@@ -6619,6 +6619,158 @@ public ApiResponse<CustomCostsFileGetResponse> getCustomCostsFileWithHttpInfo(St
66196619 new GenericType <CustomCostsFileGetResponse >() {});
66206620 }
66216621
6622+ /**
6623+ * Get a budget's custom forecast.
6624+ *
6625+ * <p>See {@link #getCustomForecastWithHttpInfo}.
6626+ *
6627+ * @param budgetId Budget id. (required)
6628+ * @return CustomForecastResponse
6629+ * @throws ApiException if fails to make API call
6630+ */
6631+ public CustomForecastResponse getCustomForecast (String budgetId ) throws ApiException {
6632+ return getCustomForecastWithHttpInfo (budgetId ).getData ();
6633+ }
6634+
6635+ /**
6636+ * Get a budget's custom forecast.
6637+ *
6638+ * <p>See {@link #getCustomForecastWithHttpInfoAsync}.
6639+ *
6640+ * @param budgetId Budget id. (required)
6641+ * @return CompletableFuture<CustomForecastResponse>
6642+ */
6643+ public CompletableFuture <CustomForecastResponse > getCustomForecastAsync (String budgetId ) {
6644+ return getCustomForecastWithHttpInfoAsync (budgetId )
6645+ .thenApply (
6646+ response -> {
6647+ return response .getData ();
6648+ });
6649+ }
6650+
6651+ /**
6652+ * Get the custom forecast for a budget.
6653+ *
6654+ * @param budgetId Budget id. (required)
6655+ * @return ApiResponse<CustomForecastResponse>
6656+ * @throws ApiException if fails to make API call
6657+ * @http.response.details
6658+ * <table border="1">
6659+ * <caption>Response details</caption>
6660+ * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
6661+ * <tr><td> 200 </td><td> OK </td><td> - </td></tr>
6662+ * <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
6663+ * <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
6664+ * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
6665+ * </table>
6666+ */
6667+ public ApiResponse <CustomForecastResponse > getCustomForecastWithHttpInfo (String budgetId )
6668+ throws ApiException {
6669+ // Check if unstable operation is enabled
6670+ String operationId = "getCustomForecast" ;
6671+ if (apiClient .isUnstableOperationEnabled ("v2." + operationId )) {
6672+ apiClient .getLogger ().warning (String .format ("Using unstable operation '%s'" , operationId ));
6673+ } else {
6674+ throw new ApiException (0 , String .format ("Unstable operation '%s' is disabled" , operationId ));
6675+ }
6676+ Object localVarPostBody = null ;
6677+
6678+ // verify the required parameter 'budgetId' is set
6679+ if (budgetId == null ) {
6680+ throw new ApiException (
6681+ 400 , "Missing the required parameter 'budgetId' when calling getCustomForecast" );
6682+ }
6683+ // create path and map variables
6684+ String localVarPath =
6685+ "/api/v2/cost/budget/{budget_id}/custom-forecast"
6686+ .replaceAll ("\\ {" + "budget_id" + "\\ }" , apiClient .escapeString (budgetId .toString ()));
6687+
6688+ Map <String , String > localVarHeaderParams = new HashMap <String , String >();
6689+
6690+ Invocation .Builder builder =
6691+ apiClient .createBuilder (
6692+ "v2.CloudCostManagementApi.getCustomForecast" ,
6693+ localVarPath ,
6694+ new ArrayList <Pair >(),
6695+ localVarHeaderParams ,
6696+ new HashMap <String , String >(),
6697+ new String [] {"application/json" },
6698+ new String [] {"apiKeyAuth" , "appKeyAuth" });
6699+ return apiClient .invokeAPI (
6700+ "GET" ,
6701+ builder ,
6702+ localVarHeaderParams ,
6703+ new String [] {},
6704+ localVarPostBody ,
6705+ new HashMap <String , Object >(),
6706+ false ,
6707+ new GenericType <CustomForecastResponse >() {});
6708+ }
6709+
6710+ /**
6711+ * Get a budget's custom forecast.
6712+ *
6713+ * <p>See {@link #getCustomForecastWithHttpInfo}.
6714+ *
6715+ * @param budgetId Budget id. (required)
6716+ * @return CompletableFuture<ApiResponse<CustomForecastResponse>>
6717+ */
6718+ public CompletableFuture <ApiResponse <CustomForecastResponse >> getCustomForecastWithHttpInfoAsync (
6719+ String budgetId ) {
6720+ // Check if unstable operation is enabled
6721+ String operationId = "getCustomForecast" ;
6722+ if (apiClient .isUnstableOperationEnabled ("v2." + operationId )) {
6723+ apiClient .getLogger ().warning (String .format ("Using unstable operation '%s'" , operationId ));
6724+ } else {
6725+ CompletableFuture <ApiResponse <CustomForecastResponse >> result = new CompletableFuture <>();
6726+ result .completeExceptionally (
6727+ new ApiException (0 , String .format ("Unstable operation '%s' is disabled" , operationId )));
6728+ return result ;
6729+ }
6730+ Object localVarPostBody = null ;
6731+
6732+ // verify the required parameter 'budgetId' is set
6733+ if (budgetId == null ) {
6734+ CompletableFuture <ApiResponse <CustomForecastResponse >> result = new CompletableFuture <>();
6735+ result .completeExceptionally (
6736+ new ApiException (
6737+ 400 , "Missing the required parameter 'budgetId' when calling getCustomForecast" ));
6738+ return result ;
6739+ }
6740+ // create path and map variables
6741+ String localVarPath =
6742+ "/api/v2/cost/budget/{budget_id}/custom-forecast"
6743+ .replaceAll ("\\ {" + "budget_id" + "\\ }" , apiClient .escapeString (budgetId .toString ()));
6744+
6745+ Map <String , String > localVarHeaderParams = new HashMap <String , String >();
6746+
6747+ Invocation .Builder builder ;
6748+ try {
6749+ builder =
6750+ apiClient .createBuilder (
6751+ "v2.CloudCostManagementApi.getCustomForecast" ,
6752+ localVarPath ,
6753+ new ArrayList <Pair >(),
6754+ localVarHeaderParams ,
6755+ new HashMap <String , String >(),
6756+ new String [] {"application/json" },
6757+ new String [] {"apiKeyAuth" , "appKeyAuth" });
6758+ } catch (ApiException ex ) {
6759+ CompletableFuture <ApiResponse <CustomForecastResponse >> result = new CompletableFuture <>();
6760+ result .completeExceptionally (ex );
6761+ return result ;
6762+ }
6763+ return apiClient .invokeAPIAsync (
6764+ "GET" ,
6765+ builder ,
6766+ localVarHeaderParams ,
6767+ new String [] {},
6768+ localVarPostBody ,
6769+ new HashMap <String , Object >(),
6770+ false ,
6771+ new GenericType <CustomForecastResponse >() {});
6772+ }
6773+
66226774 /**
66236775 * Get a tag pipeline ruleset.
66246776 *
0 commit comments