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 TimeseriesRequestStyle object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TimeseriesRequestStyle timeseriesRequestStyle = (TimeseriesRequestStyle) o;
+ return Objects.equals(this.hasValueLabels, timeseriesRequestStyle.hasValueLabels)
+ && Objects.equals(this.lineType, timeseriesRequestStyle.lineType)
+ && Objects.equals(this.lineWidth, timeseriesRequestStyle.lineWidth)
+ && Objects.equals(this.orderBy, timeseriesRequestStyle.orderBy)
+ && Objects.equals(this.palette, timeseriesRequestStyle.palette)
+ && Objects.equals(this.additionalProperties, timeseriesRequestStyle.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ hasValueLabels, lineType, lineWidth, orderBy, palette, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TimeseriesRequestStyle {\n");
+ sb.append(" hasValueLabels: ").append(toIndentedString(hasValueLabels)).append("\n");
+ sb.append(" lineType: ").append(toIndentedString(lineType)).append("\n");
+ sb.append(" lineWidth: ").append(toIndentedString(lineWidth)).append("\n");
+ sb.append(" orderBy: ").append(toIndentedString(orderBy)).append("\n");
+ sb.append(" palette: ").append(toIndentedString(palette)).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/v1/model/TimeseriesWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java
index 9b6a4f0fe46..034de2cf67c 100644
--- a/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java
+++ b/src/main/java/com/datadog/api/client/v1/model/TimeseriesWidgetRequest.java
@@ -91,7 +91,7 @@ public class TimeseriesWidgetRequest {
private LogQueryDefinition securityQuery;
public static final String JSON_PROPERTY_STYLE = "style";
- private WidgetRequestStyle style;
+ private TimeseriesRequestStyle style;
public TimeseriesWidgetRequest apmQuery(LogQueryDefinition apmQuery) {
this.apmQuery = apmQuery;
@@ -483,25 +483,25 @@ public void setSecurityQuery(LogQueryDefinition securityQuery) {
this.securityQuery = securityQuery;
}
- public TimeseriesWidgetRequest style(WidgetRequestStyle style) {
+ public TimeseriesWidgetRequest style(TimeseriesRequestStyle style) {
this.style = style;
this.unparsed |= style.unparsed;
return this;
}
/**
- * Define request widget style.
+ * Define request widget style for timeseries widgets.
*
* @return style
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STYLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
- public WidgetRequestStyle getStyle() {
+ public TimeseriesRequestStyle getStyle() {
return style;
}
- public void setStyle(WidgetRequestStyle style) {
+ public void setStyle(TimeseriesRequestStyle style) {
this.style = style;
}
diff --git a/src/main/java/com/datadog/api/client/v2/api/ProductAnalyticsApi.java b/src/main/java/com/datadog/api/client/v2/api/ProductAnalyticsApi.java
index 4059a272fdb..d0c712b8895 100644
--- a/src/main/java/com/datadog/api/client/v2/api/ProductAnalyticsApi.java
+++ b/src/main/java/com/datadog/api/client/v2/api/ProductAnalyticsApi.java
@@ -4,7 +4,10 @@
import com.datadog.api.client.ApiException;
import com.datadog.api.client.ApiResponse;
import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.ProductAnalyticsAnalyticsRequest;
+import com.datadog.api.client.v2.model.ProductAnalyticsScalarResponse;
import com.datadog.api.client.v2.model.ProductAnalyticsServerSideEventItem;
+import com.datadog.api.client.v2.model.ProductAnalyticsTimeseriesResponse;
import jakarta.ws.rs.client.Invocation;
import jakarta.ws.rs.core.GenericType;
import java.util.ArrayList;
@@ -43,6 +46,284 @@ public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
+ /**
+ * Compute scalar analytics.
+ *
+ * See {@link #queryProductAnalyticsScalarWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return ProductAnalyticsScalarResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ProductAnalyticsScalarResponse queryProductAnalyticsScalar(
+ ProductAnalyticsAnalyticsRequest body) throws ApiException {
+ return queryProductAnalyticsScalarWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Compute scalar analytics.
+ *
+ *
See {@link #queryProductAnalyticsScalarWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ProductAnalyticsScalarResponse>
+ */
+ public CompletableFuture queryProductAnalyticsScalarAsync(
+ ProductAnalyticsAnalyticsRequest body) {
+ return queryProductAnalyticsScalarWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Compute scalar analytics results for Product Analytics data. Returns aggregated values (counts,
+ * averages, percentiles) optionally grouped by facets.
+ *
+ * @param body (required)
+ * @return ApiResponse<ProductAnalyticsScalarResponse>
+ * @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 | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse queryProductAnalyticsScalarWithHttpInfo(
+ ProductAnalyticsAnalyticsRequest 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 queryProductAnalyticsScalar");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/product-analytics/analytics/scalar";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ProductAnalyticsApi.queryProductAnalyticsScalar",
+ 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() {});
+ }
+
+ /**
+ * Compute scalar analytics.
+ *
+ * See {@link #queryProductAnalyticsScalarWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<ProductAnalyticsScalarResponse>>
+ */
+ public CompletableFuture>
+ queryProductAnalyticsScalarWithHttpInfoAsync(ProductAnalyticsAnalyticsRequest 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 queryProductAnalyticsScalar"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/product-analytics/analytics/scalar";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ProductAnalyticsApi.queryProductAnalyticsScalar",
+ 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() {});
+ }
+
+ /**
+ * Compute timeseries analytics.
+ *
+ * See {@link #queryProductAnalyticsTimeseriesWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return ProductAnalyticsTimeseriesResponse
+ * @throws ApiException if fails to make API call
+ */
+ public ProductAnalyticsTimeseriesResponse queryProductAnalyticsTimeseries(
+ ProductAnalyticsAnalyticsRequest body) throws ApiException {
+ return queryProductAnalyticsTimeseriesWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Compute timeseries analytics.
+ *
+ *
See {@link #queryProductAnalyticsTimeseriesWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ProductAnalyticsTimeseriesResponse>
+ */
+ public CompletableFuture queryProductAnalyticsTimeseriesAsync(
+ ProductAnalyticsAnalyticsRequest body) {
+ return queryProductAnalyticsTimeseriesWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Compute timeseries analytics results for Product Analytics data. Returns time-bucketed values
+ * for charts and trend analysis. The compute.interval field (milliseconds) is
+ * required for time bucketing.
+ *
+ * @param body (required)
+ * @return ApiResponse<ProductAnalyticsTimeseriesResponse>
+ * @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 | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse
+ queryProductAnalyticsTimeseriesWithHttpInfo(ProductAnalyticsAnalyticsRequest 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 queryProductAnalyticsTimeseries");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/product-analytics/analytics/timeseries";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.ProductAnalyticsApi.queryProductAnalyticsTimeseries",
+ 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() {});
+ }
+
+ /**
+ * Compute timeseries analytics.
+ *
+ * See {@link #queryProductAnalyticsTimeseriesWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<ProductAnalyticsTimeseriesResponse>>
+ */
+ public CompletableFuture>
+ queryProductAnalyticsTimeseriesWithHttpInfoAsync(ProductAnalyticsAnalyticsRequest 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"
+ + " queryProductAnalyticsTimeseries"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/product-analytics/analytics/timeseries";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.ProductAnalyticsApi.queryProductAnalyticsTimeseries",
+ 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() {});
+ }
+
/**
* Send server-side events.
*
diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsQuery.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsQuery.java
new file mode 100644
index 00000000000..19c9062cda5
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsQuery.java
@@ -0,0 +1,286 @@
+/*
+ * 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 analytics query definition containing a base query, compute rule, and optional grouping. */
+@JsonPropertyOrder({
+ ProductAnalyticsAnalyticsQuery.JSON_PROPERTY_AUDIENCE_FILTERS,
+ ProductAnalyticsAnalyticsQuery.JSON_PROPERTY_COMPUTE,
+ ProductAnalyticsAnalyticsQuery.JSON_PROPERTY_GROUP_BY,
+ ProductAnalyticsAnalyticsQuery.JSON_PROPERTY_INDEXES,
+ ProductAnalyticsAnalyticsQuery.JSON_PROPERTY_QUERY
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ProductAnalyticsAnalyticsQuery {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_AUDIENCE_FILTERS = "audience_filters";
+ private ProductAnalyticsAudienceFilters audienceFilters;
+
+ public static final String JSON_PROPERTY_COMPUTE = "compute";
+ private ProductAnalyticsCompute compute;
+
+ public static final String JSON_PROPERTY_GROUP_BY = "group_by";
+ private List groupBy = null;
+
+ public static final String JSON_PROPERTY_INDEXES = "indexes";
+ private List indexes = null;
+
+ public static final String JSON_PROPERTY_QUERY = "query";
+ private ProductAnalyticsBaseQuery query;
+
+ public ProductAnalyticsAnalyticsQuery() {}
+
+ @JsonCreator
+ public ProductAnalyticsAnalyticsQuery(
+ @JsonProperty(required = true, value = JSON_PROPERTY_COMPUTE) ProductAnalyticsCompute compute,
+ @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) ProductAnalyticsBaseQuery query) {
+ this.compute = compute;
+ this.unparsed |= compute.unparsed;
+ this.query = query;
+ this.unparsed |= query.unparsed;
+ }
+
+ public ProductAnalyticsAnalyticsQuery audienceFilters(
+ ProductAnalyticsAudienceFilters audienceFilters) {
+ this.audienceFilters = audienceFilters;
+ this.unparsed |= audienceFilters.unparsed;
+ return this;
+ }
+
+ /**
+ * Audience filter definitions for targeting specific user segments.
+ *
+ * @return audienceFilters
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_AUDIENCE_FILTERS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ProductAnalyticsAudienceFilters getAudienceFilters() {
+ return audienceFilters;
+ }
+
+ public void setAudienceFilters(ProductAnalyticsAudienceFilters audienceFilters) {
+ this.audienceFilters = audienceFilters;
+ }
+
+ public ProductAnalyticsAnalyticsQuery compute(ProductAnalyticsCompute compute) {
+ this.compute = compute;
+ this.unparsed |= compute.unparsed;
+ return this;
+ }
+
+ /**
+ * A compute rule for aggregating data.
+ *
+ * @return compute
+ */
+ @JsonProperty(JSON_PROPERTY_COMPUTE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ProductAnalyticsCompute getCompute() {
+ return compute;
+ }
+
+ public void setCompute(ProductAnalyticsCompute compute) {
+ this.compute = compute;
+ }
+
+ public ProductAnalyticsAnalyticsQuery groupBy(List groupBy) {
+ this.groupBy = groupBy;
+ for (ProductAnalyticsGroupBy item : groupBy) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public ProductAnalyticsAnalyticsQuery addGroupByItem(ProductAnalyticsGroupBy groupByItem) {
+ if (this.groupBy == null) {
+ this.groupBy = new ArrayList<>();
+ }
+ this.groupBy.add(groupByItem);
+ this.unparsed |= groupByItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Group-by rules for segmenting results.
+ *
+ * @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 ProductAnalyticsAnalyticsQuery indexes(List indexes) {
+ this.indexes = indexes;
+ return this;
+ }
+
+ public ProductAnalyticsAnalyticsQuery addIndexesItem(String indexesItem) {
+ if (this.indexes == null) {
+ this.indexes = new ArrayList<>();
+ }
+ this.indexes.add(indexesItem);
+ return this;
+ }
+
+ /**
+ * Restrict the query to specific indexes. Max 1 entry.
+ *
+ * @return indexes
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_INDEXES)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getIndexes() {
+ return indexes;
+ }
+
+ public void setIndexes(List indexes) {
+ this.indexes = indexes;
+ }
+
+ public ProductAnalyticsAnalyticsQuery query(ProductAnalyticsBaseQuery query) {
+ this.query = query;
+ this.unparsed |= query.unparsed;
+ return this;
+ }
+
+ /**
+ * A query definition discriminated by the data_source field. Use
+ * product_analytics for standard event queries, or product_analytics_occurrence
+ * for occurrence-filtered queries.
+ *
+ * @return query
+ */
+ @JsonProperty(JSON_PROPERTY_QUERY)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ProductAnalyticsBaseQuery getQuery() {
+ return query;
+ }
+
+ public void setQuery(ProductAnalyticsBaseQuery 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 ProductAnalyticsAnalyticsQuery
+ */
+ @JsonAnySetter
+ public ProductAnalyticsAnalyticsQuery 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 ProductAnalyticsAnalyticsQuery object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ProductAnalyticsAnalyticsQuery productAnalyticsAnalyticsQuery =
+ (ProductAnalyticsAnalyticsQuery) o;
+ return Objects.equals(this.audienceFilters, productAnalyticsAnalyticsQuery.audienceFilters)
+ && Objects.equals(this.compute, productAnalyticsAnalyticsQuery.compute)
+ && Objects.equals(this.groupBy, productAnalyticsAnalyticsQuery.groupBy)
+ && Objects.equals(this.indexes, productAnalyticsAnalyticsQuery.indexes)
+ && Objects.equals(this.query, productAnalyticsAnalyticsQuery.query)
+ && Objects.equals(
+ this.additionalProperties, productAnalyticsAnalyticsQuery.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(audienceFilters, compute, groupBy, indexes, query, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ProductAnalyticsAnalyticsQuery {\n");
+ sb.append(" audienceFilters: ").append(toIndentedString(audienceFilters)).append("\n");
+ sb.append(" compute: ").append(toIndentedString(compute)).append("\n");
+ sb.append(" groupBy: ").append(toIndentedString(groupBy)).append("\n");
+ sb.append(" indexes: ").append(toIndentedString(indexes)).append("\n");
+ sb.append(" query: ").append(toIndentedString(query)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsRequest.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsRequest.java
new file mode 100644
index 00000000000..408f785708d
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsRequest.java
@@ -0,0 +1,148 @@
+/*
+ * 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;
+
+/** Request for computing analytics results (scalar or timeseries). */
+@JsonPropertyOrder({ProductAnalyticsAnalyticsRequest.JSON_PROPERTY_DATA})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ProductAnalyticsAnalyticsRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_DATA = "data";
+ private ProductAnalyticsAnalyticsRequestData data;
+
+ public ProductAnalyticsAnalyticsRequest() {}
+
+ @JsonCreator
+ public ProductAnalyticsAnalyticsRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_DATA)
+ ProductAnalyticsAnalyticsRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ }
+
+ public ProductAnalyticsAnalyticsRequest data(ProductAnalyticsAnalyticsRequestData data) {
+ this.data = data;
+ this.unparsed |= data.unparsed;
+ return this;
+ }
+
+ /**
+ * Data object for an analytics request.
+ *
+ * @return data
+ */
+ @JsonProperty(JSON_PROPERTY_DATA)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ProductAnalyticsAnalyticsRequestData getData() {
+ return data;
+ }
+
+ public void setData(ProductAnalyticsAnalyticsRequestData 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 ProductAnalyticsAnalyticsRequest
+ */
+ @JsonAnySetter
+ public ProductAnalyticsAnalyticsRequest 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 ProductAnalyticsAnalyticsRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ProductAnalyticsAnalyticsRequest productAnalyticsAnalyticsRequest =
+ (ProductAnalyticsAnalyticsRequest) o;
+ return Objects.equals(this.data, productAnalyticsAnalyticsRequest.data)
+ && Objects.equals(
+ this.additionalProperties, productAnalyticsAnalyticsRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ProductAnalyticsAnalyticsRequest {\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/ProductAnalyticsAnalyticsRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsRequestAttributes.java
new file mode 100644
index 00000000000..636b55250e8
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsRequestAttributes.java
@@ -0,0 +1,271 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.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;
+
+/** Attributes for an analytics request. */
+@JsonPropertyOrder({
+ ProductAnalyticsAnalyticsRequestAttributes.JSON_PROPERTY_ENFORCED_EXECUTION_TYPE,
+ ProductAnalyticsAnalyticsRequestAttributes.JSON_PROPERTY_FROM,
+ ProductAnalyticsAnalyticsRequestAttributes.JSON_PROPERTY_QUERY,
+ ProductAnalyticsAnalyticsRequestAttributes.JSON_PROPERTY_REQUEST_ID,
+ ProductAnalyticsAnalyticsRequestAttributes.JSON_PROPERTY_TO
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ProductAnalyticsAnalyticsRequestAttributes {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ENFORCED_EXECUTION_TYPE = "enforced_execution_type";
+ private ProductAnalyticsExecutionType enforcedExecutionType;
+
+ public static final String JSON_PROPERTY_FROM = "from";
+ private Long from;
+
+ public static final String JSON_PROPERTY_QUERY = "query";
+ private ProductAnalyticsAnalyticsQuery query;
+
+ public static final String JSON_PROPERTY_REQUEST_ID = "request_id";
+ private String requestId;
+
+ public static final String JSON_PROPERTY_TO = "to";
+ private Long to;
+
+ public ProductAnalyticsAnalyticsRequestAttributes() {}
+
+ @JsonCreator
+ public ProductAnalyticsAnalyticsRequestAttributes(
+ @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from,
+ @JsonProperty(required = true, value = JSON_PROPERTY_QUERY)
+ ProductAnalyticsAnalyticsQuery query,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) {
+ this.from = from;
+ this.query = query;
+ this.unparsed |= query.unparsed;
+ this.to = to;
+ }
+
+ public ProductAnalyticsAnalyticsRequestAttributes enforcedExecutionType(
+ ProductAnalyticsExecutionType enforcedExecutionType) {
+ this.enforcedExecutionType = enforcedExecutionType;
+ this.unparsed |= !enforcedExecutionType.isValid();
+ return this;
+ }
+
+ /**
+ * Override the query execution strategy.
+ *
+ * @return enforcedExecutionType
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ENFORCED_EXECUTION_TYPE)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public ProductAnalyticsExecutionType getEnforcedExecutionType() {
+ return enforcedExecutionType;
+ }
+
+ public void setEnforcedExecutionType(ProductAnalyticsExecutionType enforcedExecutionType) {
+ if (!enforcedExecutionType.isValid()) {
+ this.unparsed = true;
+ }
+ this.enforcedExecutionType = enforcedExecutionType;
+ }
+
+ public ProductAnalyticsAnalyticsRequestAttributes from(Long from) {
+ this.from = from;
+ return this;
+ }
+
+ /**
+ * Start time in epoch milliseconds. Must be less than to.
+ *
+ * @return from
+ */
+ @JsonProperty(JSON_PROPERTY_FROM)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Long getFrom() {
+ return from;
+ }
+
+ public void setFrom(Long from) {
+ this.from = from;
+ }
+
+ public ProductAnalyticsAnalyticsRequestAttributes query(ProductAnalyticsAnalyticsQuery query) {
+ this.query = query;
+ this.unparsed |= query.unparsed;
+ return this;
+ }
+
+ /**
+ * The analytics query definition containing a base query, compute rule, and optional grouping.
+ *
+ * @return query
+ */
+ @JsonProperty(JSON_PROPERTY_QUERY)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ProductAnalyticsAnalyticsQuery getQuery() {
+ return query;
+ }
+
+ public void setQuery(ProductAnalyticsAnalyticsQuery query) {
+ this.query = query;
+ }
+
+ public ProductAnalyticsAnalyticsRequestAttributes requestId(String requestId) {
+ this.requestId = requestId;
+ return this;
+ }
+
+ /**
+ * Optional request ID for multi-step query continuation.
+ *
+ * @return requestId
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_REQUEST_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getRequestId() {
+ return requestId;
+ }
+
+ public void setRequestId(String requestId) {
+ this.requestId = requestId;
+ }
+
+ public ProductAnalyticsAnalyticsRequestAttributes to(Long to) {
+ this.to = to;
+ return this;
+ }
+
+ /**
+ * End time in epoch milliseconds.
+ *
+ * @return to
+ */
+ @JsonProperty(JSON_PROPERTY_TO)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Long getTo() {
+ return to;
+ }
+
+ public void setTo(Long to) {
+ this.to = to;
+ }
+
+ /**
+ * 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 ProductAnalyticsAnalyticsRequestAttributes
+ */
+ @JsonAnySetter
+ public ProductAnalyticsAnalyticsRequestAttributes 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 ProductAnalyticsAnalyticsRequestAttributes object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ProductAnalyticsAnalyticsRequestAttributes productAnalyticsAnalyticsRequestAttributes =
+ (ProductAnalyticsAnalyticsRequestAttributes) o;
+ return Objects.equals(
+ this.enforcedExecutionType,
+ productAnalyticsAnalyticsRequestAttributes.enforcedExecutionType)
+ && Objects.equals(this.from, productAnalyticsAnalyticsRequestAttributes.from)
+ && Objects.equals(this.query, productAnalyticsAnalyticsRequestAttributes.query)
+ && Objects.equals(this.requestId, productAnalyticsAnalyticsRequestAttributes.requestId)
+ && Objects.equals(this.to, productAnalyticsAnalyticsRequestAttributes.to)
+ && Objects.equals(
+ this.additionalProperties,
+ productAnalyticsAnalyticsRequestAttributes.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(enforcedExecutionType, from, query, requestId, to, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ProductAnalyticsAnalyticsRequestAttributes {\n");
+ sb.append(" enforcedExecutionType: ")
+ .append(toIndentedString(enforcedExecutionType))
+ .append("\n");
+ sb.append(" from: ").append(toIndentedString(from)).append("\n");
+ sb.append(" query: ").append(toIndentedString(query)).append("\n");
+ sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
+ sb.append(" to: ").append(toIndentedString(to)).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/ProductAnalyticsAnalyticsRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsRequestData.java
new file mode 100644
index 00000000000..e9f42571bd6
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsRequestData.java
@@ -0,0 +1,185 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** Data object for an analytics request. */
+@JsonPropertyOrder({
+ ProductAnalyticsAnalyticsRequestData.JSON_PROPERTY_ATTRIBUTES,
+ ProductAnalyticsAnalyticsRequestData.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ProductAnalyticsAnalyticsRequestData {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
+ private ProductAnalyticsAnalyticsRequestAttributes attributes;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private ProductAnalyticsAnalyticsRequestType type;
+
+ public ProductAnalyticsAnalyticsRequestData() {}
+
+ @JsonCreator
+ public ProductAnalyticsAnalyticsRequestData(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
+ ProductAnalyticsAnalyticsRequestAttributes attributes,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE)
+ ProductAnalyticsAnalyticsRequestType type) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ }
+
+ public ProductAnalyticsAnalyticsRequestData attributes(
+ ProductAnalyticsAnalyticsRequestAttributes attributes) {
+ this.attributes = attributes;
+ this.unparsed |= attributes.unparsed;
+ return this;
+ }
+
+ /**
+ * Attributes for an analytics request.
+ *
+ * @return attributes
+ */
+ @JsonProperty(JSON_PROPERTY_ATTRIBUTES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ProductAnalyticsAnalyticsRequestAttributes getAttributes() {
+ return attributes;
+ }
+
+ public void setAttributes(ProductAnalyticsAnalyticsRequestAttributes attributes) {
+ this.attributes = attributes;
+ }
+
+ public ProductAnalyticsAnalyticsRequestData type(ProductAnalyticsAnalyticsRequestType type) {
+ this.type = type;
+ this.unparsed |= !type.isValid();
+ return this;
+ }
+
+ /**
+ * The resource type for analytics requests.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public ProductAnalyticsAnalyticsRequestType getType() {
+ return type;
+ }
+
+ public void setType(ProductAnalyticsAnalyticsRequestType 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 ProductAnalyticsAnalyticsRequestData
+ */
+ @JsonAnySetter
+ public ProductAnalyticsAnalyticsRequestData 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 ProductAnalyticsAnalyticsRequestData object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ProductAnalyticsAnalyticsRequestData productAnalyticsAnalyticsRequestData =
+ (ProductAnalyticsAnalyticsRequestData) o;
+ return Objects.equals(this.attributes, productAnalyticsAnalyticsRequestData.attributes)
+ && Objects.equals(this.type, productAnalyticsAnalyticsRequestData.type)
+ && Objects.equals(
+ this.additionalProperties, productAnalyticsAnalyticsRequestData.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attributes, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ProductAnalyticsAnalyticsRequestData {\n");
+ sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsRequestType.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsRequestType.java
new file mode 100644
index 00000000000..10013e87e85
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAnalyticsRequestType.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 resource type for analytics requests. */
+@JsonSerialize(
+ using =
+ ProductAnalyticsAnalyticsRequestType.ProductAnalyticsAnalyticsRequestTypeSerializer.class)
+public class ProductAnalyticsAnalyticsRequestType extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("formula_analytics_extended_request"));
+
+ public static final ProductAnalyticsAnalyticsRequestType FORMULA_ANALYTICS_EXTENDED_REQUEST =
+ new ProductAnalyticsAnalyticsRequestType("formula_analytics_extended_request");
+
+ ProductAnalyticsAnalyticsRequestType(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class ProductAnalyticsAnalyticsRequestTypeSerializer
+ extends StdSerializer {
+ public ProductAnalyticsAnalyticsRequestTypeSerializer(
+ Class t) {
+ super(t);
+ }
+
+ public ProductAnalyticsAnalyticsRequestTypeSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ProductAnalyticsAnalyticsRequestType value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static ProductAnalyticsAnalyticsRequestType fromValue(String value) {
+ return new ProductAnalyticsAnalyticsRequestType(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAudienceAccountSubquery.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAudienceAccountSubquery.java
new file mode 100644
index 00000000000..33a4778bb0c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAudienceAccountSubquery.java
@@ -0,0 +1,175 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/** An account-based audience query. */
+@JsonPropertyOrder({
+ ProductAnalyticsAudienceAccountSubquery.JSON_PROPERTY_NAME,
+ ProductAnalyticsAudienceAccountSubquery.JSON_PROPERTY_QUERY
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ProductAnalyticsAudienceAccountSubquery {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public static final String JSON_PROPERTY_QUERY = "query";
+ private String query;
+
+ public ProductAnalyticsAudienceAccountSubquery() {}
+
+ @JsonCreator
+ public ProductAnalyticsAudienceAccountSubquery(
+ @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) {
+ this.name = name;
+ }
+
+ public ProductAnalyticsAudienceAccountSubquery name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Name of this query, referenced in the formula.
+ *
+ * @return name
+ */
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ProductAnalyticsAudienceAccountSubquery query(String query) {
+ this.query = query;
+ return this;
+ }
+
+ /**
+ * Search query for filtering accounts.
+ *
+ * @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 ProductAnalyticsAudienceAccountSubquery
+ */
+ @JsonAnySetter
+ public ProductAnalyticsAudienceAccountSubquery 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 ProductAnalyticsAudienceAccountSubquery object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ProductAnalyticsAudienceAccountSubquery productAnalyticsAudienceAccountSubquery =
+ (ProductAnalyticsAudienceAccountSubquery) o;
+ return Objects.equals(this.name, productAnalyticsAudienceAccountSubquery.name)
+ && Objects.equals(this.query, productAnalyticsAudienceAccountSubquery.query)
+ && Objects.equals(
+ this.additionalProperties,
+ productAnalyticsAudienceAccountSubquery.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, query, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ProductAnalyticsAudienceAccountSubquery {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" query: ").append(toIndentedString(query)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAudienceFilters.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAudienceFilters.java
new file mode 100644
index 00000000000..406a6911e71
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAudienceFilters.java
@@ -0,0 +1,263 @@
+/*
+ * 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;
+
+/** Audience filter definitions for targeting specific user segments. */
+@JsonPropertyOrder({
+ ProductAnalyticsAudienceFilters.JSON_PROPERTY_ACCOUNTS,
+ ProductAnalyticsAudienceFilters.JSON_PROPERTY_FORMULA,
+ ProductAnalyticsAudienceFilters.JSON_PROPERTY_SEGMENTS,
+ ProductAnalyticsAudienceFilters.JSON_PROPERTY_USERS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ProductAnalyticsAudienceFilters {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ACCOUNTS = "accounts";
+ private List accounts = null;
+
+ public static final String JSON_PROPERTY_FORMULA = "formula";
+ private String formula;
+
+ public static final String JSON_PROPERTY_SEGMENTS = "segments";
+ private List segments = null;
+
+ public static final String JSON_PROPERTY_USERS = "users";
+ private List users = null;
+
+ public ProductAnalyticsAudienceFilters accounts(
+ List accounts) {
+ this.accounts = accounts;
+ for (ProductAnalyticsAudienceAccountSubquery item : accounts) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public ProductAnalyticsAudienceFilters addAccountsItem(
+ ProductAnalyticsAudienceAccountSubquery accountsItem) {
+ if (this.accounts == null) {
+ this.accounts = new ArrayList<>();
+ }
+ this.accounts.add(accountsItem);
+ this.unparsed |= accountsItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Account audience queries.
+ *
+ * @return accounts
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_ACCOUNTS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getAccounts() {
+ return accounts;
+ }
+
+ public void setAccounts(List accounts) {
+ this.accounts = accounts;
+ }
+
+ public ProductAnalyticsAudienceFilters formula(String formula) {
+ this.formula = formula;
+ return this;
+ }
+
+ /**
+ * Boolean formula combining audience queries by name.
+ *
+ * @return formula
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_FORMULA)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getFormula() {
+ return formula;
+ }
+
+ public void setFormula(String formula) {
+ this.formula = formula;
+ }
+
+ public ProductAnalyticsAudienceFilters segments(
+ List segments) {
+ this.segments = segments;
+ for (ProductAnalyticsAudienceSegmentSubquery item : segments) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public ProductAnalyticsAudienceFilters addSegmentsItem(
+ ProductAnalyticsAudienceSegmentSubquery segmentsItem) {
+ if (this.segments == null) {
+ this.segments = new ArrayList<>();
+ }
+ this.segments.add(segmentsItem);
+ this.unparsed |= segmentsItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Segment audience queries.
+ *
+ * @return segments
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_SEGMENTS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getSegments() {
+ return segments;
+ }
+
+ public void setSegments(List segments) {
+ this.segments = segments;
+ }
+
+ public ProductAnalyticsAudienceFilters users(List users) {
+ this.users = users;
+ for (ProductAnalyticsAudienceUserSubquery item : users) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public ProductAnalyticsAudienceFilters addUsersItem(
+ ProductAnalyticsAudienceUserSubquery usersItem) {
+ if (this.users == null) {
+ this.users = new ArrayList<>();
+ }
+ this.users.add(usersItem);
+ this.unparsed |= usersItem.unparsed;
+ return this;
+ }
+
+ /**
+ * User audience queries.
+ *
+ * @return users
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_USERS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getUsers() {
+ return users;
+ }
+
+ public void setUsers(List users) {
+ this.users = users;
+ }
+
+ /**
+ * 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 ProductAnalyticsAudienceFilters
+ */
+ @JsonAnySetter
+ public ProductAnalyticsAudienceFilters 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 ProductAnalyticsAudienceFilters object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ProductAnalyticsAudienceFilters productAnalyticsAudienceFilters =
+ (ProductAnalyticsAudienceFilters) o;
+ return Objects.equals(this.accounts, productAnalyticsAudienceFilters.accounts)
+ && Objects.equals(this.formula, productAnalyticsAudienceFilters.formula)
+ && Objects.equals(this.segments, productAnalyticsAudienceFilters.segments)
+ && Objects.equals(this.users, productAnalyticsAudienceFilters.users)
+ && Objects.equals(
+ this.additionalProperties, productAnalyticsAudienceFilters.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(accounts, formula, segments, users, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ProductAnalyticsAudienceFilters {\n");
+ sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n");
+ sb.append(" formula: ").append(toIndentedString(formula)).append("\n");
+ sb.append(" segments: ").append(toIndentedString(segments)).append("\n");
+ sb.append(" users: ").append(toIndentedString(users)).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/ProductAnalyticsAudienceSegmentSubquery.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAudienceSegmentSubquery.java
new file mode 100644
index 00000000000..f36b2ae0257
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAudienceSegmentSubquery.java
@@ -0,0 +1,177 @@
+/*
+ * 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;
+import java.util.UUID;
+
+/** A segment-based audience query. */
+@JsonPropertyOrder({
+ ProductAnalyticsAudienceSegmentSubquery.JSON_PROPERTY_NAME,
+ ProductAnalyticsAudienceSegmentSubquery.JSON_PROPERTY_SEGMENT_ID
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ProductAnalyticsAudienceSegmentSubquery {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public static final String JSON_PROPERTY_SEGMENT_ID = "segment_id";
+ private UUID segmentId;
+
+ public ProductAnalyticsAudienceSegmentSubquery() {}
+
+ @JsonCreator
+ public ProductAnalyticsAudienceSegmentSubquery(
+ @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name,
+ @JsonProperty(required = true, value = JSON_PROPERTY_SEGMENT_ID) UUID segmentId) {
+ this.name = name;
+ this.segmentId = segmentId;
+ }
+
+ public ProductAnalyticsAudienceSegmentSubquery name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Name of this query, referenced in the formula.
+ *
+ * @return name
+ */
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ProductAnalyticsAudienceSegmentSubquery segmentId(UUID segmentId) {
+ this.segmentId = segmentId;
+ return this;
+ }
+
+ /**
+ * UUID of the segment to filter by.
+ *
+ * @return segmentId
+ */
+ @JsonProperty(JSON_PROPERTY_SEGMENT_ID)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public UUID getSegmentId() {
+ return segmentId;
+ }
+
+ public void setSegmentId(UUID segmentId) {
+ this.segmentId = segmentId;
+ }
+
+ /**
+ * 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 ProductAnalyticsAudienceSegmentSubquery
+ */
+ @JsonAnySetter
+ public ProductAnalyticsAudienceSegmentSubquery 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 ProductAnalyticsAudienceSegmentSubquery object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ProductAnalyticsAudienceSegmentSubquery productAnalyticsAudienceSegmentSubquery =
+ (ProductAnalyticsAudienceSegmentSubquery) o;
+ return Objects.equals(this.name, productAnalyticsAudienceSegmentSubquery.name)
+ && Objects.equals(this.segmentId, productAnalyticsAudienceSegmentSubquery.segmentId)
+ && Objects.equals(
+ this.additionalProperties,
+ productAnalyticsAudienceSegmentSubquery.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, segmentId, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ProductAnalyticsAudienceSegmentSubquery {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" segmentId: ").append(toIndentedString(segmentId)).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/ProductAnalyticsAudienceUserSubquery.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAudienceUserSubquery.java
new file mode 100644
index 00000000000..0719526f51b
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAudienceUserSubquery.java
@@ -0,0 +1,174 @@
+/*
+ * 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 user-based audience query. */
+@JsonPropertyOrder({
+ ProductAnalyticsAudienceUserSubquery.JSON_PROPERTY_NAME,
+ ProductAnalyticsAudienceUserSubquery.JSON_PROPERTY_QUERY
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class ProductAnalyticsAudienceUserSubquery {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_NAME = "name";
+ private String name;
+
+ public static final String JSON_PROPERTY_QUERY = "query";
+ private String query;
+
+ public ProductAnalyticsAudienceUserSubquery() {}
+
+ @JsonCreator
+ public ProductAnalyticsAudienceUserSubquery(
+ @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) {
+ this.name = name;
+ }
+
+ public ProductAnalyticsAudienceUserSubquery name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Name of this query, referenced in the formula.
+ *
+ * @return name
+ */
+ @JsonProperty(JSON_PROPERTY_NAME)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public ProductAnalyticsAudienceUserSubquery query(String query) {
+ this.query = query;
+ return this;
+ }
+
+ /**
+ * Search query for filtering users.
+ *
+ * @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 ProductAnalyticsAudienceUserSubquery
+ */
+ @JsonAnySetter
+ public ProductAnalyticsAudienceUserSubquery 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 ProductAnalyticsAudienceUserSubquery object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ProductAnalyticsAudienceUserSubquery productAnalyticsAudienceUserSubquery =
+ (ProductAnalyticsAudienceUserSubquery) o;
+ return Objects.equals(this.name, productAnalyticsAudienceUserSubquery.name)
+ && Objects.equals(this.query, productAnalyticsAudienceUserSubquery.query)
+ && Objects.equals(
+ this.additionalProperties, productAnalyticsAudienceUserSubquery.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, query, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ProductAnalyticsAudienceUserSubquery {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" query: ").append(toIndentedString(query)).append("\n");
+ sb.append(" additionalProperties: ")
+ .append(toIndentedString(additionalProperties))
+ .append("\n");
+ sb.append('}');
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsBaseQuery.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsBaseQuery.java
new file mode 100644
index 00000000000..e6434b395e0
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsBaseQuery.java
@@ -0,0 +1,286 @@
+/*
+ * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
+ * This product includes software developed at Datadog (https://www.datadoghq.com/).
+ * Copyright 2019-Present Datadog, Inc.
+ */
+
+package com.datadog.api.client.v2.model;
+
+import com.datadog.api.client.AbstractOpenApiSchema;
+import com.datadog.api.client.JSON;
+import com.datadog.api.client.UnparsedObject;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import jakarta.ws.rs.core.GenericType;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+@JsonDeserialize(using = ProductAnalyticsBaseQuery.ProductAnalyticsBaseQueryDeserializer.class)
+@JsonSerialize(using = ProductAnalyticsBaseQuery.ProductAnalyticsBaseQuerySerializer.class)
+public class ProductAnalyticsBaseQuery extends AbstractOpenApiSchema {
+ private static final Logger log = Logger.getLogger(ProductAnalyticsBaseQuery.class.getName());
+
+ @JsonIgnore public boolean unparsed = false;
+
+ public static class ProductAnalyticsBaseQuerySerializer
+ extends StdSerializer {
+ public ProductAnalyticsBaseQuerySerializer(Class t) {
+ super(t);
+ }
+
+ public ProductAnalyticsBaseQuerySerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ ProductAnalyticsBaseQuery value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.getActualInstance());
+ }
+ }
+
+ public static class ProductAnalyticsBaseQueryDeserializer
+ extends StdDeserializer {
+ public ProductAnalyticsBaseQueryDeserializer() {
+ this(ProductAnalyticsBaseQuery.class);
+ }
+
+ public ProductAnalyticsBaseQueryDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public ProductAnalyticsBaseQuery deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+ JsonNode tree = jp.readValueAsTree();
+ Object deserialized = null;
+ Object tmp = null;
+ boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS);
+ int match = 0;
+ JsonToken token = tree.traverse(jp.getCodec()).nextToken();
+ // deserialize ProductAnalyticsEventQuery
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (ProductAnalyticsEventQuery.class.equals(Integer.class)
+ || ProductAnalyticsEventQuery.class.equals(Long.class)
+ || ProductAnalyticsEventQuery.class.equals(Float.class)
+ || ProductAnalyticsEventQuery.class.equals(Double.class)
+ || ProductAnalyticsEventQuery.class.equals(Boolean.class)
+ || ProductAnalyticsEventQuery.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((ProductAnalyticsEventQuery.class.equals(Integer.class)
+ || ProductAnalyticsEventQuery.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((ProductAnalyticsEventQuery.class.equals(Float.class)
+ || ProductAnalyticsEventQuery.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (ProductAnalyticsEventQuery.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (ProductAnalyticsEventQuery.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(ProductAnalyticsEventQuery.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((ProductAnalyticsEventQuery) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'ProductAnalyticsEventQuery'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'ProductAnalyticsEventQuery'", e);
+ }
+
+ // deserialize ProductAnalyticsOccurrenceQuery
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (ProductAnalyticsOccurrenceQuery.class.equals(Integer.class)
+ || ProductAnalyticsOccurrenceQuery.class.equals(Long.class)
+ || ProductAnalyticsOccurrenceQuery.class.equals(Float.class)
+ || ProductAnalyticsOccurrenceQuery.class.equals(Double.class)
+ || ProductAnalyticsOccurrenceQuery.class.equals(Boolean.class)
+ || ProductAnalyticsOccurrenceQuery.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((ProductAnalyticsOccurrenceQuery.class.equals(Integer.class)
+ || ProductAnalyticsOccurrenceQuery.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((ProductAnalyticsOccurrenceQuery.class.equals(Float.class)
+ || ProductAnalyticsOccurrenceQuery.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (ProductAnalyticsOccurrenceQuery.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (ProductAnalyticsOccurrenceQuery.class.equals(String.class)
+ && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(ProductAnalyticsOccurrenceQuery.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ if (!((ProductAnalyticsOccurrenceQuery) tmp).unparsed) {
+ deserialized = tmp;
+ match++;
+ }
+ log.log(Level.FINER, "Input data matches schema 'ProductAnalyticsOccurrenceQuery'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(
+ Level.FINER, "Input data does not match schema 'ProductAnalyticsOccurrenceQuery'", e);
+ }
+
+ ProductAnalyticsBaseQuery ret = new ProductAnalyticsBaseQuery();
+ if (match == 1) {
+ ret.setActualInstance(deserialized);
+ } else {
+ Map res =
+ new ObjectMapper()
+ .readValue(
+ tree.traverse(jp.getCodec()).readValueAsTree().toString(),
+ new TypeReference