From eded9cdcd2415eb62db5096ce2a750a5379c97f8 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 25 Feb 2026 16:34:07 +0000 Subject: [PATCH] Regenerate client from commit de14407 of spec repo --- .generator/schemas/v2/openapi.yaml | 317 +++++++++++++++ .../QueryProductAnalyticsSankey.java | 55 +++ .../client/v2/api/ProductAnalyticsApi.java | 140 +++++++ .../v2/model/ProductAnalyticsJoinKeys.java | 174 ++++++++ .../v2/model/ProductAnalyticsSampling.java | 135 ++++++ .../ProductAnalyticsSankeyAggregatedNode.java | 278 +++++++++++++ ...ductAnalyticsSankeyAggregatedNodeType.java | 62 +++ .../ProductAnalyticsSankeyDefinition.java | 224 ++++++++++ .../v2/model/ProductAnalyticsSankeyLink.java | 246 +++++++++++ .../v2/model/ProductAnalyticsSankeyNode.java | 384 ++++++++++++++++++ .../model/ProductAnalyticsSankeyNodeType.java | 62 +++ .../model/ProductAnalyticsSankeyRequest.java | 147 +++++++ ...oductAnalyticsSankeyRequestAttributes.java | 342 ++++++++++++++++ .../ProductAnalyticsSankeyRequestData.java | 185 +++++++++ .../ProductAnalyticsSankeyRequestType.java | 58 +++ .../model/ProductAnalyticsSankeyResponse.java | 168 ++++++++ ...ductAnalyticsSankeyResponseAttributes.java | 195 +++++++++ .../ProductAnalyticsSankeyResponseData.java | 199 +++++++++ .../ProductAnalyticsSankeyResponseType.java | 59 +++ .../model/ProductAnalyticsSankeySearch.java | 259 ++++++++++++ .../v2/model/ProductAnalyticsSankeyTime.java | 174 ++++++++ .../client/v2/api/product_analytics.feature | 16 + .../com/datadog/api/client/v2/api/undo.json | 6 + 23 files changed, 3885 insertions(+) create mode 100644 examples/v2/product-analytics/QueryProductAnalyticsSankey.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsJoinKeys.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSampling.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyAggregatedNode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyAggregatedNodeType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyDefinition.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyLink.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyNode.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyNodeType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequestAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequestData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequestType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponseAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponseType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeySearch.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyTime.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e2256f32bd5..56347150288 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -48417,6 +48417,19 @@ components: type: type: string type: object + ProductAnalyticsJoinKeys: + description: Join key configuration for correlating events. + properties: + primary: + description: The primary join key facet. + example: '@session.id' + type: string + secondary: + description: Secondary join key facets. + items: + type: string + type: array + type: object ProductAnalyticsOccurrenceFilter: description: Filter for occurrence-based queries. properties: @@ -48484,6 +48497,273 @@ components: - DONE - RUNNING - TIMEOUT + ProductAnalyticsSampling: + description: Sampling configuration. + properties: + enabled: + default: false + description: Whether sampling is enabled. + type: boolean + type: object + ProductAnalyticsSankeyAggregatedNode: + description: A node aggregated into an "other" node. + properties: + id: + type: string + incoming_value: + format: int64 + type: integer + name: + type: string + outgoing_value: + format: int64 + type: integer + type: + $ref: '#/components/schemas/ProductAnalyticsSankeyAggregatedNodeType' + value: + format: int64 + type: integer + type: object + ProductAnalyticsSankeyAggregatedNodeType: + enum: + - aggregated + type: string + x-enum-varnames: + - AGGREGATED + ProductAnalyticsSankeyDefinition: + description: 'Sankey visualization definition. Set either `source` or `target`, + not both. + + Use `source` for forward flow (where do users go after this page?) or + + `target` for backward flow (where did users come from?).' + properties: + entries_per_step: + default: 5 + description: Number of page entries per step. Default 5, max 10. + example: 5 + format: int64 + maximum: 10 + type: integer + number_of_steps: + default: 5 + description: Number of steps in the flow. Default 5, max 10. + example: 5 + format: int64 + maximum: 10 + type: integer + source: + description: The source page for forward flow analysis. Use "*" for all + pages. + example: /logs + type: string + target: + description: The target page for backward flow analysis. + type: string + type: object + ProductAnalyticsSankeyLink: + description: A link between two nodes in the Sankey diagram. + properties: + column: + description: The step column of the source node. + format: int64 + type: integer + id: + type: string + source: + description: The source node ID. + type: string + target: + description: The target node ID. + type: string + value: + description: The number of sessions through this link. + format: int64 + type: integer + type: object + ProductAnalyticsSankeyNode: + description: A node in the Sankey diagram representing a page or aggregation. + properties: + aggregated_nodes: + description: Nodes aggregated into this node (for "other" type). + items: + $ref: '#/components/schemas/ProductAnalyticsSankeyAggregatedNode' + type: array + column: + description: The step column (0-indexed). + format: int64 + type: integer + dropoff_value: + format: int64 + type: integer + id: + type: string + incoming_value: + format: int64 + type: integer + name: + description: The page name. + example: /logs + type: string + outgoing_value: + format: int64 + type: integer + type: + $ref: '#/components/schemas/ProductAnalyticsSankeyNodeType' + value: + description: The number of sessions through this node. + format: int64 + type: integer + type: object + ProductAnalyticsSankeyNodeType: + description: Node type. + enum: + - regular + - other + - dropoff + type: string + x-enum-varnames: + - REGULAR + - OTHER + - DROPOFF + ProductAnalyticsSankeyRequest: + description: Request for computing a Sankey flow analysis. + example: + data: + attributes: + data_source: product_analytics + definition: + entries_per_step: 5 + number_of_steps: 5 + source: /logs + target: '' + search: + join_keys: + primary: '@session.id' + query: '@type:view' + time: + from: 1771232048460 + to: 1771836848262 + type: sankey_request + properties: + data: + $ref: '#/components/schemas/ProductAnalyticsSankeyRequestData' + required: + - data + type: object + ProductAnalyticsSankeyRequestAttributes: + description: Attributes for a Sankey request. + properties: + data_source: + description: The data source for the Sankey query. + example: product_analytics + type: string + definition: + $ref: '#/components/schemas/ProductAnalyticsSankeyDefinition' + enforced_execution_type: + $ref: '#/components/schemas/ProductAnalyticsExecutionType' + request_id: + type: string + sampling: + $ref: '#/components/schemas/ProductAnalyticsSampling' + search: + $ref: '#/components/schemas/ProductAnalyticsSankeySearch' + time: + $ref: '#/components/schemas/ProductAnalyticsSankeyTime' + required: + - time + - search + - definition + - data_source + type: object + ProductAnalyticsSankeyRequestData: + properties: + attributes: + $ref: '#/components/schemas/ProductAnalyticsSankeyRequestAttributes' + type: + $ref: '#/components/schemas/ProductAnalyticsSankeyRequestType' + required: + - type + - attributes + type: object + ProductAnalyticsSankeyRequestType: + enum: + - sankey_request + example: sankey_request + type: string + x-enum-varnames: + - SANKEY_REQUEST + ProductAnalyticsSankeyResponse: + description: Response for a Sankey flow analysis. + properties: + data: + $ref: '#/components/schemas/ProductAnalyticsSankeyResponseData' + meta: + $ref: '#/components/schemas/ProductAnalyticsResponseMeta' + type: object + ProductAnalyticsSankeyResponseAttributes: + properties: + links: + description: The links (flows) between nodes. + items: + $ref: '#/components/schemas/ProductAnalyticsSankeyLink' + type: array + nodes: + description: The nodes (pages) in the Sankey diagram. + items: + $ref: '#/components/schemas/ProductAnalyticsSankeyNode' + type: array + type: object + ProductAnalyticsSankeyResponseData: + properties: + attributes: + $ref: '#/components/schemas/ProductAnalyticsSankeyResponseAttributes' + id: + type: string + type: + $ref: '#/components/schemas/ProductAnalyticsSankeyResponseType' + type: object + ProductAnalyticsSankeyResponseType: + enum: + - sankey_response + type: string + x-enum-varnames: + - SANKEY_RESPONSE + ProductAnalyticsSankeySearch: + description: Search parameters for a Sankey query. + properties: + audience_filters: + $ref: '#/components/schemas/ProductAnalyticsAudienceFilters' + join_keys: + $ref: '#/components/schemas/ProductAnalyticsJoinKeys' + occurrences: + $ref: '#/components/schemas/ProductAnalyticsOccurrenceFilter' + query: + description: The search query. Cannot be empty. + example: '@type:view' + type: string + subquery_id: + type: string + required: + - query + type: object + ProductAnalyticsSankeyTime: + description: Time range for the Sankey query. + properties: + from: + description: Start time in epoch milliseconds. + example: 0 + format: int64 + type: integer + to: + description: End time in epoch milliseconds. + example: 0 + format: int64 + type: integer + required: + - from + - to + type: object ProductAnalyticsScalarColumn: description: A column in a scalar response. properties: @@ -93205,6 +93485,43 @@ paths: operator: OR permissions: - rum_apps_read + /api/v2/product-analytics/sankey: + post: + description: 'Compute a Sankey flow analysis showing how users navigate between + pages. + + Specify either a `source` page (forward flow) or `target` page (backward flow), + but not both. + + Maximum 10 steps and 10 entries per step.' + operationId: QueryProductAnalyticsSankey + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductAnalyticsSankeyRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProductAnalyticsSankeyResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '403': + $ref: '#/components/responses/NotAuthorizedResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + summary: Compute Sankey flow analysis + tags: + - Product Analytics + x-codegen-request-body-name: body + x-permission: + operator: OR + permissions: + - rum_apps_read /api/v2/product-analytics/users/event_filtered_query: post: description: Query users filtered by both user properties and event platform diff --git a/examples/v2/product-analytics/QueryProductAnalyticsSankey.java b/examples/v2/product-analytics/QueryProductAnalyticsSankey.java new file mode 100644 index 00000000000..44dda1a0d5a --- /dev/null +++ b/examples/v2/product-analytics/QueryProductAnalyticsSankey.java @@ -0,0 +1,55 @@ +// Compute Sankey flow analysis returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ProductAnalyticsApi; +import com.datadog.api.client.v2.model.ProductAnalyticsJoinKeys; +import com.datadog.api.client.v2.model.ProductAnalyticsSankeyDefinition; +import com.datadog.api.client.v2.model.ProductAnalyticsSankeyRequest; +import com.datadog.api.client.v2.model.ProductAnalyticsSankeyRequestAttributes; +import com.datadog.api.client.v2.model.ProductAnalyticsSankeyRequestData; +import com.datadog.api.client.v2.model.ProductAnalyticsSankeyRequestType; +import com.datadog.api.client.v2.model.ProductAnalyticsSankeyResponse; +import com.datadog.api.client.v2.model.ProductAnalyticsSankeySearch; +import com.datadog.api.client.v2.model.ProductAnalyticsSankeyTime; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + ProductAnalyticsApi apiInstance = new ProductAnalyticsApi(defaultClient); + + ProductAnalyticsSankeyRequest body = + new ProductAnalyticsSankeyRequest() + .data( + new ProductAnalyticsSankeyRequestData() + .attributes( + new ProductAnalyticsSankeyRequestAttributes() + .dataSource("product_analytics") + .definition( + new ProductAnalyticsSankeyDefinition() + .entriesPerStep(5L) + .numberOfSteps(5L) + .source("/logs") + .target("")) + .search( + new ProductAnalyticsSankeySearch() + .joinKeys(new ProductAnalyticsJoinKeys().primary("@session.id")) + .query("@type:view")) + .time( + new ProductAnalyticsSankeyTime() + .from(1771232048460L) + .to(1771836848262L))) + .type(ProductAnalyticsSankeyRequestType.SANKEY_REQUEST)); + + try { + ProductAnalyticsSankeyResponse result = apiInstance.queryProductAnalyticsSankey(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ProductAnalyticsApi#queryProductAnalyticsSankey"); + 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/ProductAnalyticsApi.java b/src/main/java/com/datadog/api/client/v2/api/ProductAnalyticsApi.java index d0c712b8895..81304aa615d 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 @@ -5,6 +5,8 @@ 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.ProductAnalyticsSankeyRequest; +import com.datadog.api.client.v2.model.ProductAnalyticsSankeyResponse; import com.datadog.api.client.v2.model.ProductAnalyticsScalarResponse; import com.datadog.api.client.v2.model.ProductAnalyticsServerSideEventItem; import com.datadog.api.client.v2.model.ProductAnalyticsTimeseriesResponse; @@ -46,6 +48,144 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Compute Sankey flow analysis. + * + *

