From 5baf49d56c9c920703848d1fc9d4bcc5cddc65cf Mon Sep 17 00:00:00 2001 From: arshabbir <64956766+arshabbir@users.noreply.github.com> Date: Thu, 5 Sep 2024 14:49:50 +0530 Subject: [PATCH] feat(Resource Controller): deprecate alias, bindings APIs, and related schema items (#256) Signed-off-by: arshabbir --- .../v2/ResourceController.java | 44 ++++++++++++++++++- .../v2/model/ResourceInstance.java | 4 ++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceController.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceController.java index c9d854e4b7..e311ddb744 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceController.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/ResourceController.java @@ -12,7 +12,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.91.0-d9755c53-20240605-153412 + * IBM OpenAPI SDK Code Generator Version: 3.94.1-71478489-20240820-161623 */ package com.ibm.cloud.platform_services.resource_controller.v2; @@ -67,6 +67,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.logging.Logger; /** * Manage lifecycle of your Cloud resources using Resource Controller APIs. Resources are provisioned globally in an @@ -76,6 +77,7 @@ * API Version: 2.0 */ public class ResourceController extends BaseService { + private static final Logger LOGGER = Logger.getLogger(ResourceController.class.getName()); /** * Default service name used when configuring the `ResourceController` client. @@ -333,8 +335,11 @@ public ServiceCall updateResourceInstance(UpdateResourceInstan * * @param listResourceAliasesForInstanceOptions the {@link ListResourceAliasesForInstanceOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link ResourceAliasesList} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall listResourceAliasesForInstance(ListResourceAliasesForInstanceOptions listResourceAliasesForInstanceOptions) { + LOGGER.warning("A deprecated operation has been invoked: listResourceAliasesForInstance"); com.ibm.cloud.sdk.core.util.Validator.notNull(listResourceAliasesForInstanceOptions, "listResourceAliasesForInstanceOptions cannot be null"); Map pathParamsMap = new HashMap(); @@ -632,8 +637,11 @@ public ServiceCall updateResourceKey(UpdateResourceKeyOptions updat * * @param listResourceBindingsOptions the {@link ListResourceBindingsOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link ResourceBindingsList} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall listResourceBindings(ListResourceBindingsOptions listResourceBindingsOptions) { + LOGGER.warning("A deprecated operation has been invoked: listResourceBindings"); if (listResourceBindingsOptions == null) { listResourceBindingsOptions = new ListResourceBindingsOptions.Builder().build(); } @@ -681,7 +689,9 @@ public ServiceCall listResourceBindings(ListResourceBindin * View all of the resource bindings that exist for all of your resource aliases. * * @return a {@link ServiceCall} with a result of type {@link ResourceBindingsList} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall listResourceBindings() { return listResourceBindings(null); } @@ -693,8 +703,11 @@ public ServiceCall listResourceBindings() { * * @param createResourceBindingOptions the {@link CreateResourceBindingOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link ResourceBinding} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall createResourceBinding(CreateResourceBindingOptions createResourceBindingOptions) { + LOGGER.warning("A deprecated operation has been invoked: createResourceBinding"); com.ibm.cloud.sdk.core.util.Validator.notNull(createResourceBindingOptions, "createResourceBindingOptions cannot be null"); RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v2/resource_bindings")); @@ -729,8 +742,11 @@ public ServiceCall createResourceBinding(CreateResourceBindingO * * @param getResourceBindingOptions the {@link GetResourceBindingOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link ResourceBinding} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall getResourceBinding(GetResourceBindingOptions getResourceBindingOptions) { + LOGGER.warning("A deprecated operation has been invoked: getResourceBinding"); com.ibm.cloud.sdk.core.util.Validator.notNull(getResourceBindingOptions, "getResourceBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); @@ -753,8 +769,11 @@ public ServiceCall getResourceBinding(GetResourceBindingOptions * * @param deleteResourceBindingOptions the {@link DeleteResourceBindingOptions} 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 */ + @Deprecated public ServiceCall deleteResourceBinding(DeleteResourceBindingOptions deleteResourceBindingOptions) { + LOGGER.warning("A deprecated operation has been invoked: deleteResourceBinding"); com.ibm.cloud.sdk.core.util.Validator.notNull(deleteResourceBindingOptions, "deleteResourceBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); @@ -775,8 +794,11 @@ public ServiceCall deleteResourceBinding(DeleteResourceBindingOptions dele * * @param updateResourceBindingOptions the {@link UpdateResourceBindingOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link ResourceBinding} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall updateResourceBinding(UpdateResourceBindingOptions updateResourceBindingOptions) { + LOGGER.warning("A deprecated operation has been invoked: updateResourceBinding"); com.ibm.cloud.sdk.core.util.Validator.notNull(updateResourceBindingOptions, "updateResourceBindingOptions cannot be null"); Map pathParamsMap = new HashMap(); @@ -802,8 +824,11 @@ public ServiceCall updateResourceBinding(UpdateResourceBindingO * * @param listResourceAliasesOptions the {@link ListResourceAliasesOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link ResourceAliasesList} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall listResourceAliases(ListResourceAliasesOptions listResourceAliasesOptions) { + LOGGER.warning("A deprecated operation has been invoked: listResourceAliases"); if (listResourceAliasesOptions == null) { listResourceAliasesOptions = new ListResourceAliasesOptions.Builder().build(); } @@ -854,7 +879,9 @@ public ServiceCall listResourceAliases(ListResourceAliasesO * View all of the resource aliases that exist for every resource instance. * * @return a {@link ServiceCall} with a result of type {@link ResourceAliasesList} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall listResourceAliases() { return listResourceAliases(null); } @@ -866,8 +893,11 @@ public ServiceCall listResourceAliases() { * * @param createResourceAliasOptions the {@link CreateResourceAliasOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link ResourceAlias} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall createResourceAlias(CreateResourceAliasOptions createResourceAliasOptions) { + LOGGER.warning("A deprecated operation has been invoked: createResourceAlias"); com.ibm.cloud.sdk.core.util.Validator.notNull(createResourceAliasOptions, "createResourceAliasOptions cannot be null"); RequestBuilder builder = RequestBuilder.post(RequestBuilder.resolveRequestUrl(getServiceUrl(), "/v2/resource_aliases")); @@ -894,8 +924,11 @@ public ServiceCall createResourceAlias(CreateResourceAliasOptions * * @param getResourceAliasOptions the {@link GetResourceAliasOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link ResourceAlias} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall getResourceAlias(GetResourceAliasOptions getResourceAliasOptions) { + LOGGER.warning("A deprecated operation has been invoked: getResourceAlias"); com.ibm.cloud.sdk.core.util.Validator.notNull(getResourceAliasOptions, "getResourceAliasOptions cannot be null"); Map pathParamsMap = new HashMap(); @@ -919,8 +952,11 @@ public ServiceCall getResourceAlias(GetResourceAliasOptions getRe * * @param deleteResourceAliasOptions the {@link DeleteResourceAliasOptions} 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 */ + @Deprecated public ServiceCall deleteResourceAlias(DeleteResourceAliasOptions deleteResourceAliasOptions) { + LOGGER.warning("A deprecated operation has been invoked: deleteResourceAlias"); com.ibm.cloud.sdk.core.util.Validator.notNull(deleteResourceAliasOptions, "deleteResourceAliasOptions cannot be null"); Map pathParamsMap = new HashMap(); @@ -944,8 +980,11 @@ public ServiceCall deleteResourceAlias(DeleteResourceAliasOptions deleteRe * * @param updateResourceAliasOptions the {@link UpdateResourceAliasOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link ResourceAlias} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall updateResourceAlias(UpdateResourceAliasOptions updateResourceAliasOptions) { + LOGGER.warning("A deprecated operation has been invoked: updateResourceAlias"); com.ibm.cloud.sdk.core.util.Validator.notNull(updateResourceAliasOptions, "updateResourceAliasOptions cannot be null"); Map pathParamsMap = new HashMap(); @@ -971,8 +1010,11 @@ public ServiceCall updateResourceAlias(UpdateResourceAliasOptions * * @param listResourceBindingsForAliasOptions the {@link ListResourceBindingsForAliasOptions} containing the options for the call * @return a {@link ServiceCall} with a result of type {@link ResourceBindingsList} + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public ServiceCall listResourceBindingsForAlias(ListResourceBindingsForAliasOptions listResourceBindingsForAliasOptions) { + LOGGER.warning("A deprecated operation has been invoked: listResourceBindingsForAlias"); com.ibm.cloud.sdk.core.util.Validator.notNull(listResourceBindingsForAliasOptions, "listResourceBindingsForAliasOptions cannot be null"); Map pathParamsMap = new HashMap(); diff --git a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstance.java b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstance.java index c0b6dbff53..0fe65ed563 100644 --- a/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstance.java +++ b/modules/resource-controller/src/main/java/com/ibm/cloud/platform_services/resource_controller/v2/model/ResourceInstance.java @@ -468,7 +468,9 @@ public ResourceInstanceLastOperation getLastOperation() { * The relative path to the resource aliases for the instance. * * @return the resourceAliasesUrl + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public String getResourceAliasesUrl() { return resourceAliasesUrl; } @@ -479,7 +481,9 @@ public String getResourceAliasesUrl() { * The relative path to the resource bindings for the instance. * * @return the resourceBindingsUrl + * @deprecated this method is deprecated and may be removed in a future release */ + @Deprecated public String getResourceBindingsUrl() { return resourceBindingsUrl; }