diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 982af418809..21ff8f4cb4c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1767,6 +1767,20 @@ components: required: true schema: type: string + RumExclusionFilterApplicationIDParameter: + description: RUM application ID. + in: path + name: app_id + required: true + schema: + type: string + RumExclusionFilterIDParameter: + description: Exclusion filter ID. + in: path + name: ef_id + required: true + schema: + type: string RumMetricIDParameter: description: The name of the RUM-based metric. in: path @@ -2222,6 +2236,12 @@ components: schema: $ref: "#/components/schemas/APIErrorResponse" description: Failed Precondition + RumExclusionFilterMethodNotAllowedResponse: + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Method Not Allowed SpansBadRequestResponse: content: application/json: @@ -89786,6 +89806,185 @@ components: minimum: 0 type: number type: object + RumExclusionFilterAttributes: + description: The attributes of an exclusion filter. + properties: + enabled: + $ref: "#/components/schemas/RumExclusionFilterEnabled" + event_type: + $ref: "#/components/schemas/RumExclusionFilterEventType" + name: + $ref: "#/components/schemas/RumExclusionFilterName" + query: + $ref: "#/components/schemas/RumExclusionFilterQuery" + type: object + RumExclusionFilterCreateAttributes: + description: The attributes of an exclusion filter to create. + properties: + enabled: + description: Whether the exclusion filter is active. Defaults to `true`. + example: true + type: boolean + event_type: + $ref: "#/components/schemas/RumExclusionFilterEventType" + name: + $ref: "#/components/schemas/RumExclusionFilterName" + query: + $ref: "#/components/schemas/RumExclusionFilterQuery" + required: + - name + type: object + RumExclusionFilterCreateData: + description: The new exclusion filter properties to create. + properties: + attributes: + $ref: "#/components/schemas/RumExclusionFilterCreateAttributes" + type: + $ref: "#/components/schemas/RumExclusionFilterType" + required: + - type + - attributes + type: object + RumExclusionFilterCreateRequest: + description: The exclusion filter body to create. + properties: + data: + $ref: "#/components/schemas/RumExclusionFilterCreateData" + required: + - data + type: object + RumExclusionFilterData: + description: An exclusion filter. + properties: + attributes: + $ref: "#/components/schemas/RumExclusionFilterAttributes" + id: + description: The ID of the exclusion filter. + example: "051601eb-54a0-abc0-03f9-cc02efa18892" + type: string + meta: + $ref: "#/components/schemas/RumExclusionFilterMeta" + type: + $ref: "#/components/schemas/RumExclusionFilterType" + required: + - id + - type + type: object + RumExclusionFilterEnabled: + description: Whether the exclusion filter is active. + example: true + type: boolean + RumExclusionFilterEventType: + description: The type of RUM events to filter on. + enum: + - session + - view + - action + - error + - resource + - long_task + - vital + example: error + type: string + x-enum-varnames: + - SESSION + - VIEW + - ACTION + - ERROR + - RESOURCE + - LONG_TASK + - VITAL + RumExclusionFilterMeta: + description: Metadata about the exclusion filter. + properties: + enabled_at: + description: Unix epoch (in milliseconds) when the exclusion filter was last enabled. + example: 1735689600000 + format: int64 + type: integer + updated_at: + description: Unix epoch (in milliseconds) of the last update. + example: 1735689600000 + format: int64 + type: integer + updated_by_handle: + description: Handle of the user who last updated the exclusion filter. + example: jane.doe@example.com + type: string + type: object + RumExclusionFilterName: + description: The name of the exclusion filter. + example: Exclude noisy browser extension errors + type: string + RumExclusionFilterQuery: + description: |- + Additional query used to further restrict which RUM events are excluded. + Combined with `event_type` when both are provided. + example: "@error.message:*extension*" + type: string + RumExclusionFilterResponse: + description: An exclusion filter response body. + properties: + data: + $ref: "#/components/schemas/RumExclusionFilterData" + type: object + RumExclusionFilterType: + default: exclusion_filters + description: The resource type. The value must be `exclusion_filters`. + enum: + - exclusion_filters + example: exclusion_filters + type: string + x-enum-varnames: + - EXCLUSION_FILTERS + RumExclusionFilterUpdateAttributes: + description: |- + The attributes of an exclusion filter that can be updated. + For the built-in Error Tracking exclusion filter, only `enabled` can be set; + `name`, `event_type`, and `query` must be omitted. + properties: + enabled: + $ref: "#/components/schemas/RumExclusionFilterEnabled" + event_type: + $ref: "#/components/schemas/RumExclusionFilterEventType" + name: + $ref: "#/components/schemas/RumExclusionFilterName" + query: + $ref: "#/components/schemas/RumExclusionFilterQuery" + type: object + RumExclusionFilterUpdateData: + description: The exclusion filter properties to update. + properties: + attributes: + $ref: "#/components/schemas/RumExclusionFilterUpdateAttributes" + id: + description: The ID of the exclusion filter. Must match the `ef_id` path parameter. + example: "051601eb-54a0-abc0-03f9-cc02efa18892" + type: string + type: + $ref: "#/components/schemas/RumExclusionFilterType" + required: + - id + - type + - attributes + type: object + RumExclusionFilterUpdateRequest: + description: The exclusion filter body to update. + properties: + data: + $ref: "#/components/schemas/RumExclusionFilterUpdateData" + required: + - data + type: object + RumExclusionFiltersResponse: + description: All exclusion filters for a RUM application. + properties: + data: + description: A list of exclusion filters. + items: + $ref: "#/components/schemas/RumExclusionFilterData" + type: array + type: object RumMetricCompute: description: The compute rule to compute the RUM-based metric. properties: @@ -183238,6 +183437,233 @@ paths: tags: - Rum Retention Filters x-codegen-request-body-name: body + /api/v2/rum/applications/{app_id}/retention_filters/exclusion: + get: + description: |- + Get the list of exclusion filters for a RUM application. + The built-in Error Tracking exclusion filter (`error_tracking_exclusion_filter`) is always returned first. + operationId: ListExclusionFilters + parameters: + - $ref: "#/components/parameters/RumExclusionFilterApplicationIDParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + enabled: true + name: Ignored / Excluded errors from Error Tracking + id: error_tracking_exclusion_filter + meta: + enabled_at: 1735689600000 + updated_at: 1735689600000 + updated_by_handle: jane.doe@example.com + type: exclusion_filters + - attributes: + enabled: true + event_type: error + name: Exclude noisy browser extension errors + query: "@error.message:*extension*" + id: "051601eb-54a0-abc0-03f9-cc02efa18892" + meta: + enabled_at: 1735689600000 + updated_at: 1735689600000 + updated_by_handle: jane.doe@example.com + type: exclusion_filters + schema: + $ref: "#/components/schemas/RumExclusionFiltersResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get all RUM exclusion filters + tags: + - Rum Retention Filters + post: + description: |- + Create an exclusion filter for a RUM application. + Returns the created exclusion filter when the request is successful. + operationId: CreateExclusionFilter + parameters: + - $ref: "#/components/parameters/RumExclusionFilterApplicationIDParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: true + event_type: error + name: Exclude noisy browser extension errors + query: "@error.message:*extension*" + type: exclusion_filters + schema: + $ref: "#/components/schemas/RumExclusionFilterCreateRequest" + description: The definition of the new RUM exclusion filter. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: true + event_type: error + name: Exclude noisy browser extension errors + query: "@error.message:*extension*" + id: "051601eb-54a0-abc0-03f9-cc02efa18892" + meta: + enabled_at: 1735689600000 + updated_at: 1735689600000 + updated_by_handle: jane.doe@example.com + type: exclusion_filters + schema: + $ref: "#/components/schemas/RumExclusionFilterResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a RUM exclusion filter + tags: + - Rum Retention Filters + x-codegen-request-body-name: body + /api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}: + delete: + description: |- + Delete an exclusion filter for a RUM application. + The built-in Error Tracking exclusion filter (`error_tracking_exclusion_filter`) cannot be deleted; + attempting to do so returns a `405 Method Not Allowed` response. + operationId: DeleteExclusionFilter + parameters: + - $ref: "#/components/parameters/RumExclusionFilterApplicationIDParameter" + - $ref: "#/components/parameters/RumExclusionFilterIDParameter" + responses: + "204": + description: No Content + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "405": + $ref: "#/components/responses/RumExclusionFilterMethodNotAllowedResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a RUM exclusion filter + tags: + - Rum Retention Filters + get: + description: Get a single exclusion filter for a RUM application. + operationId: GetExclusionFilter + parameters: + - $ref: "#/components/parameters/RumExclusionFilterApplicationIDParameter" + - $ref: "#/components/parameters/RumExclusionFilterIDParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: true + event_type: error + name: Exclude noisy browser extension errors + query: "@error.message:*extension*" + id: "051601eb-54a0-abc0-03f9-cc02efa18892" + meta: + enabled_at: 1735689600000 + updated_at: 1735689600000 + updated_by_handle: jane.doe@example.com + type: exclusion_filters + schema: + $ref: "#/components/schemas/RumExclusionFilterResponse" + description: OK + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a RUM exclusion filter + tags: + - Rum Retention Filters + patch: + description: |- + Update an exclusion filter for a RUM application. + For the built-in Error Tracking exclusion filter (`error_tracking_exclusion_filter`), only `enabled` can be + updated; `name`, `event_type`, and `query` must be omitted. + Returns the updated exclusion filter when the request is successful. + operationId: UpdateExclusionFilter + parameters: + - $ref: "#/components/parameters/RumExclusionFilterApplicationIDParameter" + - $ref: "#/components/parameters/RumExclusionFilterIDParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: false + event_type: error + name: Exclude noisy browser extension errors + query: "@error.message:*extension*" + id: "051601eb-54a0-abc0-03f9-cc02efa18892" + type: exclusion_filters + schema: + $ref: "#/components/schemas/RumExclusionFilterUpdateRequest" + description: New definition of the RUM exclusion filter. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + enabled: false + event_type: error + name: Exclude noisy browser extension errors + query: "@error.message:*extension*" + id: "051601eb-54a0-abc0-03f9-cc02efa18892" + meta: + enabled_at: 1735689600000 + updated_at: 1735689600000 + updated_by_handle: jane.doe@example.com + type: exclusion_filters + schema: + $ref: "#/components/schemas/RumExclusionFilterResponse" + description: Updated + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/NotAuthorizedResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "409": + $ref: "#/components/responses/ConflictResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a RUM exclusion filter + tags: + - Rum Retention Filters + x-codegen-request-body-name: body /api/v2/rum/applications/{app_id}/retention_filters/permanent: get: description: |- diff --git a/examples/v2/rum-retention-filters/CreateExclusionFilter.java b/examples/v2/rum-retention-filters/CreateExclusionFilter.java new file mode 100644 index 00000000000..8c35342fb1e --- /dev/null +++ b/examples/v2/rum-retention-filters/CreateExclusionFilter.java @@ -0,0 +1,41 @@ +// Create a RUM exclusion filter returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRetentionFiltersApi; +import com.datadog.api.client.v2.model.RumExclusionFilterCreateAttributes; +import com.datadog.api.client.v2.model.RumExclusionFilterCreateData; +import com.datadog.api.client.v2.model.RumExclusionFilterCreateRequest; +import com.datadog.api.client.v2.model.RumExclusionFilterEventType; +import com.datadog.api.client.v2.model.RumExclusionFilterResponse; +import com.datadog.api.client.v2.model.RumExclusionFilterType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRetentionFiltersApi apiInstance = new RumRetentionFiltersApi(defaultClient); + + RumExclusionFilterCreateRequest body = + new RumExclusionFilterCreateRequest() + .data( + new RumExclusionFilterCreateData() + .attributes( + new RumExclusionFilterCreateAttributes() + .enabled(true) + .eventType(RumExclusionFilterEventType.ERROR) + .name("Exclude noisy browser extension errors") + .query("@error.message:*extension*")) + .type(RumExclusionFilterType.EXCLUSION_FILTERS)); + + try { + RumExclusionFilterResponse result = apiInstance.createExclusionFilter("app_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRetentionFiltersApi#createExclusionFilter"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-retention-filters/DeleteExclusionFilter.java b/examples/v2/rum-retention-filters/DeleteExclusionFilter.java new file mode 100644 index 00000000000..40f26db531c --- /dev/null +++ b/examples/v2/rum-retention-filters/DeleteExclusionFilter.java @@ -0,0 +1,22 @@ +// Delete a RUM exclusion filter returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRetentionFiltersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRetentionFiltersApi apiInstance = new RumRetentionFiltersApi(defaultClient); + + try { + apiInstance.deleteExclusionFilter("app_id", "ef_id"); + } catch (ApiException e) { + System.err.println("Exception when calling RumRetentionFiltersApi#deleteExclusionFilter"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-retention-filters/GetExclusionFilter.java b/examples/v2/rum-retention-filters/GetExclusionFilter.java new file mode 100644 index 00000000000..31f9f59468b --- /dev/null +++ b/examples/v2/rum-retention-filters/GetExclusionFilter.java @@ -0,0 +1,24 @@ +// Get a RUM exclusion filter returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRetentionFiltersApi; +import com.datadog.api.client.v2.model.RumExclusionFilterResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRetentionFiltersApi apiInstance = new RumRetentionFiltersApi(defaultClient); + + try { + RumExclusionFilterResponse result = apiInstance.getExclusionFilter("app_id", "ef_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRetentionFiltersApi#getExclusionFilter"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-retention-filters/ListExclusionFilters.java b/examples/v2/rum-retention-filters/ListExclusionFilters.java new file mode 100644 index 00000000000..ffaebc3ada6 --- /dev/null +++ b/examples/v2/rum-retention-filters/ListExclusionFilters.java @@ -0,0 +1,24 @@ +// Get all RUM exclusion filters returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRetentionFiltersApi; +import com.datadog.api.client.v2.model.RumExclusionFiltersResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRetentionFiltersApi apiInstance = new RumRetentionFiltersApi(defaultClient); + + try { + RumExclusionFiltersResponse result = apiInstance.listExclusionFilters("app_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRetentionFiltersApi#listExclusionFilters"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/rum-retention-filters/UpdateExclusionFilter.java b/examples/v2/rum-retention-filters/UpdateExclusionFilter.java new file mode 100644 index 00000000000..d479bfebf0f --- /dev/null +++ b/examples/v2/rum-retention-filters/UpdateExclusionFilter.java @@ -0,0 +1,43 @@ +// Update a RUM exclusion filter returns "Updated" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.RumRetentionFiltersApi; +import com.datadog.api.client.v2.model.RumExclusionFilterEventType; +import com.datadog.api.client.v2.model.RumExclusionFilterResponse; +import com.datadog.api.client.v2.model.RumExclusionFilterType; +import com.datadog.api.client.v2.model.RumExclusionFilterUpdateAttributes; +import com.datadog.api.client.v2.model.RumExclusionFilterUpdateData; +import com.datadog.api.client.v2.model.RumExclusionFilterUpdateRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + RumRetentionFiltersApi apiInstance = new RumRetentionFiltersApi(defaultClient); + + RumExclusionFilterUpdateRequest body = + new RumExclusionFilterUpdateRequest() + .data( + new RumExclusionFilterUpdateData() + .attributes( + new RumExclusionFilterUpdateAttributes() + .enabled(true) + .eventType(RumExclusionFilterEventType.ERROR) + .name("Exclude noisy browser extension errors") + .query("@error.message:*extension*")) + .id("051601eb-54a0-abc0-03f9-cc02efa18892") + .type(RumExclusionFilterType.EXCLUSION_FILTERS)); + + try { + RumExclusionFilterResponse result = + apiInstance.updateExclusionFilter("app_id", "ef_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling RumRetentionFiltersApi#updateExclusionFilter"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/RumRetentionFiltersApi.java b/src/main/java/com/datadog/api/client/v2/api/RumRetentionFiltersApi.java index fca9a362421..e65b4fd97a0 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RumRetentionFiltersApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RumRetentionFiltersApi.java @@ -4,6 +4,10 @@ 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.RumExclusionFilterCreateRequest; +import com.datadog.api.client.v2.model.RumExclusionFilterResponse; +import com.datadog.api.client.v2.model.RumExclusionFilterUpdateRequest; +import com.datadog.api.client.v2.model.RumExclusionFiltersResponse; import com.datadog.api.client.v2.model.RumPermanentRetentionFilterID; import com.datadog.api.client.v2.model.RumPermanentRetentionFilterResponse; import com.datadog.api.client.v2.model.RumPermanentRetentionFilterUpdateRequest; @@ -52,6 +56,163 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Create a RUM exclusion filter. + * + *

