diff --git a/.apigentools-info b/.apigentools-info
index 91595476b0f..d1458794431 100644
--- a/.apigentools-info
+++ b/.apigentools-info
@@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
- "regenerated": "2024-10-30 18:58:12.249463",
- "spec_repo_commit": "755120dd"
+ "regenerated": "2024-10-31 14:19:53.013748",
+ "spec_repo_commit": "47da2e01"
},
"v2": {
"apigentools_version": "1.6.6",
- "regenerated": "2024-10-30 18:58:12.267886",
- "spec_repo_commit": "755120dd"
+ "regenerated": "2024-10-31 14:19:53.032374",
+ "spec_repo_commit": "47da2e01"
}
}
}
\ No newline at end of file
diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index 38238fba6cc..32377c157b0 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -597,6 +597,13 @@ components:
required: true
schema:
type: string
+ RumMetricIDParameter:
+ description: The name of the rum-based metric.
+ in: path
+ name: metric_id
+ required: true
+ schema:
+ type: string
SchemaVersion:
description: The schema version desired in the response.
in: query
@@ -19253,6 +19260,287 @@ components:
type: string
x-enum-varnames:
- RULE
+ RumMetricCompute:
+ description: The compute rule to compute the rum-based metric.
+ properties:
+ aggregation_type:
+ $ref: '#/components/schemas/RumMetricComputeAggregationType'
+ include_percentiles:
+ $ref: '#/components/schemas/RumMetricComputeIncludePercentiles'
+ path:
+ description: The path to the value the rum-based metric will aggregate on
+ (only used if the aggregation type is a "distribution").
+ example: '@duration'
+ type: string
+ required:
+ - aggregation_type
+ type: object
+ RumMetricComputeAggregationType:
+ description: The type of aggregation to use.
+ enum:
+ - count
+ - distribution
+ example: distribution
+ type: string
+ x-enum-varnames:
+ - COUNT
+ - DISTRIBUTION
+ RumMetricComputeIncludePercentiles:
+ description: 'Toggle to include or exclude percentile aggregations for distribution
+ metrics.
+
+ Only present when the `aggregation_type` is `distribution`.'
+ example: true
+ type: boolean
+ RumMetricCreateAttributes:
+ description: The object describing the Datadog rum-based metric to create.
+ properties:
+ compute:
+ $ref: '#/components/schemas/RumMetricCompute'
+ event_type:
+ $ref: '#/components/schemas/RumMetricEventType'
+ filter:
+ $ref: '#/components/schemas/RumMetricFilter'
+ group_by:
+ description: The rules for the group by.
+ items:
+ $ref: '#/components/schemas/RumMetricGroupBy'
+ type: array
+ uniqueness:
+ $ref: '#/components/schemas/RumMetricUniqueness'
+ required:
+ - event_type
+ - compute
+ type: object
+ RumMetricCreateData:
+ description: The new rum-based metric properties.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/RumMetricCreateAttributes'
+ id:
+ $ref: '#/components/schemas/RumMetricID'
+ type:
+ $ref: '#/components/schemas/RumMetricType'
+ required:
+ - id
+ - type
+ - attributes
+ type: object
+ RumMetricCreateRequest:
+ description: The new rum-based metric body.
+ properties:
+ data:
+ $ref: '#/components/schemas/RumMetricCreateData'
+ required:
+ - data
+ type: object
+ RumMetricEventType:
+ description: The type of RUM events to filter on.
+ enum:
+ - session
+ - view
+ - action
+ - error
+ - resource
+ - long_task
+ - vital
+ example: session
+ type: string
+ x-enum-varnames:
+ - SESSION
+ - VIEW
+ - ACTION
+ - ERROR
+ - RESOURCE
+ - LONG_TASK
+ - VITAL
+ RumMetricFilter:
+ description: The rum-based metric filter. Events matching this filter will be
+ aggregated in this metric.
+ properties:
+ query:
+ default: '*'
+ description: The search query - following the RUM search syntax. Must include
+ an @type facet query.
+ example: '@service:web-ui: '
+ type: string
+ required:
+ - query
+ type: object
+ RumMetricGroupBy:
+ description: A group by rule.
+ properties:
+ path:
+ description: The path to the value the rum-based metric will be aggregated
+ over.
+ example: '@browser.name'
+ type: string
+ tag_name:
+ description: Eventual name of the tag that gets created. By default, the
+ path attribute is used as the tag name.
+ example: browser_name
+ type: string
+ required:
+ - path
+ type: object
+ RumMetricID:
+ description: The name of the rum-based metric.
+ example: rum.sessions.webui.count
+ type: string
+ RumMetricResponse:
+ description: The rum-based metric object.
+ properties:
+ data:
+ $ref: '#/components/schemas/RumMetricResponseData'
+ type: object
+ RumMetricResponseAttributes:
+ description: The object describing a Datadog rum-based metric.
+ properties:
+ compute:
+ $ref: '#/components/schemas/RumMetricResponseCompute'
+ event_type:
+ $ref: '#/components/schemas/RumMetricEventType'
+ filter:
+ $ref: '#/components/schemas/RumMetricResponseFilter'
+ group_by:
+ description: The rules for the group by.
+ items:
+ $ref: '#/components/schemas/RumMetricResponseGroupBy'
+ type: array
+ uniqueness:
+ $ref: '#/components/schemas/RumMetricResponseUniqueness'
+ type: object
+ RumMetricResponseCompute:
+ description: The compute rule to compute the rum-based metric.
+ properties:
+ aggregation_type:
+ $ref: '#/components/schemas/RumMetricComputeAggregationType'
+ include_percentiles:
+ $ref: '#/components/schemas/RumMetricComputeIncludePercentiles'
+ path:
+ description: The path to the value the rum-based metric will aggregate on
+ (only used if the aggregation type is a "distribution").
+ example: '@duration'
+ type: string
+ type: object
+ RumMetricResponseData:
+ description: The rum-based metric properties.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/RumMetricResponseAttributes'
+ id:
+ $ref: '#/components/schemas/RumMetricID'
+ type:
+ $ref: '#/components/schemas/RumMetricType'
+ type: object
+ RumMetricResponseFilter:
+ description: The rum-based metric filter. RUM events matching this filter will
+ be aggregated in this metric.
+ properties:
+ query:
+ description: The search query - following the RUM search syntax.
+ example: service:web* AND @http.status_code:[200 TO 299]
+ type: string
+ type: object
+ RumMetricResponseGroupBy:
+ description: A group by rule.
+ properties:
+ path:
+ description: The path to the value the rum-based metric will be aggregated
+ over.
+ example: '@http.status_code'
+ type: string
+ tag_name:
+ description: Eventual name of the tag that gets created. By default, the
+ path attribute is used as the tag name.
+ example: status_code
+ type: string
+ type: object
+ RumMetricResponseUniqueness:
+ description: The rule to count updatable events. Is only set if "event_type"
+ is "sessions" or "views".
+ properties:
+ when:
+ $ref: '#/components/schemas/RumMetricUniquenessWhen'
+ type: object
+ RumMetricType:
+ default: rum_metrics
+ description: The type of the resource. The value should always be rum_metrics.
+ enum:
+ - rum_metrics
+ example: rum_metrics
+ type: string
+ x-enum-varnames:
+ - RUM_METRICS
+ RumMetricUniqueness:
+ description: The rule to count updatable events. Is only set if "event_type"
+ is "sessions" or "views".
+ properties:
+ when:
+ $ref: '#/components/schemas/RumMetricUniquenessWhen'
+ required:
+ - when
+ type: object
+ RumMetricUniquenessWhen:
+ description: When to count updatable events. "match" when the event is first
+ seen, or "end" when the event is complete.
+ enum:
+ - match
+ - end
+ example: match
+ type: string
+ x-enum-varnames:
+ - WHEN_MATCH
+ - WHEN_END
+ RumMetricUpdateAttributes:
+ description: The rum-based metric properties that will be updated.
+ properties:
+ compute:
+ $ref: '#/components/schemas/RumMetricUpdateCompute'
+ filter:
+ $ref: '#/components/schemas/RumMetricFilter'
+ group_by:
+ description: The rules for the group by.
+ items:
+ $ref: '#/components/schemas/RumMetricGroupBy'
+ type: array
+ type: object
+ RumMetricUpdateCompute:
+ description: The compute rule to compute the rum-based metric.
+ properties:
+ include_percentiles:
+ $ref: '#/components/schemas/RumMetricComputeIncludePercentiles'
+ type: object
+ RumMetricUpdateData:
+ description: The new rum-based metric properties.
+ properties:
+ attributes:
+ $ref: '#/components/schemas/RumMetricUpdateAttributes'
+ id:
+ $ref: '#/components/schemas/RumMetricID'
+ type:
+ $ref: '#/components/schemas/RumMetricType'
+ required:
+ - type
+ - attributes
+ type: object
+ RumMetricUpdateRequest:
+ description: The new rum-based metric body.
+ properties:
+ data:
+ $ref: '#/components/schemas/RumMetricUpdateData'
+ required:
+ - data
+ type: object
+ RumMetricsResponse:
+ description: All the available rum-based metric objects.
+ properties:
+ data:
+ description: A list of rum-based metric objects.
+ items:
+ $ref: '#/components/schemas/RumMetricResponseData'
+ type: array
+ type: object
SAMLAssertionAttribute:
description: SAML assertion attribute.
properties:
@@ -36517,6 +36805,131 @@ paths:
operator: OR
permissions:
- rum_apps_write
+ /api/v2/rum/config/metrics:
+ get:
+ description: Get the list of configured rum-based metrics with their definitions.
+ operationId: ListRumMetrics
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RumMetricsResponse'
+ description: OK
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Get all rum-based metrics
+ tags:
+ - Rum Metrics
+ post:
+ description: 'Create a metric based on your organization''s RUM data.
+
+ Returns the rum-based metric object from the request body when the request
+ is successful.'
+ operationId: CreateRumMetric
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RumMetricCreateRequest'
+ description: The definition of the new rum-based metric.
+ required: true
+ responses:
+ '201':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RumMetricResponse'
+ description: Created
+ '400':
+ $ref: '#/components/responses/BadRequestResponse'
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '409':
+ $ref: '#/components/responses/ConflictResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Create a rum-based metric
+ tags:
+ - Rum Metrics
+ x-codegen-request-body-name: body
+ /api/v2/rum/config/metrics/{metric_id}:
+ delete:
+ description: Delete a specific rum-based metric from your organization.
+ operationId: DeleteRumMetric
+ parameters:
+ - $ref: '#/components/parameters/RumMetricIDParameter'
+ responses:
+ '204':
+ description: No Content
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Delete a rum-based metric
+ tags:
+ - Rum Metrics
+ get:
+ description: Get a specific rum-based metric from your organization.
+ operationId: GetRumMetric
+ parameters:
+ - $ref: '#/components/parameters/RumMetricIDParameter'
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RumMetricResponse'
+ description: OK
+ '403':
+ $ref: '#/components/responses/NotAuthorizedResponse'
+ '404':
+ $ref: '#/components/responses/NotFoundResponse'
+ '429':
+ $ref: '#/components/responses/TooManyRequestsResponse'
+ summary: Get a rum-based metric
+ tags:
+ - Rum Metrics
+ patch:
+ description: 'Update a specific rum-based metric from your organization.
+
+ Returns the rum-based metric object from the request body when the request
+ is successful.'
+ operationId: UpdateRumMetric
+ parameters:
+ - $ref: '#/components/parameters/RumMetricIDParameter'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RumMetricUpdateRequest'
+ description: New definition of the rum-based metric.
+ required: true
+ responses:
+ '200':
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RumMetricResponse'
+ description: OK
+ '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-based metric
+ tags:
+ - Rum Metrics
+ x-codegen-request-body-name: body
/api/v2/rum/events:
get:
description: 'List endpoint returns events that match a RUM search query.
@@ -42124,6 +42537,12 @@ tags:
[Pipelines page](https://app.datadoghq.com/logs/pipelines).'
name: Roles
+- description: Manage configuration of [rum-based metrics](https://app.datadoghq.com/rum/generate-metrics)
+ for your organization.
+ externalDocs:
+ description: Find out more at
+ url: https://docs.datadoghq.com/real_user_monitoring/platform/generate_metrics/
+ name: Rum Metrics
- description: Create and manage your security rules, signals, filters, and more.
See the [Datadog Security page](https://docs.datadoghq.com/security/) for more
information.
diff --git a/examples/v2/rum-metrics/CreateRumMetric.java b/examples/v2/rum-metrics/CreateRumMetric.java
new file mode 100644
index 00000000000..76de54274f7
--- /dev/null
+++ b/examples/v2/rum-metrics/CreateRumMetric.java
@@ -0,0 +1,59 @@
+// Create a rum-based metric returns "Created" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.RumMetricsApi;
+import com.datadog.api.client.v2.model.RumMetricCompute;
+import com.datadog.api.client.v2.model.RumMetricComputeAggregationType;
+import com.datadog.api.client.v2.model.RumMetricCreateAttributes;
+import com.datadog.api.client.v2.model.RumMetricCreateData;
+import com.datadog.api.client.v2.model.RumMetricCreateRequest;
+import com.datadog.api.client.v2.model.RumMetricEventType;
+import com.datadog.api.client.v2.model.RumMetricFilter;
+import com.datadog.api.client.v2.model.RumMetricGroupBy;
+import com.datadog.api.client.v2.model.RumMetricResponse;
+import com.datadog.api.client.v2.model.RumMetricType;
+import com.datadog.api.client.v2.model.RumMetricUniqueness;
+import com.datadog.api.client.v2.model.RumMetricUniquenessWhen;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ RumMetricsApi apiInstance = new RumMetricsApi(defaultClient);
+
+ RumMetricCreateRequest body =
+ new RumMetricCreateRequest()
+ .data(
+ new RumMetricCreateData()
+ .attributes(
+ new RumMetricCreateAttributes()
+ .compute(
+ new RumMetricCompute()
+ .aggregationType(RumMetricComputeAggregationType.DISTRIBUTION)
+ .includePercentiles(true)
+ .path("@duration"))
+ .eventType(RumMetricEventType.SESSION)
+ .filter(new RumMetricFilter().query("@service:web-ui"))
+ .groupBy(
+ Collections.singletonList(
+ new RumMetricGroupBy()
+ .path("@browser.name")
+ .tagName("browser_name")))
+ .uniqueness(
+ new RumMetricUniqueness().when(RumMetricUniquenessWhen.WHEN_MATCH)))
+ .id("rum.sessions.webui.count")
+ .type(RumMetricType.RUM_METRICS));
+
+ try {
+ RumMetricResponse result = apiInstance.createRumMetric(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RumMetricsApi#createRumMetric");
+ 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-metrics/DeleteRumMetric.java b/examples/v2/rum-metrics/DeleteRumMetric.java
new file mode 100644
index 00000000000..b7b753ed3ca
--- /dev/null
+++ b/examples/v2/rum-metrics/DeleteRumMetric.java
@@ -0,0 +1,25 @@
+// Delete a rum-based metric returns "No Content" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.RumMetricsApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ RumMetricsApi apiInstance = new RumMetricsApi(defaultClient);
+
+ // there is a valid "rum_metric" in the system
+ String RUM_METRIC_DATA_ID = System.getenv("RUM_METRIC_DATA_ID");
+
+ try {
+ apiInstance.deleteRumMetric(RUM_METRIC_DATA_ID);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RumMetricsApi#deleteRumMetric");
+ 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-metrics/GetRumMetric.java b/examples/v2/rum-metrics/GetRumMetric.java
new file mode 100644
index 00000000000..07155d9c0b3
--- /dev/null
+++ b/examples/v2/rum-metrics/GetRumMetric.java
@@ -0,0 +1,27 @@
+// Get a rum-based metric returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.RumMetricsApi;
+import com.datadog.api.client.v2.model.RumMetricResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ RumMetricsApi apiInstance = new RumMetricsApi(defaultClient);
+
+ // there is a valid "rum_metric" in the system
+ String RUM_METRIC_DATA_ID = System.getenv("RUM_METRIC_DATA_ID");
+
+ try {
+ RumMetricResponse result = apiInstance.getRumMetric(RUM_METRIC_DATA_ID);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RumMetricsApi#getRumMetric");
+ 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-metrics/ListRumMetrics.java b/examples/v2/rum-metrics/ListRumMetrics.java
new file mode 100644
index 00000000000..0225cf6b02d
--- /dev/null
+++ b/examples/v2/rum-metrics/ListRumMetrics.java
@@ -0,0 +1,24 @@
+// Get all rum-based metrics returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.RumMetricsApi;
+import com.datadog.api.client.v2.model.RumMetricsResponse;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ RumMetricsApi apiInstance = new RumMetricsApi(defaultClient);
+
+ try {
+ RumMetricsResponse result = apiInstance.listRumMetrics();
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RumMetricsApi#listRumMetrics");
+ 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-metrics/UpdateRumMetric.java b/examples/v2/rum-metrics/UpdateRumMetric.java
new file mode 100644
index 00000000000..b6d3f2468fc
--- /dev/null
+++ b/examples/v2/rum-metrics/UpdateRumMetric.java
@@ -0,0 +1,51 @@
+// Update a rum-based metric returns "OK" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.RumMetricsApi;
+import com.datadog.api.client.v2.model.RumMetricFilter;
+import com.datadog.api.client.v2.model.RumMetricGroupBy;
+import com.datadog.api.client.v2.model.RumMetricResponse;
+import com.datadog.api.client.v2.model.RumMetricType;
+import com.datadog.api.client.v2.model.RumMetricUpdateAttributes;
+import com.datadog.api.client.v2.model.RumMetricUpdateCompute;
+import com.datadog.api.client.v2.model.RumMetricUpdateData;
+import com.datadog.api.client.v2.model.RumMetricUpdateRequest;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ RumMetricsApi apiInstance = new RumMetricsApi(defaultClient);
+
+ // there is a valid "rum_metric" in the system
+ String RUM_METRIC_DATA_ID = System.getenv("RUM_METRIC_DATA_ID");
+
+ RumMetricUpdateRequest body =
+ new RumMetricUpdateRequest()
+ .data(
+ new RumMetricUpdateData()
+ .id(RUM_METRIC_DATA_ID)
+ .type(RumMetricType.RUM_METRICS)
+ .attributes(
+ new RumMetricUpdateAttributes()
+ .compute(new RumMetricUpdateCompute().includePercentiles(false))
+ .filter(new RumMetricFilter().query("@service:rum-config"))
+ .groupBy(
+ Collections.singletonList(
+ new RumMetricGroupBy()
+ .path("@browser.version")
+ .tagName("browser_version")))));
+
+ try {
+ RumMetricResponse result = apiInstance.updateRumMetric(RUM_METRIC_DATA_ID, body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling RumMetricsApi#updateRumMetric");
+ 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/RumMetricsApi.java b/src/main/java/com/datadog/api/client/v2/api/RumMetricsApi.java
new file mode 100644
index 00000000000..62fef809e09
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/RumMetricsApi.java
@@ -0,0 +1,716 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.RumMetricCreateRequest;
+import com.datadog.api.client.v2.model.RumMetricResponse;
+import com.datadog.api.client.v2.model.RumMetricUpdateRequest;
+import com.datadog.api.client.v2.model.RumMetricsResponse;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricsApi {
+ private ApiClient apiClient;
+
+ public RumMetricsApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public RumMetricsApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Create a rum-based metric.
+ *
+ *
See {@link #createRumMetricWithHttpInfo}.
+ *
+ * @param body The definition of the new rum-based metric. (required)
+ * @return RumMetricResponse
+ * @throws ApiException if fails to make API call
+ */
+ public RumMetricResponse createRumMetric(RumMetricCreateRequest body) throws ApiException {
+ return createRumMetricWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Create a rum-based metric.
+ *
+ *
See {@link #createRumMetricWithHttpInfoAsync}.
+ *
+ * @param body The definition of the new rum-based metric. (required)
+ * @return CompletableFuture<RumMetricResponse>
+ */
+ public CompletableFuture createRumMetricAsync(RumMetricCreateRequest body) {
+ return createRumMetricWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Create a metric based on your organization's RUM data. Returns the rum-based metric object from
+ * the request body when the request is successful.
+ *
+ * @param body The definition of the new rum-based metric. (required)
+ * @return ApiResponse<RumMetricResponse>
+ * @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 | - |
+ * | 409 | Conflict | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse createRumMetricWithHttpInfo(RumMetricCreateRequest body)
+ throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling createRumMetric");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/rum/config/metrics";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.RumMetricsApi.createRumMetric",
+ 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-based metric.
+ *
+ * See {@link #createRumMetricWithHttpInfo}.
+ *
+ * @param body The definition of the new rum-based metric. (required)
+ * @return CompletableFuture<ApiResponse<RumMetricResponse>>
+ */
+ public CompletableFuture> createRumMetricWithHttpInfoAsync(
+ RumMetricCreateRequest body) {
+ Object localVarPostBody = body;
+
+ // 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 createRumMetric"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/rum/config/metrics";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.RumMetricsApi.createRumMetric",
+ 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() {});
+ }
+
+ /**
+ * Delete a rum-based metric.
+ *
+ * See {@link #deleteRumMetricWithHttpInfo}.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @throws ApiException if fails to make API call
+ */
+ public void deleteRumMetric(String metricId) throws ApiException {
+ deleteRumMetricWithHttpInfo(metricId);
+ }
+
+ /**
+ * Delete a rum-based metric.
+ *
+ *
See {@link #deleteRumMetricWithHttpInfoAsync}.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @return CompletableFuture
+ */
+ public CompletableFuture deleteRumMetricAsync(String metricId) {
+ return deleteRumMetricWithHttpInfoAsync(metricId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Delete a specific rum-based metric from your organization.
+ *
+ * @param metricId The name of the rum-based metric. (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 | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse deleteRumMetricWithHttpInfo(String metricId) throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'metricId' is set
+ if (metricId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'metricId' when calling deleteRumMetric");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/rum/config/metrics/{metric_id}"
+ .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.RumMetricsApi.deleteRumMetric",
+ 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-based metric.
+ *
+ * See {@link #deleteRumMetricWithHttpInfo}.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @return CompletableFuture<ApiResponse<Void>>
+ */
+ public CompletableFuture> deleteRumMetricWithHttpInfoAsync(String metricId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'metricId' is set
+ if (metricId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'metricId' when calling deleteRumMetric"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/rum/config/metrics/{metric_id}"
+ .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.RumMetricsApi.deleteRumMetric",
+ 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-based metric.
+ *
+ * See {@link #getRumMetricWithHttpInfo}.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @return RumMetricResponse
+ * @throws ApiException if fails to make API call
+ */
+ public RumMetricResponse getRumMetric(String metricId) throws ApiException {
+ return getRumMetricWithHttpInfo(metricId).getData();
+ }
+
+ /**
+ * Get a rum-based metric.
+ *
+ *
See {@link #getRumMetricWithHttpInfoAsync}.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @return CompletableFuture<RumMetricResponse>
+ */
+ public CompletableFuture getRumMetricAsync(String metricId) {
+ return getRumMetricWithHttpInfoAsync(metricId)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get a specific rum-based metric from your organization.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @return ApiResponse<RumMetricResponse>
+ * @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 getRumMetricWithHttpInfo(String metricId)
+ throws ApiException {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'metricId' is set
+ if (metricId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'metricId' when calling getRumMetric");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/rum/config/metrics/{metric_id}"
+ .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.RumMetricsApi.getRumMetric",
+ 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-based metric.
+ *
+ * See {@link #getRumMetricWithHttpInfo}.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @return CompletableFuture<ApiResponse<RumMetricResponse>>
+ */
+ public CompletableFuture> getRumMetricWithHttpInfoAsync(
+ String metricId) {
+ Object localVarPostBody = null;
+
+ // verify the required parameter 'metricId' is set
+ if (metricId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'metricId' when calling getRumMetric"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/rum/config/metrics/{metric_id}"
+ .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.RumMetricsApi.getRumMetric",
+ 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 rum-based metrics.
+ *
+ * See {@link #listRumMetricsWithHttpInfo}.
+ *
+ * @return RumMetricsResponse
+ * @throws ApiException if fails to make API call
+ */
+ public RumMetricsResponse listRumMetrics() throws ApiException {
+ return listRumMetricsWithHttpInfo().getData();
+ }
+
+ /**
+ * Get all rum-based metrics.
+ *
+ *
See {@link #listRumMetricsWithHttpInfoAsync}.
+ *
+ * @return CompletableFuture<RumMetricsResponse>
+ */
+ public CompletableFuture listRumMetricsAsync() {
+ return listRumMetricsWithHttpInfoAsync()
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Get the list of configured rum-based metrics with their definitions.
+ *
+ * @return ApiResponse<RumMetricsResponse>
+ * @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 listRumMetricsWithHttpInfo() throws ApiException {
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/rum/config/metrics";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.RumMetricsApi.listRumMetrics",
+ 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-based metrics.
+ *
+ * See {@link #listRumMetricsWithHttpInfo}.
+ *
+ * @return CompletableFuture<ApiResponse<RumMetricsResponse>>
+ */
+ public CompletableFuture> listRumMetricsWithHttpInfoAsync() {
+ Object localVarPostBody = null;
+ // create path and map variables
+ String localVarPath = "/api/v2/rum/config/metrics";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.RumMetricsApi.listRumMetrics",
+ 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() {});
+ }
+
+ /**
+ * Update a rum-based metric.
+ *
+ * See {@link #updateRumMetricWithHttpInfo}.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @param body New definition of the rum-based metric. (required)
+ * @return RumMetricResponse
+ * @throws ApiException if fails to make API call
+ */
+ public RumMetricResponse updateRumMetric(String metricId, RumMetricUpdateRequest body)
+ throws ApiException {
+ return updateRumMetricWithHttpInfo(metricId, body).getData();
+ }
+
+ /**
+ * Update a rum-based metric.
+ *
+ *
See {@link #updateRumMetricWithHttpInfoAsync}.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @param body New definition of the rum-based metric. (required)
+ * @return CompletableFuture<RumMetricResponse>
+ */
+ public CompletableFuture updateRumMetricAsync(
+ String metricId, RumMetricUpdateRequest body) {
+ return updateRumMetricWithHttpInfoAsync(metricId, body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Update a specific rum-based metric from your organization. Returns the rum-based metric object
+ * from the request body when the request is successful.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @param body New definition of the rum-based metric. (required)
+ * @return ApiResponse<RumMetricResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | OK | - |
+ * | 400 | Bad Request | - |
+ * | 403 | Not Authorized | - |
+ * | 404 | Not Found | - |
+ * | 409 | Conflict | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse updateRumMetricWithHttpInfo(
+ String metricId, RumMetricUpdateRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'metricId' is set
+ if (metricId == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'metricId' when calling updateRumMetric");
+ }
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling updateRumMetric");
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/rum/config/metrics/{metric_id}"
+ .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.RumMetricsApi.updateRumMetric",
+ 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-based metric.
+ *
+ * See {@link #updateRumMetricWithHttpInfo}.
+ *
+ * @param metricId The name of the rum-based metric. (required)
+ * @param body New definition of the rum-based metric. (required)
+ * @return CompletableFuture<ApiResponse<RumMetricResponse>>
+ */
+ public CompletableFuture> updateRumMetricWithHttpInfoAsync(
+ String metricId, RumMetricUpdateRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'metricId' is set
+ if (metricId == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'metricId' when calling updateRumMetric"));
+ 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 updateRumMetric"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath =
+ "/api/v2/rum/config/metrics/{metric_id}"
+ .replaceAll("\\{" + "metric_id" + "\\}", apiClient.escapeString(metricId.toString()));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.RumMetricsApi.updateRumMetric",
+ 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() {});
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricCompute.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricCompute.java
new file mode 100644
index 00000000000..065e9661bd9
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricCompute.java
@@ -0,0 +1,207 @@
+/*
+ * 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 compute rule to compute the rum-based metric. */
+@JsonPropertyOrder({
+ RumMetricCompute.JSON_PROPERTY_AGGREGATION_TYPE,
+ RumMetricCompute.JSON_PROPERTY_INCLUDE_PERCENTILES,
+ RumMetricCompute.JSON_PROPERTY_PATH
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricCompute {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_AGGREGATION_TYPE = "aggregation_type";
+ private RumMetricComputeAggregationType aggregationType;
+
+ public static final String JSON_PROPERTY_INCLUDE_PERCENTILES = "include_percentiles";
+ private Boolean includePercentiles;
+
+ public static final String JSON_PROPERTY_PATH = "path";
+ private String path;
+
+ public RumMetricCompute() {}
+
+ @JsonCreator
+ public RumMetricCompute(
+ @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION_TYPE)
+ RumMetricComputeAggregationType aggregationType) {
+ this.aggregationType = aggregationType;
+ this.unparsed |= !aggregationType.isValid();
+ }
+
+ public RumMetricCompute aggregationType(RumMetricComputeAggregationType aggregationType) {
+ this.aggregationType = aggregationType;
+ this.unparsed |= !aggregationType.isValid();
+ return this;
+ }
+
+ /**
+ * The type of aggregation to use.
+ *
+ * @return aggregationType
+ */
+ @JsonProperty(JSON_PROPERTY_AGGREGATION_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public RumMetricComputeAggregationType getAggregationType() {
+ return aggregationType;
+ }
+
+ public void setAggregationType(RumMetricComputeAggregationType aggregationType) {
+ if (!aggregationType.isValid()) {
+ this.unparsed = true;
+ }
+ this.aggregationType = aggregationType;
+ }
+
+ public RumMetricCompute includePercentiles(Boolean includePercentiles) {
+ this.includePercentiles = includePercentiles;
+ return this;
+ }
+
+ /**
+ * Toggle to include or exclude percentile aggregations for distribution metrics. Only present
+ * when the aggregation_type is distribution.
+ *
+ * @return includePercentiles
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getIncludePercentiles() {
+ return includePercentiles;
+ }
+
+ public void setIncludePercentiles(Boolean includePercentiles) {
+ this.includePercentiles = includePercentiles;
+ }
+
+ public RumMetricCompute path(String path) {
+ this.path = path;
+ return this;
+ }
+
+ /**
+ * The path to the value the rum-based metric will aggregate on (only used if the aggregation type
+ * is a "distribution").
+ *
+ * @return path
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_PATH)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ /**
+ * 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 RumMetricCompute
+ */
+ @JsonAnySetter
+ public RumMetricCompute 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 RumMetricCompute object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricCompute rumMetricCompute = (RumMetricCompute) o;
+ return Objects.equals(this.aggregationType, rumMetricCompute.aggregationType)
+ && Objects.equals(this.includePercentiles, rumMetricCompute.includePercentiles)
+ && Objects.equals(this.path, rumMetricCompute.path)
+ && Objects.equals(this.additionalProperties, rumMetricCompute.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(aggregationType, includePercentiles, path, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricCompute {\n");
+ sb.append(" aggregationType: ").append(toIndentedString(aggregationType)).append("\n");
+ sb.append(" includePercentiles: ").append(toIndentedString(includePercentiles)).append("\n");
+ sb.append(" path: ").append(toIndentedString(path)).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/RumMetricComputeAggregationType.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricComputeAggregationType.java
new file mode 100644
index 00000000000..9587c124eab
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricComputeAggregationType.java
@@ -0,0 +1,60 @@
+/*
+ * 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 aggregation to use. */
+@JsonSerialize(
+ using = RumMetricComputeAggregationType.RumMetricComputeAggregationTypeSerializer.class)
+public class RumMetricComputeAggregationType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("count", "distribution"));
+
+ public static final RumMetricComputeAggregationType COUNT =
+ new RumMetricComputeAggregationType("count");
+ public static final RumMetricComputeAggregationType DISTRIBUTION =
+ new RumMetricComputeAggregationType("distribution");
+
+ RumMetricComputeAggregationType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class RumMetricComputeAggregationTypeSerializer
+ extends StdSerializer {
+ public RumMetricComputeAggregationTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public RumMetricComputeAggregationTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ RumMetricComputeAggregationType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static RumMetricComputeAggregationType fromValue(String value) {
+ return new RumMetricComputeAggregationType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateAttributes.java
new file mode 100644
index 00000000000..0fec2a21ea2
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateAttributes.java
@@ -0,0 +1,279 @@
+/*
+ * 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.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** The object describing the Datadog rum-based metric to create. */
+@JsonPropertyOrder({
+ RumMetricCreateAttributes.JSON_PROPERTY_COMPUTE,
+ RumMetricCreateAttributes.JSON_PROPERTY_EVENT_TYPE,
+ RumMetricCreateAttributes.JSON_PROPERTY_FILTER,
+ RumMetricCreateAttributes.JSON_PROPERTY_GROUP_BY,
+ RumMetricCreateAttributes.JSON_PROPERTY_UNIQUENESS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricCreateAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_COMPUTE = "compute";
+ private RumMetricCompute compute;
+
+ public static final String JSON_PROPERTY_EVENT_TYPE = "event_type";
+ private RumMetricEventType eventType;
+
+ public static final String JSON_PROPERTY_FILTER = "filter";
+ private RumMetricFilter filter;
+
+ public static final String JSON_PROPERTY_GROUP_BY = "group_by";
+ private List groupBy = null;
+
+ public static final String JSON_PROPERTY_UNIQUENESS = "uniqueness";
+ private RumMetricUniqueness uniqueness;
+
+ public RumMetricCreateAttributes() {}
+
+ @JsonCreator
+ public RumMetricCreateAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_COMPUTE) RumMetricCompute compute,
+ @JsonProperty(required = true, value = JSON_PROPERTY_EVENT_TYPE)
+ RumMetricEventType eventType) {
+ this.compute = compute;
+ this.unparsed |= compute.unparsed;
+ this.eventType = eventType;
+ this.unparsed |= !eventType.isValid();
+ }
+
+ public RumMetricCreateAttributes compute(RumMetricCompute compute) {
+ this.compute = compute;
+ this.unparsed |= compute.unparsed;
+ return this;
+ }
+
+ /**
+ * The compute rule to compute the rum-based metric.
+ *
+ * @return compute
+ */
+ @JsonProperty(JSON_PROPERTY_COMPUTE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public RumMetricCompute getCompute() {
+ return compute;
+ }
+
+ public void setCompute(RumMetricCompute compute) {
+ this.compute = compute;
+ }
+
+ public RumMetricCreateAttributes eventType(RumMetricEventType eventType) {
+ this.eventType = eventType;
+ this.unparsed |= !eventType.isValid();
+ return this;
+ }
+
+ /**
+ * The type of RUM events to filter on.
+ *
+ * @return eventType
+ */
+ @JsonProperty(JSON_PROPERTY_EVENT_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public RumMetricEventType getEventType() {
+ return eventType;
+ }
+
+ public void setEventType(RumMetricEventType eventType) {
+ if (!eventType.isValid()) {
+ this.unparsed = true;
+ }
+ this.eventType = eventType;
+ }
+
+ public RumMetricCreateAttributes filter(RumMetricFilter filter) {
+ this.filter = filter;
+ this.unparsed |= filter.unparsed;
+ return this;
+ }
+
+ /**
+ * The rum-based metric filter. Events matching this filter will be aggregated in this metric.
+ *
+ * @return filter
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_FILTER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricFilter getFilter() {
+ return filter;
+ }
+
+ public void setFilter(RumMetricFilter filter) {
+ this.filter = filter;
+ }
+
+ public RumMetricCreateAttributes groupBy(List groupBy) {
+ this.groupBy = groupBy;
+ for (RumMetricGroupBy item : groupBy) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public RumMetricCreateAttributes addGroupByItem(RumMetricGroupBy groupByItem) {
+ if (this.groupBy == null) {
+ this.groupBy = new ArrayList<>();
+ }
+ this.groupBy.add(groupByItem);
+ this.unparsed |= groupByItem.unparsed;
+ return this;
+ }
+
+ /**
+ * The rules for the group by.
+ *
+ * @return groupBy
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_GROUP_BY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getGroupBy() {
+ return groupBy;
+ }
+
+ public void setGroupBy(List groupBy) {
+ this.groupBy = groupBy;
+ }
+
+ public RumMetricCreateAttributes uniqueness(RumMetricUniqueness uniqueness) {
+ this.uniqueness = uniqueness;
+ this.unparsed |= uniqueness.unparsed;
+ return this;
+ }
+
+ /**
+ * The rule to count updatable events. Is only set if "event_type" is "sessions" or "views".
+ *
+ * @return uniqueness
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_UNIQUENESS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricUniqueness getUniqueness() {
+ return uniqueness;
+ }
+
+ public void setUniqueness(RumMetricUniqueness uniqueness) {
+ this.uniqueness = uniqueness;
+ }
+
+ /**
+ * 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 RumMetricCreateAttributes
+ */
+ @JsonAnySetter
+ public RumMetricCreateAttributes 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 RumMetricCreateAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricCreateAttributes rumMetricCreateAttributes = (RumMetricCreateAttributes) o;
+ return Objects.equals(this.compute, rumMetricCreateAttributes.compute)
+ && Objects.equals(this.eventType, rumMetricCreateAttributes.eventType)
+ && Objects.equals(this.filter, rumMetricCreateAttributes.filter)
+ && Objects.equals(this.groupBy, rumMetricCreateAttributes.groupBy)
+ && Objects.equals(this.uniqueness, rumMetricCreateAttributes.uniqueness)
+ && Objects.equals(
+ this.additionalProperties, rumMetricCreateAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(compute, eventType, filter, groupBy, uniqueness, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricCreateAttributes {\n");
+ sb.append(" compute: ").append(toIndentedString(compute)).append("\n");
+ sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n");
+ sb.append(" filter: ").append(toIndentedString(filter)).append("\n");
+ sb.append(" groupBy: ").append(toIndentedString(groupBy)).append("\n");
+ sb.append(" uniqueness: ").append(toIndentedString(uniqueness)).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/RumMetricCreateData.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateData.java
new file mode 100644
index 00000000000..f63c74e3145
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateData.java
@@ -0,0 +1,209 @@
+/*
+ * 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 rum-based metric properties. */
+@JsonPropertyOrder({
+ RumMetricCreateData.JSON_PROPERTY_ATTRIBUTES,
+ RumMetricCreateData.JSON_PROPERTY_ID,
+ RumMetricCreateData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricCreateData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private RumMetricCreateAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private RumMetricType type = RumMetricType.RUM_METRICS;
+
+ public RumMetricCreateData() {}
+
+ @JsonCreator
+ public RumMetricCreateData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ RumMetricCreateAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumMetricType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.id = id;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public RumMetricCreateData attributes(RumMetricCreateAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * The object describing the Datadog rum-based metric to create.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public RumMetricCreateAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(RumMetricCreateAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public RumMetricCreateData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The name of the rum-based metric.
+ *
+ * @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 RumMetricCreateData type(RumMetricType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the resource. The value should always be rum_metrics.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public RumMetricType getType() {
+ return type;
+ }
+
+ public void setType(RumMetricType 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 RumMetricCreateData
+ */
+ @JsonAnySetter
+ public RumMetricCreateData 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 RumMetricCreateData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricCreateData rumMetricCreateData = (RumMetricCreateData) o;
+ return Objects.equals(this.attributes, rumMetricCreateData.attributes)
+ && Objects.equals(this.id, rumMetricCreateData.id)
+ && Objects.equals(this.type, rumMetricCreateData.type)
+ && Objects.equals(this.additionalProperties, rumMetricCreateData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricCreateData {\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/RumMetricCreateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateRequest.java
new file mode 100644
index 00000000000..67e8d95463a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricCreateRequest.java
@@ -0,0 +1,145 @@
+/*
+ * 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 rum-based metric body. */
+@JsonPropertyOrder({RumMetricCreateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricCreateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private RumMetricCreateData data;
+
+ public RumMetricCreateRequest() {}
+
+ @JsonCreator
+ public RumMetricCreateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RumMetricCreateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public RumMetricCreateRequest data(RumMetricCreateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * The new rum-based metric properties.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public RumMetricCreateData getData() {
+ return data;
+ }
+
+ public void setData(RumMetricCreateData data) {
+ this.data = data;
+ }
+
+ /**
+ * 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 RumMetricCreateRequest
+ */
+ @JsonAnySetter
+ public RumMetricCreateRequest 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 RumMetricCreateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricCreateRequest rumMetricCreateRequest = (RumMetricCreateRequest) o;
+ return Objects.equals(this.data, rumMetricCreateRequest.data)
+ && Objects.equals(this.additionalProperties, rumMetricCreateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricCreateRequest {\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/RumMetricEventType.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricEventType.java
new file mode 100644
index 00000000000..880d72c3dde
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricEventType.java
@@ -0,0 +1,61 @@
+/*
+ * 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 = RumMetricEventType.RumMetricEventTypeSerializer.class)
+public class RumMetricEventType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(
+ Arrays.asList("session", "view", "action", "error", "resource", "long_task", "vital"));
+
+ public static final RumMetricEventType SESSION = new RumMetricEventType("session");
+ public static final RumMetricEventType VIEW = new RumMetricEventType("view");
+ public static final RumMetricEventType ACTION = new RumMetricEventType("action");
+ public static final RumMetricEventType ERROR = new RumMetricEventType("error");
+ public static final RumMetricEventType RESOURCE = new RumMetricEventType("resource");
+ public static final RumMetricEventType LONG_TASK = new RumMetricEventType("long_task");
+ public static final RumMetricEventType VITAL = new RumMetricEventType("vital");
+
+ RumMetricEventType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class RumMetricEventTypeSerializer extends StdSerializer {
+ public RumMetricEventTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public RumMetricEventTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(RumMetricEventType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static RumMetricEventType fromValue(String value) {
+ return new RumMetricEventType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricFilter.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricFilter.java
new file mode 100644
index 00000000000..c43d36bc732
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricFilter.java
@@ -0,0 +1,142 @@
+/*
+ * 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 rum-based metric filter. Events matching this filter will be aggregated in this metric. */
+@JsonPropertyOrder({RumMetricFilter.JSON_PROPERTY_QUERY})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricFilter {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_QUERY = "query";
+ private String query = "*";
+
+ public RumMetricFilter() {}
+
+ @JsonCreator
+ public RumMetricFilter(@JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) {
+ this.query = query;
+ }
+
+ public RumMetricFilter query(String query) {
+ this.query = query;
+ return this;
+ }
+
+ /**
+ * The search query - following the RUM search syntax. Must include an @type facet query.
+ *
+ * @return query
+ */
+ @JsonProperty(JSON_PROPERTY_QUERY)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ 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 RumMetricFilter
+ */
+ @JsonAnySetter
+ public RumMetricFilter 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 RumMetricFilter object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricFilter rumMetricFilter = (RumMetricFilter) o;
+ return Objects.equals(this.query, rumMetricFilter.query)
+ && Objects.equals(this.additionalProperties, rumMetricFilter.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(query, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricFilter {\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/RumMetricGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricGroupBy.java
new file mode 100644
index 00000000000..4f072cc98b7
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricGroupBy.java
@@ -0,0 +1,169 @@
+/*
+ * 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;
+
+/** A group by rule. */
+@JsonPropertyOrder({RumMetricGroupBy.JSON_PROPERTY_PATH, RumMetricGroupBy.JSON_PROPERTY_TAG_NAME})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricGroupBy {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_PATH = "path";
+ private String path;
+
+ public static final String JSON_PROPERTY_TAG_NAME = "tag_name";
+ private String tagName;
+
+ public RumMetricGroupBy() {}
+
+ @JsonCreator
+ public RumMetricGroupBy(@JsonProperty(required = true, value = JSON_PROPERTY_PATH) String path) {
+ this.path = path;
+ }
+
+ public RumMetricGroupBy path(String path) {
+ this.path = path;
+ return this;
+ }
+
+ /**
+ * The path to the value the rum-based metric will be aggregated over.
+ *
+ * @return path
+ */
+ @JsonProperty(JSON_PROPERTY_PATH)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public RumMetricGroupBy tagName(String tagName) {
+ this.tagName = tagName;
+ return this;
+ }
+
+ /**
+ * Eventual name of the tag that gets created. By default, the path attribute is used as the tag
+ * name.
+ *
+ * @return tagName
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TAG_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getTagName() {
+ return tagName;
+ }
+
+ public void setTagName(String tagName) {
+ this.tagName = tagName;
+ }
+
+ /**
+ * 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 RumMetricGroupBy
+ */
+ @JsonAnySetter
+ public RumMetricGroupBy 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 RumMetricGroupBy object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricGroupBy rumMetricGroupBy = (RumMetricGroupBy) o;
+ return Objects.equals(this.path, rumMetricGroupBy.path)
+ && Objects.equals(this.tagName, rumMetricGroupBy.tagName)
+ && Objects.equals(this.additionalProperties, rumMetricGroupBy.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(path, tagName, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricGroupBy {\n");
+ sb.append(" path: ").append(toIndentedString(path)).append("\n");
+ sb.append(" tagName: ").append(toIndentedString(tagName)).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/RumMetricResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponse.java
new file mode 100644
index 00000000000..e9fcba1b385
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponse.java
@@ -0,0 +1,136 @@
+/*
+ * 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 rum-based metric object. */
+@JsonPropertyOrder({RumMetricResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private RumMetricResponseData data;
+
+ public RumMetricResponse data(RumMetricResponseData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * The rum-based metric properties.
+ *
+ * @return data
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricResponseData getData() {
+ return data;
+ }
+
+ public void setData(RumMetricResponseData data) {
+ this.data = data;
+ }
+
+ /**
+ * 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 RumMetricResponse
+ */
+ @JsonAnySetter
+ public RumMetricResponse 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 RumMetricResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricResponse rumMetricResponse = (RumMetricResponse) o;
+ return Objects.equals(this.data, rumMetricResponse.data)
+ && Objects.equals(this.additionalProperties, rumMetricResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricResponse {\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/RumMetricResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseAttributes.java
new file mode 100644
index 00000000000..ec7d6a13449
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseAttributes.java
@@ -0,0 +1,267 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** The object describing a Datadog rum-based metric. */
+@JsonPropertyOrder({
+ RumMetricResponseAttributes.JSON_PROPERTY_COMPUTE,
+ RumMetricResponseAttributes.JSON_PROPERTY_EVENT_TYPE,
+ RumMetricResponseAttributes.JSON_PROPERTY_FILTER,
+ RumMetricResponseAttributes.JSON_PROPERTY_GROUP_BY,
+ RumMetricResponseAttributes.JSON_PROPERTY_UNIQUENESS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricResponseAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_COMPUTE = "compute";
+ private RumMetricResponseCompute compute;
+
+ public static final String JSON_PROPERTY_EVENT_TYPE = "event_type";
+ private RumMetricEventType eventType;
+
+ public static final String JSON_PROPERTY_FILTER = "filter";
+ private RumMetricResponseFilter filter;
+
+ public static final String JSON_PROPERTY_GROUP_BY = "group_by";
+ private List groupBy = null;
+
+ public static final String JSON_PROPERTY_UNIQUENESS = "uniqueness";
+ private RumMetricResponseUniqueness uniqueness;
+
+ public RumMetricResponseAttributes compute(RumMetricResponseCompute compute) {
+ this.compute = compute;
+ this.unparsed |= compute.unparsed;
+ return this;
+ }
+
+ /**
+ * The compute rule to compute the rum-based metric.
+ *
+ * @return compute
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_COMPUTE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricResponseCompute getCompute() {
+ return compute;
+ }
+
+ public void setCompute(RumMetricResponseCompute compute) {
+ this.compute = compute;
+ }
+
+ public RumMetricResponseAttributes eventType(RumMetricEventType 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 RumMetricEventType getEventType() {
+ return eventType;
+ }
+
+ public void setEventType(RumMetricEventType eventType) {
+ if (!eventType.isValid()) {
+ this.unparsed = true;
+ }
+ this.eventType = eventType;
+ }
+
+ public RumMetricResponseAttributes filter(RumMetricResponseFilter filter) {
+ this.filter = filter;
+ this.unparsed |= filter.unparsed;
+ return this;
+ }
+
+ /**
+ * The rum-based metric filter. RUM events matching this filter will be aggregated in this metric.
+ *
+ * @return filter
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_FILTER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricResponseFilter getFilter() {
+ return filter;
+ }
+
+ public void setFilter(RumMetricResponseFilter filter) {
+ this.filter = filter;
+ }
+
+ public RumMetricResponseAttributes groupBy(List groupBy) {
+ this.groupBy = groupBy;
+ for (RumMetricResponseGroupBy item : groupBy) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public RumMetricResponseAttributes addGroupByItem(RumMetricResponseGroupBy groupByItem) {
+ if (this.groupBy == null) {
+ this.groupBy = new ArrayList<>();
+ }
+ this.groupBy.add(groupByItem);
+ this.unparsed |= groupByItem.unparsed;
+ return this;
+ }
+
+ /**
+ * The rules for the group by.
+ *
+ * @return groupBy
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_GROUP_BY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getGroupBy() {
+ return groupBy;
+ }
+
+ public void setGroupBy(List groupBy) {
+ this.groupBy = groupBy;
+ }
+
+ public RumMetricResponseAttributes uniqueness(RumMetricResponseUniqueness uniqueness) {
+ this.uniqueness = uniqueness;
+ this.unparsed |= uniqueness.unparsed;
+ return this;
+ }
+
+ /**
+ * The rule to count updatable events. Is only set if "event_type" is "sessions" or "views".
+ *
+ * @return uniqueness
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_UNIQUENESS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricResponseUniqueness getUniqueness() {
+ return uniqueness;
+ }
+
+ public void setUniqueness(RumMetricResponseUniqueness uniqueness) {
+ this.uniqueness = uniqueness;
+ }
+
+ /**
+ * 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 RumMetricResponseAttributes
+ */
+ @JsonAnySetter
+ public RumMetricResponseAttributes 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 RumMetricResponseAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricResponseAttributes rumMetricResponseAttributes = (RumMetricResponseAttributes) o;
+ return Objects.equals(this.compute, rumMetricResponseAttributes.compute)
+ && Objects.equals(this.eventType, rumMetricResponseAttributes.eventType)
+ && Objects.equals(this.filter, rumMetricResponseAttributes.filter)
+ && Objects.equals(this.groupBy, rumMetricResponseAttributes.groupBy)
+ && Objects.equals(this.uniqueness, rumMetricResponseAttributes.uniqueness)
+ && Objects.equals(
+ this.additionalProperties, rumMetricResponseAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(compute, eventType, filter, groupBy, uniqueness, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricResponseAttributes {\n");
+ sb.append(" compute: ").append(toIndentedString(compute)).append("\n");
+ sb.append(" eventType: ").append(toIndentedString(eventType)).append("\n");
+ sb.append(" filter: ").append(toIndentedString(filter)).append("\n");
+ sb.append(" groupBy: ").append(toIndentedString(groupBy)).append("\n");
+ sb.append(" uniqueness: ").append(toIndentedString(uniqueness)).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/RumMetricResponseCompute.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseCompute.java
new file mode 100644
index 00000000000..c5a97086f07
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseCompute.java
@@ -0,0 +1,197 @@
+/*
+ * 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 compute rule to compute the rum-based metric. */
+@JsonPropertyOrder({
+ RumMetricResponseCompute.JSON_PROPERTY_AGGREGATION_TYPE,
+ RumMetricResponseCompute.JSON_PROPERTY_INCLUDE_PERCENTILES,
+ RumMetricResponseCompute.JSON_PROPERTY_PATH
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricResponseCompute {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_AGGREGATION_TYPE = "aggregation_type";
+ private RumMetricComputeAggregationType aggregationType;
+
+ public static final String JSON_PROPERTY_INCLUDE_PERCENTILES = "include_percentiles";
+ private Boolean includePercentiles;
+
+ public static final String JSON_PROPERTY_PATH = "path";
+ private String path;
+
+ public RumMetricResponseCompute aggregationType(RumMetricComputeAggregationType aggregationType) {
+ this.aggregationType = aggregationType;
+ this.unparsed |= !aggregationType.isValid();
+ return this;
+ }
+
+ /**
+ * The type of aggregation to use.
+ *
+ * @return aggregationType
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_AGGREGATION_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricComputeAggregationType getAggregationType() {
+ return aggregationType;
+ }
+
+ public void setAggregationType(RumMetricComputeAggregationType aggregationType) {
+ if (!aggregationType.isValid()) {
+ this.unparsed = true;
+ }
+ this.aggregationType = aggregationType;
+ }
+
+ public RumMetricResponseCompute includePercentiles(Boolean includePercentiles) {
+ this.includePercentiles = includePercentiles;
+ return this;
+ }
+
+ /**
+ * Toggle to include or exclude percentile aggregations for distribution metrics. Only present
+ * when the aggregation_type is distribution.
+ *
+ * @return includePercentiles
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getIncludePercentiles() {
+ return includePercentiles;
+ }
+
+ public void setIncludePercentiles(Boolean includePercentiles) {
+ this.includePercentiles = includePercentiles;
+ }
+
+ public RumMetricResponseCompute path(String path) {
+ this.path = path;
+ return this;
+ }
+
+ /**
+ * The path to the value the rum-based metric will aggregate on (only used if the aggregation type
+ * is a "distribution").
+ *
+ * @return path
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_PATH)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ /**
+ * 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 RumMetricResponseCompute
+ */
+ @JsonAnySetter
+ public RumMetricResponseCompute 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 RumMetricResponseCompute object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricResponseCompute rumMetricResponseCompute = (RumMetricResponseCompute) o;
+ return Objects.equals(this.aggregationType, rumMetricResponseCompute.aggregationType)
+ && Objects.equals(this.includePercentiles, rumMetricResponseCompute.includePercentiles)
+ && Objects.equals(this.path, rumMetricResponseCompute.path)
+ && Objects.equals(this.additionalProperties, rumMetricResponseCompute.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(aggregationType, includePercentiles, path, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricResponseCompute {\n");
+ sb.append(" aggregationType: ").append(toIndentedString(aggregationType)).append("\n");
+ sb.append(" includePercentiles: ").append(toIndentedString(includePercentiles)).append("\n");
+ sb.append(" path: ").append(toIndentedString(path)).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/RumMetricResponseData.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseData.java
new file mode 100644
index 00000000000..a4d64fd601c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseData.java
@@ -0,0 +1,196 @@
+/*
+ * 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 rum-based metric properties. */
+@JsonPropertyOrder({
+ RumMetricResponseData.JSON_PROPERTY_ATTRIBUTES,
+ RumMetricResponseData.JSON_PROPERTY_ID,
+ RumMetricResponseData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricResponseData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private RumMetricResponseAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private RumMetricType type = RumMetricType.RUM_METRICS;
+
+ public RumMetricResponseData attributes(RumMetricResponseAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * The object describing a Datadog rum-based metric.
+ *
+ * @return attributes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricResponseAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(RumMetricResponseAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public RumMetricResponseData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The name of the rum-based metric.
+ *
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public RumMetricResponseData type(RumMetricType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the resource. The value should always be rum_metrics.
+ *
+ * @return type
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricType getType() {
+ return type;
+ }
+
+ public void setType(RumMetricType 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 RumMetricResponseData
+ */
+ @JsonAnySetter
+ public RumMetricResponseData 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 RumMetricResponseData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricResponseData rumMetricResponseData = (RumMetricResponseData) o;
+ return Objects.equals(this.attributes, rumMetricResponseData.attributes)
+ && Objects.equals(this.id, rumMetricResponseData.id)
+ && Objects.equals(this.type, rumMetricResponseData.type)
+ && Objects.equals(this.additionalProperties, rumMetricResponseData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricResponseData {\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/RumMetricResponseFilter.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseFilter.java
new file mode 100644
index 00000000000..50d0a4ad45a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseFilter.java
@@ -0,0 +1,137 @@
+/*
+ * 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 rum-based metric filter. RUM events matching this filter will be aggregated in this metric.
+ */
+@JsonPropertyOrder({RumMetricResponseFilter.JSON_PROPERTY_QUERY})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricResponseFilter {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_QUERY = "query";
+ private String query;
+
+ public RumMetricResponseFilter query(String query) {
+ this.query = query;
+ return this;
+ }
+
+ /**
+ * The search query - following the RUM search syntax.
+ *
+ * @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 RumMetricResponseFilter
+ */
+ @JsonAnySetter
+ public RumMetricResponseFilter 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 RumMetricResponseFilter object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricResponseFilter rumMetricResponseFilter = (RumMetricResponseFilter) o;
+ return Objects.equals(this.query, rumMetricResponseFilter.query)
+ && Objects.equals(this.additionalProperties, rumMetricResponseFilter.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(query, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricResponseFilter {\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/RumMetricResponseGroupBy.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseGroupBy.java
new file mode 100644
index 00000000000..746d3296882
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseGroupBy.java
@@ -0,0 +1,165 @@
+/*
+ * 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;
+
+/** A group by rule. */
+@JsonPropertyOrder({
+ RumMetricResponseGroupBy.JSON_PROPERTY_PATH,
+ RumMetricResponseGroupBy.JSON_PROPERTY_TAG_NAME
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricResponseGroupBy {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_PATH = "path";
+ private String path;
+
+ public static final String JSON_PROPERTY_TAG_NAME = "tag_name";
+ private String tagName;
+
+ public RumMetricResponseGroupBy path(String path) {
+ this.path = path;
+ return this;
+ }
+
+ /**
+ * The path to the value the rum-based metric will be aggregated over.
+ *
+ * @return path
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_PATH)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public RumMetricResponseGroupBy tagName(String tagName) {
+ this.tagName = tagName;
+ return this;
+ }
+
+ /**
+ * Eventual name of the tag that gets created. By default, the path attribute is used as the tag
+ * name.
+ *
+ * @return tagName
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TAG_NAME)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getTagName() {
+ return tagName;
+ }
+
+ public void setTagName(String tagName) {
+ this.tagName = tagName;
+ }
+
+ /**
+ * 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 RumMetricResponseGroupBy
+ */
+ @JsonAnySetter
+ public RumMetricResponseGroupBy 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 RumMetricResponseGroupBy object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricResponseGroupBy rumMetricResponseGroupBy = (RumMetricResponseGroupBy) o;
+ return Objects.equals(this.path, rumMetricResponseGroupBy.path)
+ && Objects.equals(this.tagName, rumMetricResponseGroupBy.tagName)
+ && Objects.equals(this.additionalProperties, rumMetricResponseGroupBy.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(path, tagName, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricResponseGroupBy {\n");
+ sb.append(" path: ").append(toIndentedString(path)).append("\n");
+ sb.append(" tagName: ").append(toIndentedString(tagName)).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/RumMetricResponseUniqueness.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseUniqueness.java
new file mode 100644
index 00000000000..67a0bc369c7
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricResponseUniqueness.java
@@ -0,0 +1,141 @@
+/*
+ * 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 rule to count updatable events. Is only set if "event_type" is "sessions" or "views". */
+@JsonPropertyOrder({RumMetricResponseUniqueness.JSON_PROPERTY_WHEN})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricResponseUniqueness {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_WHEN = "when";
+ private RumMetricUniquenessWhen when;
+
+ public RumMetricResponseUniqueness when(RumMetricUniquenessWhen when) {
+ this.when = when;
+ this.unparsed |= !when.isValid();
+ return this;
+ }
+
+ /**
+ * When to count updatable events. "match" when the event is first seen, or "end" when the event
+ * is complete.
+ *
+ * @return when
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_WHEN)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricUniquenessWhen getWhen() {
+ return when;
+ }
+
+ public void setWhen(RumMetricUniquenessWhen when) {
+ if (!when.isValid()) {
+ this.unparsed = true;
+ }
+ this.when = when;
+ }
+
+ /**
+ * 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 RumMetricResponseUniqueness
+ */
+ @JsonAnySetter
+ public RumMetricResponseUniqueness 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 RumMetricResponseUniqueness object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricResponseUniqueness rumMetricResponseUniqueness = (RumMetricResponseUniqueness) o;
+ return Objects.equals(this.when, rumMetricResponseUniqueness.when)
+ && Objects.equals(
+ this.additionalProperties, rumMetricResponseUniqueness.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(when, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricResponseUniqueness {\n");
+ sb.append(" when: ").append(toIndentedString(when)).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/RumMetricType.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricType.java
new file mode 100644
index 00000000000..5c6364456f1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricType.java
@@ -0,0 +1,54 @@
+/*
+ * 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 the resource. The value should always be rum_metrics. */
+@JsonSerialize(using = RumMetricType.RumMetricTypeSerializer.class)
+public class RumMetricType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("rum_metrics"));
+
+ public static final RumMetricType RUM_METRICS = new RumMetricType("rum_metrics");
+
+ RumMetricType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class RumMetricTypeSerializer extends StdSerializer {
+ public RumMetricTypeSerializer(Class t) {
+ super(t);
+ }
+
+ public RumMetricTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(RumMetricType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static RumMetricType fromValue(String value) {
+ return new RumMetricType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricUniqueness.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricUniqueness.java
new file mode 100644
index 00000000000..4fbc6ee3d25
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricUniqueness.java
@@ -0,0 +1,149 @@
+/*
+ * 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 rule to count updatable events. Is only set if "event_type" is "sessions" or "views". */
+@JsonPropertyOrder({RumMetricUniqueness.JSON_PROPERTY_WHEN})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricUniqueness {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_WHEN = "when";
+ private RumMetricUniquenessWhen when;
+
+ public RumMetricUniqueness() {}
+
+ @JsonCreator
+ public RumMetricUniqueness(
+ @JsonProperty(required = true, value = JSON_PROPERTY_WHEN) RumMetricUniquenessWhen when) {
+ this.when = when;
+ this.unparsed |= !when.isValid();
+ }
+
+ public RumMetricUniqueness when(RumMetricUniquenessWhen when) {
+ this.when = when;
+ this.unparsed |= !when.isValid();
+ return this;
+ }
+
+ /**
+ * When to count updatable events. "match" when the event is first seen, or "end" when the event
+ * is complete.
+ *
+ * @return when
+ */
+ @JsonProperty(JSON_PROPERTY_WHEN)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public RumMetricUniquenessWhen getWhen() {
+ return when;
+ }
+
+ public void setWhen(RumMetricUniquenessWhen when) {
+ if (!when.isValid()) {
+ this.unparsed = true;
+ }
+ this.when = when;
+ }
+
+ /**
+ * 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 RumMetricUniqueness
+ */
+ @JsonAnySetter
+ public RumMetricUniqueness 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 RumMetricUniqueness object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricUniqueness rumMetricUniqueness = (RumMetricUniqueness) o;
+ return Objects.equals(this.when, rumMetricUniqueness.when)
+ && Objects.equals(this.additionalProperties, rumMetricUniqueness.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(when, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricUniqueness {\n");
+ sb.append(" when: ").append(toIndentedString(when)).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/RumMetricUniquenessWhen.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricUniquenessWhen.java
new file mode 100644
index 00000000000..52b088369aa
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricUniquenessWhen.java
@@ -0,0 +1,60 @@
+/*
+ * 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;
+
+/**
+ * When to count updatable events. "match" when the event is first seen, or "end" when the event is
+ * complete.
+ */
+@JsonSerialize(using = RumMetricUniquenessWhen.RumMetricUniquenessWhenSerializer.class)
+public class RumMetricUniquenessWhen extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("match", "end"));
+
+ public static final RumMetricUniquenessWhen WHEN_MATCH = new RumMetricUniquenessWhen("match");
+ public static final RumMetricUniquenessWhen WHEN_END = new RumMetricUniquenessWhen("end");
+
+ RumMetricUniquenessWhen(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class RumMetricUniquenessWhenSerializer
+ extends StdSerializer {
+ public RumMetricUniquenessWhenSerializer(Class t) {
+ super(t);
+ }
+
+ public RumMetricUniquenessWhenSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ RumMetricUniquenessWhen value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static RumMetricUniquenessWhen fromValue(String value) {
+ return new RumMetricUniquenessWhen(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateAttributes.java
new file mode 100644
index 00000000000..68a8b6db02a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateAttributes.java
@@ -0,0 +1,208 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** The rum-based metric properties that will be updated. */
+@JsonPropertyOrder({
+ RumMetricUpdateAttributes.JSON_PROPERTY_COMPUTE,
+ RumMetricUpdateAttributes.JSON_PROPERTY_FILTER,
+ RumMetricUpdateAttributes.JSON_PROPERTY_GROUP_BY
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricUpdateAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_COMPUTE = "compute";
+ private RumMetricUpdateCompute compute;
+
+ public static final String JSON_PROPERTY_FILTER = "filter";
+ private RumMetricFilter filter;
+
+ public static final String JSON_PROPERTY_GROUP_BY = "group_by";
+ private List groupBy = null;
+
+ public RumMetricUpdateAttributes compute(RumMetricUpdateCompute compute) {
+ this.compute = compute;
+ this.unparsed |= compute.unparsed;
+ return this;
+ }
+
+ /**
+ * The compute rule to compute the rum-based metric.
+ *
+ * @return compute
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_COMPUTE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricUpdateCompute getCompute() {
+ return compute;
+ }
+
+ public void setCompute(RumMetricUpdateCompute compute) {
+ this.compute = compute;
+ }
+
+ public RumMetricUpdateAttributes filter(RumMetricFilter filter) {
+ this.filter = filter;
+ this.unparsed |= filter.unparsed;
+ return this;
+ }
+
+ /**
+ * The rum-based metric filter. Events matching this filter will be aggregated in this metric.
+ *
+ * @return filter
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_FILTER)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public RumMetricFilter getFilter() {
+ return filter;
+ }
+
+ public void setFilter(RumMetricFilter filter) {
+ this.filter = filter;
+ }
+
+ public RumMetricUpdateAttributes groupBy(List groupBy) {
+ this.groupBy = groupBy;
+ for (RumMetricGroupBy item : groupBy) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public RumMetricUpdateAttributes addGroupByItem(RumMetricGroupBy groupByItem) {
+ if (this.groupBy == null) {
+ this.groupBy = new ArrayList<>();
+ }
+ this.groupBy.add(groupByItem);
+ this.unparsed |= groupByItem.unparsed;
+ return this;
+ }
+
+ /**
+ * The rules for the group by.
+ *
+ * @return groupBy
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_GROUP_BY)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getGroupBy() {
+ return groupBy;
+ }
+
+ public void setGroupBy(List groupBy) {
+ this.groupBy = groupBy;
+ }
+
+ /**
+ * 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 RumMetricUpdateAttributes
+ */
+ @JsonAnySetter
+ public RumMetricUpdateAttributes 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 RumMetricUpdateAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricUpdateAttributes rumMetricUpdateAttributes = (RumMetricUpdateAttributes) o;
+ return Objects.equals(this.compute, rumMetricUpdateAttributes.compute)
+ && Objects.equals(this.filter, rumMetricUpdateAttributes.filter)
+ && Objects.equals(this.groupBy, rumMetricUpdateAttributes.groupBy)
+ && Objects.equals(
+ this.additionalProperties, rumMetricUpdateAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(compute, filter, groupBy, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricUpdateAttributes {\n");
+ sb.append(" compute: ").append(toIndentedString(compute)).append("\n");
+ sb.append(" filter: ").append(toIndentedString(filter)).append("\n");
+ sb.append(" groupBy: ").append(toIndentedString(groupBy)).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/RumMetricUpdateCompute.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateCompute.java
new file mode 100644
index 00000000000..51dfc6ccb53
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateCompute.java
@@ -0,0 +1,136 @@
+/*
+ * 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 compute rule to compute the rum-based metric. */
+@JsonPropertyOrder({RumMetricUpdateCompute.JSON_PROPERTY_INCLUDE_PERCENTILES})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricUpdateCompute {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_INCLUDE_PERCENTILES = "include_percentiles";
+ private Boolean includePercentiles;
+
+ public RumMetricUpdateCompute includePercentiles(Boolean includePercentiles) {
+ this.includePercentiles = includePercentiles;
+ return this;
+ }
+
+ /**
+ * Toggle to include or exclude percentile aggregations for distribution metrics. Only present
+ * when the aggregation_type is distribution.
+ *
+ * @return includePercentiles
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_INCLUDE_PERCENTILES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Boolean getIncludePercentiles() {
+ return includePercentiles;
+ }
+
+ public void setIncludePercentiles(Boolean includePercentiles) {
+ this.includePercentiles = includePercentiles;
+ }
+
+ /**
+ * 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 RumMetricUpdateCompute
+ */
+ @JsonAnySetter
+ public RumMetricUpdateCompute 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 RumMetricUpdateCompute object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricUpdateCompute rumMetricUpdateCompute = (RumMetricUpdateCompute) o;
+ return Objects.equals(this.includePercentiles, rumMetricUpdateCompute.includePercentiles)
+ && Objects.equals(this.additionalProperties, rumMetricUpdateCompute.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(includePercentiles, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricUpdateCompute {\n");
+ sb.append(" includePercentiles: ").append(toIndentedString(includePercentiles)).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/RumMetricUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateData.java
new file mode 100644
index 00000000000..3af36d6a282
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateData.java
@@ -0,0 +1,208 @@
+/*
+ * 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 rum-based metric properties. */
+@JsonPropertyOrder({
+ RumMetricUpdateData.JSON_PROPERTY_ATTRIBUTES,
+ RumMetricUpdateData.JSON_PROPERTY_ID,
+ RumMetricUpdateData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricUpdateData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private RumMetricUpdateAttributes attributes;
+
+ public static final String JSON_PROPERTY_ID = "id";
+ private String id;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private RumMetricType type = RumMetricType.RUM_METRICS;
+
+ public RumMetricUpdateData() {}
+
+ @JsonCreator
+ public RumMetricUpdateData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ RumMetricUpdateAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) RumMetricType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public RumMetricUpdateData attributes(RumMetricUpdateAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * The rum-based metric properties that will be updated.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public RumMetricUpdateAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(RumMetricUpdateAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public RumMetricUpdateData id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The name of the rum-based metric.
+ *
+ * @return id
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public RumMetricUpdateData type(RumMetricType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The type of the resource. The value should always be rum_metrics.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public RumMetricType getType() {
+ return type;
+ }
+
+ public void setType(RumMetricType 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 RumMetricUpdateData
+ */
+ @JsonAnySetter
+ public RumMetricUpdateData 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 RumMetricUpdateData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricUpdateData rumMetricUpdateData = (RumMetricUpdateData) o;
+ return Objects.equals(this.attributes, rumMetricUpdateData.attributes)
+ && Objects.equals(this.id, rumMetricUpdateData.id)
+ && Objects.equals(this.type, rumMetricUpdateData.type)
+ && Objects.equals(this.additionalProperties, rumMetricUpdateData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, id, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricUpdateData {\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/RumMetricUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateRequest.java
new file mode 100644
index 00000000000..a3d3863b71a
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricUpdateRequest.java
@@ -0,0 +1,145 @@
+/*
+ * 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 rum-based metric body. */
+@JsonPropertyOrder({RumMetricUpdateRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricUpdateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private RumMetricUpdateData data;
+
+ public RumMetricUpdateRequest() {}
+
+ @JsonCreator
+ public RumMetricUpdateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA) RumMetricUpdateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public RumMetricUpdateRequest data(RumMetricUpdateData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * The new rum-based metric properties.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public RumMetricUpdateData getData() {
+ return data;
+ }
+
+ public void setData(RumMetricUpdateData data) {
+ this.data = data;
+ }
+
+ /**
+ * 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 RumMetricUpdateRequest
+ */
+ @JsonAnySetter
+ public RumMetricUpdateRequest 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 RumMetricUpdateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricUpdateRequest rumMetricUpdateRequest = (RumMetricUpdateRequest) o;
+ return Objects.equals(this.data, rumMetricUpdateRequest.data)
+ && Objects.equals(this.additionalProperties, rumMetricUpdateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricUpdateRequest {\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/RumMetricsResponse.java b/src/main/java/com/datadog/api/client/v2/model/RumMetricsResponse.java
new file mode 100644
index 00000000000..048565a607d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/RumMetricsResponse.java
@@ -0,0 +1,149 @@
+/*
+ * 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 the available rum-based metric objects. */
+@JsonPropertyOrder({RumMetricsResponse.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class RumMetricsResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private List data = null;
+
+ public RumMetricsResponse data(List data) {
+ this.data = data;
+ for (RumMetricResponseData item : data) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public RumMetricsResponse addDataItem(RumMetricResponseData dataItem) {
+ if (this.data == null) {
+ this.data = new ArrayList<>();
+ }
+ this.data.add(dataItem);
+ this.unparsed |= dataItem.unparsed;
+ return this;
+ }
+
+ /**
+ * A list of rum-based metric objects.
+ *
+ * @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;
+ }
+
+ /**
+ * 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 RumMetricsResponse
+ */
+ @JsonAnySetter
+ public RumMetricsResponse 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 RumMetricsResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ RumMetricsResponse rumMetricsResponse = (RumMetricsResponse) o;
+ return Objects.equals(this.data, rumMetricsResponse.data)
+ && Objects.equals(this.additionalProperties, rumMetricsResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class RumMetricsResponse {\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/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.freeze
new file mode 100644
index 00000000000..aeb6d494b5c
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:19.714Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.json
new file mode 100644
index 00000000000..c018c6b6afd
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Bad_Request_response.json
@@ -0,0 +1,32 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\",\"uniqueness\":{\"when\":\"match\"}},\"id\":\"rum.actions.invalid\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"uniqueness\\\" failed excluded_if validation\"}]}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 400,
+ "reasonPhrase": "Bad Request"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "8fb0b3e4-39bb-f164-4ee3-704266160603"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.freeze
new file mode 100644
index 00000000000..7ab47461a53
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:20.162Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.json
new file mode 100644
index 00000000000..5ad1f4ff6fa
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Conflict_response.json
@@ -0,0 +1,83 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Create_a_rum_based_metric_returns_Conflict_response-1730203160\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"Test-Create_a_rum_based_metric_returns_Conflict_response-1730203160\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"id\":\"Test_Create_a_rum_based_metric_returns_Conflict_response_1730203160\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Create_a_rum_based_metric_returns_Conflict_response-1730203160\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 201,
+ "reasonPhrase": "Created"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "2a6602f7-aa7e-35be-efd3-54decce6d54a"
+ },
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"count\"},\"event_type\":\"action\"},\"id\":\"Test_Create_a_rum_based_metric_returns_Conflict_response_1730203160\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[{\"status\":\"409\",\"title\":\"Conflict\",\"detail\":\"conflict(Field 'data.id' is invalid: 'Test_Create_a_rum_based_metric_returns_Conflict_response_1730203160' cannot be used as metric name, a metric already exists with that name)\"}]}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 409,
+ "reasonPhrase": "Conflict"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "0b463238-da04-e251-6292-7c2144cefd67"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/rum/config/metrics/Test_Create_a_rum_based_metric_returns_Conflict_response_1730203160",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "headers": {},
+ "statusCode": 204,
+ "reasonPhrase": "No Content"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "dd0c47de-d3cd-da09-899a-1b5c9bde3ddf"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.freeze
new file mode 100644
index 00000000000..904b31816c1
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:21.453Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.json b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.json
new file mode 100644
index 00000000000..91c7c3b0023
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Create_a_rum_based_metric_returns_Created_response.json
@@ -0,0 +1,53 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"rum.sessions.webui.count\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"id\":\"rum.sessions.webui.count\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:web-ui\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 201,
+ "reasonPhrase": "Created"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "a60dcd3f-6b42-61be-976b-55b839c23015"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/rum/config/metrics/rum.sessions.webui.count",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "headers": {},
+ "statusCode": 204,
+ "reasonPhrase": "No Content"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "f43cd3bd-54ea-b636-71dc-c9e06bea290c"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.freeze
new file mode 100644
index 00000000000..6cfba31aca3
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:22.291Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.json b/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.json
new file mode 100644
index 00000000000..1a641579bf2
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_No_Content_response.json
@@ -0,0 +1,79 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Delete_a_rum_based_metric_returns_No_Content_response-1730203162\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"Test-Delete_a_rum_based_metric_returns_No_Content_response-1730203162\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"id\":\"Test_Delete_a_rum_based_metric_returns_No_Content_response_1730203162\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Delete_a_rum_based_metric_returns_No_Content_response-1730203162\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 201,
+ "reasonPhrase": "Created"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "6f9c5928-9dbd-ed8d-9596-d137c94d59c1"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/rum/config/metrics/Test_Delete_a_rum_based_metric_returns_No_Content_response_1730203162",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "headers": {},
+ "statusCode": 204,
+ "reasonPhrase": "No Content"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "8d4567a4-22c0-35bf-e51b-749fa0eb0b4b"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/rum/config/metrics/Test_Delete_a_rum_based_metric_returns_No_Content_response_1730203162",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"not_found(Metric with name 'Test_Delete_a_rum_based_metric_returns_No_Content_response_1730203162' not found)\"}]}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 404,
+ "reasonPhrase": "Not Found"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "8d4567a4-22c0-35bf-e51b-749fa0eb0b4c"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.freeze
new file mode 100644
index 00000000000..2d4669c70d3
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:23.441Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.json
new file mode 100644
index 00000000000..13aed9c4881
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Delete_a_rum_based_metric_returns_Not_Found_response.json
@@ -0,0 +1,28 @@
+[
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/rum/config/metrics/Test-Delete_a_rum_based_metric_returns_Not_Found_response-1730203163",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"not_found(Metric with name 'Test-Delete_a_rum_based_metric_returns_Not_Found_response-1730203163' not found)\"}]}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 404,
+ "reasonPhrase": "Not Found"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "11da52f4-7492-c7a8-b294-e1779c412d9f"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.freeze
new file mode 100644
index 00000000000..bf0fe79db01
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:23.838Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.json
new file mode 100644
index 00000000000..e0eb61f3fbc
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_Not_Found_response.json
@@ -0,0 +1,28 @@
+[
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "GET",
+ "path": "/api/v2/rum/config/metrics/Test-Get_a_rum_based_metric_returns_Not_Found_response-1730203163",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"not_found(Metric with name 'Test-Get_a_rum_based_metric_returns_Not_Found_response-1730203163' not found)\"}]}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 404,
+ "reasonPhrase": "Not Found"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "6489998c-70f8-3cce-41fe-3600f06a7efa"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.freeze
new file mode 100644
index 00000000000..166f9b69cbe
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:24.146Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.json
new file mode 100644
index 00000000000..7ed89427384
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Get_a_rum_based_metric_returns_OK_response.json
@@ -0,0 +1,79 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Get_a_rum_based_metric_returns_OK_response-1730203164\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"Test-Get_a_rum_based_metric_returns_OK_response-1730203164\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"id\":\"Test_Get_a_rum_based_metric_returns_OK_response_1730203164\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Get_a_rum_based_metric_returns_OK_response-1730203164\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 201,
+ "reasonPhrase": "Created"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "e1936bc9-086c-5b0c-6de7-92d56f19191a"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "GET",
+ "path": "/api/v2/rum/config/metrics/Test_Get_a_rum_based_metric_returns_OK_response_1730203164",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"id\":\"Test_Get_a_rum_based_metric_returns_OK_response_1730203164\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Get_a_rum_based_metric_returns_OK_response-1730203164\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "87479b45-bb8c-7f68-1134-f342234a38ca"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/rum/config/metrics/Test_Get_a_rum_based_metric_returns_OK_response_1730203164",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "headers": {},
+ "statusCode": 204,
+ "reasonPhrase": "No Content"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "936d6d67-6585-3e4d-ba49-26ed713cd772"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.freeze
new file mode 100644
index 00000000000..b61a6a3553c
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:25.250Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.json
new file mode 100644
index 00000000000..777ff4c7647
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Get_all_rum_based_metrics_returns_OK_response.json
@@ -0,0 +1,28 @@
+[
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "GET",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":[]}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "7eaf3a01-07e0-12af-d372-902bd49e160e"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.freeze
new file mode 100644
index 00000000000..311aa3beb93
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:25.568Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.json
new file mode 100644
index 00000000000..5d2a451c8f0
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Bad_Request_response.json
@@ -0,0 +1,83 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Bad_Request_response-1730203165\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"Test-Update_a_rum_based_metric_returns_Bad_Request_response-1730203165\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"id\":\"Test_Update_a_rum_based_metric_returns_Bad_Request_response_1730203165\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Bad_Request_response-1730203165\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 201,
+ "reasonPhrase": "Created"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "c91e32cb-5a1c-cb12-def4-d9f0da52d922"
+ },
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"include_percentiles\":true}},\"id\":\"rum.sessions.webui.count\",\"type\":\"unknown_metrics\"}}"
+ },
+ "headers": {},
+ "method": "PATCH",
+ "path": "/api/v2/rum/config/metrics/Test_Update_a_rum_based_metric_returns_Bad_Request_response_1730203165",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"got type \\\"unknown_metrics\\\" expected one of \\\"rum_metrics\\\"\"}]}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 400,
+ "reasonPhrase": "Bad Request"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "0d95507c-1b64-4fa4-29fd-37ec22d20606"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/rum/config/metrics/Test_Update_a_rum_based_metric_returns_Bad_Request_response_1730203165",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "headers": {},
+ "statusCode": 204,
+ "reasonPhrase": "No Content"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "8682adc8-695e-6c42-16ef-cacabae0fa98"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.freeze
new file mode 100644
index 00000000000..85af2dc5c80
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:27.027Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.json
new file mode 100644
index 00000000000..3cab802b24e
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Conflict_response.json
@@ -0,0 +1,83 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Conflict_response-1730203167\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"Test-Update_a_rum_based_metric_returns_Conflict_response-1730203167\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"id\":\"Test_Update_a_rum_based_metric_returns_Conflict_response_1730203167\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Conflict_response-1730203167\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 201,
+ "reasonPhrase": "Created"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "11890b83-f1b0-cb40-781b-4f98b3bb08cb"
+ },
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"include_percentiles\":true}},\"id\":\"conflicting.id\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "PATCH",
+ "path": "/api/v2/rum/config/metrics/Test_Update_a_rum_based_metric_returns_Conflict_response_1730203167",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[{\"status\":\"409\",\"title\":\"Conflict\",\"detail\":\"ID provided in the payload does not match the url parameter\"}]}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 409,
+ "reasonPhrase": "Conflict"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "4faafd02-614f-bfa6-a7f0-0cbddeae06b8"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/rum/config/metrics/Test_Update_a_rum_based_metric_returns_Conflict_response_1730203167",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "headers": {},
+ "statusCode": 204,
+ "reasonPhrase": "No Content"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "1410007e-f5c7-3dcc-62a3-8f1ec16ec47c"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.freeze
new file mode 100644
index 00000000000..d0605146d53
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:28.193Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.json
new file mode 100644
index 00000000000..2d1453b2ad6
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_Not_Found_response.json
@@ -0,0 +1,83 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Not_Found_response-1730203168\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"Test-Update_a_rum_based_metric_returns_Not_Found_response-1730203168\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"id\":\"Test_Update_a_rum_based_metric_returns_Not_Found_response_1730203168\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_Not_Found_response-1730203168\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 201,
+ "reasonPhrase": "Created"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "b132afbf-83f6-9646-7003-b8c11761f046"
+ },
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"include_percentiles\":true}},\"id\":\"8fc991bf-967e-4652-8a5b-0711a985abe3\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "PATCH",
+ "path": "/api/v2/rum/config/metrics/8fc991bf-967e-4652-8a5b-0711a985abe3",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"not_found(Metric with name '8fc991bf-967e-4652-8a5b-0711a985abe3' not found)\"}]}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 404,
+ "reasonPhrase": "Not Found"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "e116e149-c017-29bc-315e-7355e9ff5e09"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/rum/config/metrics/Test_Update_a_rum_based_metric_returns_Not_Found_response_1730203168",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "headers": {},
+ "statusCode": 204,
+ "reasonPhrase": "No Content"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "a367cc16-0356-bb41-e12c-ae5574610e2b"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.freeze
new file mode 100644
index 00000000000..79f1ec749e7
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.freeze
@@ -0,0 +1 @@
+2024-10-29T11:59:29.233Z
\ No newline at end of file
diff --git a/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.json
new file mode 100644
index 00000000000..2db06d2aa4b
--- /dev/null
+++ b/src/test/resources/cassettes/features/v2/Update_a_rum_based_metric_returns_OK_response.json
@@ -0,0 +1,83 @@
+[
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_OK_response-1730203169\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}},\"id\":\"Test-Update_a_rum_based_metric_returns_OK_response-1730203169\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "POST",
+ "path": "/api/v2/rum/config/metrics",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"id\":\"Test_Update_a_rum_based_metric_returns_OK_response_1730203169\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":true,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"source:Test-Update_a_rum_based_metric_returns_OK_response-1730203169\"},\"group_by\":[{\"path\":\"@browser.name\",\"tag_name\":\"browser_name\"}],\"uniqueness\":{\"when\":\"match\"}}}}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 201,
+ "reasonPhrase": "Created"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "8474deb1-29c3-e071-c067-cf1c8958fb38"
+ },
+ {
+ "httpRequest": {
+ "body": {
+ "type": "JSON",
+ "json": "{\"data\":{\"attributes\":{\"compute\":{\"include_percentiles\":false},\"filter\":{\"query\":\"@service:rum-config\"},\"group_by\":[{\"path\":\"@browser.version\",\"tag_name\":\"browser_version\"}]},\"id\":\"Test_Update_a_rum_based_metric_returns_OK_response_1730203169\",\"type\":\"rum_metrics\"}}"
+ },
+ "headers": {},
+ "method": "PATCH",
+ "path": "/api/v2/rum/config/metrics/Test_Update_a_rum_based_metric_returns_OK_response_1730203169",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "body": "{\"data\":{\"id\":\"Test_Update_a_rum_based_metric_returns_OK_response_1730203169\",\"type\":\"rum_metrics\",\"attributes\":{\"compute\":{\"aggregation_type\":\"distribution\",\"include_percentiles\":false,\"path\":\"@duration\"},\"event_type\":\"session\",\"filter\":{\"query\":\"@service:rum-config\"},\"group_by\":[{\"path\":\"@browser.version\",\"tag_name\":\"browser_version\"}],\"uniqueness\":{\"when\":\"match\"}}}}",
+ "headers": {
+ "Content-Type": [
+ "application/vnd.api+json"
+ ]
+ },
+ "statusCode": 200,
+ "reasonPhrase": "OK"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "b172a204-6506-56f2-c9b7-24e1c899bdfd"
+ },
+ {
+ "httpRequest": {
+ "headers": {},
+ "method": "DELETE",
+ "path": "/api/v2/rum/config/metrics/Test_Update_a_rum_based_metric_returns_OK_response_1730203169",
+ "keepAlive": false,
+ "secure": true
+ },
+ "httpResponse": {
+ "headers": {},
+ "statusCode": 204,
+ "reasonPhrase": "No Content"
+ },
+ "times": {
+ "remainingTimes": 1
+ },
+ "timeToLive": {
+ "unlimited": true
+ },
+ "id": "00381f3f-8a56-4455-9b5f-32797bc88897"
+ }
+]
\ No newline at end of file
diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json
index 9370b4fc5fc..76246b3199d 100644
--- a/src/test/resources/com/datadog/api/client/v2/api/given.json
+++ b/src/test/resources/com/datadog/api/client/v2/api/given.json
@@ -471,6 +471,18 @@
"tag": "RUM",
"operationId": "CreateRUMApplication"
},
+ {
+ "parameters": [
+ {
+ "name": "body",
+ "value": "{\n \"data\": {\n \"id\": \"{{ unique }}\",\n \"type\": \"rum_metrics\",\n \"attributes\": {\n \"event_type\": \"session\",\n \"compute\": {\n \"aggregation_type\": \"distribution\",\n \"include_percentiles\": true,\n \"path\": \"@duration\"\n },\n \"filter\": {\n \"query\": \"source:{{ unique }}\"\n },\n \"group_by\": [{\n \"path\": \"@browser.name\",\n \"tag_name\": \"browser_name\"\n }],\n \"uniqueness\": {\n \"when\": \"match\"\n }\n }\n }\n}"
+ }
+ ],
+ "step": "there is a valid \"rum_metric\" in the system",
+ "key": "rum_metric",
+ "tag": "Rum Metrics",
+ "operationId": "CreateRumMetric"
+ },
{
"parameters": [
{
diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature
new file mode 100644
index 00000000000..cf13d41e951
--- /dev/null
+++ b/src/test/resources/com/datadog/api/client/v2/api/rum_metrics.feature
@@ -0,0 +1,134 @@
+@endpoint(rum-metrics) @endpoint(rum-metrics-v2)
+Feature: Rum Metrics
+ Manage configuration of [rum-based
+ metrics](https://app.datadoghq.com/rum/generate-metrics) for your
+ organization.
+
+ Background:
+ Given a valid "apiKeyAuth" key in the system
+ And a valid "appKeyAuth" key in the system
+ And an instance of "RumMetrics" API
+
+ @team:DataDog/rum-backend
+ Scenario: Create a rum-based metric returns "Bad Request" response
+ Given new "CreateRumMetric" request
+ And body with value {"data": {"id": "rum.actions.invalid", "type": "rum_metrics", "attributes": {"event_type": "action", "compute": {"aggregation_type": "count"}, "uniqueness":{"when": "match"}}}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/rum-backend
+ Scenario: Create a rum-based metric returns "Conflict" response
+ Given there is a valid "rum_metric" in the system
+ And new "CreateRumMetric" request
+ And body with value {"data": {"id": "{{ rum_metric.data.id }}", "type": "rum_metrics", "attributes": {"compute": {"aggregation_type": "count"}, "event_type": "action"}}}
+ When the request is sent
+ Then the response status is 409 Conflict
+
+ @team:DataDog/rum-backend
+ Scenario: Create a rum-based metric returns "Created" response
+ Given new "CreateRumMetric" request
+ And body with value {"data": {"attributes": {"compute": {"aggregation_type": "distribution", "include_percentiles": true, "path": "@duration"}, "event_type": "session", "filter": {"query": "@service:web-ui"}, "group_by": [{"path": "@browser.name", "tag_name": "browser_name"}], "uniqueness": {"when": "match"}}, "id": "rum.sessions.webui.count", "type": "rum_metrics"}}
+ When the request is sent
+ Then the response status is 201 Created
+ And the response "data.id" is equal to "rum.sessions.webui.count"
+ And the response "data.type" is equal to "rum_metrics"
+ And the response "data.attributes.event_type" is equal to "session"
+ And the response "data.attributes.compute.aggregation_type" is equal to "distribution"
+ And the response "data.attributes.compute.include_percentiles" is equal to true
+ And the response "data.attributes.compute.path" is equal to "@duration"
+ And the response "data.attributes.filter.query" is equal to "@service:web-ui"
+ And the response "data.attributes.group_by[0].path" is equal to "@browser.name"
+ And the response "data.attributes.group_by[0].tag_name" is equal to "browser_name"
+ And the response "data.attributes.uniqueness.when" is equal to "match"
+
+ @team:DataDog/rum-backend
+ Scenario: Delete a rum-based metric returns "No Content" response
+ Given there is a valid "rum_metric" in the system
+ And new "DeleteRumMetric" request
+ And request contains "metric_id" parameter from "rum_metric.data.id"
+ When the request is sent
+ Then the response status is 204 No Content
+
+ @team:DataDog/rum-backend
+ Scenario: Delete a rum-based metric returns "Not Found" response
+ Given new "DeleteRumMetric" request
+ And request contains "metric_id" parameter with value "{{ unique }}"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @team:DataDog/rum-backend
+ Scenario: Get a rum-based metric returns "Not Found" response
+ Given new "GetRumMetric" request
+ And request contains "metric_id" parameter with value "{{ unique }}"
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @team:DataDog/rum-backend
+ Scenario: Get a rum-based metric returns "OK" response
+ Given there is a valid "rum_metric" in the system
+ And new "GetRumMetric" request
+ And request contains "metric_id" parameter from "rum_metric.data.id"
+ When the request is sent
+ Then the response status is 200 OK
+ And the response "data.id" has the same value as "rum_metric.data.id"
+ And the response "data.type" has the same value as "rum_metric.data.type"
+ And the response "data.attributes.event_type" has the same value as "rum_metric.data.attributes.event_type"
+ And the response "data.attributes.compute.aggregation_type" has the same value as "rum_metric.data.attributes.compute.aggregation_type"
+ And the response "data.attributes.compute.include_percentiles" has the same value as "rum_metric.data.attributes.compute.include_percentiles"
+ And the response "data.attributes.compute.path" has the same value as "rum_metric.data.attributes.compute.path"
+ And the response "data.attributes.filter.query" has the same value as "rum_metric.data.attributes.filter.query"
+ And the response "data.attributes.group_by[0].path" has the same value as "rum_metric.data.attributes.group_by[0].path"
+ And the response "data.attributes.group_by[0].tag_name" has the same value as "rum_metric.data.attributes.group_by[0].tag_name"
+ And the response "data.attributes.uniqueness.when" has the same value as "rum_metric.data.attributes.uniqueness.when"
+
+ @team:DataDog/rum-backend
+ Scenario: Get all rum-based metrics returns "OK" response
+ Given new "ListRumMetrics" request
+ When the request is sent
+ Then the response status is 200 OK
+
+ @team:DataDog/rum-backend
+ Scenario: Update a rum-based metric returns "Bad Request" response
+ Given there is a valid "rum_metric" in the system
+ And new "UpdateRumMetric" request
+ And request contains "metric_id" parameter from "rum_metric.data.id"
+ And body with value {"data": {"id": "rum.sessions.webui.count", "type": "unknown_metrics", "attributes": {"compute": {"include_percentiles": true}}}}
+ When the request is sent
+ Then the response status is 400 Bad Request
+
+ @team:DataDog/rum-backend
+ Scenario: Update a rum-based metric returns "Conflict" response
+ Given there is a valid "rum_metric" in the system
+ And new "UpdateRumMetric" request
+ And request contains "metric_id" parameter from "rum_metric.data.id"
+ And body with value {"data": {"id": "conflicting.id", "type": "rum_metrics", "attributes": {"compute": {"include_percentiles": true}}}}
+ When the request is sent
+ Then the response status is 409 Conflict
+
+ @team:DataDog/rum-backend
+ Scenario: Update a rum-based metric returns "Not Found" response
+ Given there is a valid "rum_metric" in the system
+ And new "UpdateRumMetric" request
+ And request contains "metric_id" parameter with value "8fc991bf-967e-4652-8a5b-0711a985abe3"
+ And body with value {"data": {"id": "8fc991bf-967e-4652-8a5b-0711a985abe3", "type": "rum_metrics", "attributes": {"compute": {"include_percentiles": true}}}}
+ When the request is sent
+ Then the response status is 404 Not Found
+
+ @team:DataDog/rum-backend
+ Scenario: Update a rum-based metric returns "OK" response
+ Given there is a valid "rum_metric" in the system
+ And new "UpdateRumMetric" request
+ And request contains "metric_id" parameter from "rum_metric.data.id"
+ And body with value {"data": {"id": "{{ rum_metric.data.id }}", "type": "rum_metrics", "attributes": {"compute": {"include_percentiles": false}, "filter": {"query": "@service:rum-config"}, "group_by": [{"path": "@browser.version", "tag_name": "browser_version"}]}}}
+ When the request is sent
+ Then the response status is 200 OK
+ And the response "data.id" has the same value as "rum_metric.data.id"
+ And the response "data.type" has the same value as "rum_metric.data.type"
+ And the response "data.attributes.event_type" has the same value as "rum_metric.data.attributes.event_type"
+ And the response "data.attributes.compute.aggregation_type" has the same value as "rum_metric.data.attributes.compute.aggregation_type"
+ And the response "data.attributes.compute.include_percentiles" is equal to false
+ And the response "data.attributes.compute.path" has the same value as "rum_metric.data.attributes.compute.path"
+ And the response "data.attributes.filter.query" is equal to "@service:rum-config"
+ And the response "data.attributes.group_by[0].path" is equal to "@browser.version"
+ And the response "data.attributes.group_by[0].tag_name" is equal to "browser_version"
+ And the response "data.attributes.uniqueness.when" has the same value as "rum_metric.data.attributes.uniqueness.when"
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 5516102f8ff..62b494c8dc1 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
@@ -1755,6 +1755,43 @@
"type": "idempotent"
}
},
+ "ListRumMetrics": {
+ "tag": "Rum Metrics",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "CreateRumMetric": {
+ "tag": "Rum Metrics",
+ "undo": {
+ "operationId": "DeleteRumMetric",
+ "parameters": [
+ {
+ "name": "metric_id",
+ "source": "data.id"
+ }
+ ],
+ "type": "unsafe"
+ }
+ },
+ "DeleteRumMetric": {
+ "tag": "Rum Metrics",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
+ "GetRumMetric": {
+ "tag": "Rum Metrics",
+ "undo": {
+ "type": "safe"
+ }
+ },
+ "UpdateRumMetric": {
+ "tag": "Rum Metrics",
+ "undo": {
+ "type": "idempotent"
+ }
+ },
"ListRUMEvents": {
"tag": "RUM",
"undo": {