From 580f1a33dd75e93cfb1517cfb284b49df0d13267 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 24 Dec 2024 22:27:56 +0000 Subject: [PATCH] Regenerate client from commit e84e2933 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 134 +++--- .../{app-deployment => apps}/DeployApp.java | 6 +- .../{app-deployment => apps}/DisableApp.java | 6 +- .../com/datadog/api/client/ApiClient.java | 4 +- .../api/client/v2/api/AppDeploymentApi.java | 346 --------------- .../datadog/api/client/v2/api/AppsApi.java | 415 +++++++++++++++++- .../api/client/v2/model/AppBuilderError.java | 149 ------- .../v2/model/AppBuilderErrorErrorsItems.java | 166 ------- .../AppBuilderErrorErrorsItemsSource.java | 166 ------- .../client/v2/model/AppVersionSelector.java | 271 ++++++++++++ .../v2/model/AppVersionSelectorConstants.java | 59 +++ ...te_App_returns_App_Created_response.freeze | 2 +- ...eate_App_returns_App_Created_response.json | 8 +- ...te_App_returns_Bad_Request_response.freeze | 2 +- ...te_App_returns_Bad_Request_response.freeze | 2 +- ...lete_App_returns_Not_Found_response.freeze | 2 +- .../v2/Delete_App_returns_OK_response.freeze | 2 +- .../v2/Delete_App_returns_OK_response.json | 12 +- ...e_Apps_returns_Bad_Request_response.freeze | 2 +- ...ple_Apps_returns_Not_Found_response.freeze | 2 +- ...e_Multiple_Apps_returns_OK_response.freeze | 2 +- ...ete_Multiple_Apps_returns_OK_response.json | 12 +- ...oy_App_returns_Bad_Request_response.freeze | 2 +- ...Deploy_App_returns_Created_response.freeze | 2 +- .../Deploy_App_returns_Created_response.json | 14 +- ...ploy_App_returns_Not_Found_response.freeze | 2 +- ...le_App_returns_Bad_Request_response.freeze | 2 +- ...able_App_returns_Not_Found_response.freeze | 2 +- .../v2/Disable_App_returns_OK_response.freeze | 2 +- .../v2/Disable_App_returns_OK_response.json | 16 +- ...et_App_returns_Bad_Request_response.freeze | 2 +- .../Get_App_returns_Not_Found_response.freeze | 2 +- .../v2/Get_App_returns_OK_response.freeze | 2 +- .../v2/Get_App_returns_OK_response.json | 16 +- .../v2/List_Apps_returns_OK_response.freeze | 2 +- .../v2/List_Apps_returns_OK_response.json | 2 +- ...te_App_returns_Bad_Request_response.freeze | 2 +- ...date_App_returns_Bad_Request_response.json | 16 +- .../v2/Update_App_returns_OK_response.freeze | 2 +- .../v2/Update_App_returns_OK_response.json | 16 +- .../datadog/api/client/v2/api/apps.feature | 59 ++- .../com/datadog/api/client/v2/api/given.json | 2 +- .../com/datadog/api/client/v2/api/undo.json | 4 +- 44 files changed, 941 insertions(+), 1006 deletions(-) rename examples/v2/{app-deployment => apps}/DeployApp.java (80%) rename examples/v2/{app-deployment => apps}/DisableApp.java (80%) delete mode 100644 src/main/java/com/datadog/api/client/v2/api/AppDeploymentApi.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/AppBuilderError.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItems.java delete mode 100644 src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItemsSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AppVersionSelector.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/AppVersionSelectorConstants.java diff --git a/.apigentools-info b/.apigentools-info index 2d95aaae2f4..cf68db20e2d 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-19 07:26:23.728211", - "spec_repo_commit": "5dd2cbe4" + "regenerated": "2024-12-24 22:26:03.645888", + "spec_repo_commit": "e84e2933" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-19 07:26:23.743147", - "spec_repo_commit": "5dd2cbe4" + "regenerated": "2024-12-24 22:26:03.660568", + "spec_repo_commit": "e84e2933" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3480f9db3a7..00a1784a0d7 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1615,34 +1615,6 @@ components: type: string x-enum-varnames: - apm_retention_filter - AppBuilderError: - description: The definition of `AppBuilderError` object. - properties: - errors: - description: The `AppBuilderError` `errors`. - items: - $ref: '#/components/schemas/AppBuilderErrorErrorsItems' - type: array - type: object - AppBuilderErrorErrorsItems: - description: The definition of `AppBuilderErrorErrorsItems` object. - properties: - detail: - description: The `items` `detail`. - type: string - source: - $ref: '#/components/schemas/AppBuilderErrorErrorsItemsSource' - type: object - AppBuilderErrorErrorsItemsSource: - description: The definition of `AppBuilderErrorErrorsItemsSource` object. - properties: - parameter: - description: The `source` `parameter`. - type: string - pointer: - description: The `source` `pointer`. - type: string - type: object AppBuilderEvent: additionalProperties: {} description: The definition of `AppBuilderEvent` object. @@ -1735,6 +1707,21 @@ components: format: int64 type: integer type: object + AppVersionSelector: + description: The version selector parameter used in endpoints such as Get App + oneOf: + - $ref: '#/components/schemas/AppVersionSelectorConstants' + - format: int64 + type: integer + AppVersionSelectorConstants: + description: Constants that always selects a particular version of an app + enum: + - latest + - deployed + type: string + x-enum-varnames: + - LATEST + - DEPLOYED ApplicationKeyCreateAttributes: description: Attributes used to create an application Key. properties: @@ -30153,19 +30140,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Forbidden, e.g. missing permissions to delete one or more apps + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30196,19 +30183,19 @@ paths: schema: format: int64 type: integer - - description: The `AppsFilter` `user_name`. + - description: Filter apps by the app creator. Usually the user's email in: query name: filter[user_name] required: false schema: type: string - - description: The `AppsFilter` `user_uuid`. + - description: Filter apps by the app creator's UUID in: query name: filter[user_uuid] required: false schema: type: string - - description: The `AppsFilter` `name`. + - description: Filter by app name in: query name: filter[name] required: false @@ -30220,25 +30207,32 @@ paths: required: false schema: type: string - - description: The `AppsFilter` `deployed`. + - description: Filter apps by whether they are published in: query name: filter[deployed] required: false schema: type: boolean - - description: The `AppsFilter` `tags`. + - description: Filter apps by tags in: query name: filter[tags] required: false schema: type: string - - description: The `AppsFilter` `favorite`. + - description: Filter apps by whether you have added them to your favorites in: query name: filter[favorite] required: false schema: type: boolean - - explode: false + - description: Filter apps by whether they are enabled for self-service + in: query + name: filter[self_service] + required: false + schema: + type: boolean + - description: The fields and direction to sort apps by + explode: false in: query name: sort required: false @@ -30258,13 +30252,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Bad Request, e.g. invalid sort parameter + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30297,15 +30291,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Forbidden, e.g. missing required permissions to a connection - or workflow used in the app + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Create App @@ -30340,25 +30333,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '410': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Gone '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30380,6 +30373,11 @@ paths: required: true schema: type: string + - in: query + name: version + required: false + schema: + $ref: '#/components/schemas/AppVersionSelector' responses: '200': content: @@ -30391,19 +30389,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30443,15 +30441,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Forbidden, e.g. missing required permissions to a connection - or workflow used in the app + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Update App @@ -30486,25 +30483,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Disable App tags: - - App Deployment + - Apps x-permission: operator: OR permissions: @@ -30531,25 +30528,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Deploy App tags: - - App Deployment + - Apps x-permission: operator: OR permissions: @@ -46584,9 +46581,10 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection name: AWS Logs Integration -- description: Deploy and disable apps in App Builder. - name: App Deployment -- description: Create, read, update, and delete apps in App Builder. +- description: Datadog App Builder provides a low-code solution to rapidly develop + and integrate secure, customized applications into your monitoring stack that + are built to accelerate remediation at scale. These API endpoints allow you to + create, read, update, delete, and publish apps. name: Apps - description: Search your Audit Logs events over HTTP. name: Audit diff --git a/examples/v2/app-deployment/DeployApp.java b/examples/v2/apps/DeployApp.java similarity index 80% rename from examples/v2/app-deployment/DeployApp.java rename to examples/v2/apps/DeployApp.java index 4fc374e497e..44983e6577b 100644 --- a/examples/v2/app-deployment/DeployApp.java +++ b/examples/v2/apps/DeployApp.java @@ -2,14 +2,14 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.AppDeploymentApi; +import com.datadog.api.client.v2.api.AppsApi; import com.datadog.api.client.v2.model.DeployAppResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); defaultClient.setUnstableOperationEnabled("v2.deployApp", true); - AppDeploymentApi apiInstance = new AppDeploymentApi(defaultClient); + AppsApi apiInstance = new AppsApi(defaultClient); // there is a valid "app" in the system String APP_DATA_ID = System.getenv("APP_DATA_ID"); @@ -18,7 +18,7 @@ public static void main(String[] args) { DeployAppResponse result = apiInstance.deployApp(APP_DATA_ID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppDeploymentApi#deployApp"); + System.err.println("Exception when calling AppsApi#deployApp"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/app-deployment/DisableApp.java b/examples/v2/apps/DisableApp.java similarity index 80% rename from examples/v2/app-deployment/DisableApp.java rename to examples/v2/apps/DisableApp.java index 3e84d7f9858..d3fb4a34ee2 100644 --- a/examples/v2/app-deployment/DisableApp.java +++ b/examples/v2/apps/DisableApp.java @@ -2,14 +2,14 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.AppDeploymentApi; +import com.datadog.api.client.v2.api.AppsApi; import com.datadog.api.client.v2.model.DisableAppResponse; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); defaultClient.setUnstableOperationEnabled("v2.disableApp", true); - AppDeploymentApi apiInstance = new AppDeploymentApi(defaultClient); + AppsApi apiInstance = new AppsApi(defaultClient); // there is a valid "app" in the system String APP_DATA_ID = System.getenv("APP_DATA_ID"); @@ -18,7 +18,7 @@ public static void main(String[] args) { DisableAppResponse result = apiInstance.disableApp(APP_DATA_ID); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AppDeploymentApi#disableApp"); + System.err.println("Exception when calling AppsApi#disableApp"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 353c2a33f42..2e730a17a11 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -375,11 +375,11 @@ public class ApiClient { put("v2.createApp", false); put("v2.deleteApp", false); put("v2.deleteApps", false); + put("v2.deployApp", false); + put("v2.disableApp", false); put("v2.getApp", false); put("v2.listApps", false); put("v2.updateApp", false); - put("v2.deployApp", false); - put("v2.disableApp", false); put("v2.getActiveBillingDimensions", false); put("v2.getBillingDimensionMapping", false); put("v2.getMonthlyCostAttribution", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/AppDeploymentApi.java b/src/main/java/com/datadog/api/client/v2/api/AppDeploymentApi.java deleted file mode 100644 index 5b1a358dc67..00000000000 --- a/src/main/java/com/datadog/api/client/v2/api/AppDeploymentApi.java +++ /dev/null @@ -1,346 +0,0 @@ -package com.datadog.api.client.v2.api; - -import com.datadog.api.client.ApiClient; -import com.datadog.api.client.ApiException; -import com.datadog.api.client.ApiResponse; -import com.datadog.api.client.Pair; -import com.datadog.api.client.v2.model.DeployAppResponse; -import com.datadog.api.client.v2.model.DisableAppResponse; -import jakarta.ws.rs.client.Invocation; -import jakarta.ws.rs.core.GenericType; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class AppDeploymentApi { - private ApiClient apiClient; - - public AppDeploymentApi() { - this(ApiClient.getDefaultApiClient()); - } - - public AppDeploymentApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Get the API client. - * - * @return API client - */ - public ApiClient getApiClient() { - return apiClient; - } - - /** - * Set the API client. - * - * @param apiClient an instance of API client - */ - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Deploy App. - * - *