See {@link #createExclusionFilterWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @param body The definition of the new RUM exclusion filter. (required) + * @return RumExclusionFilterResponse + * @throws ApiException if fails to make API call + */ + public RumExclusionFilterResponse createExclusionFilter( + String appId, RumExclusionFilterCreateRequest body) throws ApiException { + return createExclusionFilterWithHttpInfo(appId, body).getData(); + } + + /** + * Create a RUM exclusion filter. + * + *

See {@link #createExclusionFilterWithHttpInfoAsync}. + * + * @param appId RUM application ID. (required) + * @param body The definition of the new RUM exclusion filter. (required) + * @return CompletableFuture<RumExclusionFilterResponse> + */ + public CompletableFuture createExclusionFilterAsync( + String appId, RumExclusionFilterCreateRequest body) { + return createExclusionFilterWithHttpInfoAsync(appId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an exclusion filter for a RUM application. Returns the created exclusion filter when the + * request is successful. + * + * @param appId RUM application ID. (required) + * @param body The definition of the new RUM exclusion filter. (required) + * @return ApiResponse<RumExclusionFilterResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse createExclusionFilterWithHttpInfo( + String appId, RumExclusionFilterCreateRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException( + 400, "Missing the required parameter 'appId' when calling createExclusionFilter"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createExclusionFilter"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/applications/{app_id}/retention_filters/exclusion" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRetentionFiltersApi.createExclusionFilter", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a RUM exclusion filter. + * + *

See {@link #createExclusionFilterWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @param body The definition of the new RUM exclusion filter. (required) + * @return CompletableFuture<ApiResponse<RumExclusionFilterResponse>> + */ + public CompletableFuture> + createExclusionFilterWithHttpInfoAsync(String appId, RumExclusionFilterCreateRequest body) { + Object localVarPostBody = body; + + // 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 createExclusionFilter")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createExclusionFilter")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/applications/{app_id}/retention_filters/exclusion" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRetentionFiltersApi.createExclusionFilter", + 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[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Create a RUM retention filter. * @@ -209,6 +370,164 @@ public ApiResponse createRetentionFilterWithHttpInfo new GenericType() {}); } + /** + * Delete a RUM exclusion filter. + * + *

See {@link #deleteExclusionFilterWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @throws ApiException if fails to make API call + */ + public void deleteExclusionFilter(String appId, String efId) throws ApiException { + deleteExclusionFilterWithHttpInfo(appId, efId); + } + + /** + * Delete a RUM exclusion filter. + * + *

See {@link #deleteExclusionFilterWithHttpInfoAsync}. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteExclusionFilterAsync(String appId, String efId) { + return deleteExclusionFilterWithHttpInfoAsync(appId, efId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an exclusion filter for a RUM application. The built-in Error Tracking exclusion filter + * (error_tracking_exclusion_filter) cannot be deleted; attempting to do so returns a + * 405 Method Not Allowed response. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
403 Not Authorized -
404 Not Found -
405 Method Not Allowed -
429 Too many requests -
+ */ + public ApiResponse deleteExclusionFilterWithHttpInfo(String appId, String efId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException( + 400, "Missing the required parameter 'appId' when calling deleteExclusionFilter"); + } + + // verify the required parameter 'efId' is set + if (efId == null) { + throw new ApiException( + 400, "Missing the required parameter 'efId' when calling deleteExclusionFilter"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())) + .replaceAll("\\{" + "ef_id" + "\\}", apiClient.escapeString(efId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRetentionFiltersApi.deleteExclusionFilter", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a RUM exclusion filter. + * + *

See {@link #deleteExclusionFilterWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteExclusionFilterWithHttpInfoAsync( + String appId, String efId) { + 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 deleteExclusionFilter")); + return result; + } + + // verify the required parameter 'efId' is set + if (efId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'efId' when calling deleteExclusionFilter")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())) + .replaceAll("\\{" + "ef_id" + "\\}", apiClient.escapeString(efId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRetentionFiltersApi.deleteExclusionFilter", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + 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, + null); + } + /** * Delete a RUM retention filter. * @@ -300,40 +619,198 @@ public ApiResponse deleteRetentionFilterWithHttpInfo(String appId, String } /** - * Delete a RUM retention filter. + * Delete a RUM retention filter. + * + *

See {@link #deleteRetentionFilterWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @param rfId Retention filter ID. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteRetentionFilterWithHttpInfoAsync( + String appId, String rfId) { + 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 deleteRetentionFilter")); + return result; + } + + // verify the required parameter 'rfId' is set + if (rfId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'rfId' when calling deleteRetentionFilter")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/applications/{app_id}/retention_filters/{rf_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())) + .replaceAll("\\{" + "rf_id" + "\\}", apiClient.escapeString(rfId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRetentionFiltersApi.deleteRetentionFilter", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + 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, + null); + } + + /** + * Get a RUM exclusion filter. + * + *

See {@link #getExclusionFilterWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @return RumExclusionFilterResponse + * @throws ApiException if fails to make API call + */ + public RumExclusionFilterResponse getExclusionFilter(String appId, String efId) + throws ApiException { + return getExclusionFilterWithHttpInfo(appId, efId).getData(); + } + + /** + * Get a RUM exclusion filter. + * + *

See {@link #getExclusionFilterWithHttpInfoAsync}. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @return CompletableFuture<RumExclusionFilterResponse> + */ + public CompletableFuture getExclusionFilterAsync( + String appId, String efId) { + return getExclusionFilterWithHttpInfoAsync(appId, efId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single exclusion filter for a RUM application. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @return ApiResponse<RumExclusionFilterResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getExclusionFilterWithHttpInfo( + String appId, String efId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException( + 400, "Missing the required parameter 'appId' when calling getExclusionFilter"); + } + + // verify the required parameter 'efId' is set + if (efId == null) { + throw new ApiException( + 400, "Missing the required parameter 'efId' when calling getExclusionFilter"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())) + .replaceAll("\\{" + "ef_id" + "\\}", apiClient.escapeString(efId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRetentionFiltersApi.getExclusionFilter", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a RUM exclusion filter. * - *

See {@link #deleteRetentionFilterWithHttpInfo}. + *

See {@link #getExclusionFilterWithHttpInfo}. * * @param appId RUM application ID. (required) - * @param rfId Retention filter ID. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param efId Exclusion filter ID. (required) + * @return CompletableFuture<ApiResponse<RumExclusionFilterResponse>> */ - public CompletableFuture> deleteRetentionFilterWithHttpInfoAsync( - String appId, String rfId) { + public CompletableFuture> + getExclusionFilterWithHttpInfoAsync(String appId, String efId) { Object localVarPostBody = null; // verify the required parameter 'appId' is set if (appId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'appId' when calling deleteRetentionFilter")); + 400, "Missing the required parameter 'appId' when calling getExclusionFilter")); return result; } - // verify the required parameter 'rfId' is set - if (rfId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'efId' is set + if (efId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'rfId' when calling deleteRetentionFilter")); + 400, "Missing the required parameter 'efId' when calling getExclusionFilter")); return result; } // create path and map variables String localVarPath = - "/api/v2/rum/applications/{app_id}/retention_filters/{rf_id}" + "/api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}" .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())) - .replaceAll("\\{" + "rf_id" + "\\}", apiClient.escapeString(rfId.toString())); + .replaceAll("\\{" + "ef_id" + "\\}", apiClient.escapeString(efId.toString())); Map localVarHeaderParams = new HashMap(); @@ -341,27 +818,27 @@ public CompletableFuture> deleteRetentionFilterWithHttpInfoAsy try { builder = apiClient.createBuilder( - "v2.RumRetentionFiltersApi.deleteRetentionFilter", + "v2.RumRetentionFiltersApi.getExclusionFilter", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "DELETE", + "GET", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** @@ -693,6 +1170,143 @@ public ApiResponse getRetentionFilterWithHttpInfo( new GenericType() {}); } + /** + * Get all RUM exclusion filters. + * + *

See {@link #listExclusionFiltersWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @return RumExclusionFiltersResponse + * @throws ApiException if fails to make API call + */ + public RumExclusionFiltersResponse listExclusionFilters(String appId) throws ApiException { + return listExclusionFiltersWithHttpInfo(appId).getData(); + } + + /** + * Get all RUM exclusion filters. + * + *

See {@link #listExclusionFiltersWithHttpInfoAsync}. + * + * @param appId RUM application ID. (required) + * @return CompletableFuture<RumExclusionFiltersResponse> + */ + public CompletableFuture listExclusionFiltersAsync(String appId) { + return listExclusionFiltersWithHttpInfoAsync(appId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get the list of exclusion filters for a RUM application. The built-in Error Tracking exclusion + * filter (error_tracking_exclusion_filter) is always returned first. + * + * @param appId RUM application ID. (required) + * @return ApiResponse<RumExclusionFiltersResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
403 Not Authorized -
429 Too many requests -
+ */ + public ApiResponse listExclusionFiltersWithHttpInfo(String appId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException( + 400, "Missing the required parameter 'appId' when calling listExclusionFilters"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/applications/{app_id}/retention_filters/exclusion" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRetentionFiltersApi.listExclusionFilters", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get all RUM exclusion filters. + * + *

See {@link #listExclusionFiltersWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @return CompletableFuture<ApiResponse<RumExclusionFiltersResponse>> + */ + public CompletableFuture> + listExclusionFiltersWithHttpInfoAsync(String appId) { + 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 listExclusionFilters")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/applications/{app_id}/retention_filters/exclusion" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRetentionFiltersApi.listExclusionFilters", + 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( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Get all permanent RUM retention filters. * @@ -1130,6 +1744,189 @@ public ApiResponse orderRetentionFiltersWithHt new GenericType() {}); } + /** + * Update a RUM exclusion filter. + * + *

See {@link #updateExclusionFilterWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @param body New definition of the RUM exclusion filter. (required) + * @return RumExclusionFilterResponse + * @throws ApiException if fails to make API call + */ + public RumExclusionFilterResponse updateExclusionFilter( + String appId, String efId, RumExclusionFilterUpdateRequest body) throws ApiException { + return updateExclusionFilterWithHttpInfo(appId, efId, body).getData(); + } + + /** + * Update a RUM exclusion filter. + * + *

See {@link #updateExclusionFilterWithHttpInfoAsync}. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @param body New definition of the RUM exclusion filter. (required) + * @return CompletableFuture<RumExclusionFilterResponse> + */ + public CompletableFuture updateExclusionFilterAsync( + String appId, String efId, RumExclusionFilterUpdateRequest body) { + return updateExclusionFilterWithHttpInfoAsync(appId, efId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an exclusion filter for a RUM application. For the built-in Error Tracking exclusion + * filter (error_tracking_exclusion_filter), only enabled can be + * updated; name, event_type, and query must be omitted. + * Returns the updated exclusion filter when the request is successful. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @param body New definition of the RUM exclusion filter. (required) + * @return ApiResponse<RumExclusionFilterResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 Updated -
400 Bad Request -
403 Not Authorized -
404 Not Found -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse updateExclusionFilterWithHttpInfo( + String appId, String efId, RumExclusionFilterUpdateRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'appId' is set + if (appId == null) { + throw new ApiException( + 400, "Missing the required parameter 'appId' when calling updateExclusionFilter"); + } + + // verify the required parameter 'efId' is set + if (efId == null) { + throw new ApiException( + 400, "Missing the required parameter 'efId' when calling updateExclusionFilter"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateExclusionFilter"); + } + // create path and map variables + String localVarPath = + "/api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())) + .replaceAll("\\{" + "ef_id" + "\\}", apiClient.escapeString(efId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.RumRetentionFiltersApi.updateExclusionFilter", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a RUM exclusion filter. + * + *

See {@link #updateExclusionFilterWithHttpInfo}. + * + * @param appId RUM application ID. (required) + * @param efId Exclusion filter ID. (required) + * @param body New definition of the RUM exclusion filter. (required) + * @return CompletableFuture<ApiResponse<RumExclusionFilterResponse>> + */ + public CompletableFuture> + updateExclusionFilterWithHttpInfoAsync( + String appId, String efId, RumExclusionFilterUpdateRequest body) { + Object localVarPostBody = body; + + // 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 updateExclusionFilter")); + return result; + } + + // verify the required parameter 'efId' is set + if (efId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'efId' when calling updateExclusionFilter")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling updateExclusionFilter")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/rum/applications/{app_id}/retention_filters/exclusion/{ef_id}" + .replaceAll("\\{" + "app_id" + "\\}", apiClient.escapeString(appId.toString())) + .replaceAll("\\{" + "ef_id" + "\\}", apiClient.escapeString(efId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.RumRetentionFiltersApi.updateExclusionFilter", + 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( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Update a permanent RUM retention filter. * diff --git a/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterAttributes.java new file mode 100644 index 00000000000..1abe44e1e19 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterAttributes.java @@ -0,0 +1,224 @@ +/* + * 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 attributes of an exclusion filter. */ +@JsonPropertyOrder({ + RumExclusionFilterAttributes.JSON_PROPERTY_ENABLED, + RumExclusionFilterAttributes.JSON_PROPERTY_EVENT_TYPE, + RumExclusionFilterAttributes.JSON_PROPERTY_NAME, + RumExclusionFilterAttributes.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFilterAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_EVENT_TYPE = "event_type"; + private RumExclusionFilterEventType eventType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public RumExclusionFilterAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the exclusion filter is active. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public RumExclusionFilterAttributes eventType(RumExclusionFilterEventType eventType) { + this.eventType = eventType; + this.unparsed |= !eventType.isValid(); + return this; + } + + /** + * The type of RUM events to filter on. + * + * @return eventType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumExclusionFilterEventType getEventType() { + return eventType; + } + + public void setEventType(RumExclusionFilterEventType eventType) { + if (!eventType.isValid()) { + this.unparsed = true; + } + this.eventType = eventType; + } + + public RumExclusionFilterAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the exclusion filter. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public RumExclusionFilterAttributes query(String query) { + this.query = query; + return this; + } + + /** + * Additional query used to further restrict which RUM events are excluded. Combined with + * event_type when both are provided. + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * 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 RumExclusionFilterAttributes + */ + @JsonAnySetter + public RumExclusionFilterAttributes 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 RumExclusionFilterAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFilterAttributes rumExclusionFilterAttributes = (RumExclusionFilterAttributes) o; + return Objects.equals(this.enabled, rumExclusionFilterAttributes.enabled) + && Objects.equals(this.eventType, rumExclusionFilterAttributes.eventType) + && Objects.equals(this.name, rumExclusionFilterAttributes.name) + && Objects.equals(this.query, rumExclusionFilterAttributes.query) + && Objects.equals( + this.additionalProperties, rumExclusionFilterAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, eventType, name, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFilterAttributes {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).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/RumExclusionFilterCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterCreateAttributes.java new file mode 100644 index 00000000000..b333545ea93 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterCreateAttributes.java @@ -0,0 +1,233 @@ +/* + * 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.JsonCreator; +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 attributes of an exclusion filter to create. */ +@JsonPropertyOrder({ + RumExclusionFilterCreateAttributes.JSON_PROPERTY_ENABLED, + RumExclusionFilterCreateAttributes.JSON_PROPERTY_EVENT_TYPE, + RumExclusionFilterCreateAttributes.JSON_PROPERTY_NAME, + RumExclusionFilterCreateAttributes.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFilterCreateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_EVENT_TYPE = "event_type"; + private RumExclusionFilterEventType eventType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public RumExclusionFilterCreateAttributes() {} + + @JsonCreator + public RumExclusionFilterCreateAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.name = name; + } + + public RumExclusionFilterCreateAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the exclusion filter is active. Defaults to true. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public RumExclusionFilterCreateAttributes eventType(RumExclusionFilterEventType eventType) { + this.eventType = eventType; + this.unparsed |= !eventType.isValid(); + return this; + } + + /** + * The type of RUM events to filter on. + * + * @return eventType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumExclusionFilterEventType getEventType() { + return eventType; + } + + public void setEventType(RumExclusionFilterEventType eventType) { + if (!eventType.isValid()) { + this.unparsed = true; + } + this.eventType = eventType; + } + + public RumExclusionFilterCreateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the exclusion filter. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public RumExclusionFilterCreateAttributes query(String query) { + this.query = query; + return this; + } + + /** + * Additional query used to further restrict which RUM events are excluded. Combined with + * event_type when both are provided. + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * 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 RumExclusionFilterCreateAttributes + */ + @JsonAnySetter + public RumExclusionFilterCreateAttributes 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 RumExclusionFilterCreateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFilterCreateAttributes rumExclusionFilterCreateAttributes = + (RumExclusionFilterCreateAttributes) o; + return Objects.equals(this.enabled, rumExclusionFilterCreateAttributes.enabled) + && Objects.equals(this.eventType, rumExclusionFilterCreateAttributes.eventType) + && Objects.equals(this.name, rumExclusionFilterCreateAttributes.name) + && Objects.equals(this.query, rumExclusionFilterCreateAttributes.query) + && Objects.equals( + this.additionalProperties, rumExclusionFilterCreateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, eventType, name, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFilterCreateAttributes {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).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/RumExclusionFilterCreateData.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterCreateData.java new file mode 100644 index 00000000000..cd657961025 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterCreateData.java @@ -0,0 +1,185 @@ +/* + * 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.JsonCreator; +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 new exclusion filter properties to create. */ +@JsonPropertyOrder({ + RumExclusionFilterCreateData.JSON_PROPERTY_ATTRIBUTES, + RumExclusionFilterCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFilterCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumExclusionFilterCreateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumExclusionFilterType type = RumExclusionFilterType.EXCLUSION_FILTERS; + + public RumExclusionFilterCreateData() {} + + @JsonCreator + public RumExclusionFilterCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumExclusionFilterCreateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumExclusionFilterType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumExclusionFilterCreateData attributes(RumExclusionFilterCreateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of an exclusion filter to create. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumExclusionFilterCreateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumExclusionFilterCreateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumExclusionFilterCreateData type(RumExclusionFilterType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type. The value must be exclusion_filters. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumExclusionFilterType getType() { + return type; + } + + public void setType(RumExclusionFilterType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * 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 RumExclusionFilterCreateData + */ + @JsonAnySetter + public RumExclusionFilterCreateData 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 RumExclusionFilterCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFilterCreateData rumExclusionFilterCreateData = (RumExclusionFilterCreateData) o; + return Objects.equals(this.attributes, rumExclusionFilterCreateData.attributes) + && Objects.equals(this.type, rumExclusionFilterCreateData.type) + && Objects.equals( + this.additionalProperties, rumExclusionFilterCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFilterCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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/RumExclusionFilterCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterCreateRequest.java new file mode 100644 index 00000000000..5e66b02d7ed --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterCreateRequest.java @@ -0,0 +1,151 @@ +/* + * 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.JsonCreator; +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 exclusion filter body to create. */ +@JsonPropertyOrder({RumExclusionFilterCreateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFilterCreateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumExclusionFilterCreateData data; + + public RumExclusionFilterCreateRequest() {} + + @JsonCreator + public RumExclusionFilterCreateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RumExclusionFilterCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumExclusionFilterCreateRequest data(RumExclusionFilterCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The new exclusion filter properties to create. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumExclusionFilterCreateData getData() { + return data; + } + + public void setData(RumExclusionFilterCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumExclusionFilterCreateRequest + */ + @JsonAnySetter + public RumExclusionFilterCreateRequest 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 RumExclusionFilterCreateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFilterCreateRequest rumExclusionFilterCreateRequest = + (RumExclusionFilterCreateRequest) o; + return Objects.equals(this.data, rumExclusionFilterCreateRequest.data) + && Objects.equals( + this.additionalProperties, rumExclusionFilterCreateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFilterCreateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/RumExclusionFilterData.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterData.java new file mode 100644 index 00000000000..36d9c4e34f3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterData.java @@ -0,0 +1,240 @@ +/* + * 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.JsonCreator; +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; + +/** An exclusion filter. */ +@JsonPropertyOrder({ + RumExclusionFilterData.JSON_PROPERTY_ATTRIBUTES, + RumExclusionFilterData.JSON_PROPERTY_ID, + RumExclusionFilterData.JSON_PROPERTY_META, + RumExclusionFilterData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFilterData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumExclusionFilterAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_META = "meta"; + private RumExclusionFilterMeta meta; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumExclusionFilterType type = RumExclusionFilterType.EXCLUSION_FILTERS; + + public RumExclusionFilterData() {} + + @JsonCreator + public RumExclusionFilterData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumExclusionFilterType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumExclusionFilterData attributes(RumExclusionFilterAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of an exclusion filter. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumExclusionFilterAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumExclusionFilterAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumExclusionFilterData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the exclusion filter. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public RumExclusionFilterData meta(RumExclusionFilterMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata about the exclusion filter. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumExclusionFilterMeta getMeta() { + return meta; + } + + public void setMeta(RumExclusionFilterMeta meta) { + this.meta = meta; + if (meta != null) { + this.unparsed |= meta.unparsed; + } + } + + public RumExclusionFilterData type(RumExclusionFilterType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type. The value must be exclusion_filters. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumExclusionFilterType getType() { + return type; + } + + public void setType(RumExclusionFilterType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * 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 RumExclusionFilterData + */ + @JsonAnySetter + public RumExclusionFilterData 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 RumExclusionFilterData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFilterData rumExclusionFilterData = (RumExclusionFilterData) o; + return Objects.equals(this.attributes, rumExclusionFilterData.attributes) + && Objects.equals(this.id, rumExclusionFilterData.id) + && Objects.equals(this.meta, rumExclusionFilterData.meta) + && Objects.equals(this.type, rumExclusionFilterData.type) + && Objects.equals(this.additionalProperties, rumExclusionFilterData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, meta, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFilterData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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/RumExclusionFilterEventType.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterEventType.java new file mode 100644 index 00000000000..d2d4e173413 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterEventType.java @@ -0,0 +1,67 @@ +/* + * 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; + +/** The type of RUM events to filter on. */ +@JsonSerialize(using = RumExclusionFilterEventType.RumExclusionFilterEventTypeSerializer.class) +public class RumExclusionFilterEventType extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("session", "view", "action", "error", "resource", "long_task", "vital")); + + public static final RumExclusionFilterEventType SESSION = + new RumExclusionFilterEventType("session"); + public static final RumExclusionFilterEventType VIEW = new RumExclusionFilterEventType("view"); + public static final RumExclusionFilterEventType ACTION = + new RumExclusionFilterEventType("action"); + public static final RumExclusionFilterEventType ERROR = new RumExclusionFilterEventType("error"); + public static final RumExclusionFilterEventType RESOURCE = + new RumExclusionFilterEventType("resource"); + public static final RumExclusionFilterEventType LONG_TASK = + new RumExclusionFilterEventType("long_task"); + public static final RumExclusionFilterEventType VITAL = new RumExclusionFilterEventType("vital"); + + RumExclusionFilterEventType(String value) { + super(value, allowedValues); + } + + public static class RumExclusionFilterEventTypeSerializer + extends StdSerializer { + public RumExclusionFilterEventTypeSerializer(Class t) { + super(t); + } + + public RumExclusionFilterEventTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumExclusionFilterEventType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumExclusionFilterEventType fromValue(String value) { + return new RumExclusionFilterEventType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterMeta.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterMeta.java new file mode 100644 index 00000000000..1dd74e05c07 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterMeta.java @@ -0,0 +1,191 @@ +/* + * 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; + +/** Metadata about the exclusion filter. */ +@JsonPropertyOrder({ + RumExclusionFilterMeta.JSON_PROPERTY_ENABLED_AT, + RumExclusionFilterMeta.JSON_PROPERTY_UPDATED_AT, + RumExclusionFilterMeta.JSON_PROPERTY_UPDATED_BY_HANDLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFilterMeta { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED_AT = "enabled_at"; + private Long enabledAt; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private Long updatedAt; + + public static final String JSON_PROPERTY_UPDATED_BY_HANDLE = "updated_by_handle"; + private String updatedByHandle; + + public RumExclusionFilterMeta enabledAt(Long enabledAt) { + this.enabledAt = enabledAt; + return this; + } + + /** + * Unix epoch (in milliseconds) when the exclusion filter was last enabled. + * + * @return enabledAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getEnabledAt() { + return enabledAt; + } + + public void setEnabledAt(Long enabledAt) { + this.enabledAt = enabledAt; + } + + public RumExclusionFilterMeta updatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Unix epoch (in milliseconds) of the last update. + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + public RumExclusionFilterMeta updatedByHandle(String updatedByHandle) { + this.updatedByHandle = updatedByHandle; + return this; + } + + /** + * Handle of the user who last updated the exclusion filter. + * + * @return updatedByHandle + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_BY_HANDLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUpdatedByHandle() { + return updatedByHandle; + } + + public void setUpdatedByHandle(String updatedByHandle) { + this.updatedByHandle = updatedByHandle; + } + + /** + * 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 RumExclusionFilterMeta + */ + @JsonAnySetter + public RumExclusionFilterMeta 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 RumExclusionFilterMeta object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFilterMeta rumExclusionFilterMeta = (RumExclusionFilterMeta) o; + return Objects.equals(this.enabledAt, rumExclusionFilterMeta.enabledAt) + && Objects.equals(this.updatedAt, rumExclusionFilterMeta.updatedAt) + && Objects.equals(this.updatedByHandle, rumExclusionFilterMeta.updatedByHandle) + && Objects.equals(this.additionalProperties, rumExclusionFilterMeta.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabledAt, updatedAt, updatedByHandle, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFilterMeta {\n"); + sb.append(" enabledAt: ").append(toIndentedString(enabledAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" updatedByHandle: ").append(toIndentedString(updatedByHandle)).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/RumExclusionFilterResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterResponse.java new file mode 100644 index 00000000000..d4ca4655bb1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterResponse.java @@ -0,0 +1,140 @@ +/* + * 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; + +/** An exclusion filter response body. */ +@JsonPropertyOrder({RumExclusionFilterResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFilterResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumExclusionFilterData data; + + public RumExclusionFilterResponse data(RumExclusionFilterData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * An exclusion filter. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumExclusionFilterData getData() { + return data; + } + + public void setData(RumExclusionFilterData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumExclusionFilterResponse + */ + @JsonAnySetter + public RumExclusionFilterResponse 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 RumExclusionFilterResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFilterResponse rumExclusionFilterResponse = (RumExclusionFilterResponse) o; + return Objects.equals(this.data, rumExclusionFilterResponse.data) + && Objects.equals( + this.additionalProperties, rumExclusionFilterResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFilterResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/RumExclusionFilterType.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterType.java new file mode 100644 index 00000000000..4158fc9ddfc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterType.java @@ -0,0 +1,57 @@ +/* + * 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; + +/** The resource type. The value must be exclusion_filters. */ +@JsonSerialize(using = RumExclusionFilterType.RumExclusionFilterTypeSerializer.class) +public class RumExclusionFilterType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("exclusion_filters")); + + public static final RumExclusionFilterType EXCLUSION_FILTERS = + new RumExclusionFilterType("exclusion_filters"); + + RumExclusionFilterType(String value) { + super(value, allowedValues); + } + + public static class RumExclusionFilterTypeSerializer + extends StdSerializer { + public RumExclusionFilterTypeSerializer(Class t) { + super(t); + } + + public RumExclusionFilterTypeSerializer() { + this(null); + } + + @Override + public void serialize( + RumExclusionFilterType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static RumExclusionFilterType fromValue(String value) { + return new RumExclusionFilterType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterUpdateAttributes.java new file mode 100644 index 00000000000..dd23b606732 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterUpdateAttributes.java @@ -0,0 +1,229 @@ +/* + * 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 attributes of an exclusion filter that can be updated. For the built-in Error Tracking + * exclusion filter, only enabled can be set; name, event_type + * , and query must be omitted. + */ +@JsonPropertyOrder({ + RumExclusionFilterUpdateAttributes.JSON_PROPERTY_ENABLED, + RumExclusionFilterUpdateAttributes.JSON_PROPERTY_EVENT_TYPE, + RumExclusionFilterUpdateAttributes.JSON_PROPERTY_NAME, + RumExclusionFilterUpdateAttributes.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFilterUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_EVENT_TYPE = "event_type"; + private RumExclusionFilterEventType eventType; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public RumExclusionFilterUpdateAttributes enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the exclusion filter is active. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public RumExclusionFilterUpdateAttributes eventType(RumExclusionFilterEventType eventType) { + this.eventType = eventType; + this.unparsed |= !eventType.isValid(); + return this; + } + + /** + * The type of RUM events to filter on. + * + * @return eventType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public RumExclusionFilterEventType getEventType() { + return eventType; + } + + public void setEventType(RumExclusionFilterEventType eventType) { + if (!eventType.isValid()) { + this.unparsed = true; + } + this.eventType = eventType; + } + + public RumExclusionFilterUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * The name of the exclusion filter. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public RumExclusionFilterUpdateAttributes query(String query) { + this.query = query; + return this; + } + + /** + * Additional query used to further restrict which RUM events are excluded. Combined with + * event_type when both are provided. + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * 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 RumExclusionFilterUpdateAttributes + */ + @JsonAnySetter + public RumExclusionFilterUpdateAttributes 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 RumExclusionFilterUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFilterUpdateAttributes rumExclusionFilterUpdateAttributes = + (RumExclusionFilterUpdateAttributes) o; + return Objects.equals(this.enabled, rumExclusionFilterUpdateAttributes.enabled) + && Objects.equals(this.eventType, rumExclusionFilterUpdateAttributes.eventType) + && Objects.equals(this.name, rumExclusionFilterUpdateAttributes.name) + && Objects.equals(this.query, rumExclusionFilterUpdateAttributes.query) + && Objects.equals( + this.additionalProperties, rumExclusionFilterUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, eventType, name, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFilterUpdateAttributes {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).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/RumExclusionFilterUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterUpdateData.java new file mode 100644 index 00000000000..1cc8cd3ca19 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterUpdateData.java @@ -0,0 +1,215 @@ +/* + * 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.JsonCreator; +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 exclusion filter properties to update. */ +@JsonPropertyOrder({ + RumExclusionFilterUpdateData.JSON_PROPERTY_ATTRIBUTES, + RumExclusionFilterUpdateData.JSON_PROPERTY_ID, + RumExclusionFilterUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFilterUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private RumExclusionFilterUpdateAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private RumExclusionFilterType type = RumExclusionFilterType.EXCLUSION_FILTERS; + + public RumExclusionFilterUpdateData() {} + + @JsonCreator + public RumExclusionFilterUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + RumExclusionFilterUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumExclusionFilterType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public RumExclusionFilterUpdateData attributes(RumExclusionFilterUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of an exclusion filter that can be updated. For the built-in Error Tracking + * exclusion filter, only enabled can be set; name, event_type + * , and query must be omitted. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumExclusionFilterUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(RumExclusionFilterUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public RumExclusionFilterUpdateData id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the exclusion filter. Must match the ef_id path parameter. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public RumExclusionFilterUpdateData type(RumExclusionFilterType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The resource type. The value must be exclusion_filters. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumExclusionFilterType getType() { + return type; + } + + public void setType(RumExclusionFilterType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * 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 RumExclusionFilterUpdateData + */ + @JsonAnySetter + public RumExclusionFilterUpdateData 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 RumExclusionFilterUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFilterUpdateData rumExclusionFilterUpdateData = (RumExclusionFilterUpdateData) o; + return Objects.equals(this.attributes, rumExclusionFilterUpdateData.attributes) + && Objects.equals(this.id, rumExclusionFilterUpdateData.id) + && Objects.equals(this.type, rumExclusionFilterUpdateData.type) + && Objects.equals( + this.additionalProperties, rumExclusionFilterUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFilterUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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/RumExclusionFilterUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterUpdateRequest.java new file mode 100644 index 00000000000..6cf26a3e756 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFilterUpdateRequest.java @@ -0,0 +1,151 @@ +/* + * 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.JsonCreator; +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 exclusion filter body to update. */ +@JsonPropertyOrder({RumExclusionFilterUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFilterUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private RumExclusionFilterUpdateData data; + + public RumExclusionFilterUpdateRequest() {} + + @JsonCreator + public RumExclusionFilterUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + RumExclusionFilterUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public RumExclusionFilterUpdateRequest data(RumExclusionFilterUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * The exclusion filter properties to update. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public RumExclusionFilterUpdateData getData() { + return data; + } + + public void setData(RumExclusionFilterUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 RumExclusionFilterUpdateRequest + */ + @JsonAnySetter + public RumExclusionFilterUpdateRequest 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 RumExclusionFilterUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFilterUpdateRequest rumExclusionFilterUpdateRequest = + (RumExclusionFilterUpdateRequest) o; + return Objects.equals(this.data, rumExclusionFilterUpdateRequest.data) + && Objects.equals( + this.additionalProperties, rumExclusionFilterUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFilterUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/RumExclusionFiltersResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFiltersResponse.java new file mode 100644 index 00000000000..95f8a266961 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/RumExclusionFiltersResponse.java @@ -0,0 +1,157 @@ +/* + * 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; + +/** All exclusion filters for a RUM application. */ +@JsonPropertyOrder({RumExclusionFiltersResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class RumExclusionFiltersResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public RumExclusionFiltersResponse data(List data) { + this.data = data; + if (data != null) { + for (RumExclusionFilterData item : data) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public RumExclusionFiltersResponse addDataItem(RumExclusionFilterData dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * A list of exclusion filters. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (RumExclusionFilterData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 RumExclusionFiltersResponse + */ + @JsonAnySetter + public RumExclusionFiltersResponse 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 RumExclusionFiltersResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RumExclusionFiltersResponse rumExclusionFiltersResponse = (RumExclusionFiltersResponse) o; + return Objects.equals(this.data, rumExclusionFiltersResponse.data) + && Objects.equals( + this.additionalProperties, rumExclusionFiltersResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RumExclusionFiltersResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/test/resources/com/datadog/api/client/v2/api/rum_retention_filters.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_retention_filters.feature index 9c41dcedc0d..9abef85a775 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_retention_filters.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_retention_filters.feature @@ -9,6 +9,22 @@ Feature: Rum Retention Filters And a valid "appKeyAuth" key in the system And an instance of "RumRetentionFilters" API + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM exclusion filter returns "Bad Request" response + Given new "CreateExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "type": "exclusion_filters"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Create a RUM exclusion filter returns "Created" response + Given new "CreateExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "type": "exclusion_filters"}} + When the request is sent + Then the response status is 201 Created + @team:DataDog/rum-backend Scenario: Create a RUM retention filter returns "Bad Request" response Given new "CreateRetentionFilter" request @@ -31,6 +47,30 @@ Feature: Rum Retention Filters And the response "data.attributes.query" is equal to "custom_query" And the response "data.attributes.sample_rate" is equal to 50 + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM exclusion filter returns "Method Not Allowed" response + Given new "DeleteExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "ef_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 405 Method Not Allowed + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM exclusion filter returns "No Content" response + Given new "DeleteExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "ef_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM exclusion filter returns "Not Found" response + Given new "DeleteExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "ef_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @replay-only @team:DataDog/rum-backend Scenario: Delete a RUM retention filter returns "No Content" response Given new "DeleteRetentionFilter" request @@ -47,6 +87,22 @@ Feature: Rum Retention Filters When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM exclusion filter returns "Not Found" response + Given new "GetExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "ef_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM exclusion filter returns "OK" response + Given new "GetExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "ef_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @team:DataDog/rum-backend Scenario: Get a RUM retention filter returns "Not Found" response Given new "GetRetentionFilter" request @@ -86,6 +142,13 @@ Feature: Rum Retention Filters When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/rum-backend + Scenario: Get all RUM exclusion filters returns "OK" response + Given new "ListExclusionFilters" request + And request contains "app_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/rum-backend Scenario: Get all RUM retention filters returns "OK" response Given new "ListRetentionFilters" request @@ -120,6 +183,42 @@ Feature: Rum Retention Filters And the response "data[1].id" is equal to "42d89430-5b80-426e-a44b-ba3b417ece25" And the response "data[2].id" is equal to "bff0bc34-99e9-4c16-adce-f47e71948c23" + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM exclusion filter returns "Bad Request" response + Given new "UpdateExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "ef_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "id": "051601eb-54a0-abc0-03f9-cc02efa18892", "type": "exclusion_filters"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM exclusion filter returns "Conflict" response + Given new "UpdateExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "ef_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "id": "051601eb-54a0-abc0-03f9-cc02efa18892", "type": "exclusion_filters"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM exclusion filter returns "Not Found" response + Given new "UpdateExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "ef_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "id": "051601eb-54a0-abc0-03f9-cc02efa18892", "type": "exclusion_filters"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Update a RUM exclusion filter returns "Updated" response + Given new "UpdateExclusionFilter" request + And request contains "app_id" parameter from "REPLACE.ME" + And request contains "ef_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"enabled": true, "event_type": "error", "name": "Exclude noisy browser extension errors", "query": "@error.message:*extension*"}, "id": "051601eb-54a0-abc0-03f9-cc02efa18892", "type": "exclusion_filters"}} + When the request is sent + Then the response status is 200 Updated + @team:DataDog/rum-backend Scenario: Update a RUM retention filter returns "Bad Request" response Given new "UpdateRetentionFilter" request 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 870f4e34a50..9f130996f11 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 @@ -6977,6 +6977,36 @@ "type": "safe" } }, + "ListExclusionFilters": { + "tag": "Rum Retention Filters", + "undo": { + "type": "safe" + } + }, + "CreateExclusionFilter": { + "tag": "Rum Retention Filters", + "undo": { + "type": "safe" + } + }, + "DeleteExclusionFilter": { + "tag": "Rum Retention Filters", + "undo": { + "type": "idempotent" + } + }, + "GetExclusionFilter": { + "tag": "Rum Retention Filters", + "undo": { + "type": "safe" + } + }, + "UpdateExclusionFilter": { + "tag": "Rum Retention Filters", + "undo": { + "type": "idempotent" + } + }, "ListPermanentRetentionFilters": { "tag": "Rum Retention Filters", "undo": {