See {@link #queryProductAnalyticsSankeyWithHttpInfo}. + * + * @param body (required) + * @return ProductAnalyticsSankeyResponse + * @throws ApiException if fails to make API call + */ + public ProductAnalyticsSankeyResponse queryProductAnalyticsSankey( + ProductAnalyticsSankeyRequest body) throws ApiException { + return queryProductAnalyticsSankeyWithHttpInfo(body).getData(); + } + + /** + * Compute Sankey flow analysis. + * + *

See {@link #queryProductAnalyticsSankeyWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ProductAnalyticsSankeyResponse> + */ + public CompletableFuture queryProductAnalyticsSankeyAsync( + ProductAnalyticsSankeyRequest body) { + return queryProductAnalyticsSankeyWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Compute a Sankey flow analysis showing how users navigate between pages. Specify either a + * source page (forward flow) or target page (backward flow), but not + * both. Maximum 10 steps and 10 entries per step. + * + * @param body (required) + * @return ApiResponse<ProductAnalyticsSankeyResponse> + * @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 queryProductAnalyticsSankeyWithHttpInfo( + ProductAnalyticsSankeyRequest 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 queryProductAnalyticsSankey"); + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/sankey"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ProductAnalyticsApi.queryProductAnalyticsSankey", + 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 Sankey flow analysis. + * + *

See {@link #queryProductAnalyticsSankeyWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<ProductAnalyticsSankeyResponse>> + */ + public CompletableFuture> + queryProductAnalyticsSankeyWithHttpInfoAsync(ProductAnalyticsSankeyRequest 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 queryProductAnalyticsSankey")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/product-analytics/sankey"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ProductAnalyticsApi.queryProductAnalyticsSankey", + 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 scalar analytics. * diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsJoinKeys.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsJoinKeys.java new file mode 100644 index 00000000000..c98c30a6cbd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsJoinKeys.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.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; + +/** Join key configuration for correlating events. */ +@JsonPropertyOrder({ + ProductAnalyticsJoinKeys.JSON_PROPERTY_PRIMARY, + ProductAnalyticsJoinKeys.JSON_PROPERTY_SECONDARY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsJoinKeys { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PRIMARY = "primary"; + private String primary; + + public static final String JSON_PROPERTY_SECONDARY = "secondary"; + private List secondary = null; + + public ProductAnalyticsJoinKeys primary(String primary) { + this.primary = primary; + return this; + } + + /** + * The primary join key facet. + * + * @return primary + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIMARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPrimary() { + return primary; + } + + public void setPrimary(String primary) { + this.primary = primary; + } + + public ProductAnalyticsJoinKeys secondary(List secondary) { + this.secondary = secondary; + return this; + } + + public ProductAnalyticsJoinKeys addSecondaryItem(String secondaryItem) { + if (this.secondary == null) { + this.secondary = new ArrayList<>(); + } + this.secondary.add(secondaryItem); + return this; + } + + /** + * Secondary join key facets. + * + * @return secondary + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECONDARY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSecondary() { + return secondary; + } + + public void setSecondary(List secondary) { + this.secondary = secondary; + } + + /** + * 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 ProductAnalyticsJoinKeys + */ + @JsonAnySetter + public ProductAnalyticsJoinKeys 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 ProductAnalyticsJoinKeys object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsJoinKeys productAnalyticsJoinKeys = (ProductAnalyticsJoinKeys) o; + return Objects.equals(this.primary, productAnalyticsJoinKeys.primary) + && Objects.equals(this.secondary, productAnalyticsJoinKeys.secondary) + && Objects.equals(this.additionalProperties, productAnalyticsJoinKeys.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(primary, secondary, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsJoinKeys {\n"); + sb.append(" primary: ").append(toIndentedString(primary)).append("\n"); + sb.append(" secondary: ").append(toIndentedString(secondary)).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/ProductAnalyticsSampling.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSampling.java new file mode 100644 index 00000000000..0275f414a6f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSampling.java @@ -0,0 +1,135 @@ +/* + * 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; + +/** Sampling configuration. */ +@JsonPropertyOrder({ProductAnalyticsSampling.JSON_PROPERTY_ENABLED}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSampling { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled = false; + + public ProductAnalyticsSampling enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether sampling is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * 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 ProductAnalyticsSampling + */ + @JsonAnySetter + public ProductAnalyticsSampling 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 ProductAnalyticsSampling object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSampling productAnalyticsSampling = (ProductAnalyticsSampling) o; + return Objects.equals(this.enabled, productAnalyticsSampling.enabled) + && Objects.equals(this.additionalProperties, productAnalyticsSampling.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSampling {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).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/ProductAnalyticsSankeyAggregatedNode.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyAggregatedNode.java new file mode 100644 index 00000000000..9a420d2f36a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyAggregatedNode.java @@ -0,0 +1,278 @@ +/* + * 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 node aggregated into an "other" node. */ +@JsonPropertyOrder({ + ProductAnalyticsSankeyAggregatedNode.JSON_PROPERTY_ID, + ProductAnalyticsSankeyAggregatedNode.JSON_PROPERTY_INCOMING_VALUE, + ProductAnalyticsSankeyAggregatedNode.JSON_PROPERTY_NAME, + ProductAnalyticsSankeyAggregatedNode.JSON_PROPERTY_OUTGOING_VALUE, + ProductAnalyticsSankeyAggregatedNode.JSON_PROPERTY_TYPE, + ProductAnalyticsSankeyAggregatedNode.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyAggregatedNode { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_INCOMING_VALUE = "incoming_value"; + private Long incomingValue; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OUTGOING_VALUE = "outgoing_value"; + private Long outgoingValue; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ProductAnalyticsSankeyAggregatedNodeType type; + + public static final String JSON_PROPERTY_VALUE = "value"; + private Long value; + + public ProductAnalyticsSankeyAggregatedNode id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @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 ProductAnalyticsSankeyAggregatedNode incomingValue(Long incomingValue) { + this.incomingValue = incomingValue; + return this; + } + + /** + * GetincomingValue + * + * @return incomingValue + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCOMING_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIncomingValue() { + return incomingValue; + } + + public void setIncomingValue(Long incomingValue) { + this.incomingValue = incomingValue; + } + + public ProductAnalyticsSankeyAggregatedNode name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ProductAnalyticsSankeyAggregatedNode outgoingValue(Long outgoingValue) { + this.outgoingValue = outgoingValue; + return this; + } + + /** + * GetoutgoingValue + * + * @return outgoingValue + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTGOING_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOutgoingValue() { + return outgoingValue; + } + + public void setOutgoingValue(Long outgoingValue) { + this.outgoingValue = outgoingValue; + } + + public ProductAnalyticsSankeyAggregatedNode type(ProductAnalyticsSankeyAggregatedNodeType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProductAnalyticsSankeyAggregatedNodeType getType() { + return type; + } + + public void setType(ProductAnalyticsSankeyAggregatedNodeType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + public ProductAnalyticsSankeyAggregatedNode value(Long value) { + this.value = value; + return this; + } + + /** + * Getvalue + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getValue() { + return value; + } + + public void setValue(Long value) { + this.value = value; + } + + /** + * 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 ProductAnalyticsSankeyAggregatedNode + */ + @JsonAnySetter + public ProductAnalyticsSankeyAggregatedNode 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 ProductAnalyticsSankeyAggregatedNode object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyAggregatedNode productAnalyticsSankeyAggregatedNode = + (ProductAnalyticsSankeyAggregatedNode) o; + return Objects.equals(this.id, productAnalyticsSankeyAggregatedNode.id) + && Objects.equals(this.incomingValue, productAnalyticsSankeyAggregatedNode.incomingValue) + && Objects.equals(this.name, productAnalyticsSankeyAggregatedNode.name) + && Objects.equals(this.outgoingValue, productAnalyticsSankeyAggregatedNode.outgoingValue) + && Objects.equals(this.type, productAnalyticsSankeyAggregatedNode.type) + && Objects.equals(this.value, productAnalyticsSankeyAggregatedNode.value) + && Objects.equals( + this.additionalProperties, productAnalyticsSankeyAggregatedNode.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, incomingValue, name, outgoingValue, type, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyAggregatedNode {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" incomingValue: ").append(toIndentedString(incomingValue)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" outgoingValue: ").append(toIndentedString(outgoingValue)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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/ProductAnalyticsSankeyAggregatedNodeType.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyAggregatedNodeType.java new file mode 100644 index 00000000000..eca5f937b76 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyAggregatedNodeType.java @@ -0,0 +1,62 @@ +/* + * 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; + +/** */ +@JsonSerialize( + using = + ProductAnalyticsSankeyAggregatedNodeType.ProductAnalyticsSankeyAggregatedNodeTypeSerializer + .class) +public class ProductAnalyticsSankeyAggregatedNodeType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("aggregated")); + + public static final ProductAnalyticsSankeyAggregatedNodeType AGGREGATED = + new ProductAnalyticsSankeyAggregatedNodeType("aggregated"); + + ProductAnalyticsSankeyAggregatedNodeType(String value) { + super(value, allowedValues); + } + + public static class ProductAnalyticsSankeyAggregatedNodeTypeSerializer + extends StdSerializer { + public ProductAnalyticsSankeyAggregatedNodeTypeSerializer( + Class t) { + super(t); + } + + public ProductAnalyticsSankeyAggregatedNodeTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ProductAnalyticsSankeyAggregatedNodeType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ProductAnalyticsSankeyAggregatedNodeType fromValue(String value) { + return new ProductAnalyticsSankeyAggregatedNodeType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyDefinition.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyDefinition.java new file mode 100644 index 00000000000..22fb35d0adc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyDefinition.java @@ -0,0 +1,224 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Sankey visualization definition. Set either source or target, not both. + * Use source for forward flow (where do users go after this page?) or target + * for backward flow (where did users come from?). + */ +@JsonPropertyOrder({ + ProductAnalyticsSankeyDefinition.JSON_PROPERTY_ENTRIES_PER_STEP, + ProductAnalyticsSankeyDefinition.JSON_PROPERTY_NUMBER_OF_STEPS, + ProductAnalyticsSankeyDefinition.JSON_PROPERTY_SOURCE, + ProductAnalyticsSankeyDefinition.JSON_PROPERTY_TARGET +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyDefinition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENTRIES_PER_STEP = "entries_per_step"; + private Long entriesPerStep = 5l; + + public static final String JSON_PROPERTY_NUMBER_OF_STEPS = "number_of_steps"; + private Long numberOfSteps = 5l; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private String source; + + public static final String JSON_PROPERTY_TARGET = "target"; + private String target; + + public ProductAnalyticsSankeyDefinition entriesPerStep(Long entriesPerStep) { + this.entriesPerStep = entriesPerStep; + return this; + } + + /** + * Number of page entries per step. Default 5, max 10. maximum: 10 + * + * @return entriesPerStep + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENTRIES_PER_STEP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getEntriesPerStep() { + return entriesPerStep; + } + + public void setEntriesPerStep(Long entriesPerStep) { + this.entriesPerStep = entriesPerStep; + } + + public ProductAnalyticsSankeyDefinition numberOfSteps(Long numberOfSteps) { + this.numberOfSteps = numberOfSteps; + return this; + } + + /** + * Number of steps in the flow. Default 5, max 10. maximum: 10 + * + * @return numberOfSteps + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_STEPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getNumberOfSteps() { + return numberOfSteps; + } + + public void setNumberOfSteps(Long numberOfSteps) { + this.numberOfSteps = numberOfSteps; + } + + public ProductAnalyticsSankeyDefinition source(String source) { + this.source = source; + return this; + } + + /** + * The source page for forward flow analysis. Use "*" for all pages. + * + * @return source + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public ProductAnalyticsSankeyDefinition target(String target) { + this.target = target; + return this; + } + + /** + * The target page for backward flow analysis. + * + * @return target + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTarget() { + return target; + } + + public void setTarget(String target) { + this.target = target; + } + + /** + * 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 ProductAnalyticsSankeyDefinition + */ + @JsonAnySetter + public ProductAnalyticsSankeyDefinition 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 ProductAnalyticsSankeyDefinition object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyDefinition productAnalyticsSankeyDefinition = + (ProductAnalyticsSankeyDefinition) o; + return Objects.equals(this.entriesPerStep, productAnalyticsSankeyDefinition.entriesPerStep) + && Objects.equals(this.numberOfSteps, productAnalyticsSankeyDefinition.numberOfSteps) + && Objects.equals(this.source, productAnalyticsSankeyDefinition.source) + && Objects.equals(this.target, productAnalyticsSankeyDefinition.target) + && Objects.equals( + this.additionalProperties, productAnalyticsSankeyDefinition.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(entriesPerStep, numberOfSteps, source, target, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyDefinition {\n"); + sb.append(" entriesPerStep: ").append(toIndentedString(entriesPerStep)).append("\n"); + sb.append(" numberOfSteps: ").append(toIndentedString(numberOfSteps)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).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/ProductAnalyticsSankeyLink.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyLink.java new file mode 100644 index 00000000000..3857069aa91 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyLink.java @@ -0,0 +1,246 @@ +/* + * 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 link between two nodes in the Sankey diagram. */ +@JsonPropertyOrder({ + ProductAnalyticsSankeyLink.JSON_PROPERTY_COLUMN, + ProductAnalyticsSankeyLink.JSON_PROPERTY_ID, + ProductAnalyticsSankeyLink.JSON_PROPERTY_SOURCE, + ProductAnalyticsSankeyLink.JSON_PROPERTY_TARGET, + ProductAnalyticsSankeyLink.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyLink { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COLUMN = "column"; + private Long column; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private String source; + + public static final String JSON_PROPERTY_TARGET = "target"; + private String target; + + public static final String JSON_PROPERTY_VALUE = "value"; + private Long value; + + public ProductAnalyticsSankeyLink column(Long column) { + this.column = column; + return this; + } + + /** + * The step column of the source node. + * + * @return column + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getColumn() { + return column; + } + + public void setColumn(Long column) { + this.column = column; + } + + public ProductAnalyticsSankeyLink id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @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 ProductAnalyticsSankeyLink source(String source) { + this.source = source; + return this; + } + + /** + * The source node ID. + * + * @return source + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public ProductAnalyticsSankeyLink target(String target) { + this.target = target; + return this; + } + + /** + * The target node ID. + * + * @return target + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTarget() { + return target; + } + + public void setTarget(String target) { + this.target = target; + } + + public ProductAnalyticsSankeyLink value(Long value) { + this.value = value; + return this; + } + + /** + * The number of sessions through this link. + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getValue() { + return value; + } + + public void setValue(Long value) { + this.value = value; + } + + /** + * 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 ProductAnalyticsSankeyLink + */ + @JsonAnySetter + public ProductAnalyticsSankeyLink 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 ProductAnalyticsSankeyLink object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyLink productAnalyticsSankeyLink = (ProductAnalyticsSankeyLink) o; + return Objects.equals(this.column, productAnalyticsSankeyLink.column) + && Objects.equals(this.id, productAnalyticsSankeyLink.id) + && Objects.equals(this.source, productAnalyticsSankeyLink.source) + && Objects.equals(this.target, productAnalyticsSankeyLink.target) + && Objects.equals(this.value, productAnalyticsSankeyLink.value) + && Objects.equals( + this.additionalProperties, productAnalyticsSankeyLink.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(column, id, source, target, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyLink {\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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/ProductAnalyticsSankeyNode.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyNode.java new file mode 100644 index 00000000000..23eaaeda869 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyNode.java @@ -0,0 +1,384 @@ +/* + * 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; + +/** A node in the Sankey diagram representing a page or aggregation. */ +@JsonPropertyOrder({ + ProductAnalyticsSankeyNode.JSON_PROPERTY_AGGREGATED_NODES, + ProductAnalyticsSankeyNode.JSON_PROPERTY_COLUMN, + ProductAnalyticsSankeyNode.JSON_PROPERTY_DROPOFF_VALUE, + ProductAnalyticsSankeyNode.JSON_PROPERTY_ID, + ProductAnalyticsSankeyNode.JSON_PROPERTY_INCOMING_VALUE, + ProductAnalyticsSankeyNode.JSON_PROPERTY_NAME, + ProductAnalyticsSankeyNode.JSON_PROPERTY_OUTGOING_VALUE, + ProductAnalyticsSankeyNode.JSON_PROPERTY_TYPE, + ProductAnalyticsSankeyNode.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyNode { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AGGREGATED_NODES = "aggregated_nodes"; + private List aggregatedNodes = null; + + public static final String JSON_PROPERTY_COLUMN = "column"; + private Long column; + + public static final String JSON_PROPERTY_DROPOFF_VALUE = "dropoff_value"; + private Long dropoffValue; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_INCOMING_VALUE = "incoming_value"; + private Long incomingValue; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OUTGOING_VALUE = "outgoing_value"; + private Long outgoingValue; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ProductAnalyticsSankeyNodeType type; + + public static final String JSON_PROPERTY_VALUE = "value"; + private Long value; + + public ProductAnalyticsSankeyNode aggregatedNodes( + List aggregatedNodes) { + this.aggregatedNodes = aggregatedNodes; + for (ProductAnalyticsSankeyAggregatedNode item : aggregatedNodes) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ProductAnalyticsSankeyNode addAggregatedNodesItem( + ProductAnalyticsSankeyAggregatedNode aggregatedNodesItem) { + if (this.aggregatedNodes == null) { + this.aggregatedNodes = new ArrayList<>(); + } + this.aggregatedNodes.add(aggregatedNodesItem); + this.unparsed |= aggregatedNodesItem.unparsed; + return this; + } + + /** + * Nodes aggregated into this node (for "other" type). + * + * @return aggregatedNodes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AGGREGATED_NODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAggregatedNodes() { + return aggregatedNodes; + } + + public void setAggregatedNodes(List aggregatedNodes) { + this.aggregatedNodes = aggregatedNodes; + } + + public ProductAnalyticsSankeyNode column(Long column) { + this.column = column; + return this; + } + + /** + * The step column (0-indexed). + * + * @return column + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLUMN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getColumn() { + return column; + } + + public void setColumn(Long column) { + this.column = column; + } + + public ProductAnalyticsSankeyNode dropoffValue(Long dropoffValue) { + this.dropoffValue = dropoffValue; + return this; + } + + /** + * GetdropoffValue + * + * @return dropoffValue + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DROPOFF_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getDropoffValue() { + return dropoffValue; + } + + public void setDropoffValue(Long dropoffValue) { + this.dropoffValue = dropoffValue; + } + + public ProductAnalyticsSankeyNode id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @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 ProductAnalyticsSankeyNode incomingValue(Long incomingValue) { + this.incomingValue = incomingValue; + return this; + } + + /** + * GetincomingValue + * + * @return incomingValue + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCOMING_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getIncomingValue() { + return incomingValue; + } + + public void setIncomingValue(Long incomingValue) { + this.incomingValue = incomingValue; + } + + public ProductAnalyticsSankeyNode name(String name) { + this.name = name; + return this; + } + + /** + * The page name. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public ProductAnalyticsSankeyNode outgoingValue(Long outgoingValue) { + this.outgoingValue = outgoingValue; + return this; + } + + /** + * GetoutgoingValue + * + * @return outgoingValue + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTGOING_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOutgoingValue() { + return outgoingValue; + } + + public void setOutgoingValue(Long outgoingValue) { + this.outgoingValue = outgoingValue; + } + + public ProductAnalyticsSankeyNode type(ProductAnalyticsSankeyNodeType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Node type. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProductAnalyticsSankeyNodeType getType() { + return type; + } + + public void setType(ProductAnalyticsSankeyNodeType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + public ProductAnalyticsSankeyNode value(Long value) { + this.value = value; + return this; + } + + /** + * The number of sessions through this node. + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getValue() { + return value; + } + + public void setValue(Long value) { + this.value = value; + } + + /** + * 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 ProductAnalyticsSankeyNode + */ + @JsonAnySetter + public ProductAnalyticsSankeyNode 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 ProductAnalyticsSankeyNode object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyNode productAnalyticsSankeyNode = (ProductAnalyticsSankeyNode) o; + return Objects.equals(this.aggregatedNodes, productAnalyticsSankeyNode.aggregatedNodes) + && Objects.equals(this.column, productAnalyticsSankeyNode.column) + && Objects.equals(this.dropoffValue, productAnalyticsSankeyNode.dropoffValue) + && Objects.equals(this.id, productAnalyticsSankeyNode.id) + && Objects.equals(this.incomingValue, productAnalyticsSankeyNode.incomingValue) + && Objects.equals(this.name, productAnalyticsSankeyNode.name) + && Objects.equals(this.outgoingValue, productAnalyticsSankeyNode.outgoingValue) + && Objects.equals(this.type, productAnalyticsSankeyNode.type) + && Objects.equals(this.value, productAnalyticsSankeyNode.value) + && Objects.equals( + this.additionalProperties, productAnalyticsSankeyNode.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + aggregatedNodes, + column, + dropoffValue, + id, + incomingValue, + name, + outgoingValue, + type, + value, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyNode {\n"); + sb.append(" aggregatedNodes: ").append(toIndentedString(aggregatedNodes)).append("\n"); + sb.append(" column: ").append(toIndentedString(column)).append("\n"); + sb.append(" dropoffValue: ").append(toIndentedString(dropoffValue)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" incomingValue: ").append(toIndentedString(incomingValue)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" outgoingValue: ").append(toIndentedString(outgoingValue)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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/ProductAnalyticsSankeyNodeType.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyNodeType.java new file mode 100644 index 00000000000..f030cf31bd4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyNodeType.java @@ -0,0 +1,62 @@ +/* + * 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; + +/** Node type. */ +@JsonSerialize( + using = ProductAnalyticsSankeyNodeType.ProductAnalyticsSankeyNodeTypeSerializer.class) +public class ProductAnalyticsSankeyNodeType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("regular", "other", "dropoff")); + + public static final ProductAnalyticsSankeyNodeType REGULAR = + new ProductAnalyticsSankeyNodeType("regular"); + public static final ProductAnalyticsSankeyNodeType OTHER = + new ProductAnalyticsSankeyNodeType("other"); + public static final ProductAnalyticsSankeyNodeType DROPOFF = + new ProductAnalyticsSankeyNodeType("dropoff"); + + ProductAnalyticsSankeyNodeType(String value) { + super(value, allowedValues); + } + + public static class ProductAnalyticsSankeyNodeTypeSerializer + extends StdSerializer { + public ProductAnalyticsSankeyNodeTypeSerializer(Class t) { + super(t); + } + + public ProductAnalyticsSankeyNodeTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ProductAnalyticsSankeyNodeType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ProductAnalyticsSankeyNodeType fromValue(String value) { + return new ProductAnalyticsSankeyNodeType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequest.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequest.java new file mode 100644 index 00000000000..3894ade3914 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequest.java @@ -0,0 +1,147 @@ +/* + * 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 a Sankey flow analysis. */ +@JsonPropertyOrder({ProductAnalyticsSankeyRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ProductAnalyticsSankeyRequestData data; + + public ProductAnalyticsSankeyRequest() {} + + @JsonCreator + public ProductAnalyticsSankeyRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ProductAnalyticsSankeyRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ProductAnalyticsSankeyRequest data(ProductAnalyticsSankeyRequestData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ProductAnalyticsSankeyRequestData getData() { + return data; + } + + public void setData(ProductAnalyticsSankeyRequestData 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 ProductAnalyticsSankeyRequest + */ + @JsonAnySetter + public ProductAnalyticsSankeyRequest 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 ProductAnalyticsSankeyRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyRequest productAnalyticsSankeyRequest = (ProductAnalyticsSankeyRequest) o; + return Objects.equals(this.data, productAnalyticsSankeyRequest.data) + && Objects.equals( + this.additionalProperties, productAnalyticsSankeyRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyRequest {\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/ProductAnalyticsSankeyRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequestAttributes.java new file mode 100644 index 00000000000..59e50fd04ba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequestAttributes.java @@ -0,0 +1,342 @@ +/* + * 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 a Sankey request. */ +@JsonPropertyOrder({ + ProductAnalyticsSankeyRequestAttributes.JSON_PROPERTY_DATA_SOURCE, + ProductAnalyticsSankeyRequestAttributes.JSON_PROPERTY_DEFINITION, + ProductAnalyticsSankeyRequestAttributes.JSON_PROPERTY_ENFORCED_EXECUTION_TYPE, + ProductAnalyticsSankeyRequestAttributes.JSON_PROPERTY_REQUEST_ID, + ProductAnalyticsSankeyRequestAttributes.JSON_PROPERTY_SAMPLING, + ProductAnalyticsSankeyRequestAttributes.JSON_PROPERTY_SEARCH, + ProductAnalyticsSankeyRequestAttributes.JSON_PROPERTY_TIME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyRequestAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; + private String dataSource; + + public static final String JSON_PROPERTY_DEFINITION = "definition"; + private ProductAnalyticsSankeyDefinition definition; + + public static final String JSON_PROPERTY_ENFORCED_EXECUTION_TYPE = "enforced_execution_type"; + private ProductAnalyticsExecutionType enforcedExecutionType; + + public static final String JSON_PROPERTY_REQUEST_ID = "request_id"; + private String requestId; + + public static final String JSON_PROPERTY_SAMPLING = "sampling"; + private ProductAnalyticsSampling sampling; + + public static final String JSON_PROPERTY_SEARCH = "search"; + private ProductAnalyticsSankeySearch search; + + public static final String JSON_PROPERTY_TIME = "time"; + private ProductAnalyticsSankeyTime time; + + public ProductAnalyticsSankeyRequestAttributes() {} + + @JsonCreator + public ProductAnalyticsSankeyRequestAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) String dataSource, + @JsonProperty(required = true, value = JSON_PROPERTY_DEFINITION) + ProductAnalyticsSankeyDefinition definition, + @JsonProperty(required = true, value = JSON_PROPERTY_SEARCH) + ProductAnalyticsSankeySearch search, + @JsonProperty(required = true, value = JSON_PROPERTY_TIME) ProductAnalyticsSankeyTime time) { + this.dataSource = dataSource; + this.definition = definition; + this.unparsed |= definition.unparsed; + this.search = search; + this.unparsed |= search.unparsed; + this.time = time; + this.unparsed |= time.unparsed; + } + + public ProductAnalyticsSankeyRequestAttributes dataSource(String dataSource) { + this.dataSource = dataSource; + return this; + } + + /** + * The data source for the Sankey query. + * + * @return dataSource + */ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getDataSource() { + return dataSource; + } + + public void setDataSource(String dataSource) { + this.dataSource = dataSource; + } + + public ProductAnalyticsSankeyRequestAttributes definition( + ProductAnalyticsSankeyDefinition definition) { + this.definition = definition; + this.unparsed |= definition.unparsed; + return this; + } + + /** + * Sankey visualization definition. Set either source or target, not + * both. Use source for forward flow (where do users go after this page?) or + * target for backward flow (where did users come from?). + * + * @return definition + */ + @JsonProperty(JSON_PROPERTY_DEFINITION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ProductAnalyticsSankeyDefinition getDefinition() { + return definition; + } + + public void setDefinition(ProductAnalyticsSankeyDefinition definition) { + this.definition = definition; + } + + public ProductAnalyticsSankeyRequestAttributes 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 ProductAnalyticsSankeyRequestAttributes requestId(String requestId) { + this.requestId = requestId; + return this; + } + + /** + * GetrequestId + * + * @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 ProductAnalyticsSankeyRequestAttributes sampling(ProductAnalyticsSampling sampling) { + this.sampling = sampling; + this.unparsed |= sampling.unparsed; + return this; + } + + /** + * Sampling configuration. + * + * @return sampling + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SAMPLING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProductAnalyticsSampling getSampling() { + return sampling; + } + + public void setSampling(ProductAnalyticsSampling sampling) { + this.sampling = sampling; + } + + public ProductAnalyticsSankeyRequestAttributes search(ProductAnalyticsSankeySearch search) { + this.search = search; + this.unparsed |= search.unparsed; + return this; + } + + /** + * Search parameters for a Sankey query. + * + * @return search + */ + @JsonProperty(JSON_PROPERTY_SEARCH) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ProductAnalyticsSankeySearch getSearch() { + return search; + } + + public void setSearch(ProductAnalyticsSankeySearch search) { + this.search = search; + } + + public ProductAnalyticsSankeyRequestAttributes time(ProductAnalyticsSankeyTime time) { + this.time = time; + this.unparsed |= time.unparsed; + return this; + } + + /** + * Time range for the Sankey query. + * + * @return time + */ + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ProductAnalyticsSankeyTime getTime() { + return time; + } + + public void setTime(ProductAnalyticsSankeyTime time) { + this.time = time; + } + + /** + * 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 ProductAnalyticsSankeyRequestAttributes + */ + @JsonAnySetter + public ProductAnalyticsSankeyRequestAttributes 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 ProductAnalyticsSankeyRequestAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyRequestAttributes productAnalyticsSankeyRequestAttributes = + (ProductAnalyticsSankeyRequestAttributes) o; + return Objects.equals(this.dataSource, productAnalyticsSankeyRequestAttributes.dataSource) + && Objects.equals(this.definition, productAnalyticsSankeyRequestAttributes.definition) + && Objects.equals( + this.enforcedExecutionType, + productAnalyticsSankeyRequestAttributes.enforcedExecutionType) + && Objects.equals(this.requestId, productAnalyticsSankeyRequestAttributes.requestId) + && Objects.equals(this.sampling, productAnalyticsSankeyRequestAttributes.sampling) + && Objects.equals(this.search, productAnalyticsSankeyRequestAttributes.search) + && Objects.equals(this.time, productAnalyticsSankeyRequestAttributes.time) + && Objects.equals( + this.additionalProperties, + productAnalyticsSankeyRequestAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + dataSource, + definition, + enforcedExecutionType, + requestId, + sampling, + search, + time, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyRequestAttributes {\n"); + sb.append(" dataSource: ").append(toIndentedString(dataSource)).append("\n"); + sb.append(" definition: ").append(toIndentedString(definition)).append("\n"); + sb.append(" enforcedExecutionType: ") + .append(toIndentedString(enforcedExecutionType)) + .append("\n"); + sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); + sb.append(" sampling: ").append(toIndentedString(sampling)).append("\n"); + sb.append(" search: ").append(toIndentedString(search)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).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/ProductAnalyticsSankeyRequestData.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequestData.java new file mode 100644 index 00000000000..6733a8d1fef --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequestData.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; + +/** */ +@JsonPropertyOrder({ + ProductAnalyticsSankeyRequestData.JSON_PROPERTY_ATTRIBUTES, + ProductAnalyticsSankeyRequestData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyRequestData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ProductAnalyticsSankeyRequestAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ProductAnalyticsSankeyRequestType type; + + public ProductAnalyticsSankeyRequestData() {} + + @JsonCreator + public ProductAnalyticsSankeyRequestData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ProductAnalyticsSankeyRequestAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + ProductAnalyticsSankeyRequestType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ProductAnalyticsSankeyRequestData attributes( + ProductAnalyticsSankeyRequestAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for a Sankey request. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ProductAnalyticsSankeyRequestAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ProductAnalyticsSankeyRequestAttributes attributes) { + this.attributes = attributes; + } + + public ProductAnalyticsSankeyRequestData type(ProductAnalyticsSankeyRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ProductAnalyticsSankeyRequestType getType() { + return type; + } + + public void setType(ProductAnalyticsSankeyRequestType 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 ProductAnalyticsSankeyRequestData + */ + @JsonAnySetter + public ProductAnalyticsSankeyRequestData 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 ProductAnalyticsSankeyRequestData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyRequestData productAnalyticsSankeyRequestData = + (ProductAnalyticsSankeyRequestData) o; + return Objects.equals(this.attributes, productAnalyticsSankeyRequestData.attributes) + && Objects.equals(this.type, productAnalyticsSankeyRequestData.type) + && Objects.equals( + this.additionalProperties, productAnalyticsSankeyRequestData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyRequestData {\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/ProductAnalyticsSankeyRequestType.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequestType.java new file mode 100644 index 00000000000..50a96158003 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyRequestType.java @@ -0,0 +1,58 @@ +/* + * 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; + +/** */ +@JsonSerialize( + using = ProductAnalyticsSankeyRequestType.ProductAnalyticsSankeyRequestTypeSerializer.class) +public class ProductAnalyticsSankeyRequestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("sankey_request")); + + public static final ProductAnalyticsSankeyRequestType SANKEY_REQUEST = + new ProductAnalyticsSankeyRequestType("sankey_request"); + + ProductAnalyticsSankeyRequestType(String value) { + super(value, allowedValues); + } + + public static class ProductAnalyticsSankeyRequestTypeSerializer + extends StdSerializer { + public ProductAnalyticsSankeyRequestTypeSerializer(Class t) { + super(t); + } + + public ProductAnalyticsSankeyRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ProductAnalyticsSankeyRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ProductAnalyticsSankeyRequestType fromValue(String value) { + return new ProductAnalyticsSankeyRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponse.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponse.java new file mode 100644 index 00000000000..b6bf7554a56 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponse.java @@ -0,0 +1,168 @@ +/* + * 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; + +/** Response for a Sankey flow analysis. */ +@JsonPropertyOrder({ + ProductAnalyticsSankeyResponse.JSON_PROPERTY_DATA, + ProductAnalyticsSankeyResponse.JSON_PROPERTY_META +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ProductAnalyticsSankeyResponseData data; + + public static final String JSON_PROPERTY_META = "meta"; + private ProductAnalyticsResponseMeta meta; + + public ProductAnalyticsSankeyResponse data(ProductAnalyticsSankeyResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProductAnalyticsSankeyResponseData getData() { + return data; + } + + public void setData(ProductAnalyticsSankeyResponseData data) { + this.data = data; + } + + public ProductAnalyticsSankeyResponse meta(ProductAnalyticsResponseMeta meta) { + this.meta = meta; + this.unparsed |= meta.unparsed; + return this; + } + + /** + * Metadata for a Product Analytics query response. + * + * @return meta + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_META) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProductAnalyticsResponseMeta getMeta() { + return meta; + } + + public void setMeta(ProductAnalyticsResponseMeta meta) { + this.meta = meta; + } + + /** + * 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 ProductAnalyticsSankeyResponse + */ + @JsonAnySetter + public ProductAnalyticsSankeyResponse 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 ProductAnalyticsSankeyResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyResponse productAnalyticsSankeyResponse = + (ProductAnalyticsSankeyResponse) o; + return Objects.equals(this.data, productAnalyticsSankeyResponse.data) + && Objects.equals(this.meta, productAnalyticsSankeyResponse.meta) + && Objects.equals( + this.additionalProperties, productAnalyticsSankeyResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, meta, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).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/ProductAnalyticsSankeyResponseAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponseAttributes.java new file mode 100644 index 00000000000..7825f0e6b2f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponseAttributes.java @@ -0,0 +1,195 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + ProductAnalyticsSankeyResponseAttributes.JSON_PROPERTY_LINKS, + ProductAnalyticsSankeyResponseAttributes.JSON_PROPERTY_NODES +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyResponseAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LINKS = "links"; + private List links = null; + + public static final String JSON_PROPERTY_NODES = "nodes"; + private List nodes = null; + + public ProductAnalyticsSankeyResponseAttributes links(List links) { + this.links = links; + for (ProductAnalyticsSankeyLink item : links) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ProductAnalyticsSankeyResponseAttributes addLinksItem( + ProductAnalyticsSankeyLink linksItem) { + if (this.links == null) { + this.links = new ArrayList<>(); + } + this.links.add(linksItem); + this.unparsed |= linksItem.unparsed; + return this; + } + + /** + * The links (flows) between nodes. + * + * @return links + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLinks() { + return links; + } + + public void setLinks(List links) { + this.links = links; + } + + public ProductAnalyticsSankeyResponseAttributes nodes(List nodes) { + this.nodes = nodes; + for (ProductAnalyticsSankeyNode item : nodes) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ProductAnalyticsSankeyResponseAttributes addNodesItem( + ProductAnalyticsSankeyNode nodesItem) { + if (this.nodes == null) { + this.nodes = new ArrayList<>(); + } + this.nodes.add(nodesItem); + this.unparsed |= nodesItem.unparsed; + return this; + } + + /** + * The nodes (pages) in the Sankey diagram. + * + * @return nodes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getNodes() { + return nodes; + } + + public void setNodes(List nodes) { + this.nodes = nodes; + } + + /** + * 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 ProductAnalyticsSankeyResponseAttributes + */ + @JsonAnySetter + public ProductAnalyticsSankeyResponseAttributes 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 ProductAnalyticsSankeyResponseAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyResponseAttributes productAnalyticsSankeyResponseAttributes = + (ProductAnalyticsSankeyResponseAttributes) o; + return Objects.equals(this.links, productAnalyticsSankeyResponseAttributes.links) + && Objects.equals(this.nodes, productAnalyticsSankeyResponseAttributes.nodes) + && Objects.equals( + this.additionalProperties, + productAnalyticsSankeyResponseAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(links, nodes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyResponseAttributes {\n"); + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" nodes: ").append(toIndentedString(nodes)).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/ProductAnalyticsSankeyResponseData.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponseData.java new file mode 100644 index 00000000000..cb21460fd2c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponseData.java @@ -0,0 +1,199 @@ +/* + * 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; + +/** */ +@JsonPropertyOrder({ + ProductAnalyticsSankeyResponseData.JSON_PROPERTY_ATTRIBUTES, + ProductAnalyticsSankeyResponseData.JSON_PROPERTY_ID, + ProductAnalyticsSankeyResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ProductAnalyticsSankeyResponseAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private ProductAnalyticsSankeyResponseType type; + + public ProductAnalyticsSankeyResponseData attributes( + ProductAnalyticsSankeyResponseAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProductAnalyticsSankeyResponseAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ProductAnalyticsSankeyResponseAttributes attributes) { + this.attributes = attributes; + } + + public ProductAnalyticsSankeyResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @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 ProductAnalyticsSankeyResponseData type(ProductAnalyticsSankeyResponseType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProductAnalyticsSankeyResponseType getType() { + return type; + } + + public void setType(ProductAnalyticsSankeyResponseType 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 ProductAnalyticsSankeyResponseData + */ + @JsonAnySetter + public ProductAnalyticsSankeyResponseData 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 ProductAnalyticsSankeyResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyResponseData productAnalyticsSankeyResponseData = + (ProductAnalyticsSankeyResponseData) o; + return Objects.equals(this.attributes, productAnalyticsSankeyResponseData.attributes) + && Objects.equals(this.id, productAnalyticsSankeyResponseData.id) + && Objects.equals(this.type, productAnalyticsSankeyResponseData.type) + && Objects.equals( + this.additionalProperties, productAnalyticsSankeyResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyResponseData {\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/ProductAnalyticsSankeyResponseType.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponseType.java new file mode 100644 index 00000000000..2fccac355f4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyResponseType.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize( + using = ProductAnalyticsSankeyResponseType.ProductAnalyticsSankeyResponseTypeSerializer.class) +public class ProductAnalyticsSankeyResponseType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("sankey_response")); + + public static final ProductAnalyticsSankeyResponseType SANKEY_RESPONSE = + new ProductAnalyticsSankeyResponseType("sankey_response"); + + ProductAnalyticsSankeyResponseType(String value) { + super(value, allowedValues); + } + + public static class ProductAnalyticsSankeyResponseTypeSerializer + extends StdSerializer { + public ProductAnalyticsSankeyResponseTypeSerializer( + Class t) { + super(t); + } + + public ProductAnalyticsSankeyResponseTypeSerializer() { + this(null); + } + + @Override + public void serialize( + ProductAnalyticsSankeyResponseType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static ProductAnalyticsSankeyResponseType fromValue(String value) { + return new ProductAnalyticsSankeyResponseType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeySearch.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeySearch.java new file mode 100644 index 00000000000..2ad142f065d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeySearch.java @@ -0,0 +1,259 @@ +/* + * 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; + +/** Search parameters for a Sankey query. */ +@JsonPropertyOrder({ + ProductAnalyticsSankeySearch.JSON_PROPERTY_AUDIENCE_FILTERS, + ProductAnalyticsSankeySearch.JSON_PROPERTY_JOIN_KEYS, + ProductAnalyticsSankeySearch.JSON_PROPERTY_OCCURRENCES, + ProductAnalyticsSankeySearch.JSON_PROPERTY_QUERY, + ProductAnalyticsSankeySearch.JSON_PROPERTY_SUBQUERY_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeySearch { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUDIENCE_FILTERS = "audience_filters"; + private ProductAnalyticsAudienceFilters audienceFilters; + + public static final String JSON_PROPERTY_JOIN_KEYS = "join_keys"; + private ProductAnalyticsJoinKeys joinKeys; + + public static final String JSON_PROPERTY_OCCURRENCES = "occurrences"; + private ProductAnalyticsOccurrenceFilter occurrences; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public static final String JSON_PROPERTY_SUBQUERY_ID = "subquery_id"; + private String subqueryId; + + public ProductAnalyticsSankeySearch() {} + + @JsonCreator + public ProductAnalyticsSankeySearch( + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) { + this.query = query; + } + + public ProductAnalyticsSankeySearch 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 ProductAnalyticsSankeySearch joinKeys(ProductAnalyticsJoinKeys joinKeys) { + this.joinKeys = joinKeys; + this.unparsed |= joinKeys.unparsed; + return this; + } + + /** + * Join key configuration for correlating events. + * + * @return joinKeys + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JOIN_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProductAnalyticsJoinKeys getJoinKeys() { + return joinKeys; + } + + public void setJoinKeys(ProductAnalyticsJoinKeys joinKeys) { + this.joinKeys = joinKeys; + } + + public ProductAnalyticsSankeySearch occurrences(ProductAnalyticsOccurrenceFilter occurrences) { + this.occurrences = occurrences; + this.unparsed |= occurrences.unparsed; + return this; + } + + /** + * Filter for occurrence-based queries. + * + * @return occurrences + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCURRENCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProductAnalyticsOccurrenceFilter getOccurrences() { + return occurrences; + } + + public void setOccurrences(ProductAnalyticsOccurrenceFilter occurrences) { + this.occurrences = occurrences; + } + + public ProductAnalyticsSankeySearch query(String query) { + this.query = query; + return this; + } + + /** + * The search query. Cannot be empty. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + public ProductAnalyticsSankeySearch subqueryId(String subqueryId) { + this.subqueryId = subqueryId; + return this; + } + + /** + * GetsubqueryId + * + * @return subqueryId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBQUERY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubqueryId() { + return subqueryId; + } + + public void setSubqueryId(String subqueryId) { + this.subqueryId = subqueryId; + } + + /** + * 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 ProductAnalyticsSankeySearch + */ + @JsonAnySetter + public ProductAnalyticsSankeySearch 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 ProductAnalyticsSankeySearch object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeySearch productAnalyticsSankeySearch = (ProductAnalyticsSankeySearch) o; + return Objects.equals(this.audienceFilters, productAnalyticsSankeySearch.audienceFilters) + && Objects.equals(this.joinKeys, productAnalyticsSankeySearch.joinKeys) + && Objects.equals(this.occurrences, productAnalyticsSankeySearch.occurrences) + && Objects.equals(this.query, productAnalyticsSankeySearch.query) + && Objects.equals(this.subqueryId, productAnalyticsSankeySearch.subqueryId) + && Objects.equals( + this.additionalProperties, productAnalyticsSankeySearch.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + audienceFilters, joinKeys, occurrences, query, subqueryId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeySearch {\n"); + sb.append(" audienceFilters: ").append(toIndentedString(audienceFilters)).append("\n"); + sb.append(" joinKeys: ").append(toIndentedString(joinKeys)).append("\n"); + sb.append(" occurrences: ").append(toIndentedString(occurrences)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" subqueryId: ").append(toIndentedString(subqueryId)).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/ProductAnalyticsSankeyTime.java b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyTime.java new file mode 100644 index 00000000000..8822ddd70ba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsSankeyTime.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; + +/** Time range for the Sankey query. */ +@JsonPropertyOrder({ + ProductAnalyticsSankeyTime.JSON_PROPERTY_FROM, + ProductAnalyticsSankeyTime.JSON_PROPERTY_TO +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsSankeyTime { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FROM = "from"; + private Long from; + + public static final String JSON_PROPERTY_TO = "to"; + private Long to; + + public ProductAnalyticsSankeyTime() {} + + @JsonCreator + public ProductAnalyticsSankeyTime( + @JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from, + @JsonProperty(required = true, value = JSON_PROPERTY_TO) Long to) { + this.from = from; + this.to = to; + } + + public ProductAnalyticsSankeyTime from(Long from) { + this.from = from; + return this; + } + + /** + * Start time in epoch milliseconds. + * + * @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 ProductAnalyticsSankeyTime 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 ProductAnalyticsSankeyTime + */ + @JsonAnySetter + public ProductAnalyticsSankeyTime 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 ProductAnalyticsSankeyTime object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsSankeyTime productAnalyticsSankeyTime = (ProductAnalyticsSankeyTime) o; + return Objects.equals(this.from, productAnalyticsSankeyTime.from) + && Objects.equals(this.to, productAnalyticsSankeyTime.to) + && Objects.equals( + this.additionalProperties, productAnalyticsSankeyTime.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(from, to, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsSankeyTime {\n"); + sb.append(" from: ").append(toIndentedString(from)).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/test/resources/com/datadog/api/client/v2/api/product_analytics.feature b/src/test/resources/com/datadog/api/client/v2/api/product_analytics.feature index 3b59a3a0f64..3cc09916022 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/product_analytics.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/product_analytics.feature @@ -12,6 +12,22 @@ Feature: Product Analytics Given a valid "apiKeyAuth" key in the system And an instance of "ProductAnalytics" API + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute Sankey flow analysis returns "Bad Request" response + Given a valid "appKeyAuth" key in the system + And new "QueryProductAnalyticsSankey" request + And body with value {"data": {"attributes": {"data_source": "product_analytics", "definition": {"entries_per_step": 5, "number_of_steps": 5, "source": "/logs", "target": ""}, "search": {"join_keys": {"primary": "@session.id"}, "query": "@type:view"}, "time": {"from": 1771232048460, "to": 1771836848262}}, "type": "sankey_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/product-analytics-backend + Scenario: Compute Sankey flow analysis returns "OK" response + Given a valid "appKeyAuth" key in the system + And new "QueryProductAnalyticsSankey" request + And body with value {"data": {"attributes": {"data_source": "product_analytics", "definition": {"entries_per_step": 5, "number_of_steps": 5, "source": "/logs", "target": ""}, "search": {"join_keys": {"primary": "@session.id"}, "query": "@type:view"}, "time": {"from": 1771232048460, "to": 1771836848262}}, "type": "sankey_request"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/product-analytics-backend Scenario: Compute scalar analytics returns "Bad Request" response Given a valid "appKeyAuth" key in the system diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index 09186eef673..3628ff9e680 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 @@ -3731,6 +3731,12 @@ "type": "safe" } }, + "QueryProductAnalyticsSankey": { + "tag": "Product Analytics", + "undo": { + "type": "safe" + } + }, "QueryEventFilteredUsers": { "tag": "Rum Audience Management", "undo": {