See {@link #deployAppWithHttpInfo}. - * - * @param appId (required) - * @return DeployAppResponse - * @throws ApiException if fails to make API call - */ - public DeployAppResponse deployApp(String appId) throws ApiException { - return deployAppWithHttpInfo(appId).getData(); - } - - /** - * Deploy App. - * - *

See {@link #deployAppWithHttpInfoAsync}. - * - * @param appId (required) - * @return CompletableFuture<DeployAppResponse> - */ - public CompletableFuture deployAppAsync(String appId) { - return deployAppWithHttpInfoAsync(appId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Deploy (publish) an app by ID - * - * @param appId (required) - * @return ApiResponse<DeployAppResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
- */ - public ApiResponse deployAppWithHttpInfo(String appId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "deployApp"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; - - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException(400, "Missing the required parameter 'appId' when calling deployApp"); - } - // create path and map variables - String localVarPath = - "/api/v2/app-builder/apps/{app_id}/deployment" - .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.AppDeploymentApi.deployApp", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "POST", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Deploy App. - * - *

See {@link #deployAppWithHttpInfo}. - * - * @param appId (required) - * @return CompletableFuture<ApiResponse<DeployAppResponse>> - */ - public CompletableFuture> deployAppWithHttpInfoAsync( - String appId) { - // Check if unstable operation is enabled - String operationId = "deployApp"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; - - // verify the required parameter 'appId' is set - if (appId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'appId' when calling deployApp")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/app-builder/apps/{app_id}/deployment" - .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.AppDeploymentApi.deployApp", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "POST", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Disable App. - * - *

See {@link #disableAppWithHttpInfo}. - * - * @param appId (required) - * @return DisableAppResponse - * @throws ApiException if fails to make API call - */ - public DisableAppResponse disableApp(String appId) throws ApiException { - return disableAppWithHttpInfo(appId).getData(); - } - - /** - * Disable App. - * - *

See {@link #disableAppWithHttpInfoAsync}. - * - * @param appId (required) - * @return CompletableFuture<DisableAppResponse> - */ - public CompletableFuture disableAppAsync(String appId) { - return disableAppWithHttpInfoAsync(appId) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * Disable an app by ID - * - * @param appId (required) - * @return ApiResponse<DisableAppResponse> - * @throws ApiException if fails to make API call - * @http.response.details - * - * - * - * - * - * - * - * - *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
- */ - public ApiResponse disableAppWithHttpInfo(String appId) throws ApiException { - // Check if unstable operation is enabled - String operationId = "disableApp"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); - } - Object localVarPostBody = null; - - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException(400, "Missing the required parameter 'appId' when calling disableApp"); - } - // create path and map variables - String localVarPath = - "/api/v2/app-builder/apps/{app_id}/deployment" - .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder = - apiClient.createBuilder( - "v2.AppDeploymentApi.disableApp", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - return apiClient.invokeAPI( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - - /** - * Disable App. - * - *

See {@link #disableAppWithHttpInfo}. - * - * @param appId (required) - * @return CompletableFuture<ApiResponse<DisableAppResponse>> - */ - public CompletableFuture> disableAppWithHttpInfoAsync( - String appId) { - // Check if unstable operation is enabled - String operationId = "disableApp"; - if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { - apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); - return result; - } - Object localVarPostBody = null; - - // verify the required parameter 'appId' is set - if (appId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException(400, "Missing the required parameter 'appId' when calling disableApp")); - return result; - } - // create path and map variables - String localVarPath = - "/api/v2/app-builder/apps/{app_id}/deployment" - .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); - - Map localVarHeaderParams = new HashMap(); - - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.AppDeploymentApi.disableApp", - localVarPath, - new ArrayList(), - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; - } - return apiClient.invokeAPIAsync( - "DELETE", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/api/AppsApi.java b/src/main/java/com/datadog/api/client/v2/api/AppsApi.java index 66254d5a9d9..6d5214f3884 100644 --- a/src/main/java/com/datadog/api/client/v2/api/AppsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/AppsApi.java @@ -10,6 +10,8 @@ import com.datadog.api.client.v2.model.DeleteAppResponse; import com.datadog.api.client.v2.model.DeleteAppsRequest; import com.datadog.api.client.v2.model.DeleteAppsResponse; +import com.datadog.api.client.v2.model.DeployAppResponse; +import com.datadog.api.client.v2.model.DisableAppResponse; import com.datadog.api.client.v2.model.GetAppResponse; import com.datadog.api.client.v2.model.ListAppsResponse; import com.datadog.api.client.v2.model.UpdateAppRequest; @@ -94,7 +96,7 @@ public CompletableFuture createAppAsync(CreateAppRequest body * Status Code Description Response Headers * 201 App Created - * 400 Bad Request - - * 403 Forbidden, e.g. missing required permissions to a connection or workflow used in the app - + * 403 Forbidden - * 429 Too many requests - * */ @@ -391,7 +393,7 @@ public CompletableFuture deleteAppsAsync(DeleteAppsRequest b * Status Code Description Response Headers * 200 OK - * 400 Bad Request - - * 403 Forbidden, e.g. missing permissions to delete one or more apps - + * 403 Forbidden - * 404 Not Found - * 429 Too many requests - * @@ -497,6 +499,322 @@ public CompletableFuture> deleteAppsWithHttpInfo new GenericType() {}); } + /** + * Deploy App. + * + *

See {@link #deployAppWithHttpInfo}. + * + * @param appId (required) + * @return DeployAppResponse + * @throws ApiException if fails to make API call + */ + public DeployAppResponse deployApp(String appId) throws ApiException { + return deployAppWithHttpInfo(appId).getData(); + } + + /** + * Deploy App. + * + *

See {@link #deployAppWithHttpInfoAsync}. + * + * @param appId (required) + * @return CompletableFuture<DeployAppResponse> + */ + public CompletableFuture deployAppAsync(String appId) { + return deployAppWithHttpInfoAsync(appId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Deploy (publish) an app by ID + * + * @param appId (required) + * @return ApiResponse<DeployAppResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deployAppWithHttpInfo(String appId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "deployApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException(400, "Missing the required parameter 'appId' when calling deployApp"); + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}/deployment" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppsApi.deployApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Deploy App. + * + *

See {@link #deployAppWithHttpInfo}. + * + * @param appId (required) + * @return CompletableFuture<ApiResponse<DeployAppResponse>> + */ + public CompletableFuture> deployAppWithHttpInfoAsync( + String appId) { + // Check if unstable operation is enabled + String operationId = "deployApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'appId' when calling deployApp")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}/deployment" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppsApi.deployApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Disable App. + * + *

See {@link #disableAppWithHttpInfo}. + * + * @param appId (required) + * @return DisableAppResponse + * @throws ApiException if fails to make API call + */ + public DisableAppResponse disableApp(String appId) throws ApiException { + return disableAppWithHttpInfo(appId).getData(); + } + + /** + * Disable App. + * + *

See {@link #disableAppWithHttpInfoAsync}. + * + * @param appId (required) + * @return CompletableFuture<DisableAppResponse> + */ + public CompletableFuture disableAppAsync(String appId) { + return disableAppWithHttpInfoAsync(appId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Disable an app by ID + * + * @param appId (required) + * @return ApiResponse<DisableAppResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse disableAppWithHttpInfo(String appId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "disableApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException(400, "Missing the required parameter 'appId' when calling disableApp"); + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}/deployment" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.AppsApi.disableApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Disable App. + * + *

See {@link #disableAppWithHttpInfo}. + * + * @param appId (required) + * @return CompletableFuture<ApiResponse<DisableAppResponse>> + */ + public CompletableFuture> disableAppWithHttpInfoAsync( + String appId) { + // Check if unstable operation is enabled + String operationId = "disableApp"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(400, "Missing the required parameter 'appId' when calling disableApp")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/app-builder/apps/{app_id}/deployment" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.AppsApi.disableApp", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to getApp. */ + public static class GetAppOptionalParameters { + private AppVersionSelector version; + + /** + * Set version. + * + * @param version (optional) + * @return GetAppOptionalParameters + */ + public GetAppOptionalParameters version(AppVersionSelector version) { + this.version = version; + return this; + } + } + /** * Get App. * @@ -507,7 +825,7 @@ public CompletableFuture> deleteAppsWithHttpInfo * @throws ApiException if fails to make API call */ public GetAppResponse getApp(String appId) throws ApiException { - return getAppWithHttpInfo(appId).getData(); + return getAppWithHttpInfo(appId, new GetAppOptionalParameters()).getData(); } /** @@ -519,7 +837,40 @@ public GetAppResponse getApp(String appId) throws ApiException { * @return CompletableFuture<GetAppResponse> */ public CompletableFuture getAppAsync(String appId) { - return getAppWithHttpInfoAsync(appId) + return getAppWithHttpInfoAsync(appId, new GetAppOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get App. + * + *

See {@link #getAppWithHttpInfo}. + * + * @param appId (required) + * @param parameters Optional parameters for the request. + * @return GetAppResponse + * @throws ApiException if fails to make API call + */ + public GetAppResponse getApp(String appId, GetAppOptionalParameters parameters) + throws ApiException { + return getAppWithHttpInfo(appId, parameters).getData(); + } + + /** + * Get App. + * + *

See {@link #getAppWithHttpInfoAsync}. + * + * @param appId (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<GetAppResponse> + */ + public CompletableFuture getAppAsync( + String appId, GetAppOptionalParameters parameters) { + return getAppWithHttpInfoAsync(appId, parameters) .thenApply( response -> { return response.getData(); @@ -530,6 +881,7 @@ public CompletableFuture getAppAsync(String appId) { * Get the full definition of an app by ID * * @param appId (required) + * @param parameters Optional parameters for the request. * @return ApiResponse<GetAppResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -543,7 +895,8 @@ public CompletableFuture getAppAsync(String appId) { * 429 Too many requests - * */ - public ApiResponse getAppWithHttpInfo(String appId) throws ApiException { + public ApiResponse getAppWithHttpInfo( + String appId, GetAppOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled String operationId = "getApp"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -557,18 +910,22 @@ public ApiResponse getAppWithHttpInfo(String appId) throws ApiEx if (appId == null) { throw new ApiException(400, "Missing the required parameter 'appId' when calling getApp"); } + AppVersionSelector version = parameters.version; // create path and map variables String localVarPath = "/api/v2/app-builder/apps/{app_id}" .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "version", version)); + Invocation.Builder builder = apiClient.createBuilder( "v2.AppsApi.getApp", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -590,9 +947,11 @@ public ApiResponse getAppWithHttpInfo(String appId) throws ApiEx *

See {@link #getAppWithHttpInfo}. * * @param appId (required) + * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<GetAppResponse>> */ - public CompletableFuture> getAppWithHttpInfoAsync(String appId) { + public CompletableFuture> getAppWithHttpInfoAsync( + String appId, GetAppOptionalParameters parameters) { // Check if unstable operation is enabled String operationId = "getApp"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { @@ -612,20 +971,24 @@ public CompletableFuture> getAppWithHttpInfoAsync(St new ApiException(400, "Missing the required parameter 'appId' when calling getApp")); return result; } + AppVersionSelector version = parameters.version; // create path and map variables String localVarPath = "/api/v2/app-builder/apps/{app_id}" .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "version", version)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( "v2.AppsApi.getApp", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -657,6 +1020,7 @@ public static class ListAppsOptionalParameters { private Boolean filterDeployed; private String filterTags; private Boolean filterFavorite; + private Boolean filterSelfService; private List sort; /** @@ -684,7 +1048,7 @@ public ListAppsOptionalParameters page(Long page) { /** * Set filterUserName. * - * @param filterUserName The AppsFilter user_name. (optional) + * @param filterUserName Filter apps by the app creator. Usually the user's email (optional) * @return ListAppsOptionalParameters */ public ListAppsOptionalParameters filterUserName(String filterUserName) { @@ -695,7 +1059,7 @@ public ListAppsOptionalParameters filterUserName(String filterUserName) { /** * Set filterUserUuid. * - * @param filterUserUuid The AppsFilter user_uuid. (optional) + * @param filterUserUuid Filter apps by the app creator's UUID (optional) * @return ListAppsOptionalParameters */ public ListAppsOptionalParameters filterUserUuid(String filterUserUuid) { @@ -706,7 +1070,7 @@ public ListAppsOptionalParameters filterUserUuid(String filterUserUuid) { /** * Set filterName. * - * @param filterName The AppsFilter name. (optional) + * @param filterName Filter by app name (optional) * @return ListAppsOptionalParameters */ public ListAppsOptionalParameters filterName(String filterName) { @@ -728,7 +1092,7 @@ public ListAppsOptionalParameters filterQuery(String filterQuery) { /** * Set filterDeployed. * - * @param filterDeployed The AppsFilter deployed. (optional) + * @param filterDeployed Filter apps by whether they are published (optional) * @return ListAppsOptionalParameters */ public ListAppsOptionalParameters filterDeployed(Boolean filterDeployed) { @@ -739,7 +1103,7 @@ public ListAppsOptionalParameters filterDeployed(Boolean filterDeployed) { /** * Set filterTags. * - * @param filterTags The AppsFilter tags. (optional) + * @param filterTags Filter apps by tags (optional) * @return ListAppsOptionalParameters */ public ListAppsOptionalParameters filterTags(String filterTags) { @@ -750,7 +1114,7 @@ public ListAppsOptionalParameters filterTags(String filterTags) { /** * Set filterFavorite. * - * @param filterFavorite The AppsFilter favorite. (optional) + * @param filterFavorite Filter apps by whether you have added them to your favorites (optional) * @return ListAppsOptionalParameters */ public ListAppsOptionalParameters filterFavorite(Boolean filterFavorite) { @@ -758,10 +1122,21 @@ public ListAppsOptionalParameters filterFavorite(Boolean filterFavorite) { return this; } + /** + * Set filterSelfService. + * + * @param filterSelfService Filter apps by whether they are enabled for self-service (optional) + * @return ListAppsOptionalParameters + */ + public ListAppsOptionalParameters filterSelfService(Boolean filterSelfService) { + this.filterSelfService = filterSelfService; + return this; + } + /** * Set sort. * - * @param sort (optional) + * @param sort The fields and direction to sort apps by (optional) * @return ListAppsOptionalParameters */ public ListAppsOptionalParameters sort(List sort) { @@ -837,7 +1212,7 @@ public CompletableFuture listAppsAsync(ListAppsOptionalParamet * Response details * Status Code Description Response Headers * 200 OK - - * 400 Bad Request, e.g. invalid sort parameter - + * 400 Bad Request - * 403 Forbidden - * 429 Too many requests - * @@ -861,6 +1236,7 @@ public ApiResponse listAppsWithHttpInfo(ListAppsOptionalParame Boolean filterDeployed = parameters.filterDeployed; String filterTags = parameters.filterTags; Boolean filterFavorite = parameters.filterFavorite; + Boolean filterSelfService = parameters.filterSelfService; List sort = parameters.sort; // create path and map variables String localVarPath = "/api/v2/app-builder/apps"; @@ -877,6 +1253,8 @@ public ApiResponse listAppsWithHttpInfo(ListAppsOptionalParame localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[deployed]", filterDeployed)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[favorite]", filterFavorite)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[self_service]", filterSelfService)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "sort", sort)); Invocation.Builder builder = @@ -929,6 +1307,7 @@ public CompletableFuture> listAppsWithHttpInfoAsyn Boolean filterDeployed = parameters.filterDeployed; String filterTags = parameters.filterTags; Boolean filterFavorite = parameters.filterFavorite; + Boolean filterSelfService = parameters.filterSelfService; List sort = parameters.sort; // create path and map variables String localVarPath = "/api/v2/app-builder/apps"; @@ -945,6 +1324,8 @@ public CompletableFuture> listAppsWithHttpInfoAsyn localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[deployed]", filterDeployed)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[favorite]", filterFavorite)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[self_service]", filterSelfService)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "sort", sort)); Invocation.Builder builder; @@ -1018,7 +1399,7 @@ public CompletableFuture updateAppAsync(String appId, UpdateA * Status Code Description Response Headers * 200 OK - * 400 Bad Request - - * 403 Forbidden, e.g. missing required permissions to a connection or workflow used in the app - + * 403 Forbidden - * 429 Too many requests - * */ diff --git a/src/main/java/com/datadog/api/client/v2/model/AppBuilderError.java b/src/main/java/com/datadog/api/client/v2/model/AppBuilderError.java deleted file mode 100644 index 25d780d1bd1..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/AppBuilderError.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -/** The definition of AppBuilderError object. */ -@JsonPropertyOrder({AppBuilderError.JSON_PROPERTY_ERRORS}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class AppBuilderError { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ERRORS = "errors"; - private List errors = null; - - public AppBuilderError errors(List errors) { - this.errors = errors; - for (AppBuilderErrorErrorsItems item : errors) { - this.unparsed |= item.unparsed; - } - return this; - } - - public AppBuilderError addErrorsItem(AppBuilderErrorErrorsItems errorsItem) { - if (this.errors == null) { - this.errors = new ArrayList<>(); - } - this.errors.add(errorsItem); - this.unparsed |= errorsItem.unparsed; - return this; - } - - /** - * The AppBuilderError errors. - * - * @return errors - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ERRORS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getErrors() { - return errors; - } - - public void setErrors(List errors) { - this.errors = errors; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return AppBuilderError - */ - @JsonAnySetter - public AppBuilderError putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this AppBuilderError object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AppBuilderError appBuilderError = (AppBuilderError) o; - return Objects.equals(this.errors, appBuilderError.errors) - && Objects.equals(this.additionalProperties, appBuilderError.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(errors, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AppBuilderError {\n"); - sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItems.java b/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItems.java deleted file mode 100644 index 12b4902a353..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItems.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** The definition of AppBuilderErrorErrorsItems object. */ -@JsonPropertyOrder({ - AppBuilderErrorErrorsItems.JSON_PROPERTY_DETAIL, - AppBuilderErrorErrorsItems.JSON_PROPERTY_SOURCE -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class AppBuilderErrorErrorsItems { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_DETAIL = "detail"; - private String detail; - - public static final String JSON_PROPERTY_SOURCE = "source"; - private AppBuilderErrorErrorsItemsSource source; - - public AppBuilderErrorErrorsItems detail(String detail) { - this.detail = detail; - return this; - } - - /** - * The items detail. - * - * @return detail - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DETAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getDetail() { - return detail; - } - - public void setDetail(String detail) { - this.detail = detail; - } - - public AppBuilderErrorErrorsItems source(AppBuilderErrorErrorsItemsSource source) { - this.source = source; - this.unparsed |= source.unparsed; - return this; - } - - /** - * The definition of AppBuilderErrorErrorsItemsSource object. - * - * @return source - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public AppBuilderErrorErrorsItemsSource getSource() { - return source; - } - - public void setSource(AppBuilderErrorErrorsItemsSource source) { - this.source = source; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return AppBuilderErrorErrorsItems - */ - @JsonAnySetter - public AppBuilderErrorErrorsItems putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this AppBuilderErrorErrorsItems object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AppBuilderErrorErrorsItems appBuilderErrorErrorsItems = (AppBuilderErrorErrorsItems) o; - return Objects.equals(this.detail, appBuilderErrorErrorsItems.detail) - && Objects.equals(this.source, appBuilderErrorErrorsItems.source) - && Objects.equals( - this.additionalProperties, appBuilderErrorErrorsItems.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(detail, source, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AppBuilderErrorErrorsItems {\n"); - sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); - sb.append(" source: ").append(toIndentedString(source)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItemsSource.java b/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItemsSource.java deleted file mode 100644 index 67ab1bab029..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/AppBuilderErrorErrorsItemsSource.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - * This product includes software developed at Datadog (https://www.datadoghq.com/). - * Copyright 2019-Present Datadog, Inc. - */ - -package com.datadog.api.client.v2.model; - -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; - -/** The definition of AppBuilderErrorErrorsItemsSource object. */ -@JsonPropertyOrder({ - AppBuilderErrorErrorsItemsSource.JSON_PROPERTY_PARAMETER, - AppBuilderErrorErrorsItemsSource.JSON_PROPERTY_POINTER -}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class AppBuilderErrorErrorsItemsSource { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_PARAMETER = "parameter"; - private String parameter; - - public static final String JSON_PROPERTY_POINTER = "pointer"; - private String pointer; - - public AppBuilderErrorErrorsItemsSource parameter(String parameter) { - this.parameter = parameter; - return this; - } - - /** - * The source parameter. - * - * @return parameter - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PARAMETER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getParameter() { - return parameter; - } - - public void setParameter(String parameter) { - this.parameter = parameter; - } - - public AppBuilderErrorErrorsItemsSource pointer(String pointer) { - this.pointer = pointer; - return this; - } - - /** - * The source pointer. - * - * @return pointer - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_POINTER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getPointer() { - return pointer; - } - - public void setPointer(String pointer) { - this.pointer = pointer; - } - - /** - * A container for additional, undeclared properties. This is a holder for any undeclared - * properties as specified with the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. If the property - * does not already exist, create it otherwise replace it. - * - * @param key The arbitrary key to set - * @param value The associated value - * @return AppBuilderErrorErrorsItemsSource - */ - @JsonAnySetter - public AppBuilderErrorErrorsItemsSource putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key The arbitrary key to get - * @return The specific additional property for the given key - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - /** Return true if this AppBuilderErrorErrorsItemsSource object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AppBuilderErrorErrorsItemsSource appBuilderErrorErrorsItemsSource = - (AppBuilderErrorErrorsItemsSource) o; - return Objects.equals(this.parameter, appBuilderErrorErrorsItemsSource.parameter) - && Objects.equals(this.pointer, appBuilderErrorErrorsItemsSource.pointer) - && Objects.equals( - this.additionalProperties, appBuilderErrorErrorsItemsSource.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(parameter, pointer, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AppBuilderErrorErrorsItemsSource {\n"); - sb.append(" parameter: ").append(toIndentedString(parameter)).append("\n"); - sb.append(" pointer: ").append(toIndentedString(pointer)).append("\n"); - sb.append(" additionalProperties: ") - .append(toIndentedString(additionalProperties)) - .append("\n"); - sb.append('}'); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppVersionSelector.java b/src/main/java/com/datadog/api/client/v2/model/AppVersionSelector.java new file mode 100644 index 00000000000..bd3caf626dd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppVersionSelector.java @@ -0,0 +1,271 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = AppVersionSelector.AppVersionSelectorDeserializer.class) +@JsonSerialize(using = AppVersionSelector.AppVersionSelectorSerializer.class) +public class AppVersionSelector extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(AppVersionSelector.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class AppVersionSelectorSerializer extends StdSerializer { + public AppVersionSelectorSerializer(Class t) { + super(t); + } + + public AppVersionSelectorSerializer() { + this(null); + } + + @Override + public void serialize(AppVersionSelector value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class AppVersionSelectorDeserializer extends StdDeserializer { + public AppVersionSelectorDeserializer() { + this(AppVersionSelector.class); + } + + public AppVersionSelectorDeserializer(Class vc) { + super(vc); + } + + @Override + public AppVersionSelector deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize AppVersionSelectorConstants + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (AppVersionSelectorConstants.class.equals(Integer.class) + || AppVersionSelectorConstants.class.equals(Long.class) + || AppVersionSelectorConstants.class.equals(Float.class) + || AppVersionSelectorConstants.class.equals(Double.class) + || AppVersionSelectorConstants.class.equals(Boolean.class) + || AppVersionSelectorConstants.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((AppVersionSelectorConstants.class.equals(Integer.class) + || AppVersionSelectorConstants.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((AppVersionSelectorConstants.class.equals(Float.class) + || AppVersionSelectorConstants.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (AppVersionSelectorConstants.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (AppVersionSelectorConstants.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(AppVersionSelectorConstants.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((AppVersionSelectorConstants) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'AppVersionSelectorConstants'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'AppVersionSelectorConstants'", e); + } + + // deserialize Long + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (Long.class.equals(Integer.class) + || Long.class.equals(Long.class) + || Long.class.equals(Float.class) + || Long.class.equals(Double.class) + || Long.class.equals(Boolean.class) + || Long.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((Long.class.equals(Integer.class) || Long.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((Long.class.equals(Float.class) || Long.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (Long.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= (Long.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(Long.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'Long'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'Long'", e); + } + + AppVersionSelector ret = new AppVersionSelector(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public AppVersionSelector getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "AppVersionSelector cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public AppVersionSelector() { + super("oneOf", Boolean.FALSE); + } + + public AppVersionSelector(AppVersionSelectorConstants o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public AppVersionSelector(Long o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("AppVersionSelectorConstants", new GenericType() {}); + schemas.put("Long", new GenericType() {}); + JSON.registerDescendants(AppVersionSelector.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return AppVersionSelector.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: AppVersionSelectorConstants, Long + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(AppVersionSelectorConstants.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(Long.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be AppVersionSelectorConstants, Long"); + } + + /** + * Get the actual instance, which can be the following: AppVersionSelectorConstants, Long + * + * @return The actual instance (AppVersionSelectorConstants, Long) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `AppVersionSelectorConstants`. If the actual instance is not + * `AppVersionSelectorConstants`, the ClassCastException will be thrown. + * + * @return The actual instance of `AppVersionSelectorConstants` + * @throws ClassCastException if the instance is not `AppVersionSelectorConstants` + */ + public AppVersionSelectorConstants getAppVersionSelectorConstants() throws ClassCastException { + return (AppVersionSelectorConstants) super.getActualInstance(); + } + + /** + * Get the actual instance of `Long`. If the actual instance is not `Long`, the ClassCastException + * will be thrown. + * + * @return The actual instance of `Long` + * @throws ClassCastException if the instance is not `Long` + */ + public Long getLong() throws ClassCastException { + return (Long) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/AppVersionSelectorConstants.java b/src/main/java/com/datadog/api/client/v2/model/AppVersionSelectorConstants.java new file mode 100644 index 00000000000..3a7ff8fbaf6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/AppVersionSelectorConstants.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Constants that always selects a particular version of an app */ +@JsonSerialize(using = AppVersionSelectorConstants.AppVersionSelectorConstantsSerializer.class) +public class AppVersionSelectorConstants extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("latest", "deployed")); + + public static final AppVersionSelectorConstants LATEST = + new AppVersionSelectorConstants("latest"); + public static final AppVersionSelectorConstants DEPLOYED = + new AppVersionSelectorConstants("deployed"); + + AppVersionSelectorConstants(String value) { + super(value, allowedValues); + } + + public static class AppVersionSelectorConstantsSerializer + extends StdSerializer { + public AppVersionSelectorConstantsSerializer(Class t) { + super(t); + } + + public AppVersionSelectorConstantsSerializer() { + this(null); + } + + @Override + public void serialize( + AppVersionSelectorConstants value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static AppVersionSelectorConstants fromValue(String value) { + return new AppVersionSelectorConstants(value); + } +} diff --git a/src/test/resources/cassettes/features/v2/Create_App_returns_App_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_App_returns_App_Created_response.freeze index 6dfadcf607a..a188f565172 100644 --- a/src/test/resources/cassettes/features/v2/Create_App_returns_App_Created_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_App_returns_App_Created_response.freeze @@ -1 +1 @@ -2024-12-12T20:29:24.182Z \ No newline at end of file +2024-12-20T20:39:18.375Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_App_returns_App_Created_response.json b/src/test/resources/cassettes/features/v2/Create_App_returns_App_Created_response.json index e9eaaa6b7f0..5b441416e7a 100644 --- a/src/test/resources/cassettes/features/v2/Create_App_returns_App_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Create_App_returns_App_Created_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"2d9dd18e-c574-454c-8d43-3045b731d6a2\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"02c52f8c-78d9-4c14-ac27-b0bcac36ce74\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,12 +33,12 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/app-builder/apps/2d9dd18e-c574-454c-8d43-3045b731d6a2", + "path": "/api/v2/app-builder/apps/02c52f8c-78d9-4c14-ac27-b0bcac36ce74", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"2d9dd18e-c574-454c-8d43-3045b731d6a2\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"02c52f8c-78d9-4c14-ac27-b0bcac36ce74\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "1d96f31b-6242-7d87-11a6-166228a63510" + "id": "faf53efb-5573-c7ab-23e2-f60966d9bbd3" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_App_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_App_returns_Bad_Request_response.freeze index 5912dc34412..6bab6b51774 100644 --- a/src/test/resources/cassettes/features/v2/Create_App_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_App_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:10.031Z \ No newline at end of file +2024-12-20T20:39:18.779Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_App_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Delete_App_returns_Bad_Request_response.freeze index 3925b1b25d4..f2fcc286e7e 100644 --- a/src/test/resources/cassettes/features/v2/Delete_App_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_App_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:10.128Z \ No newline at end of file +2024-12-20T20:39:18.880Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_App_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_App_returns_Not_Found_response.freeze index cfa34bd9baf..fb9dd880bf6 100644 --- a/src/test/resources/cassettes/features/v2/Delete_App_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_App_returns_Not_Found_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:10.225Z \ No newline at end of file +2024-12-20T20:39:18.985Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.freeze index 81a74305aec..744eafd5016 100644 --- a/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-12T20:29:24.659Z \ No newline at end of file +2024-12-20T20:39:19.083Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json index fc0ffea7c7b..e3cb9ef2d6d 100644 --- a/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"5cb67134-d7bd-4320-9cda-d79ec98cff4c\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"500bf715-77a5-4c1d-b4ef-0d181b071daf\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,12 +33,12 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/app-builder/apps/5cb67134-d7bd-4320-9cda-d79ec98cff4c", + "path": "/api/v2/app-builder/apps/500bf715-77a5-4c1d-b4ef-0d181b071daf", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"5cb67134-d7bd-4320-9cda-d79ec98cff4c\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"500bf715-77a5-4c1d-b4ef-0d181b071daf\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "9c1dd179-d692-3416-28cd-f128df58ebe7" + "id": "cdb2b576-1451-1182-5179-176076a149fd" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/app-builder/apps/5cb67134-d7bd-4320-9cda-d79ec98cff4c", + "path": "/api/v2/app-builder/apps/500bf715-77a5-4c1d-b4ef-0d181b071daf", "keepAlive": false, "secure": true }, @@ -79,6 +79,6 @@ "timeToLive": { "unlimited": true }, - "id": "9c1dd179-d692-3416-28cd-f128df58ebe8" + "id": "cdb2b576-1451-1182-5179-176076a149fe" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Bad_Request_response.freeze index 47c84b21b2b..c2c122a9a5c 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:10.845Z \ No newline at end of file +2024-12-20T20:39:19.594Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Not_Found_response.freeze index 0fbfbe769d0..7d397ad29fe 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_Not_Found_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:10.942Z \ No newline at end of file +2024-12-20T20:39:19.688Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.freeze index 5848314b797..d2346be1daa 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-12T20:29:25.239Z \ No newline at end of file +2024-12-20T20:39:19.785Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.json index fb0d0df11cc..b601cdafd19 100644 --- a/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_Multiple_Apps_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"61d36766-5d27-47ea-a3e7-aa7bd77b1da3\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"884b37bc-71b8-40bc-8967-12684ec7f3c4\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,7 +33,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":[{\"id\":\"61d36766-5d27-47ea-a3e7-aa7bd77b1da3\",\"type\":\"appDefinitions\"}]}" + "json": "{\"data\":[{\"id\":\"884b37bc-71b8-40bc-8967-12684ec7f3c4\",\"type\":\"appDefinitions\"}]}" }, "headers": {}, "method": "DELETE", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":[{\"id\":\"61d36766-5d27-47ea-a3e7-aa7bd77b1da3\",\"type\":\"appDefinitions\"}]}", + "body": "{\"data\":[{\"id\":\"884b37bc-71b8-40bc-8967-12684ec7f3c4\",\"type\":\"appDefinitions\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "1e7c2f08-60e2-f090-6bfe-c9a688879afa" + "id": "a5d24919-c4f7-470d-cb66-19b89e020b7a" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/app-builder/apps/61d36766-5d27-47ea-a3e7-aa7bd77b1da3", + "path": "/api/v2/app-builder/apps/884b37bc-71b8-40bc-8967-12684ec7f3c4", "keepAlive": false, "secure": true }, @@ -83,6 +83,6 @@ "timeToLive": { "unlimited": true }, - "id": "19052e38-b509-dddd-738e-fa3cf9e0e527" + "id": "11bf9896-67b9-b708-494f-737f49e7dc3f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Deploy_App_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Deploy_App_returns_Bad_Request_response.freeze index 70eab29e2a7..3f65923d0af 100644 --- a/src/test/resources/cassettes/features/v2/Deploy_App_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Deploy_App_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:35.320Z \ No newline at end of file +2024-12-20T20:39:20.190Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Deploy_App_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Deploy_App_returns_Created_response.freeze index 12cd09b1d29..2c4a1170293 100644 --- a/src/test/resources/cassettes/features/v2/Deploy_App_returns_Created_response.freeze +++ b/src/test/resources/cassettes/features/v2/Deploy_App_returns_Created_response.freeze @@ -1 +1 @@ -2024-12-12T20:29:22.668Z \ No newline at end of file +2024-12-20T20:39:20.292Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Deploy_App_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Deploy_App_returns_Created_response.json index 1bb8a5651e6..7b03241561d 100644 --- a/src/test/resources/cassettes/features/v2/Deploy_App_returns_Created_response.json +++ b/src/test/resources/cassettes/features/v2/Deploy_App_returns_Created_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"d9f547cd-bc8d-46be-b321-336856723728\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"290ad26d-6f5c-43b6-aef6-57b403d755e8\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,12 +33,12 @@ "httpRequest": { "headers": {}, "method": "POST", - "path": "/api/v2/app-builder/apps/d9f547cd-bc8d-46be-b321-336856723728/deployment", + "path": "/api/v2/app-builder/apps/290ad26d-6f5c-43b6-aef6-57b403d755e8/deployment", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"7e1d147c-815e-46fa-8be0-278783311881\",\"type\":\"deployment\",\"attributes\":{\"app_version_id\":\"f8567809-049e-49c2-b5c0-e5cb0e8e0f5e\"},\"meta\":{\"created_at\":\"2024-12-12T20:29:23.253704Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"user_name\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}", + "body": "{\"data\":{\"id\":\"74a4bbff-b587-4272-a207-b61678cc0bf1\",\"type\":\"deployment\",\"attributes\":{\"app_version_id\":\"ab334928-2df5-4e6e-8e40-9eeee2b2cd44\"},\"meta\":{\"created_at\":\"2024-12-20T20:39:20.594723Z\",\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\"}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,18 +53,18 @@ "timeToLive": { "unlimited": true }, - "id": "47b8c8ea-d8b3-c4d6-65ee-3698d0fc6c64" + "id": "f8adee5f-a20e-b00e-bef1-5668e2745566" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/app-builder/apps/d9f547cd-bc8d-46be-b321-336856723728", + "path": "/api/v2/app-builder/apps/290ad26d-6f5c-43b6-aef6-57b403d755e8", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"d9f547cd-bc8d-46be-b321-336856723728\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"290ad26d-6f5c-43b6-aef6-57b403d755e8\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -79,6 +79,6 @@ "timeToLive": { "unlimited": true }, - "id": "61c62063-a1b4-7086-4771-3ca07f798d40" + "id": "2f533cca-97b3-a513-68b7-258f69476b93" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Deploy_App_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Deploy_App_returns_Not_Found_response.freeze index c11fe09d7f4..f8f8e8f2692 100644 --- a/src/test/resources/cassettes/features/v2/Deploy_App_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Deploy_App_returns_Not_Found_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:35.984Z \ No newline at end of file +2024-12-20T20:39:20.929Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Disable_App_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Disable_App_returns_Bad_Request_response.freeze index bf3af7629d0..afd2bf6b9f8 100644 --- a/src/test/resources/cassettes/features/v2/Disable_App_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Disable_App_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:36.091Z \ No newline at end of file +2024-12-20T20:39:21.034Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Disable_App_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Disable_App_returns_Not_Found_response.freeze index 8dc6b57d756..7332f600132 100644 --- a/src/test/resources/cassettes/features/v2/Disable_App_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Disable_App_returns_Not_Found_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:36.179Z \ No newline at end of file +2024-12-20T20:39:21.129Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Disable_App_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Disable_App_returns_OK_response.freeze index 883ce61def2..672904fce26 100644 --- a/src/test/resources/cassettes/features/v2/Disable_App_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Disable_App_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-12T20:29:23.546Z \ No newline at end of file +2024-12-20T20:39:21.230Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Disable_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Disable_App_returns_OK_response.json index 88820b790dc..e43d674f141 100644 --- a/src/test/resources/cassettes/features/v2/Disable_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Disable_App_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "820bad24-1ae4-7d45-b443-7591eb8052be" + "id": "820bad24-1ae4-7d45-b443-7591eb8052c0" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/app-builder/apps/6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad/deployment", + "path": "/api/v2/app-builder/apps/cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5/deployment", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"be510de8-34d8-45fc-830f-85c208a42920\",\"type\":\"deployment\",\"attributes\":{\"app_version_id\":\"00000000-0000-0000-0000-000000000000\"},\"meta\":{\"created_at\":\"2024-12-12T20:29:23.883145Z\",\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"user_name\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"}}}", + "body": "{\"data\":{\"id\":\"1c14f2b9-0161-4dac-ad44-b8dd84abcbe6\",\"type\":\"deployment\",\"attributes\":{\"app_version_id\":\"00000000-0000-0000-0000-000000000000\"},\"meta\":{\"created_at\":\"2024-12-20T20:39:21.490485Z\",\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\"}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,18 +53,18 @@ "timeToLive": { "unlimited": true }, - "id": "19063af7-3ab1-38a6-8fd8-9757876febdd" + "id": "e8c781fd-a291-d66a-41c8-5d33c268c3d9" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/app-builder/apps/6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad", + "path": "/api/v2/app-builder/apps/cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -79,6 +79,6 @@ "timeToLive": { "unlimited": true }, - "id": "84d81555-f8a2-c8e5-20aa-3b2a74bae9c0" + "id": "e9ff4601-1c40-4692-84e3-f020d37bd773" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_App_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Get_App_returns_Bad_Request_response.freeze index 9a1b4493f05..8251b6eaf66 100644 --- a/src/test/resources/cassettes/features/v2/Get_App_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_App_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:11.519Z \ No newline at end of file +2024-12-20T20:39:21.680Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_App_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_App_returns_Not_Found_response.freeze index 0d42c760761..8bd6f7561c5 100644 --- a/src/test/resources/cassettes/features/v2/Get_App_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_App_returns_Not_Found_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:11.612Z \ No newline at end of file +2024-12-20T20:39:21.762Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.freeze index 7b34332de4d..e407ffe5d62 100644 --- a/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-12T20:29:25.770Z \ No newline at end of file +2024-12-20T20:39:21.868Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json index 945287c0b1c..6b20617c6cf 100644 --- a/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_App_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"4937a273-31f5-4375-a9cf-b71eeb92f89c\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"e91c5ea9-5827-4008-b1e6-026d71f5c005\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "820bad24-1ae4-7d45-b443-7591eb8052bf" + "id": "820bad24-1ae4-7d45-b443-7591eb8052be" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/app-builder/apps/4937a273-31f5-4375-a9cf-b71eeb92f89c", + "path": "/api/v2/app-builder/apps/e91c5ea9-5827-4008-b1e6-026d71f5c005", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"4937a273-31f5-4375-a9cf-b71eeb92f89c\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"favorite\":false,\"name\":\"Example App\",\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":321813,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"user_name\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":1,\"updated_since_deployment\":false,\"created_at\":\"2024-12-12T20:29:25.869968Z\",\"updated_at\":\"2024-12-12T20:29:25.869968Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}", + "body": "{\"data\":{\"id\":\"e91c5ea9-5827-4008-b1e6-026d71f5c005\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"favorite\":false,\"name\":\"Example App\",\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\",\"version\":1,\"updated_since_deployment\":false,\"created_at\":\"2024-12-20T20:39:21.945448Z\",\"updated_at\":\"2024-12-20T20:39:21.945448Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,18 +53,18 @@ "timeToLive": { "unlimited": true }, - "id": "47b6aadd-1969-51f2-7639-c8987e412dfd" + "id": "6bad07d8-cc1b-219d-8950-c611208ea560" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/app-builder/apps/4937a273-31f5-4375-a9cf-b71eeb92f89c", + "path": "/api/v2/app-builder/apps/e91c5ea9-5827-4008-b1e6-026d71f5c005", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"4937a273-31f5-4375-a9cf-b71eeb92f89c\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"e91c5ea9-5827-4008-b1e6-026d71f5c005\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -79,6 +79,6 @@ "timeToLive": { "unlimited": true }, - "id": "128fd55e-6a03-8c7e-57aa-b18f757d86c7" + "id": "b4ff7a48-62c4-0cc0-c828-05fcc36aeeff" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_Apps_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_Apps_returns_OK_response.freeze index 1cb2468dc44..b459860c38e 100644 --- a/src/test/resources/cassettes/features/v2/List_Apps_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/List_Apps_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-10T19:57:12.227Z \ No newline at end of file +2024-12-20T20:39:22.419Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_Apps_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_Apps_returns_OK_response.json index 92f57d34103..70f72e8dfe4 100644 --- a/src/test/resources/cassettes/features/v2/List_Apps_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_Apps_returns_OK_response.json @@ -8,7 +8,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":[{\"id\":\"d595693a-473d-4671-9da3-fce89e3a5c5d\",\"type\":\"appDefinitions\",\"attributes\":{\"description\":\"\",\"favorite\":false,\"name\":\"Max's App Fri, Jul 12, 11:10:35 am\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":7571362,\"user_uuid\":\"3114f3a0-3fc9-11ef-acbe-a6def6551924\",\"user_name\":\"max.gale@datadoghq.com\",\"version\":0,\"updated_since_deployment\":false,\"created_at\":\"2024-07-12T15:10:48.690305Z\",\"updated_at\":\"2024-07-12T15:10:48.690305Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}],\"meta\":{\"page\":{\"totalCount\":1,\"totalFilteredCount\":1}}}", + "body": "{\"data\":[{\"id\":\"0cc51f70-6f90-406e-880b-e2fac88e823a\",\"type\":\"appDefinitions\",\"attributes\":{\"description\":\"\",\"favorite\":false,\"name\":\"[synthetics] app name 0123456789\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":7571471,\"user_uuid\":\"01347f51-3fcd-11ef-95dd-a65df5ee2843\",\"user_name\":\"01347f51-3fcd-11ef-95dd-a65df5ee2843\",\"version\":0,\"updated_since_deployment\":false,\"created_at\":\"2024-12-18T11:48:55.89363Z\",\"updated_at\":\"2024-12-18T11:48:55.89363Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}},{\"id\":\"d595693a-473d-4671-9da3-fce89e3a5c5d\",\"type\":\"appDefinitions\",\"attributes\":{\"description\":\"\",\"favorite\":false,\"name\":\"Max's App Fri, Jul 12, 11:10:35 am\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":7571362,\"user_uuid\":\"3114f3a0-3fc9-11ef-acbe-a6def6551924\",\"user_name\":\"max.gale@datadoghq.com\",\"version\":0,\"updated_since_deployment\":false,\"created_at\":\"2024-07-12T15:10:48.690305Z\",\"updated_at\":\"2024-07-12T15:10:48.690305Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}],\"meta\":{\"page\":{\"totalCount\":2,\"totalFilteredCount\":2}}}", "headers": { "Content-Type": [ "application/vnd.api+json" diff --git a/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.freeze index 56162830354..fd24ecdb585 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2024-12-12T20:29:26.349Z \ No newline at end of file +2024-12-20T20:39:22.549Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json index b74bb4334ce..2b6d04719f1 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_App_returns_Bad_Request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"9d2ee93b-6ac5-4b0e-abd8-829916f2365d\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"2eb79081-77f2-4082-93d5-fbb4d2291dc7\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,17 +27,17 @@ "timeToLive": { "unlimited": true }, - "id": "820bad24-1ae4-7d45-b443-7591eb8052c0" + "id": "820bad24-1ae4-7d45-b443-7591eb8052bf" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"rootInstanceName\":\"\"},\"id\":\"9d2ee93b-6ac5-4b0e-abd8-829916f2365d\",\"type\":\"appDefinitions\"}}" + "json": "{\"data\":{\"attributes\":{\"rootInstanceName\":\"\"},\"id\":\"2eb79081-77f2-4082-93d5-fbb4d2291dc7\",\"type\":\"appDefinitions\"}}" }, "headers": {}, "method": "PATCH", - "path": "/api/v2/app-builder/apps/9d2ee93b-6ac5-4b0e-abd8-829916f2365d", + "path": "/api/v2/app-builder/apps/2eb79081-77f2-4082-93d5-fbb4d2291dc7", "keepAlive": false, "secure": true }, @@ -57,18 +57,18 @@ "timeToLive": { "unlimited": true }, - "id": "fcc40ca7-a9d4-7e05-58cd-c9381dd2b622" + "id": "66dd124a-225f-4a1b-98f4-2f02c61653cb" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/app-builder/apps/9d2ee93b-6ac5-4b0e-abd8-829916f2365d", + "path": "/api/v2/app-builder/apps/2eb79081-77f2-4082-93d5-fbb4d2291dc7", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"9d2ee93b-6ac5-4b0e-abd8-829916f2365d\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"2eb79081-77f2-4082-93d5-fbb4d2291dc7\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -83,6 +83,6 @@ "timeToLive": { "unlimited": true }, - "id": "7e8360ae-24a9-33c7-8f13-b6753728e230" + "id": "dae6f0fa-3f61-dba8-a0f6-d8e7010ebe51" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.freeze index 9a62b802399..b873204c5af 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.freeze @@ -1 +1 @@ -2024-12-12T20:29:26.986Z \ No newline at end of file +2024-12-20T20:39:23.050Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.json index c1b70bbb7f6..bbc137c73b9 100644 --- a/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_App_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"5a5e6785-d3f8-41bf-9d5d-95a179362e02\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"22653158-3691-4a09-bbd9-f4197f14dd0c\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,16 +33,16 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"name\":\"Updated Name\",\"rootInstanceName\":\"grid0\"},\"id\":\"5a5e6785-d3f8-41bf-9d5d-95a179362e02\",\"type\":\"appDefinitions\"}}" + "json": "{\"data\":{\"attributes\":{\"name\":\"Updated Name\",\"rootInstanceName\":\"grid0\"},\"id\":\"22653158-3691-4a09-bbd9-f4197f14dd0c\",\"type\":\"appDefinitions\"}}" }, "headers": {}, "method": "PATCH", - "path": "/api/v2/app-builder/apps/5a5e6785-d3f8-41bf-9d5d-95a179362e02", + "path": "/api/v2/app-builder/apps/22653158-3691-4a09-bbd9-f4197f14dd0c", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"5a5e6785-d3f8-41bf-9d5d-95a179362e02\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"favorite\":false,\"name\":\"Updated Name\",\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":321813,\"user_id\":2320499,\"user_uuid\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"user_name\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"version\":2,\"updated_since_deployment\":false,\"created_at\":\"2024-12-12T20:29:27.115629Z\",\"updated_at\":\"2024-12-12T20:29:27.362767Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}", + "body": "{\"data\":{\"id\":\"22653158-3691-4a09-bbd9-f4197f14dd0c\",\"type\":\"appDefinitions\",\"attributes\":{\"components\":[{\"events\":[],\"name\":\"grid0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"gridCell0\",\"properties\":{\"children\":[{\"events\":[],\"name\":\"calloutValue0\",\"properties\":{\"isDisabled\":false,\"isLoading\":false,\"isVisible\":true,\"label\":\"CPU Usage\",\"size\":\"sm\",\"style\":\"vivid_yellow\",\"unit\":\"kB\",\"value\":\"42\"},\"type\":\"calloutValue\"}],\"isVisible\":\"true\",\"layout\":{\"default\":{\"height\":8,\"width\":2,\"x\":0,\"y\":0}}},\"type\":\"gridCell\"}]},\"type\":\"grid\"}],\"description\":\"This is a simple example app\",\"embeddedQueries\":[],\"favorite\":false,\"name\":\"Updated Name\",\"rootInstanceName\":\"grid0\",\"selfService\":false,\"tags\":[]},\"meta\":{\"org_id\":1107852,\"user_id\":15479137,\"user_uuid\":\"b3f98453-b289-11ef-a4e9-d6d283f92d91\",\"user_name\":\"oliver.li@datadoghq.com\",\"version\":2,\"updated_since_deployment\":false,\"created_at\":\"2024-12-20T20:39:23.117622Z\",\"updated_at\":\"2024-12-20T20:39:23.317526Z\",\"deleted_at\":\"0001-01-01T00:00:00Z\"}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,18 +57,18 @@ "timeToLive": { "unlimited": true }, - "id": "1a396fb9-a6d0-f4fc-b44a-5c7599c23cb7" + "id": "55df5978-eb09-568b-a45b-a8be9a1f9733" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/app-builder/apps/5a5e6785-d3f8-41bf-9d5d-95a179362e02", + "path": "/api/v2/app-builder/apps/22653158-3691-4a09-bbd9-f4197f14dd0c", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"5a5e6785-d3f8-41bf-9d5d-95a179362e02\",\"type\":\"appDefinitions\"}}", + "body": "{\"data\":{\"id\":\"22653158-3691-4a09-bbd9-f4197f14dd0c\",\"type\":\"appDefinitions\"}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -83,6 +83,6 @@ "timeToLive": { "unlimited": true }, - "id": "f5f5b2ab-46c5-5f99-91c3-5b0f9cacb5bf" + "id": "74c992c6-7b0b-26d2-7022-368a5f40dd1d" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/apps.feature b/src/test/resources/com/datadog/api/client/v2/api/apps.feature index 531cc382643..1bed411c311 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/apps.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/apps.feature @@ -1,6 +1,9 @@ @endpoint(apps) @endpoint(apps-v2) Feature: Apps - Create, read, update, and delete apps in App Builder. + Datadog App Builder provides a low-code solution to rapidly develop and + integrate secure, customized applications into your monitoring stack that + are built to accelerate remediation at scale. These API endpoints allow + you to create, read, update, delete, and publish apps. Background: Given a valid "apiKeyAuth" key in the system @@ -88,6 +91,56 @@ Feature: Apps And the response "data" has length 1 And the response "data[0].id" has the same value as "app.data.id" + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Bad Request" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And request contains "app_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Created" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + When the request is sent + Then the response status is 201 Created + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Not Found" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" + When the request is sent + Then the response status is 404 Not Found + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Disable App returns "Bad Request" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And request contains "app_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Disable App returns "Not Found" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" + When the request is sent + Then the response status is 404 Not Found + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Disable App returns "OK" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + When the request is sent + Then the response status is 200 OK + @skip-typescript @team:DataDog/app-builder-backend Scenario: Get App returns "Bad Request" response Given operation "GetApp" enabled @@ -116,11 +169,11 @@ Feature: Apps And the response "data.type" is equal to "appDefinitions" @generated @skip @team:DataDog/app-builder-backend - Scenario: List Apps returns "Bad Request, e.g. invalid sort parameter" response + Scenario: List Apps returns "Bad Request" response Given operation "ListApps" enabled And new "ListApps" request When the request is sent - Then the response status is 400 Bad Request, e.g. invalid sort parameter + Then the response status is 400 Bad Request @skip-typescript @team:DataDog/app-builder-backend Scenario: List Apps returns "OK" response diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index 29503a6ae7c..3c9e4279380 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -51,7 +51,7 @@ "parameters": [ { "name": "body", - "value": "{\"data\": {\"attributes\": {\"components\": [{\"events\": [], \"name\": \"grid0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"gridCell0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"calloutValue0\", \"properties\": {\"isVisible\": true, \"isDisabled\": false, \"isLoading\": false, \"label\": \"CPU Usage\", \"size\": \"sm\", \"style\": \"vivid_yellow\", \"unit\": \"kB\", \"value\": \"42\"}, \"type\": \"calloutValue\"}], \"isVisible\": \"true\", \"layout\": {\"default\": {\"height\": 8, \"width\": 2, \"x\": 0, \"y\": 0}}}, \"type\": \"gridCell\"}]}, \"type\": \"grid\"}], \"description\": \"This is a simple example app\", \"embeddedQueries\": [], \"name\": \"Example App\", \"rootInstanceName\": \"grid0\"}, \"type\": \"appDefinitions\"}}" + "value": "{\"data\": {\"attributes\": {\"components\": [{\"events\": [], \"name\": \"grid0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"gridCell0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"calloutValue0\", \"properties\": {\"isDisabled\": false, \"isLoading\": false, \"isVisible\": true, \"label\": \"CPU Usage\", \"size\": \"sm\", \"style\": \"vivid_yellow\", \"unit\": \"kB\", \"value\": \"42\"}, \"type\": \"calloutValue\"}], \"isVisible\": \"true\", \"layout\": {\"default\": {\"height\": 8, \"width\": 2, \"x\": 0, \"y\": 0}}}, \"type\": \"gridCell\"}]}, \"type\": \"grid\"}], \"description\": \"This is a simple example app\", \"embeddedQueries\": [], \"name\": \"Example App\", \"rootInstanceName\": \"grid0\"}, \"type\": \"appDefinitions\"}}" } ], "step": "there is a valid \"app\" in the system", diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index b1ed2db693d..08d57ce2bbe 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -197,13 +197,13 @@ } }, "DisableApp": { - "tag": "App Deployment", + "tag": "Apps", "undo": { "type": "idempotent" } }, "DeployApp": { - "tag": "App Deployment", + "tag": "Apps", "undo": { "type": "idempotent" }