From 1b79bce67ea14a05b187f3891d353d00abd0fc83 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 6 Jan 2026 17:56:06 +0000 Subject: [PATCH] Regenerate client from commit 1951a6b of spec repo --- .generator/schemas/v1/openapi.yaml | 333 +++++++++++++ .generator/schemas/v2/openapi.yaml | 440 ++++++++++-------- .../dashboards/CreateDashboard_258152475.java | 71 +++ .../CreateDashboard_2932151909.java | 65 +++ .../dashboards/CreateDashboard_373890042.java | 67 +++ .../v2/dora-metrics/GetDORADeployment.java | 4 +- examples/v2/dora-metrics/GetDORAFailure.java | 4 +- .../v2/dora-metrics/ListDORADeployments.java | 4 +- .../v2/dora-metrics/ListDORAFailures.java | 4 +- .../client/v1/model/EventsAggregation.java | 270 +++++++++++ .../v1/model/EventsAggregationValue.java | 80 ++++ ...oductAnalyticsAudienceAccountSubquery.java | 167 +++++++ .../ProductAnalyticsAudienceFilters.java | 263 +++++++++++ ...ductAnalyticsAudienceOccurrenceFilter.java | 167 +++++++ ...oductAnalyticsAudienceSegmentSubquery.java | 167 +++++++ .../ProductAnalyticsAudienceUserSubquery.java | 166 +++++++ .../api/client/v1/model/SankeyJoinKeys.java | 125 +++++ .../v1/model/SankeyNetworkDataSource.java | 58 +++ .../client/v1/model/SankeyNetworkQuery.java | 305 ++++++++++++ .../v1/model/SankeyNetworkQueryCompute.java | 122 +++++ .../v1/model/SankeyNetworkQueryMode.java | 55 +++ .../v1/model/SankeyNetworkQuerySort.java | 168 +++++++ .../client/v1/model/SankeyNetworkRequest.java | 127 +++++ .../v1/model/SankeyNetworkRequestType.java | 57 +++ .../client/v1/model/SankeyRumDataSource.java | 57 +++ .../api/client/v1/model/SankeyRumQuery.java | 388 +++++++++++++++ .../client/v1/model/SankeyRumQueryMode.java | 55 +++ .../api/client/v1/model/SankeyRumRequest.java | 127 +++++ .../v1/model/SankeyWidgetDefinition.java | 304 ++++++++++++ .../v1/model/SankeyWidgetDefinitionType.java | 55 +++ .../client/v1/model/SankeyWidgetRequest.java | 277 +++++++++++ .../api/client/v1/model/WidgetDefinition.java | 91 +++- .../api/client/v2/api/DoraMetricsApi.java | 116 ++--- .../client/v2/model/CaseCreateAttributes.java | 41 +- .../client/v2/model/CustomAttributeType.java | 3 +- .../v2/model/DORADeploymentFetchResponse.java | 137 ++++++ .../client/v2/model/DORADeploymentObject.java | 196 ++++++++ .../model/DORADeploymentObjectAttributes.java | 366 +++++++++++++++ .../v2/model/DORADeploymentsListResponse.java | 150 ++++++ ...nse.java => DORAFailureFetchResponse.java} | 30 +- ...nse.java => DORAFailuresListResponse.java} | 34 +- ...DORAEvent.java => DORAIncidentObject.java} | 57 +-- .../model/DORAIncidentObjectAttributes.java | 435 +++++++++++++++++ .../model/DORAListDeploymentsRequestData.java | 3 +- .../v2/model/DORAListFailuresRequestData.java | 3 +- ...nkey_widget_and_network_data_source.freeze | 1 + ...sankey_widget_and_network_data_source.json | 58 +++ ...t_and_product_analytics_data_source.freeze | 1 + ...get_and_product_analytics_data_source.json | 58 +++ ...h_sankey_widget_and_rum_data_source.freeze | 1 + ...ith_sankey_widget_and_rum_data_source.json | 58 +++ ...e_case_returns_Bad_Request_response.freeze | 2 +- ...ive_case_returns_Bad_Request_response.json | 6 +- .../Archive_case_returns_OK_response.freeze | 2 +- .../v2/Archive_case_returns_OK_response.json | 8 +- ...n_case_returns_Bad_Request_response.freeze | 2 +- ...ign_case_returns_Bad_Request_response.json | 6 +- .../v2/Assign_case_returns_OK_response.freeze | 2 +- .../v2/Assign_case_returns_OK_response.json | 20 +- ...t_case_returns_Bad_Request_response.freeze | 2 +- ...ent_case_returns_Bad_Request_response.json | 6 +- .../Comment_case_returns_OK_response.freeze | 2 +- .../v2/Comment_case_returns_OK_response.json | 8 +- ..._comment_returns_Not_Found_response.freeze | 2 +- ...se_comment_returns_Not_Found_response.json | 8 +- ...rom_case_returns_Not_Found_response.freeze | 2 +- ..._from_case_returns_Not_Found_response.json | 8 +- ...tails_of_a_case_returns_OK_response.freeze | 2 +- ...details_of_a_case_returns_OK_response.json | 8 +- ...e_case_returns_Bad_Request_response.freeze | 2 +- ...ive_case_returns_Bad_Request_response.json | 6 +- .../Unarchive_case_returns_OK_response.freeze | 2 +- .../Unarchive_case_returns_OK_response.json | 8 +- ...n_case_returns_Bad_Request_response.freeze | 2 +- ...ign_case_returns_Bad_Request_response.json | 6 +- .../Unassign_case_returns_OK_response.freeze | 2 +- .../v2/Unassign_case_returns_OK_response.json | 8 +- ...case_attributes_returns_OK_response.freeze | 2 +- ...e_case_attributes_returns_OK_response.json | 8 +- ...ttribute_returns_Not_Found_response.freeze | 2 +- ..._attribute_returns_Not_Found_response.json | 8 +- ...ase_description_returns_OK_response.freeze | 2 +- ..._case_description_returns_OK_response.json | 8 +- ...iority_returns_Bad_Request_response.freeze | 2 +- ...priority_returns_Bad_Request_response.json | 8 +- ...e_case_priority_returns_OK_response.freeze | 2 +- ...ate_case_priority_returns_OK_response.json | 8 +- ...status_returns_Bad_Request_response.freeze | 2 +- ...e_status_returns_Bad_Request_response.json | 8 +- ...ate_case_status_returns_OK_response.freeze | 2 +- ...pdate_case_status_returns_OK_response.json | 8 +- ..._title_returns_Bad_Request_response.freeze | 2 +- ...se_title_returns_Bad_Request_response.json | 6 +- ...date_case_title_returns_OK_response.freeze | 2 +- ...Update_case_title_returns_OK_response.json | 8 +- .../api/client/v1/api/dashboards.feature | 37 ++ .../sankey_network_widget.json | 41 ++ .../sankey_product_analytics_widget.json | 37 ++ .../sankey_rum_widget.json | 37 ++ 99 files changed, 6296 insertions(+), 467 deletions(-) create mode 100644 examples/v1/dashboards/CreateDashboard_258152475.java create mode 100644 examples/v1/dashboards/CreateDashboard_2932151909.java create mode 100644 examples/v1/dashboards/CreateDashboard_373890042.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/EventsAggregation.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/EventsAggregationValue.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceAccountSubquery.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceFilters.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceOccurrenceFilter.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceSegmentSubquery.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceUserSubquery.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyJoinKeys.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyNetworkDataSource.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQuery.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQueryCompute.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQueryMode.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQuerySort.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyNetworkRequest.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyNetworkRequestType.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyRumDataSource.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyRumQuery.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyRumQueryMode.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyRumRequest.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyWidgetDefinition.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyWidgetDefinitionType.java create mode 100644 src/main/java/com/datadog/api/client/v1/model/SankeyWidgetRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORADeploymentFetchResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORADeploymentObject.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORADeploymentObjectAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORADeploymentsListResponse.java rename src/main/java/com/datadog/api/client/v2/model/{DORAFetchResponse.java => DORAFailureFetchResponse.java} (79%) rename src/main/java/com/datadog/api/client/v2/model/{DORAListResponse.java => DORAFailuresListResponse.java} (77%) rename src/main/java/com/datadog/api/client/v2/model/{DORAEvent.java => DORAIncidentObject.java} (73%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORAIncidentObjectAttributes.java create mode 100644 src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_network_data_source.freeze create mode 100644 src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_network_data_source.json create mode 100644 src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_product_analytics_data_source.freeze create mode 100644 src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_product_analytics_data_source.json create mode 100644 src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.freeze create mode 100644 src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.json create mode 100644 src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_network_widget.json create mode 100644 src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_product_analytics_widget.json create mode 100644 src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_rum_widget.json diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index dba7bb99f9a..244b12fa076 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -2537,6 +2537,43 @@ components: type: string x-enum-varnames: - EVENT_TIMELINE + EventsAggregation: + description: The type of aggregation that can be performed on events-based queries. + example: avg + oneOf: + - $ref: '#/components/schemas/EventsAggregationValue' + - $ref: '#/components/schemas/EventsAggregationPercentile' + EventsAggregationPercentile: + description: Percentile aggregation. + pattern: ^pc[0-9]+(\.[0-9]+)?$ + type: string + EventsAggregationValue: + description: Standard aggregation types for events-based queries. + enum: + - avg + - cardinality + - count + - delta + - earliest + - latest + - max + - median + - min + - most_frequent + - sum + type: string + x-enum-varnames: + - AVG + - CARDINALITY + - COUNT + - DELTA + - EARLIEST + - LATEST + - MAX + - MEDIAN + - MIN + - MOST_FREQUENT + - SUM FormulaAndFunctionApmDependencyStatName: description: APM statistic. enum: @@ -10989,6 +11026,55 @@ components: required: - metric type: object + ProductAnalyticsAudienceAccountSubquery: + description: Product Analytics audience account subquery. + properties: + name: + type: string + query: + type: string + type: object + ProductAnalyticsAudienceFilters: + description: Product Analytics/RUM audience filters. + properties: + accounts: + items: + $ref: '#/components/schemas/ProductAnalyticsAudienceAccountSubquery' + type: array + filter_condition: + type: string + segments: + items: + $ref: '#/components/schemas/ProductAnalyticsAudienceSegmentSubquery' + type: array + users: + items: + $ref: '#/components/schemas/ProductAnalyticsAudienceUserSubquery' + type: array + type: object + ProductAnalyticsAudienceOccurrenceFilter: + properties: + operator: + type: string + value: + type: string + type: object + ProductAnalyticsAudienceSegmentSubquery: + description: Product Analytics audience segment subquery. + properties: + name: + type: string + segment_id: + type: string + type: object + ProductAnalyticsAudienceUserSubquery: + description: Product Analytics audience user subquery. + properties: + name: + type: string + query: + type: string + type: object QuerySortOrder: default: desc description: Direction of sort. @@ -12765,6 +12851,252 @@ components: type: string x-enum-varnames: - SLO + SankeyJoinKeys: + additionalProperties: false + description: Join keys. + properties: + primary: + description: Primary join key. + example: session.id + type: string + secondary: + description: Secondary join keys. + items: + description: Secondary join key. + type: string + type: array + required: + - primary + type: object + SankeyNetworkDataSource: + default: network + description: Network data source type. + enum: + - network_device_flows + - network + example: network + type: string + x-enum-varnames: + - NETWORK_DEVICE_FLOWS + - NETWORK + SankeyNetworkQuery: + additionalProperties: false + description: Query configuration for Sankey network widget. + properties: + compute: + $ref: '#/components/schemas/SankeyNetworkQueryCompute' + data_source: + $ref: '#/components/schemas/SankeyNetworkDataSource' + group_by: + description: Fields to group by. + example: + - source + - destination + items: + type: string + type: array + limit: + description: Maximum number of results. + example: 100 + format: int64 + type: integer + mode: + $ref: '#/components/schemas/SankeyNetworkQueryMode' + query_string: + description: Query string for filtering network data. + example: '*' + type: string + should_exclude_missing: + description: Whether to exclude missing values. + type: boolean + sort: + $ref: '#/components/schemas/SankeyNetworkQuerySort' + required: + - data_source + - query_string + - group_by + - limit + type: object + SankeyNetworkQueryCompute: + additionalProperties: false + description: Compute aggregation for network queries. + properties: + aggregation: + $ref: '#/components/schemas/EventsAggregation' + metric: + description: Metric to aggregate. + example: '' + type: string + required: + - aggregation + - metric + type: object + SankeyNetworkQueryMode: + default: target + description: Sankey mode for network queries. + enum: + - target + example: target + type: string + x-enum-varnames: + - TARGET + SankeyNetworkQuerySort: + description: Sort configuration for network queries. + properties: + field: + description: Field to sort by. + type: string + order: + $ref: '#/components/schemas/WidgetSort' + type: object + SankeyNetworkRequest: + additionalProperties: false + description: Sankey widget request for network data source. + properties: + query: + $ref: '#/components/schemas/SankeyNetworkQuery' + request_type: + $ref: '#/components/schemas/SankeyNetworkRequestType' + required: + - query + - request_type + type: object + SankeyNetworkRequestType: + default: netflow_sankey + description: Type of request for network Sankey widget. + enum: + - netflow_sankey + example: netflow_sankey + type: string + x-enum-varnames: + - NETFLOW_SANKEY + SankeyRumDataSource: + default: rum + description: Sankey widget with RUM data source. + enum: + - rum + - product_analytics + example: rum + type: string + x-enum-varnames: + - RUM + - PRODUCT_ANALYTICS + SankeyRumQuery: + additionalProperties: false + description: Sankey widget with RUM data source query. + properties: + audience_filters: + $ref: '#/components/schemas/ProductAnalyticsAudienceFilters' + data_source: + $ref: '#/components/schemas/SankeyRumDataSource' + entries_per_step: + description: Entries per step. + format: int64 + type: integer + join_keys: + $ref: '#/components/schemas/SankeyJoinKeys' + mode: + $ref: '#/components/schemas/SankeyRumQueryMode' + number_of_steps: + description: Number of steps. + format: int64 + type: integer + occurrences: + $ref: '#/components/schemas/ProductAnalyticsAudienceOccurrenceFilter' + query_string: + description: Query string. + example: '@type:view' + type: string + source: + description: Source. + type: string + subquery_id: + description: Subquery ID. + type: string + target: + description: Target. + type: string + required: + - data_source + - query_string + - mode + type: object + SankeyRumQueryMode: + default: source + description: Sankey mode for RUM queries. + enum: + - source + - target + example: source + type: string + x-enum-varnames: + - SOURCE + - TARGET + SankeyRumRequest: + additionalProperties: false + description: Sankey widget with RUM data source. + properties: + query: + $ref: '#/components/schemas/SankeyRumQuery' + request_type: + $ref: '#/components/schemas/SankeyWidgetDefinitionType' + required: + - query + - request_type + type: object + SankeyWidgetDefinition: + additionalProperties: false + description: The Sankey diagram visualizes the flow of data between categories, + stages or sets of values. + properties: + requests: + description: List of Sankey widget requests. + example: + - query: + data_source: rum + mode: source + query_string: '@type:view' + request_type: sankey + items: + $ref: '#/components/schemas/SankeyWidgetRequest' + minItems: 1 + type: array + show_other_links: + description: Whether to show links for "other" category. + type: boolean + sort_nodes: + description: Whether to sort nodes in the Sankey diagram. + type: boolean + time: + $ref: '#/components/schemas/WidgetTime' + title: + description: Title of your widget. + type: string + title_align: + $ref: '#/components/schemas/WidgetTextAlign' + title_size: + description: Size of the title. + type: string + type: + $ref: '#/components/schemas/SankeyWidgetDefinitionType' + required: + - type + - requests + type: object + SankeyWidgetDefinitionType: + default: sankey + description: Type of the Sankey widget. + enum: + - sankey + example: sankey + type: string + x-enum-varnames: + - SANKEY + SankeyWidgetRequest: + description: Request definition for Sankey widget. + oneOf: + - $ref: '#/components/schemas/SankeyRumRequest' + - $ref: '#/components/schemas/SankeyNetworkRequest' ScatterPlotRequest: description: Updated scatter plot. properties: @@ -24880,6 +25212,7 @@ components: - $ref: '#/components/schemas/SLOListWidgetDefinition' - $ref: '#/components/schemas/SLOWidgetDefinition' - $ref: '#/components/schemas/ScatterPlotWidgetDefinition' + - $ref: '#/components/schemas/SankeyWidgetDefinition' - $ref: '#/components/schemas/ServiceMapWidgetDefinition' - $ref: '#/components/schemas/ServiceSummaryWidgetDefinition' - $ref: '#/components/schemas/SplitGraphWidgetDefinition' diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index fb8574b175e..abac03b8a87 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -9168,11 +9168,6 @@ components: CaseCreateAttributes: description: Case creation attributes properties: - custom_attributes: - additionalProperties: - $ref: '#/components/schemas/CustomAttributeValue' - description: Case custom attributes - type: object description: description: Description type: string @@ -14717,9 +14712,9 @@ components: type: number type: array CustomAttributeMultiStringValue: - description: Value of multi TEXT/URL/SELECT custom attribute + description: Value of multi TEXT/URL custom attribute items: - description: TEXT/URL/SELECT Value + description: TEXT/URL Value type: string type: array CustomAttributeNumberValue: @@ -14727,7 +14722,7 @@ components: format: double type: number CustomAttributeStringValue: - description: Value of TEXT/URL/SELECT custom attribute + description: Value of TEXT/URL custom attribute type: string CustomAttributeType: description: Custom attributes type @@ -14735,14 +14730,12 @@ components: - URL - TEXT - NUMBER - - SELECT example: NUMBER type: string x-enum-varnames: - URL - TEXT - NUMBER - - SELECT CustomAttributeValue: description: Custom attribute values properties: @@ -15885,6 +15878,78 @@ components: type: string nullable: true type: array + DORADeploymentFetchResponse: + description: Response for fetching a single deployment event. + properties: + data: + $ref: '#/components/schemas/DORADeploymentObject' + type: object + DORADeploymentObject: + description: A DORA deployment event. + example: + attributes: + custom_tags: + - language:java + - department:engineering + - region:us-east-1 + env: production + finished_at: 1693491984000000000 + git: + commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 + repository_url: https://github.com/organization/example-repository + service: shopist + started_at: 1693491974000000000 + team: backend + version: v1.12.07 + id: 4242fcdd31586083 + type: dora_deployment + properties: + attributes: + $ref: '#/components/schemas/DORADeploymentObjectAttributes' + id: + description: The ID of the deployment event. + type: string + type: + $ref: '#/components/schemas/DORADeploymentType' + type: object + DORADeploymentObjectAttributes: + description: The attributes of the deployment event. + properties: + custom_tags: + $ref: '#/components/schemas/DORACustomTags' + env: + description: Environment name to where the service was deployed. + example: production + type: string + finished_at: + description: Unix timestamp when the deployment finished. + example: 1693491984000000000 + format: int64 + type: integer + git: + $ref: '#/components/schemas/DORAGitInfo' + service: + description: Service name. + example: shopist + type: string + started_at: + description: Unix timestamp when the deployment started. + example: 1693491974000000000 + format: int64 + type: integer + team: + description: Name of the team owning the deployed service. + example: backend + type: string + version: + description: Version to correlate with APM Deployment Tracking. + example: v1.12.07 + type: string + required: + - service + - started_at + - finished_at + type: object DORADeploymentRequest: description: Request to create a DORA deployment event. properties: @@ -15975,18 +16040,53 @@ components: type: string x-enum-varnames: - DORA_DEPLOYMENT - DORAEvent: - description: A DORA event. + DORADeploymentsListResponse: + description: Response for the list deployments endpoint. + example: + data: + - attributes: + custom_tags: + - language:java + - department:engineering + - region:us-east-1 + env: production + finished_at: 1693491984000000000 + git: + commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 + repository_url: https://github.com/organization/example-repository + service: shopist + started_at: 1693491974000000000 + team: backend + version: v1.12.07 + id: 4242fcdd31586083 + type: dora_deployment + - attributes: + custom_tags: + - language:go + - department:platform + env: production + finished_at: 1693492084000000000 + git: + commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599 + repository_url: https://github.com/organization/api-service + service: api-service + started_at: 1693492074000000000 + team: backend + version: v2.1.0 + id: 4242fcdd31586084 + type: dora_deployment properties: - attributes: - description: The attributes of the event. - type: object - id: - description: The ID of the event. - type: string - type: - description: The type of the event. - type: string + data: + description: The list of DORA deployment events. + items: + $ref: '#/components/schemas/DORADeploymentObject' + type: array + type: object + DORAFailureFetchResponse: + description: Response for fetching a single failure event. + properties: + data: + $ref: '#/components/schemas/DORAIncidentObject' type: object DORAFailureRequest: description: Request to create a DORA failure event. @@ -16090,11 +16190,45 @@ components: type: string x-enum-varnames: - DORA_FAILURE - DORAFetchResponse: - description: Response for the DORA fetch endpoints. + DORAFailuresListResponse: + description: Response for the list failures endpoint. + example: + data: + - attributes: + custom_tags: + - incident_type:database + - department:engineering + env: production + finished_at: 1693492274000000000 + name: Database outage + services: + - shopist + severity: SEV-1 + started_at: 1693492174000000000 + team: backend + id: 4242fcdd31586085 + type: dora_incident + - attributes: + custom_tags: + - incident_type:service_down + - department:platform + env: production + finished_at: 1693492474000000000 + name: API service outage + services: + - api-service + - payment-service + severity: SEV-2 + started_at: 1693492374000000000 + team: backend + id: 4242fcdd31586086 + type: dora_incident properties: data: - $ref: '#/components/schemas/DORAEvent' + description: The list of DORA incident events. + items: + $ref: '#/components/schemas/DORAIncidentObject' + type: array type: object DORAGitInfo: description: Git info for DORA Metrics events. @@ -16107,6 +16241,82 @@ components: - repository_url - commit_sha type: object + DORAIncidentObject: + description: A DORA incident event. + example: + attributes: + custom_tags: + - incident_type:database + - department:engineering + env: production + finished_at: 1693492274000000000 + git: + commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 + repository_url: https://github.com/organization/example-repository + name: Database outage + services: + - shopist + severity: SEV-1 + started_at: 1693492174000000000 + team: backend + id: 4242fcdd31586085 + type: dora_incident + properties: + attributes: + $ref: '#/components/schemas/DORAIncidentObjectAttributes' + id: + description: The ID of the incident event. + type: string + type: + $ref: '#/components/schemas/DORAFailureType' + type: object + DORAIncidentObjectAttributes: + description: The attributes of the incident event. + properties: + custom_tags: + $ref: '#/components/schemas/DORACustomTags' + env: + description: Environment name that was impacted by the incident. + example: production + type: string + finished_at: + description: Unix timestamp when the incident finished. + example: 1693491984000000000 + format: int64 + type: integer + git: + $ref: '#/components/schemas/DORAGitInfo' + name: + description: Incident name. + example: Database outage + type: string + services: + description: Service names impacted by the incident. + example: + - shopist + items: + type: string + type: array + severity: + description: Incident severity. + example: SEV-1 + type: string + started_at: + description: Unix timestamp when the incident started. + example: 1693491974000000000 + format: int64 + type: integer + team: + description: Name of the team owning the services impacted. + example: backend + type: string + version: + description: Version to correlate with APM Deployment Tracking. + example: v1.12.07 + type: string + required: + - started_at + type: object DORAListDeploymentsRequest: description: Request to get a list of deployments. example: @@ -16126,32 +16336,31 @@ components: type: object DORAListDeploymentsRequestAttributes: description: Attributes to get a list of deployments. - example: - from: '2025-01-01T00:00:00Z' - limit: 500 - query: service:(shopist OR api-service OR payment-service) env:(production - OR staging) team:(backend OR platform) - sort: -started_at - to: '2025-01-31T23:59:59Z' properties: from: description: Minimum timestamp for requested events. + example: '2025-01-01T00:00:00Z' format: date-time type: string limit: default: 10 description: Maximum number of events in the response. + example: 500 format: int32 maximum: 1000 type: integer query: description: Search query with event platform syntax. + example: service:(shopist OR api-service OR payment-service) env:(production + OR staging) team:(backend OR platform) type: string sort: description: Sort order (prefixed with `-` for descending). + example: -started_at type: string to: description: Maximum timestamp for requested events. + example: '2025-01-31T23:59:59Z' format: date-time type: string type: object @@ -16174,9 +16383,11 @@ components: - attributes type: object DORAListDeploymentsRequestDataType: + default: dora_deployments_list_request description: The definition of `DORAListDeploymentsRequestDataType` object. enum: - dora_deployments_list_request + example: dora_deployments_list_request type: string x-enum-varnames: - DORA_DEPLOYMENTS_LIST_REQUEST @@ -16199,32 +16410,31 @@ components: type: object DORAListFailuresRequestAttributes: description: Attributes to get a list of failures. - example: - from: '2025-01-01T00:00:00Z' - limit: 500 - query: severity:(SEV-1 OR SEV-2) env:(production OR staging) service:(shopist - OR api-service OR payment-service) team:(backend OR platform OR payments) - sort: -started_at - to: '2025-01-31T23:59:59Z' properties: from: description: Minimum timestamp for requested events. + example: '2025-01-01T00:00:00Z' format: date-time type: string limit: default: 10 description: Maximum number of events in the response. + example: 500 format: int32 maximum: 1000 type: integer query: description: Search query with event platform syntax. + example: severity:(SEV-1 OR SEV-2) env:(production OR staging) service:(shopist + OR api-service OR payment-service) team:(backend OR platform OR payments) type: string sort: description: Sort order (prefixed with `-` for descending). + example: -started_at type: string to: description: Maximum timestamp for requested events. + example: '2025-01-31T23:59:59Z' format: date-time type: string type: object @@ -16247,54 +16457,14 @@ components: - attributes type: object DORAListFailuresRequestDataType: + default: dora_failures_list_request description: The definition of `DORAListFailuresRequestDataType` object. enum: - dora_failures_list_request + example: dora_failures_list_request type: string x-enum-varnames: - DORA_FAILURES_LIST_REQUEST - DORAListResponse: - description: Response for the DORA list endpoints. - example: - data: - - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: production - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - service: shopist - started_at: 1693491974000000000 - team: backend - version: v1.12.07 - id: 4242fcdd31586083 - type: dora_deployment - - attributes: - custom_tags: - - language:go - - department:platform - env: production - finished_at: 1693492084000000000 - git: - commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599 - repository_url: https://github.com/organization/api-service - service: api-service - started_at: 1693492074000000000 - team: backend - version: v2.1.0 - id: 4242fcdd31586084 - type: dora_deployment - properties: - data: - description: The list of DORA events. - items: - $ref: '#/components/schemas/DORAEvent' - type: array - type: object DashboardListAddItemsRequest: description: Request containing a list of dashboards to add. properties: @@ -67827,7 +67997,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DORAListResponse' + $ref: '#/components/schemas/DORADeploymentsListResponse' description: OK '400': content: @@ -67865,26 +68035,8 @@ paths: '200': content: application/json: - example: - data: - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: staging - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - service: shopist - started_at: 1693491974000000000 - team: backend - version: v1.12.07 - id: 4242fcdd31586083 - type: dora_deployment - schema: - $ref: '#/components/schemas/DORAFetchResponse' + schema: + $ref: '#/components/schemas/DORADeploymentFetchResponse' description: OK '400': content: @@ -68001,66 +68153,8 @@ paths: '200': content: application/json: - example: - data: - - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: production - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - name: Web server is down; all requests are failing. - services: - - shopist - severity: SEV-1 - started_at: 1693491974000000000 - team: backend - id: 4242fcdd31586085 - type: dora_failure - - attributes: - custom_tags: - - language:go - - department:platform - env: production - finished_at: 1693492084000000000 - git: - commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599 - repository_url: https://github.com/organization/api-service - name: Database connection timeout - services: - - api-service - - payment-service - severity: SEV-1 - started_at: 1693492074000000000 - team: platform - version: v2.1.0 - id: 4242fcdd31586086 - type: dora_failure - - attributes: - custom_tags: - - language:python - - department:payments - - region:eu-west-1 - env: staging - finished_at: 1693492204000000000 - git: - commit_sha: 99edc9350f2cc9b250b69abddab733dd55e1a601 - repository_url: https://github.com/organization/payment-service - name: Payment gateway API rate limit exceeded - services: - - payment-service - severity: SEV-2 - started_at: 1693492174000000000 - team: payments - version: v1.8.3 - id: 4242fcdd31586087 - type: dora_failure - schema: - $ref: '#/components/schemas/DORAListResponse' + schema: + $ref: '#/components/schemas/DORAFailuresListResponse' description: OK '400': content: @@ -68098,28 +68192,8 @@ paths: '200': content: application/json: - example: - data: - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: staging - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - name: Web server is down; all requests are failing. - services: - - shopist - severity: High - started_at: 1693491974000000000 - team: backend - id: 4242fcdd31586085 - type: dora_failure - schema: - $ref: '#/components/schemas/DORAFetchResponse' + schema: + $ref: '#/components/schemas/DORAFailureFetchResponse' description: OK '400': content: diff --git a/examples/v1/dashboards/CreateDashboard_258152475.java b/examples/v1/dashboards/CreateDashboard_258152475.java new file mode 100644 index 00000000000..c7623dd800f --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_258152475.java @@ -0,0 +1,71 @@ +// Create a new dashboard with sankey widget and network data source + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.DashboardLayoutType; +import com.datadog.api.client.v1.model.SankeyNetworkDataSource; +import com.datadog.api.client.v1.model.SankeyNetworkQuery; +import com.datadog.api.client.v1.model.SankeyNetworkRequest; +import com.datadog.api.client.v1.model.SankeyNetworkRequestType; +import com.datadog.api.client.v1.model.SankeyWidgetDefinition; +import com.datadog.api.client.v1.model.SankeyWidgetDefinitionType; +import com.datadog.api.client.v1.model.SankeyWidgetRequest; +import com.datadog.api.client.v1.model.Widget; +import com.datadog.api.client.v1.model.WidgetDefinition; +import com.datadog.api.client.v1.model.WidgetLayout; +import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.util.Arrays; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DashboardsApi apiInstance = new DashboardsApi(defaultClient); + + Dashboard body = + new Dashboard() + .title("Example-Dashboard") + .description("") + .widgets( + Collections.singletonList( + new Widget() + .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) + .definition( + new WidgetDefinition( + new SankeyWidgetDefinition() + .title("") + .titleSize("16") + .titleAlign(WidgetTextAlign.LEFT) + .type(SankeyWidgetDefinitionType.SANKEY) + .requests( + Collections.singletonList( + new SankeyWidgetRequest( + new SankeyNetworkRequest() + .query( + new SankeyNetworkQuery() + .dataSource( + SankeyNetworkDataSource.NETWORK) + .queryString("*") + .groupBy( + Arrays.asList( + "source", "destination")) + .limit(100L)) + .requestType( + SankeyNetworkRequestType + .NETFLOW_SANKEY)))))))) + .layoutType(DashboardLayoutType.FREE); + + try { + Dashboard result = apiInstance.createDashboard(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DashboardsApi#createDashboard"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v1/dashboards/CreateDashboard_2932151909.java b/examples/v1/dashboards/CreateDashboard_2932151909.java new file mode 100644 index 00000000000..f427047d394 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2932151909.java @@ -0,0 +1,65 @@ +// Create a new dashboard with sankey widget and rum data source + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.DashboardLayoutType; +import com.datadog.api.client.v1.model.SankeyRumDataSource; +import com.datadog.api.client.v1.model.SankeyRumQuery; +import com.datadog.api.client.v1.model.SankeyRumQueryMode; +import com.datadog.api.client.v1.model.SankeyRumRequest; +import com.datadog.api.client.v1.model.SankeyWidgetDefinition; +import com.datadog.api.client.v1.model.SankeyWidgetDefinitionType; +import com.datadog.api.client.v1.model.SankeyWidgetRequest; +import com.datadog.api.client.v1.model.Widget; +import com.datadog.api.client.v1.model.WidgetDefinition; +import com.datadog.api.client.v1.model.WidgetLayout; +import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DashboardsApi apiInstance = new DashboardsApi(defaultClient); + + Dashboard body = + new Dashboard() + .title("Example-Dashboard") + .description("") + .widgets( + Collections.singletonList( + new Widget() + .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) + .definition( + new WidgetDefinition( + new SankeyWidgetDefinition() + .title("") + .titleSize("16") + .titleAlign(WidgetTextAlign.LEFT) + .type(SankeyWidgetDefinitionType.SANKEY) + .requests( + Collections.singletonList( + new SankeyWidgetRequest( + new SankeyRumRequest() + .query( + new SankeyRumQuery() + .dataSource(SankeyRumDataSource.RUM) + .queryString("@type:view") + .mode(SankeyRumQueryMode.SOURCE)) + .requestType( + SankeyWidgetDefinitionType.SANKEY)))))))) + .layoutType(DashboardLayoutType.FREE); + + try { + Dashboard result = apiInstance.createDashboard(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DashboardsApi#createDashboard"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v1/dashboards/CreateDashboard_373890042.java b/examples/v1/dashboards/CreateDashboard_373890042.java new file mode 100644 index 00000000000..48da8a511eb --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_373890042.java @@ -0,0 +1,67 @@ +// Create a new dashboard with sankey widget and product analytics data source + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v1.api.DashboardsApi; +import com.datadog.api.client.v1.model.Dashboard; +import com.datadog.api.client.v1.model.DashboardLayoutType; +import com.datadog.api.client.v1.model.SankeyRumDataSource; +import com.datadog.api.client.v1.model.SankeyRumQuery; +import com.datadog.api.client.v1.model.SankeyRumQueryMode; +import com.datadog.api.client.v1.model.SankeyRumRequest; +import com.datadog.api.client.v1.model.SankeyWidgetDefinition; +import com.datadog.api.client.v1.model.SankeyWidgetDefinitionType; +import com.datadog.api.client.v1.model.SankeyWidgetRequest; +import com.datadog.api.client.v1.model.Widget; +import com.datadog.api.client.v1.model.WidgetDefinition; +import com.datadog.api.client.v1.model.WidgetLayout; +import com.datadog.api.client.v1.model.WidgetTextAlign; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + DashboardsApi apiInstance = new DashboardsApi(defaultClient); + + Dashboard body = + new Dashboard() + .title("Example-Dashboard") + .description("") + .widgets( + Collections.singletonList( + new Widget() + .layout(new WidgetLayout().x(0L).y(0L).width(47L).height(15L)) + .definition( + new WidgetDefinition( + new SankeyWidgetDefinition() + .title("") + .titleSize("16") + .titleAlign(WidgetTextAlign.LEFT) + .type(SankeyWidgetDefinitionType.SANKEY) + .requests( + Collections.singletonList( + new SankeyWidgetRequest( + new SankeyRumRequest() + .query( + new SankeyRumQuery() + .dataSource( + SankeyRumDataSource + .PRODUCT_ANALYTICS) + .queryString("@type:session") + .mode(SankeyRumQueryMode.SOURCE)) + .requestType( + SankeyWidgetDefinitionType.SANKEY)))))))) + .layoutType(DashboardLayoutType.FREE); + + try { + Dashboard result = apiInstance.createDashboard(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DashboardsApi#createDashboard"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/dora-metrics/GetDORADeployment.java b/examples/v2/dora-metrics/GetDORADeployment.java index 1d0a1813cb4..f2c7e10c840 100644 --- a/examples/v2/dora-metrics/GetDORADeployment.java +++ b/examples/v2/dora-metrics/GetDORADeployment.java @@ -3,7 +3,7 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.DoraMetricsApi; -import com.datadog.api.client.v2.model.DORAFetchResponse; +import com.datadog.api.client.v2.model.DORADeploymentFetchResponse; public class Example { public static void main(String[] args) { @@ -11,7 +11,7 @@ public static void main(String[] args) { DoraMetricsApi apiInstance = new DoraMetricsApi(defaultClient); try { - DORAFetchResponse result = apiInstance.getDORADeployment("deployment_id"); + DORADeploymentFetchResponse result = apiInstance.getDORADeployment("deployment_id"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DoraMetricsApi#getDORADeployment"); diff --git a/examples/v2/dora-metrics/GetDORAFailure.java b/examples/v2/dora-metrics/GetDORAFailure.java index 9a856540095..8f6c063febf 100644 --- a/examples/v2/dora-metrics/GetDORAFailure.java +++ b/examples/v2/dora-metrics/GetDORAFailure.java @@ -3,7 +3,7 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.DoraMetricsApi; -import com.datadog.api.client.v2.model.DORAFetchResponse; +import com.datadog.api.client.v2.model.DORAFailureFetchResponse; public class Example { public static void main(String[] args) { @@ -11,7 +11,7 @@ public static void main(String[] args) { DoraMetricsApi apiInstance = new DoraMetricsApi(defaultClient); try { - DORAFetchResponse result = apiInstance.getDORAFailure("failure_id"); + DORAFailureFetchResponse result = apiInstance.getDORAFailure("failure_id"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DoraMetricsApi#getDORAFailure"); diff --git a/examples/v2/dora-metrics/ListDORADeployments.java b/examples/v2/dora-metrics/ListDORADeployments.java index cfe6c4eb52c..84d9b6766f4 100644 --- a/examples/v2/dora-metrics/ListDORADeployments.java +++ b/examples/v2/dora-metrics/ListDORADeployments.java @@ -3,11 +3,11 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.DoraMetricsApi; +import com.datadog.api.client.v2.model.DORADeploymentsListResponse; import com.datadog.api.client.v2.model.DORAListDeploymentsRequest; import com.datadog.api.client.v2.model.DORAListDeploymentsRequestAttributes; import com.datadog.api.client.v2.model.DORAListDeploymentsRequestData; import com.datadog.api.client.v2.model.DORAListDeploymentsRequestDataType; -import com.datadog.api.client.v2.model.DORAListResponse; import java.time.OffsetDateTime; public class Example { @@ -27,7 +27,7 @@ public static void main(String[] args) { .type(DORAListDeploymentsRequestDataType.DORA_DEPLOYMENTS_LIST_REQUEST)); try { - DORAListResponse result = apiInstance.listDORADeployments(body); + DORADeploymentsListResponse result = apiInstance.listDORADeployments(body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DoraMetricsApi#listDORADeployments"); diff --git a/examples/v2/dora-metrics/ListDORAFailures.java b/examples/v2/dora-metrics/ListDORAFailures.java index dc0f181b69c..555266cd1eb 100644 --- a/examples/v2/dora-metrics/ListDORAFailures.java +++ b/examples/v2/dora-metrics/ListDORAFailures.java @@ -3,11 +3,11 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.DoraMetricsApi; +import com.datadog.api.client.v2.model.DORAFailuresListResponse; import com.datadog.api.client.v2.model.DORAListFailuresRequest; import com.datadog.api.client.v2.model.DORAListFailuresRequestAttributes; import com.datadog.api.client.v2.model.DORAListFailuresRequestData; import com.datadog.api.client.v2.model.DORAListFailuresRequestDataType; -import com.datadog.api.client.v2.model.DORAListResponse; import java.time.OffsetDateTime; public class Example { @@ -27,7 +27,7 @@ public static void main(String[] args) { .type(DORAListFailuresRequestDataType.DORA_FAILURES_LIST_REQUEST)); try { - DORAListResponse result = apiInstance.listDORAFailures(body); + DORAFailuresListResponse result = apiInstance.listDORAFailures(body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DoraMetricsApi#listDORAFailures"); diff --git a/src/main/java/com/datadog/api/client/v1/model/EventsAggregation.java b/src/main/java/com/datadog/api/client/v1/model/EventsAggregation.java new file mode 100644 index 00000000000..6badfaab74c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/EventsAggregation.java @@ -0,0 +1,270 @@ +/* + * 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.v1.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = EventsAggregation.EventsAggregationDeserializer.class) +@JsonSerialize(using = EventsAggregation.EventsAggregationSerializer.class) +public class EventsAggregation extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(EventsAggregation.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class EventsAggregationSerializer extends StdSerializer { + public EventsAggregationSerializer(Class t) { + super(t); + } + + public EventsAggregationSerializer() { + this(null); + } + + @Override + public void serialize(EventsAggregation value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class EventsAggregationDeserializer extends StdDeserializer { + public EventsAggregationDeserializer() { + this(EventsAggregation.class); + } + + public EventsAggregationDeserializer(Class vc) { + super(vc); + } + + @Override + public EventsAggregation deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize EventsAggregationValue + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (EventsAggregationValue.class.equals(Integer.class) + || EventsAggregationValue.class.equals(Long.class) + || EventsAggregationValue.class.equals(Float.class) + || EventsAggregationValue.class.equals(Double.class) + || EventsAggregationValue.class.equals(Boolean.class) + || EventsAggregationValue.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((EventsAggregationValue.class.equals(Integer.class) + || EventsAggregationValue.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((EventsAggregationValue.class.equals(Float.class) + || EventsAggregationValue.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (EventsAggregationValue.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (EventsAggregationValue.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(EventsAggregationValue.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'EventsAggregationValue'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'EventsAggregationValue'", e); + } + + // deserialize String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) + || String.class.equals(Long.class) + || String.class.equals(Float.class) + || String.class.equals(Double.class) + || String.class.equals(Boolean.class) + || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((String.class.equals(Integer.class) || String.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((String.class.equals(Float.class) || String.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (String.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + EventsAggregation ret = new EventsAggregation(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public EventsAggregation getNullValue(DeserializationContext ctxt) throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "EventsAggregation cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public EventsAggregation() { + super("oneOf", Boolean.FALSE); + } + + public EventsAggregation(EventsAggregationValue o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public EventsAggregation(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("EventsAggregationValue", new GenericType() {}); + schemas.put("String", new GenericType() {}); + JSON.registerDescendants(EventsAggregation.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return EventsAggregation.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: EventsAggregationValue, String + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(EventsAggregationValue.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be EventsAggregationValue, String"); + } + + /** + * Get the actual instance, which can be the following: EventsAggregationValue, String + * + * @return The actual instance (EventsAggregationValue, String) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `EventsAggregationValue`. If the actual instance is not + * `EventsAggregationValue`, the ClassCastException will be thrown. + * + * @return The actual instance of `EventsAggregationValue` + * @throws ClassCastException if the instance is not `EventsAggregationValue` + */ + public EventsAggregationValue getEventsAggregationValue() throws ClassCastException { + return (EventsAggregationValue) super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/EventsAggregationValue.java b/src/main/java/com/datadog/api/client/v1/model/EventsAggregationValue.java new file mode 100644 index 00000000000..eb776407af9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/EventsAggregationValue.java @@ -0,0 +1,80 @@ +/* + * 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.v1.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; + +/** Standard aggregation types for events-based queries. */ +@JsonSerialize(using = EventsAggregationValue.EventsAggregationValueSerializer.class) +public class EventsAggregationValue extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList( + "avg", + "cardinality", + "count", + "delta", + "earliest", + "latest", + "max", + "median", + "min", + "most_frequent", + "sum")); + + public static final EventsAggregationValue AVG = new EventsAggregationValue("avg"); + public static final EventsAggregationValue CARDINALITY = + new EventsAggregationValue("cardinality"); + public static final EventsAggregationValue COUNT = new EventsAggregationValue("count"); + public static final EventsAggregationValue DELTA = new EventsAggregationValue("delta"); + public static final EventsAggregationValue EARLIEST = new EventsAggregationValue("earliest"); + public static final EventsAggregationValue LATEST = new EventsAggregationValue("latest"); + public static final EventsAggregationValue MAX = new EventsAggregationValue("max"); + public static final EventsAggregationValue MEDIAN = new EventsAggregationValue("median"); + public static final EventsAggregationValue MIN = new EventsAggregationValue("min"); + public static final EventsAggregationValue MOST_FREQUENT = + new EventsAggregationValue("most_frequent"); + public static final EventsAggregationValue SUM = new EventsAggregationValue("sum"); + + EventsAggregationValue(String value) { + super(value, allowedValues); + } + + public static class EventsAggregationValueSerializer + extends StdSerializer { + public EventsAggregationValueSerializer(Class t) { + super(t); + } + + public EventsAggregationValueSerializer() { + this(null); + } + + @Override + public void serialize( + EventsAggregationValue value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EventsAggregationValue fromValue(String value) { + return new EventsAggregationValue(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceAccountSubquery.java b/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceAccountSubquery.java new file mode 100644 index 00000000000..c517e4af22a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceAccountSubquery.java @@ -0,0 +1,167 @@ +/* + * 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.v1.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; + +/** Product Analytics audience account subquery. */ +@JsonPropertyOrder({ + ProductAnalyticsAudienceAccountSubquery.JSON_PROPERTY_NAME, + ProductAnalyticsAudienceAccountSubquery.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsAudienceAccountSubquery { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public ProductAnalyticsAudienceAccountSubquery 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 ProductAnalyticsAudienceAccountSubquery query(String query) { + this.query = query; + return this; + } + + /** + * Getquery + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ProductAnalyticsAudienceAccountSubquery + */ + @JsonAnySetter + public ProductAnalyticsAudienceAccountSubquery putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ProductAnalyticsAudienceAccountSubquery object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsAudienceAccountSubquery productAnalyticsAudienceAccountSubquery = + (ProductAnalyticsAudienceAccountSubquery) o; + return Objects.equals(this.name, productAnalyticsAudienceAccountSubquery.name) + && Objects.equals(this.query, productAnalyticsAudienceAccountSubquery.query) + && Objects.equals( + this.additionalProperties, + productAnalyticsAudienceAccountSubquery.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsAudienceAccountSubquery {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceFilters.java b/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceFilters.java new file mode 100644 index 00000000000..002940bb8ec --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceFilters.java @@ -0,0 +1,263 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v1.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; + +/** Product Analytics/RUM audience filters. */ +@JsonPropertyOrder({ + ProductAnalyticsAudienceFilters.JSON_PROPERTY_ACCOUNTS, + ProductAnalyticsAudienceFilters.JSON_PROPERTY_FILTER_CONDITION, + ProductAnalyticsAudienceFilters.JSON_PROPERTY_SEGMENTS, + ProductAnalyticsAudienceFilters.JSON_PROPERTY_USERS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsAudienceFilters { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNTS = "accounts"; + private List accounts = null; + + public static final String JSON_PROPERTY_FILTER_CONDITION = "filter_condition"; + private String filterCondition; + + public static final String JSON_PROPERTY_SEGMENTS = "segments"; + private List segments = null; + + public static final String JSON_PROPERTY_USERS = "users"; + private List users = null; + + public ProductAnalyticsAudienceFilters accounts( + List accounts) { + this.accounts = accounts; + for (ProductAnalyticsAudienceAccountSubquery item : accounts) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ProductAnalyticsAudienceFilters addAccountsItem( + ProductAnalyticsAudienceAccountSubquery accountsItem) { + if (this.accounts == null) { + this.accounts = new ArrayList<>(); + } + this.accounts.add(accountsItem); + this.unparsed |= accountsItem.unparsed; + return this; + } + + /** + * Getaccounts + * + * @return accounts + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAccounts() { + return accounts; + } + + public void setAccounts(List accounts) { + this.accounts = accounts; + } + + public ProductAnalyticsAudienceFilters filterCondition(String filterCondition) { + this.filterCondition = filterCondition; + return this; + } + + /** + * GetfilterCondition + * + * @return filterCondition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER_CONDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFilterCondition() { + return filterCondition; + } + + public void setFilterCondition(String filterCondition) { + this.filterCondition = filterCondition; + } + + public ProductAnalyticsAudienceFilters segments( + List segments) { + this.segments = segments; + for (ProductAnalyticsAudienceSegmentSubquery item : segments) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ProductAnalyticsAudienceFilters addSegmentsItem( + ProductAnalyticsAudienceSegmentSubquery segmentsItem) { + if (this.segments == null) { + this.segments = new ArrayList<>(); + } + this.segments.add(segmentsItem); + this.unparsed |= segmentsItem.unparsed; + return this; + } + + /** + * Getsegments + * + * @return segments + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEGMENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSegments() { + return segments; + } + + public void setSegments(List segments) { + this.segments = segments; + } + + public ProductAnalyticsAudienceFilters users(List users) { + this.users = users; + for (ProductAnalyticsAudienceUserSubquery item : users) { + this.unparsed |= item.unparsed; + } + return this; + } + + public ProductAnalyticsAudienceFilters addUsersItem( + ProductAnalyticsAudienceUserSubquery usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + this.unparsed |= usersItem.unparsed; + return this; + } + + /** + * Getusers + * + * @return users + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getUsers() { + return users; + } + + public void setUsers(List users) { + this.users = users; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ProductAnalyticsAudienceFilters + */ + @JsonAnySetter + public ProductAnalyticsAudienceFilters putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ProductAnalyticsAudienceFilters object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsAudienceFilters productAnalyticsAudienceFilters = + (ProductAnalyticsAudienceFilters) o; + return Objects.equals(this.accounts, productAnalyticsAudienceFilters.accounts) + && Objects.equals(this.filterCondition, productAnalyticsAudienceFilters.filterCondition) + && Objects.equals(this.segments, productAnalyticsAudienceFilters.segments) + && Objects.equals(this.users, productAnalyticsAudienceFilters.users) + && Objects.equals( + this.additionalProperties, productAnalyticsAudienceFilters.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accounts, filterCondition, segments, users, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsAudienceFilters {\n"); + sb.append(" accounts: ").append(toIndentedString(accounts)).append("\n"); + sb.append(" filterCondition: ").append(toIndentedString(filterCondition)).append("\n"); + sb.append(" segments: ").append(toIndentedString(segments)).append("\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceOccurrenceFilter.java b/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceOccurrenceFilter.java new file mode 100644 index 00000000000..22a3771ccb6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceOccurrenceFilter.java @@ -0,0 +1,167 @@ +/* + * 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.v1.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({ + ProductAnalyticsAudienceOccurrenceFilter.JSON_PROPERTY_OPERATOR, + ProductAnalyticsAudienceOccurrenceFilter.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsAudienceOccurrenceFilter { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_OPERATOR = "operator"; + private String operator; + + public static final String JSON_PROPERTY_VALUE = "value"; + private String value; + + public ProductAnalyticsAudienceOccurrenceFilter operator(String operator) { + this.operator = operator; + return this; + } + + /** + * Getoperator + * + * @return operator + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPERATOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOperator() { + return operator; + } + + public void setOperator(String operator) { + this.operator = operator; + } + + public ProductAnalyticsAudienceOccurrenceFilter value(String value) { + this.value = value; + return this; + } + + /** + * Getvalue + * + * @return value + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VALUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getValue() { + return value; + } + + public void setValue(String 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 ProductAnalyticsAudienceOccurrenceFilter + */ + @JsonAnySetter + public ProductAnalyticsAudienceOccurrenceFilter 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 ProductAnalyticsAudienceOccurrenceFilter object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsAudienceOccurrenceFilter productAnalyticsAudienceOccurrenceFilter = + (ProductAnalyticsAudienceOccurrenceFilter) o; + return Objects.equals(this.operator, productAnalyticsAudienceOccurrenceFilter.operator) + && Objects.equals(this.value, productAnalyticsAudienceOccurrenceFilter.value) + && Objects.equals( + this.additionalProperties, + productAnalyticsAudienceOccurrenceFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(operator, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsAudienceOccurrenceFilter {\n"); + sb.append(" operator: ").append(toIndentedString(operator)).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/v1/model/ProductAnalyticsAudienceSegmentSubquery.java b/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceSegmentSubquery.java new file mode 100644 index 00000000000..591f7ba5416 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceSegmentSubquery.java @@ -0,0 +1,167 @@ +/* + * 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.v1.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; + +/** Product Analytics audience segment subquery. */ +@JsonPropertyOrder({ + ProductAnalyticsAudienceSegmentSubquery.JSON_PROPERTY_NAME, + ProductAnalyticsAudienceSegmentSubquery.JSON_PROPERTY_SEGMENT_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsAudienceSegmentSubquery { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SEGMENT_ID = "segment_id"; + private String segmentId; + + public ProductAnalyticsAudienceSegmentSubquery 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 ProductAnalyticsAudienceSegmentSubquery segmentId(String segmentId) { + this.segmentId = segmentId; + return this; + } + + /** + * GetsegmentId + * + * @return segmentId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEGMENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSegmentId() { + return segmentId; + } + + public void setSegmentId(String segmentId) { + this.segmentId = segmentId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ProductAnalyticsAudienceSegmentSubquery + */ + @JsonAnySetter + public ProductAnalyticsAudienceSegmentSubquery putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ProductAnalyticsAudienceSegmentSubquery object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsAudienceSegmentSubquery productAnalyticsAudienceSegmentSubquery = + (ProductAnalyticsAudienceSegmentSubquery) o; + return Objects.equals(this.name, productAnalyticsAudienceSegmentSubquery.name) + && Objects.equals(this.segmentId, productAnalyticsAudienceSegmentSubquery.segmentId) + && Objects.equals( + this.additionalProperties, + productAnalyticsAudienceSegmentSubquery.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, segmentId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsAudienceSegmentSubquery {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" segmentId: ").append(toIndentedString(segmentId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceUserSubquery.java b/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceUserSubquery.java new file mode 100644 index 00000000000..cb1fec701fe --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/ProductAnalyticsAudienceUserSubquery.java @@ -0,0 +1,166 @@ +/* + * 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.v1.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; + +/** Product Analytics audience user subquery. */ +@JsonPropertyOrder({ + ProductAnalyticsAudienceUserSubquery.JSON_PROPERTY_NAME, + ProductAnalyticsAudienceUserSubquery.JSON_PROPERTY_QUERY +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ProductAnalyticsAudienceUserSubquery { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_QUERY = "query"; + private String query; + + public ProductAnalyticsAudienceUserSubquery 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 ProductAnalyticsAudienceUserSubquery query(String query) { + this.query = query; + return this; + } + + /** + * Getquery + * + * @return query + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQuery() { + return query; + } + + public void setQuery(String query) { + this.query = query; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ProductAnalyticsAudienceUserSubquery + */ + @JsonAnySetter + public ProductAnalyticsAudienceUserSubquery putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this ProductAnalyticsAudienceUserSubquery object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProductAnalyticsAudienceUserSubquery productAnalyticsAudienceUserSubquery = + (ProductAnalyticsAudienceUserSubquery) o; + return Objects.equals(this.name, productAnalyticsAudienceUserSubquery.name) + && Objects.equals(this.query, productAnalyticsAudienceUserSubquery.query) + && Objects.equals( + this.additionalProperties, productAnalyticsAudienceUserSubquery.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(name, query, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProductAnalyticsAudienceUserSubquery {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyJoinKeys.java b/src/main/java/com/datadog/api/client/v1/model/SankeyJoinKeys.java new file mode 100644 index 00000000000..e7cc3940045 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyJoinKeys.java @@ -0,0 +1,125 @@ +/* + * 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.v1.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** Join keys. */ +@JsonPropertyOrder({SankeyJoinKeys.JSON_PROPERTY_PRIMARY, SankeyJoinKeys.JSON_PROPERTY_SECONDARY}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SankeyJoinKeys { + @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 SankeyJoinKeys() {} + + @JsonCreator + public SankeyJoinKeys( + @JsonProperty(required = true, value = JSON_PROPERTY_PRIMARY) String primary) { + this.primary = primary; + } + + public SankeyJoinKeys primary(String primary) { + this.primary = primary; + return this; + } + + /** + * Primary join key. + * + * @return primary + */ + @JsonProperty(JSON_PROPERTY_PRIMARY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPrimary() { + return primary; + } + + public void setPrimary(String primary) { + this.primary = primary; + } + + public SankeyJoinKeys secondary(List secondary) { + this.secondary = secondary; + return this; + } + + public SankeyJoinKeys addSecondaryItem(String secondaryItem) { + if (this.secondary == null) { + this.secondary = new ArrayList<>(); + } + this.secondary.add(secondaryItem); + return this; + } + + /** + * Secondary join keys. + * + * @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; + } + + /** Return true if this SankeyJoinKeys object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SankeyJoinKeys sankeyJoinKeys = (SankeyJoinKeys) o; + return Objects.equals(this.primary, sankeyJoinKeys.primary) + && Objects.equals(this.secondary, sankeyJoinKeys.secondary); + } + + @Override + public int hashCode() { + return Objects.hash(primary, secondary); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SankeyJoinKeys {\n"); + sb.append(" primary: ").append(toIndentedString(primary)).append("\n"); + sb.append(" secondary: ").append(toIndentedString(secondary)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkDataSource.java b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkDataSource.java new file mode 100644 index 00000000000..d5ab54de05d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkDataSource.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.v1.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; + +/** Network data source type. */ +@JsonSerialize(using = SankeyNetworkDataSource.SankeyNetworkDataSourceSerializer.class) +public class SankeyNetworkDataSource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("network_device_flows", "network")); + + public static final SankeyNetworkDataSource NETWORK_DEVICE_FLOWS = + new SankeyNetworkDataSource("network_device_flows"); + public static final SankeyNetworkDataSource NETWORK = new SankeyNetworkDataSource("network"); + + SankeyNetworkDataSource(String value) { + super(value, allowedValues); + } + + public static class SankeyNetworkDataSourceSerializer + extends StdSerializer { + public SankeyNetworkDataSourceSerializer(Class t) { + super(t); + } + + public SankeyNetworkDataSourceSerializer() { + this(null); + } + + @Override + public void serialize( + SankeyNetworkDataSource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SankeyNetworkDataSource fromValue(String value) { + return new SankeyNetworkDataSource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQuery.java b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQuery.java new file mode 100644 index 00000000000..c8a2e444921 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQuery.java @@ -0,0 +1,305 @@ +/* + * 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.v1.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** Query configuration for Sankey network widget. */ +@JsonPropertyOrder({ + SankeyNetworkQuery.JSON_PROPERTY_COMPUTE, + SankeyNetworkQuery.JSON_PROPERTY_DATA_SOURCE, + SankeyNetworkQuery.JSON_PROPERTY_GROUP_BY, + SankeyNetworkQuery.JSON_PROPERTY_LIMIT, + SankeyNetworkQuery.JSON_PROPERTY_MODE, + SankeyNetworkQuery.JSON_PROPERTY_QUERY_STRING, + SankeyNetworkQuery.JSON_PROPERTY_SHOULD_EXCLUDE_MISSING, + SankeyNetworkQuery.JSON_PROPERTY_SORT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SankeyNetworkQuery { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COMPUTE = "compute"; + private SankeyNetworkQueryCompute compute; + + public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; + private SankeyNetworkDataSource dataSource = SankeyNetworkDataSource.NETWORK; + + public static final String JSON_PROPERTY_GROUP_BY = "group_by"; + private List groupBy = new ArrayList<>(); + + public static final String JSON_PROPERTY_LIMIT = "limit"; + private Long limit; + + public static final String JSON_PROPERTY_MODE = "mode"; + private SankeyNetworkQueryMode mode = SankeyNetworkQueryMode.TARGET; + + public static final String JSON_PROPERTY_QUERY_STRING = "query_string"; + private String queryString; + + public static final String JSON_PROPERTY_SHOULD_EXCLUDE_MISSING = "should_exclude_missing"; + private Boolean shouldExcludeMissing; + + public static final String JSON_PROPERTY_SORT = "sort"; + private SankeyNetworkQuerySort sort; + + public SankeyNetworkQuery() {} + + @JsonCreator + public SankeyNetworkQuery( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) + SankeyNetworkDataSource dataSource, + @JsonProperty(required = true, value = JSON_PROPERTY_GROUP_BY) List groupBy, + @JsonProperty(required = true, value = JSON_PROPERTY_LIMIT) Long limit, + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY_STRING) String queryString) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.groupBy = groupBy; + this.limit = limit; + this.queryString = queryString; + } + + public SankeyNetworkQuery compute(SankeyNetworkQueryCompute compute) { + this.compute = compute; + this.unparsed |= compute.unparsed; + return this; + } + + /** + * Compute aggregation for network queries. + * + * @return compute + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COMPUTE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SankeyNetworkQueryCompute getCompute() { + return compute; + } + + public void setCompute(SankeyNetworkQueryCompute compute) { + this.compute = compute; + } + + public SankeyNetworkQuery dataSource(SankeyNetworkDataSource dataSource) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + return this; + } + + /** + * Network data source type. + * + * @return dataSource + */ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SankeyNetworkDataSource getDataSource() { + return dataSource; + } + + public void setDataSource(SankeyNetworkDataSource dataSource) { + if (!dataSource.isValid()) { + this.unparsed = true; + } + this.dataSource = dataSource; + } + + public SankeyNetworkQuery groupBy(List groupBy) { + this.groupBy = groupBy; + return this; + } + + public SankeyNetworkQuery addGroupByItem(String groupByItem) { + this.groupBy.add(groupByItem); + return this; + } + + /** + * Fields to group by. + * + * @return groupBy + */ + @JsonProperty(JSON_PROPERTY_GROUP_BY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getGroupBy() { + return groupBy; + } + + public void setGroupBy(List groupBy) { + this.groupBy = groupBy; + } + + public SankeyNetworkQuery limit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Maximum number of results. + * + * @return limit + */ + @JsonProperty(JSON_PROPERTY_LIMIT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getLimit() { + return limit; + } + + public void setLimit(Long limit) { + this.limit = limit; + } + + public SankeyNetworkQuery mode(SankeyNetworkQueryMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Sankey mode for network queries. + * + * @return mode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SankeyNetworkQueryMode getMode() { + return mode; + } + + public void setMode(SankeyNetworkQueryMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public SankeyNetworkQuery queryString(String queryString) { + this.queryString = queryString; + return this; + } + + /** + * Query string for filtering network data. + * + * @return queryString + */ + @JsonProperty(JSON_PROPERTY_QUERY_STRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQueryString() { + return queryString; + } + + public void setQueryString(String queryString) { + this.queryString = queryString; + } + + public SankeyNetworkQuery shouldExcludeMissing(Boolean shouldExcludeMissing) { + this.shouldExcludeMissing = shouldExcludeMissing; + return this; + } + + /** + * Whether to exclude missing values. + * + * @return shouldExcludeMissing + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOULD_EXCLUDE_MISSING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShouldExcludeMissing() { + return shouldExcludeMissing; + } + + public void setShouldExcludeMissing(Boolean shouldExcludeMissing) { + this.shouldExcludeMissing = shouldExcludeMissing; + } + + public SankeyNetworkQuery sort(SankeyNetworkQuerySort sort) { + this.sort = sort; + this.unparsed |= sort.unparsed; + return this; + } + + /** + * Sort configuration for network queries. + * + * @return sort + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SankeyNetworkQuerySort getSort() { + return sort; + } + + public void setSort(SankeyNetworkQuerySort sort) { + this.sort = sort; + } + + /** Return true if this SankeyNetworkQuery object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SankeyNetworkQuery sankeyNetworkQuery = (SankeyNetworkQuery) o; + return Objects.equals(this.compute, sankeyNetworkQuery.compute) + && Objects.equals(this.dataSource, sankeyNetworkQuery.dataSource) + && Objects.equals(this.groupBy, sankeyNetworkQuery.groupBy) + && Objects.equals(this.limit, sankeyNetworkQuery.limit) + && Objects.equals(this.mode, sankeyNetworkQuery.mode) + && Objects.equals(this.queryString, sankeyNetworkQuery.queryString) + && Objects.equals(this.shouldExcludeMissing, sankeyNetworkQuery.shouldExcludeMissing) + && Objects.equals(this.sort, sankeyNetworkQuery.sort); + } + + @Override + public int hashCode() { + return Objects.hash( + compute, dataSource, groupBy, limit, mode, queryString, shouldExcludeMissing, sort); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SankeyNetworkQuery {\n"); + sb.append(" compute: ").append(toIndentedString(compute)).append("\n"); + sb.append(" dataSource: ").append(toIndentedString(dataSource)).append("\n"); + sb.append(" groupBy: ").append(toIndentedString(groupBy)).append("\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" queryString: ").append(toIndentedString(queryString)).append("\n"); + sb.append(" shouldExcludeMissing: ") + .append(toIndentedString(shouldExcludeMissing)) + .append("\n"); + sb.append(" sort: ").append(toIndentedString(sort)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQueryCompute.java b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQueryCompute.java new file mode 100644 index 00000000000..95cdfe3083e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQueryCompute.java @@ -0,0 +1,122 @@ +/* + * 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.v1.model; + +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.Objects; + +/** Compute aggregation for network queries. */ +@JsonPropertyOrder({ + SankeyNetworkQueryCompute.JSON_PROPERTY_AGGREGATION, + SankeyNetworkQueryCompute.JSON_PROPERTY_METRIC +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SankeyNetworkQueryCompute { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AGGREGATION = "aggregation"; + private EventsAggregation aggregation; + + public static final String JSON_PROPERTY_METRIC = "metric"; + private String metric; + + public SankeyNetworkQueryCompute() {} + + @JsonCreator + public SankeyNetworkQueryCompute( + @JsonProperty(required = true, value = JSON_PROPERTY_AGGREGATION) + EventsAggregation aggregation, + @JsonProperty(required = true, value = JSON_PROPERTY_METRIC) String metric) { + this.aggregation = aggregation; + this.unparsed |= aggregation.unparsed; + this.metric = metric; + } + + public SankeyNetworkQueryCompute aggregation(EventsAggregation aggregation) { + this.aggregation = aggregation; + this.unparsed |= aggregation.unparsed; + return this; + } + + /** + * The type of aggregation that can be performed on events-based queries. + * + * @return aggregation + */ + @JsonProperty(JSON_PROPERTY_AGGREGATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EventsAggregation getAggregation() { + return aggregation; + } + + public void setAggregation(EventsAggregation aggregation) { + this.aggregation = aggregation; + } + + public SankeyNetworkQueryCompute metric(String metric) { + this.metric = metric; + return this; + } + + /** + * Metric to aggregate. + * + * @return metric + */ + @JsonProperty(JSON_PROPERTY_METRIC) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMetric() { + return metric; + } + + public void setMetric(String metric) { + this.metric = metric; + } + + /** Return true if this SankeyNetworkQueryCompute object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SankeyNetworkQueryCompute sankeyNetworkQueryCompute = (SankeyNetworkQueryCompute) o; + return Objects.equals(this.aggregation, sankeyNetworkQueryCompute.aggregation) + && Objects.equals(this.metric, sankeyNetworkQueryCompute.metric); + } + + @Override + public int hashCode() { + return Objects.hash(aggregation, metric); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SankeyNetworkQueryCompute {\n"); + sb.append(" aggregation: ").append(toIndentedString(aggregation)).append("\n"); + sb.append(" metric: ").append(toIndentedString(metric)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQueryMode.java b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQueryMode.java new file mode 100644 index 00000000000..2a39acf234c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQueryMode.java @@ -0,0 +1,55 @@ +/* + * 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.v1.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; + +/** Sankey mode for network queries. */ +@JsonSerialize(using = SankeyNetworkQueryMode.SankeyNetworkQueryModeSerializer.class) +public class SankeyNetworkQueryMode extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("target")); + + public static final SankeyNetworkQueryMode TARGET = new SankeyNetworkQueryMode("target"); + + SankeyNetworkQueryMode(String value) { + super(value, allowedValues); + } + + public static class SankeyNetworkQueryModeSerializer + extends StdSerializer { + public SankeyNetworkQueryModeSerializer(Class t) { + super(t); + } + + public SankeyNetworkQueryModeSerializer() { + this(null); + } + + @Override + public void serialize( + SankeyNetworkQueryMode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SankeyNetworkQueryMode fromValue(String value) { + return new SankeyNetworkQueryMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQuerySort.java b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQuerySort.java new file mode 100644 index 00000000000..2289c614029 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkQuerySort.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.v1.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; + +/** Sort configuration for network queries. */ +@JsonPropertyOrder({ + SankeyNetworkQuerySort.JSON_PROPERTY_FIELD, + SankeyNetworkQuerySort.JSON_PROPERTY_ORDER +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SankeyNetworkQuerySort { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FIELD = "field"; + private String field; + + public static final String JSON_PROPERTY_ORDER = "order"; + private WidgetSort order; + + public SankeyNetworkQuerySort field(String field) { + this.field = field; + return this; + } + + /** + * Field to sort by. + * + * @return field + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getField() { + return field; + } + + public void setField(String field) { + this.field = field; + } + + public SankeyNetworkQuerySort order(WidgetSort order) { + this.order = order; + this.unparsed |= !order.isValid(); + return this; + } + + /** + * Widget sorting methods. + * + * @return order + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORDER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public WidgetSort getOrder() { + return order; + } + + public void setOrder(WidgetSort order) { + if (!order.isValid()) { + this.unparsed = true; + } + this.order = order; + } + + /** + * 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 SankeyNetworkQuerySort + */ + @JsonAnySetter + public SankeyNetworkQuerySort 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 SankeyNetworkQuerySort object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SankeyNetworkQuerySort sankeyNetworkQuerySort = (SankeyNetworkQuerySort) o; + return Objects.equals(this.field, sankeyNetworkQuerySort.field) + && Objects.equals(this.order, sankeyNetworkQuerySort.order) + && Objects.equals(this.additionalProperties, sankeyNetworkQuerySort.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(field, order, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SankeyNetworkQuerySort {\n"); + sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" order: ").append(toIndentedString(order)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkRequest.java b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkRequest.java new file mode 100644 index 00000000000..3621c9d73e1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkRequest.java @@ -0,0 +1,127 @@ +/* + * 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.v1.model; + +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.Objects; + +/** Sankey widget request for network data source. */ +@JsonPropertyOrder({ + SankeyNetworkRequest.JSON_PROPERTY_QUERY, + SankeyNetworkRequest.JSON_PROPERTY_REQUEST_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SankeyNetworkRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_QUERY = "query"; + private SankeyNetworkQuery query; + + public static final String JSON_PROPERTY_REQUEST_TYPE = "request_type"; + private SankeyNetworkRequestType requestType = SankeyNetworkRequestType.NETFLOW_SANKEY; + + public SankeyNetworkRequest() {} + + @JsonCreator + public SankeyNetworkRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) SankeyNetworkQuery query, + @JsonProperty(required = true, value = JSON_PROPERTY_REQUEST_TYPE) + SankeyNetworkRequestType requestType) { + this.query = query; + this.unparsed |= query.unparsed; + this.requestType = requestType; + this.unparsed |= !requestType.isValid(); + } + + public SankeyNetworkRequest query(SankeyNetworkQuery query) { + this.query = query; + this.unparsed |= query.unparsed; + return this; + } + + /** + * Query configuration for Sankey network widget. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SankeyNetworkQuery getQuery() { + return query; + } + + public void setQuery(SankeyNetworkQuery query) { + this.query = query; + } + + public SankeyNetworkRequest requestType(SankeyNetworkRequestType requestType) { + this.requestType = requestType; + this.unparsed |= !requestType.isValid(); + return this; + } + + /** + * Type of request for network Sankey widget. + * + * @return requestType + */ + @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SankeyNetworkRequestType getRequestType() { + return requestType; + } + + public void setRequestType(SankeyNetworkRequestType requestType) { + if (!requestType.isValid()) { + this.unparsed = true; + } + this.requestType = requestType; + } + + /** Return true if this SankeyNetworkRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SankeyNetworkRequest sankeyNetworkRequest = (SankeyNetworkRequest) o; + return Objects.equals(this.query, sankeyNetworkRequest.query) + && Objects.equals(this.requestType, sankeyNetworkRequest.requestType); + } + + @Override + public int hashCode() { + return Objects.hash(query, requestType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SankeyNetworkRequest {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" requestType: ").append(toIndentedString(requestType)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkRequestType.java b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkRequestType.java new file mode 100644 index 00000000000..0aaa67d47c6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyNetworkRequestType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v1.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; + +/** Type of request for network Sankey widget. */ +@JsonSerialize(using = SankeyNetworkRequestType.SankeyNetworkRequestTypeSerializer.class) +public class SankeyNetworkRequestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("netflow_sankey")); + + public static final SankeyNetworkRequestType NETFLOW_SANKEY = + new SankeyNetworkRequestType("netflow_sankey"); + + SankeyNetworkRequestType(String value) { + super(value, allowedValues); + } + + public static class SankeyNetworkRequestTypeSerializer + extends StdSerializer { + public SankeyNetworkRequestTypeSerializer(Class t) { + super(t); + } + + public SankeyNetworkRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SankeyNetworkRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SankeyNetworkRequestType fromValue(String value) { + return new SankeyNetworkRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyRumDataSource.java b/src/main/java/com/datadog/api/client/v1/model/SankeyRumDataSource.java new file mode 100644 index 00000000000..33e74df4d8d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyRumDataSource.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v1.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; + +/** Sankey widget with RUM data source. */ +@JsonSerialize(using = SankeyRumDataSource.SankeyRumDataSourceSerializer.class) +public class SankeyRumDataSource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("rum", "product_analytics")); + + public static final SankeyRumDataSource RUM = new SankeyRumDataSource("rum"); + public static final SankeyRumDataSource PRODUCT_ANALYTICS = + new SankeyRumDataSource("product_analytics"); + + SankeyRumDataSource(String value) { + super(value, allowedValues); + } + + public static class SankeyRumDataSourceSerializer extends StdSerializer { + public SankeyRumDataSourceSerializer(Class t) { + super(t); + } + + public SankeyRumDataSourceSerializer() { + this(null); + } + + @Override + public void serialize( + SankeyRumDataSource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SankeyRumDataSource fromValue(String value) { + return new SankeyRumDataSource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyRumQuery.java b/src/main/java/com/datadog/api/client/v1/model/SankeyRumQuery.java new file mode 100644 index 00000000000..1152f17740b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyRumQuery.java @@ -0,0 +1,388 @@ +/* + * 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.v1.model; + +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.Objects; + +/** Sankey widget with RUM data source query. */ +@JsonPropertyOrder({ + SankeyRumQuery.JSON_PROPERTY_AUDIENCE_FILTERS, + SankeyRumQuery.JSON_PROPERTY_DATA_SOURCE, + SankeyRumQuery.JSON_PROPERTY_ENTRIES_PER_STEP, + SankeyRumQuery.JSON_PROPERTY_JOIN_KEYS, + SankeyRumQuery.JSON_PROPERTY_MODE, + SankeyRumQuery.JSON_PROPERTY_NUMBER_OF_STEPS, + SankeyRumQuery.JSON_PROPERTY_OCCURRENCES, + SankeyRumQuery.JSON_PROPERTY_QUERY_STRING, + SankeyRumQuery.JSON_PROPERTY_SOURCE, + SankeyRumQuery.JSON_PROPERTY_SUBQUERY_ID, + SankeyRumQuery.JSON_PROPERTY_TARGET +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SankeyRumQuery { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUDIENCE_FILTERS = "audience_filters"; + private ProductAnalyticsAudienceFilters audienceFilters; + + public static final String JSON_PROPERTY_DATA_SOURCE = "data_source"; + private SankeyRumDataSource dataSource = SankeyRumDataSource.RUM; + + public static final String JSON_PROPERTY_ENTRIES_PER_STEP = "entries_per_step"; + private Long entriesPerStep; + + public static final String JSON_PROPERTY_JOIN_KEYS = "join_keys"; + private SankeyJoinKeys joinKeys; + + public static final String JSON_PROPERTY_MODE = "mode"; + private SankeyRumQueryMode mode = SankeyRumQueryMode.SOURCE; + + public static final String JSON_PROPERTY_NUMBER_OF_STEPS = "number_of_steps"; + private Long numberOfSteps; + + public static final String JSON_PROPERTY_OCCURRENCES = "occurrences"; + private ProductAnalyticsAudienceOccurrenceFilter occurrences; + + public static final String JSON_PROPERTY_QUERY_STRING = "query_string"; + private String queryString; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private String source; + + public static final String JSON_PROPERTY_SUBQUERY_ID = "subquery_id"; + private String subqueryId; + + public static final String JSON_PROPERTY_TARGET = "target"; + private String target; + + public SankeyRumQuery() {} + + @JsonCreator + public SankeyRumQuery( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE) + SankeyRumDataSource dataSource, + @JsonProperty(required = true, value = JSON_PROPERTY_MODE) SankeyRumQueryMode mode, + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY_STRING) String queryString) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + this.mode = mode; + this.unparsed |= !mode.isValid(); + this.queryString = queryString; + } + + public SankeyRumQuery audienceFilters(ProductAnalyticsAudienceFilters audienceFilters) { + this.audienceFilters = audienceFilters; + this.unparsed |= audienceFilters.unparsed; + return this; + } + + /** + * Product Analytics/RUM audience filters. + * + * @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 SankeyRumQuery dataSource(SankeyRumDataSource dataSource) { + this.dataSource = dataSource; + this.unparsed |= !dataSource.isValid(); + return this; + } + + /** + * Sankey widget with RUM data source. + * + * @return dataSource + */ + @JsonProperty(JSON_PROPERTY_DATA_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SankeyRumDataSource getDataSource() { + return dataSource; + } + + public void setDataSource(SankeyRumDataSource dataSource) { + if (!dataSource.isValid()) { + this.unparsed = true; + } + this.dataSource = dataSource; + } + + public SankeyRumQuery entriesPerStep(Long entriesPerStep) { + this.entriesPerStep = entriesPerStep; + return this; + } + + /** + * Entries per step. + * + * @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 SankeyRumQuery joinKeys(SankeyJoinKeys joinKeys) { + this.joinKeys = joinKeys; + this.unparsed |= joinKeys.unparsed; + return this; + } + + /** + * Join keys. + * + * @return joinKeys + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_JOIN_KEYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SankeyJoinKeys getJoinKeys() { + return joinKeys; + } + + public void setJoinKeys(SankeyJoinKeys joinKeys) { + this.joinKeys = joinKeys; + } + + public SankeyRumQuery mode(SankeyRumQueryMode mode) { + this.mode = mode; + this.unparsed |= !mode.isValid(); + return this; + } + + /** + * Sankey mode for RUM queries. + * + * @return mode + */ + @JsonProperty(JSON_PROPERTY_MODE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SankeyRumQueryMode getMode() { + return mode; + } + + public void setMode(SankeyRumQueryMode mode) { + if (!mode.isValid()) { + this.unparsed = true; + } + this.mode = mode; + } + + public SankeyRumQuery numberOfSteps(Long numberOfSteps) { + this.numberOfSteps = numberOfSteps; + return this; + } + + /** + * Number of steps. + * + * @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 SankeyRumQuery occurrences(ProductAnalyticsAudienceOccurrenceFilter occurrences) { + this.occurrences = occurrences; + this.unparsed |= occurrences.unparsed; + return this; + } + + /** + * Getoccurrences + * + * @return occurrences + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OCCURRENCES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ProductAnalyticsAudienceOccurrenceFilter getOccurrences() { + return occurrences; + } + + public void setOccurrences(ProductAnalyticsAudienceOccurrenceFilter occurrences) { + this.occurrences = occurrences; + } + + public SankeyRumQuery queryString(String queryString) { + this.queryString = queryString; + return this; + } + + /** + * Query string. + * + * @return queryString + */ + @JsonProperty(JSON_PROPERTY_QUERY_STRING) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getQueryString() { + return queryString; + } + + public void setQueryString(String queryString) { + this.queryString = queryString; + } + + public SankeyRumQuery source(String source) { + this.source = source; + return this; + } + + /** + * Source. + * + * @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 SankeyRumQuery subqueryId(String subqueryId) { + this.subqueryId = subqueryId; + return this; + } + + /** + * Subquery ID. + * + * @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; + } + + public SankeyRumQuery target(String target) { + this.target = target; + return this; + } + + /** + * Target. + * + * @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; + } + + /** Return true if this SankeyRumQuery object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SankeyRumQuery sankeyRumQuery = (SankeyRumQuery) o; + return Objects.equals(this.audienceFilters, sankeyRumQuery.audienceFilters) + && Objects.equals(this.dataSource, sankeyRumQuery.dataSource) + && Objects.equals(this.entriesPerStep, sankeyRumQuery.entriesPerStep) + && Objects.equals(this.joinKeys, sankeyRumQuery.joinKeys) + && Objects.equals(this.mode, sankeyRumQuery.mode) + && Objects.equals(this.numberOfSteps, sankeyRumQuery.numberOfSteps) + && Objects.equals(this.occurrences, sankeyRumQuery.occurrences) + && Objects.equals(this.queryString, sankeyRumQuery.queryString) + && Objects.equals(this.source, sankeyRumQuery.source) + && Objects.equals(this.subqueryId, sankeyRumQuery.subqueryId) + && Objects.equals(this.target, sankeyRumQuery.target); + } + + @Override + public int hashCode() { + return Objects.hash( + audienceFilters, + dataSource, + entriesPerStep, + joinKeys, + mode, + numberOfSteps, + occurrences, + queryString, + source, + subqueryId, + target); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SankeyRumQuery {\n"); + sb.append(" audienceFilters: ").append(toIndentedString(audienceFilters)).append("\n"); + sb.append(" dataSource: ").append(toIndentedString(dataSource)).append("\n"); + sb.append(" entriesPerStep: ").append(toIndentedString(entriesPerStep)).append("\n"); + sb.append(" joinKeys: ").append(toIndentedString(joinKeys)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" numberOfSteps: ").append(toIndentedString(numberOfSteps)).append("\n"); + sb.append(" occurrences: ").append(toIndentedString(occurrences)).append("\n"); + sb.append(" queryString: ").append(toIndentedString(queryString)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" subqueryId: ").append(toIndentedString(subqueryId)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyRumQueryMode.java b/src/main/java/com/datadog/api/client/v1/model/SankeyRumQueryMode.java new file mode 100644 index 00000000000..00ce6864284 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyRumQueryMode.java @@ -0,0 +1,55 @@ +/* + * 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.v1.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; + +/** Sankey mode for RUM queries. */ +@JsonSerialize(using = SankeyRumQueryMode.SankeyRumQueryModeSerializer.class) +public class SankeyRumQueryMode extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("source", "target")); + + public static final SankeyRumQueryMode SOURCE = new SankeyRumQueryMode("source"); + public static final SankeyRumQueryMode TARGET = new SankeyRumQueryMode("target"); + + SankeyRumQueryMode(String value) { + super(value, allowedValues); + } + + public static class SankeyRumQueryModeSerializer extends StdSerializer { + public SankeyRumQueryModeSerializer(Class t) { + super(t); + } + + public SankeyRumQueryModeSerializer() { + this(null); + } + + @Override + public void serialize(SankeyRumQueryMode value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SankeyRumQueryMode fromValue(String value) { + return new SankeyRumQueryMode(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyRumRequest.java b/src/main/java/com/datadog/api/client/v1/model/SankeyRumRequest.java new file mode 100644 index 00000000000..8be9a9171da --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyRumRequest.java @@ -0,0 +1,127 @@ +/* + * 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.v1.model; + +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.Objects; + +/** Sankey widget with RUM data source. */ +@JsonPropertyOrder({ + SankeyRumRequest.JSON_PROPERTY_QUERY, + SankeyRumRequest.JSON_PROPERTY_REQUEST_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SankeyRumRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_QUERY = "query"; + private SankeyRumQuery query; + + public static final String JSON_PROPERTY_REQUEST_TYPE = "request_type"; + private SankeyWidgetDefinitionType requestType = SankeyWidgetDefinitionType.SANKEY; + + public SankeyRumRequest() {} + + @JsonCreator + public SankeyRumRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_QUERY) SankeyRumQuery query, + @JsonProperty(required = true, value = JSON_PROPERTY_REQUEST_TYPE) + SankeyWidgetDefinitionType requestType) { + this.query = query; + this.unparsed |= query.unparsed; + this.requestType = requestType; + this.unparsed |= !requestType.isValid(); + } + + public SankeyRumRequest query(SankeyRumQuery query) { + this.query = query; + this.unparsed |= query.unparsed; + return this; + } + + /** + * Sankey widget with RUM data source query. + * + * @return query + */ + @JsonProperty(JSON_PROPERTY_QUERY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SankeyRumQuery getQuery() { + return query; + } + + public void setQuery(SankeyRumQuery query) { + this.query = query; + } + + public SankeyRumRequest requestType(SankeyWidgetDefinitionType requestType) { + this.requestType = requestType; + this.unparsed |= !requestType.isValid(); + return this; + } + + /** + * Type of the Sankey widget. + * + * @return requestType + */ + @JsonProperty(JSON_PROPERTY_REQUEST_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SankeyWidgetDefinitionType getRequestType() { + return requestType; + } + + public void setRequestType(SankeyWidgetDefinitionType requestType) { + if (!requestType.isValid()) { + this.unparsed = true; + } + this.requestType = requestType; + } + + /** Return true if this SankeyRumRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SankeyRumRequest sankeyRumRequest = (SankeyRumRequest) o; + return Objects.equals(this.query, sankeyRumRequest.query) + && Objects.equals(this.requestType, sankeyRumRequest.requestType); + } + + @Override + public int hashCode() { + return Objects.hash(query, requestType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SankeyRumRequest {\n"); + sb.append(" query: ").append(toIndentedString(query)).append("\n"); + sb.append(" requestType: ").append(toIndentedString(requestType)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyWidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/SankeyWidgetDefinition.java new file mode 100644 index 00000000000..05e24e7f444 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyWidgetDefinition.java @@ -0,0 +1,304 @@ +/* + * 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.v1.model; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** The Sankey diagram visualizes the flow of data between categories, stages or sets of values. */ +@JsonPropertyOrder({ + SankeyWidgetDefinition.JSON_PROPERTY_REQUESTS, + SankeyWidgetDefinition.JSON_PROPERTY_SHOW_OTHER_LINKS, + SankeyWidgetDefinition.JSON_PROPERTY_SORT_NODES, + SankeyWidgetDefinition.JSON_PROPERTY_TIME, + SankeyWidgetDefinition.JSON_PROPERTY_TITLE, + SankeyWidgetDefinition.JSON_PROPERTY_TITLE_ALIGN, + SankeyWidgetDefinition.JSON_PROPERTY_TITLE_SIZE, + SankeyWidgetDefinition.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SankeyWidgetDefinition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_REQUESTS = "requests"; + private List requests = new ArrayList<>(); + + public static final String JSON_PROPERTY_SHOW_OTHER_LINKS = "show_other_links"; + private Boolean showOtherLinks; + + public static final String JSON_PROPERTY_SORT_NODES = "sort_nodes"; + private Boolean sortNodes; + + public static final String JSON_PROPERTY_TIME = "time"; + private WidgetTime time; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_TITLE_ALIGN = "title_align"; + private WidgetTextAlign titleAlign; + + public static final String JSON_PROPERTY_TITLE_SIZE = "title_size"; + private String titleSize; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SankeyWidgetDefinitionType type = SankeyWidgetDefinitionType.SANKEY; + + public SankeyWidgetDefinition() {} + + @JsonCreator + public SankeyWidgetDefinition( + @JsonProperty(required = true, value = JSON_PROPERTY_REQUESTS) + List requests, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SankeyWidgetDefinitionType type) { + this.requests = requests; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SankeyWidgetDefinition requests(List requests) { + this.requests = requests; + for (SankeyWidgetRequest item : requests) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SankeyWidgetDefinition addRequestsItem(SankeyWidgetRequest requestsItem) { + this.requests.add(requestsItem); + this.unparsed |= requestsItem.unparsed; + return this; + } + + /** + * List of Sankey widget requests. + * + * @return requests + */ + @JsonProperty(JSON_PROPERTY_REQUESTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getRequests() { + return requests; + } + + public void setRequests(List requests) { + this.requests = requests; + } + + public SankeyWidgetDefinition showOtherLinks(Boolean showOtherLinks) { + this.showOtherLinks = showOtherLinks; + return this; + } + + /** + * Whether to show links for "other" category. + * + * @return showOtherLinks + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHOW_OTHER_LINKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getShowOtherLinks() { + return showOtherLinks; + } + + public void setShowOtherLinks(Boolean showOtherLinks) { + this.showOtherLinks = showOtherLinks; + } + + public SankeyWidgetDefinition sortNodes(Boolean sortNodes) { + this.sortNodes = sortNodes; + return this; + } + + /** + * Whether to sort nodes in the Sankey diagram. + * + * @return sortNodes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SORT_NODES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSortNodes() { + return sortNodes; + } + + public void setSortNodes(Boolean sortNodes) { + this.sortNodes = sortNodes; + } + + public SankeyWidgetDefinition time(WidgetTime time) { + this.time = time; + this.unparsed |= time.unparsed; + return this; + } + + /** + * Time setting for the widget. + * + * @return time + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTime getTime() { + return time; + } + + public void setTime(WidgetTime time) { + this.time = time; + } + + public SankeyWidgetDefinition title(String title) { + this.title = title; + return this; + } + + /** + * Title of your widget. + * + * @return title + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public SankeyWidgetDefinition titleAlign(WidgetTextAlign titleAlign) { + this.titleAlign = titleAlign; + this.unparsed |= !titleAlign.isValid(); + return this; + } + + /** + * How to align the text on the widget. + * + * @return titleAlign + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_ALIGN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public WidgetTextAlign getTitleAlign() { + return titleAlign; + } + + public void setTitleAlign(WidgetTextAlign titleAlign) { + if (!titleAlign.isValid()) { + this.unparsed = true; + } + this.titleAlign = titleAlign; + } + + public SankeyWidgetDefinition titleSize(String titleSize) { + this.titleSize = titleSize; + return this; + } + + /** + * Size of the title. + * + * @return titleSize + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitleSize() { + return titleSize; + } + + public void setTitleSize(String titleSize) { + this.titleSize = titleSize; + } + + public SankeyWidgetDefinition type(SankeyWidgetDefinitionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of the Sankey widget. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SankeyWidgetDefinitionType getType() { + return type; + } + + public void setType(SankeyWidgetDefinitionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** Return true if this SankeyWidgetDefinition object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SankeyWidgetDefinition sankeyWidgetDefinition = (SankeyWidgetDefinition) o; + return Objects.equals(this.requests, sankeyWidgetDefinition.requests) + && Objects.equals(this.showOtherLinks, sankeyWidgetDefinition.showOtherLinks) + && Objects.equals(this.sortNodes, sankeyWidgetDefinition.sortNodes) + && Objects.equals(this.time, sankeyWidgetDefinition.time) + && Objects.equals(this.title, sankeyWidgetDefinition.title) + && Objects.equals(this.titleAlign, sankeyWidgetDefinition.titleAlign) + && Objects.equals(this.titleSize, sankeyWidgetDefinition.titleSize) + && Objects.equals(this.type, sankeyWidgetDefinition.type); + } + + @Override + public int hashCode() { + return Objects.hash( + requests, showOtherLinks, sortNodes, time, title, titleAlign, titleSize, type); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SankeyWidgetDefinition {\n"); + sb.append(" requests: ").append(toIndentedString(requests)).append("\n"); + sb.append(" showOtherLinks: ").append(toIndentedString(showOtherLinks)).append("\n"); + sb.append(" sortNodes: ").append(toIndentedString(sortNodes)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" titleAlign: ").append(toIndentedString(titleAlign)).append("\n"); + sb.append(" titleSize: ").append(toIndentedString(titleSize)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyWidgetDefinitionType.java b/src/main/java/com/datadog/api/client/v1/model/SankeyWidgetDefinitionType.java new file mode 100644 index 00000000000..67222b484f1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyWidgetDefinitionType.java @@ -0,0 +1,55 @@ +/* + * 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.v1.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; + +/** Type of the Sankey widget. */ +@JsonSerialize(using = SankeyWidgetDefinitionType.SankeyWidgetDefinitionTypeSerializer.class) +public class SankeyWidgetDefinitionType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("sankey")); + + public static final SankeyWidgetDefinitionType SANKEY = new SankeyWidgetDefinitionType("sankey"); + + SankeyWidgetDefinitionType(String value) { + super(value, allowedValues); + } + + public static class SankeyWidgetDefinitionTypeSerializer + extends StdSerializer { + public SankeyWidgetDefinitionTypeSerializer(Class t) { + super(t); + } + + public SankeyWidgetDefinitionTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SankeyWidgetDefinitionType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SankeyWidgetDefinitionType fromValue(String value) { + return new SankeyWidgetDefinitionType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/SankeyWidgetRequest.java b/src/main/java/com/datadog/api/client/v1/model/SankeyWidgetRequest.java new file mode 100644 index 00000000000..e5d8138e358 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v1/model/SankeyWidgetRequest.java @@ -0,0 +1,277 @@ +/* + * 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.v1.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = SankeyWidgetRequest.SankeyWidgetRequestDeserializer.class) +@JsonSerialize(using = SankeyWidgetRequest.SankeyWidgetRequestSerializer.class) +public class SankeyWidgetRequest extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(SankeyWidgetRequest.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class SankeyWidgetRequestSerializer extends StdSerializer { + public SankeyWidgetRequestSerializer(Class t) { + super(t); + } + + public SankeyWidgetRequestSerializer() { + this(null); + } + + @Override + public void serialize( + SankeyWidgetRequest value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class SankeyWidgetRequestDeserializer extends StdDeserializer { + public SankeyWidgetRequestDeserializer() { + this(SankeyWidgetRequest.class); + } + + public SankeyWidgetRequestDeserializer(Class vc) { + super(vc); + } + + @Override + public SankeyWidgetRequest deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize SankeyRumRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SankeyRumRequest.class.equals(Integer.class) + || SankeyRumRequest.class.equals(Long.class) + || SankeyRumRequest.class.equals(Float.class) + || SankeyRumRequest.class.equals(Double.class) + || SankeyRumRequest.class.equals(Boolean.class) + || SankeyRumRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SankeyRumRequest.class.equals(Integer.class) + || SankeyRumRequest.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SankeyRumRequest.class.equals(Float.class) + || SankeyRumRequest.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SankeyRumRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SankeyRumRequest.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SankeyRumRequest.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SankeyRumRequest) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SankeyRumRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SankeyRumRequest'", e); + } + + // deserialize SankeyNetworkRequest + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SankeyNetworkRequest.class.equals(Integer.class) + || SankeyNetworkRequest.class.equals(Long.class) + || SankeyNetworkRequest.class.equals(Float.class) + || SankeyNetworkRequest.class.equals(Double.class) + || SankeyNetworkRequest.class.equals(Boolean.class) + || SankeyNetworkRequest.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SankeyNetworkRequest.class.equals(Integer.class) + || SankeyNetworkRequest.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SankeyNetworkRequest.class.equals(Float.class) + || SankeyNetworkRequest.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SankeyNetworkRequest.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SankeyNetworkRequest.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SankeyNetworkRequest.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SankeyNetworkRequest) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SankeyNetworkRequest'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SankeyNetworkRequest'", e); + } + + SankeyWidgetRequest ret = new SankeyWidgetRequest(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public SankeyWidgetRequest getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "SankeyWidgetRequest cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public SankeyWidgetRequest() { + super("oneOf", Boolean.FALSE); + } + + public SankeyWidgetRequest(SankeyRumRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public SankeyWidgetRequest(SankeyNetworkRequest o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("SankeyRumRequest", new GenericType() {}); + schemas.put("SankeyNetworkRequest", new GenericType() {}); + JSON.registerDescendants(SankeyWidgetRequest.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return SankeyWidgetRequest.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: SankeyRumRequest, SankeyNetworkRequest + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(SankeyRumRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(SankeyNetworkRequest.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( + "Invalid instance type. Must be SankeyRumRequest, SankeyNetworkRequest"); + } + + /** + * Get the actual instance, which can be the following: SankeyRumRequest, SankeyNetworkRequest + * + * @return The actual instance (SankeyRumRequest, SankeyNetworkRequest) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `SankeyRumRequest`. If the actual instance is not + * `SankeyRumRequest`, the ClassCastException will be thrown. + * + * @return The actual instance of `SankeyRumRequest` + * @throws ClassCastException if the instance is not `SankeyRumRequest` + */ + public SankeyRumRequest getSankeyRumRequest() throws ClassCastException { + return (SankeyRumRequest) super.getActualInstance(); + } + + /** + * Get the actual instance of `SankeyNetworkRequest`. If the actual instance is not + * `SankeyNetworkRequest`, the ClassCastException will be thrown. + * + * @return The actual instance of `SankeyNetworkRequest` + * @throws ClassCastException if the instance is not `SankeyNetworkRequest` + */ + public SankeyNetworkRequest getSankeyNetworkRequest() throws ClassCastException { + return (SankeyNetworkRequest) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v1/model/WidgetDefinition.java b/src/main/java/com/datadog/api/client/v1/model/WidgetDefinition.java index 7bd6b9a257c..5bef4a6c424 100644 --- a/src/main/java/com/datadog/api/client/v1/model/WidgetDefinition.java +++ b/src/main/java/com/datadog/api/client/v1/model/WidgetDefinition.java @@ -1202,6 +1202,51 @@ public WidgetDefinition deserialize(JsonParser jp, DeserializationContext ctxt) log.log(Level.FINER, "Input data does not match schema 'ScatterPlotWidgetDefinition'", e); } + // deserialize SankeyWidgetDefinition + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (SankeyWidgetDefinition.class.equals(Integer.class) + || SankeyWidgetDefinition.class.equals(Long.class) + || SankeyWidgetDefinition.class.equals(Float.class) + || SankeyWidgetDefinition.class.equals(Double.class) + || SankeyWidgetDefinition.class.equals(Boolean.class) + || SankeyWidgetDefinition.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((SankeyWidgetDefinition.class.equals(Integer.class) + || SankeyWidgetDefinition.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((SankeyWidgetDefinition.class.equals(Float.class) + || SankeyWidgetDefinition.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (SankeyWidgetDefinition.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (SankeyWidgetDefinition.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(SankeyWidgetDefinition.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((SankeyWidgetDefinition) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'SankeyWidgetDefinition'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'SankeyWidgetDefinition'", e); + } + // deserialize ServiceMapWidgetDefinition try { boolean attemptParsing = true; @@ -1761,6 +1806,11 @@ public WidgetDefinition(ScatterPlotWidgetDefinition o) { setActualInstance(o); } + public WidgetDefinition(SankeyWidgetDefinition o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + public WidgetDefinition(ServiceMapWidgetDefinition o) { super("oneOf", Boolean.FALSE); setActualInstance(o); @@ -1834,6 +1884,7 @@ public WidgetDefinition(TreeMapWidgetDefinition o) { schemas.put("SLOListWidgetDefinition", new GenericType() {}); schemas.put("SLOWidgetDefinition", new GenericType() {}); schemas.put("ScatterPlotWidgetDefinition", new GenericType() {}); + schemas.put("SankeyWidgetDefinition", new GenericType() {}); schemas.put("ServiceMapWidgetDefinition", new GenericType() {}); schemas.put( "ServiceSummaryWidgetDefinition", new GenericType() {}); @@ -1862,10 +1913,10 @@ public Map getSchemas() { * ListStreamWidgetDefinition, LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition, * NoteWidgetDefinition, PowerpackWidgetDefinition, QueryValueWidgetDefinition, * RunWorkflowWidgetDefinition, SLOListWidgetDefinition, SLOWidgetDefinition, - * ScatterPlotWidgetDefinition, ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition, - * SplitGraphWidgetDefinition, SunburstWidgetDefinition, TableWidgetDefinition, - * TimeseriesWidgetDefinition, ToplistWidgetDefinition, TopologyMapWidgetDefinition, - * TreeMapWidgetDefinition + * ScatterPlotWidgetDefinition, SankeyWidgetDefinition, ServiceMapWidgetDefinition, + * ServiceSummaryWidgetDefinition, SplitGraphWidgetDefinition, SunburstWidgetDefinition, + * TableWidgetDefinition, TimeseriesWidgetDefinition, ToplistWidgetDefinition, + * TopologyMapWidgetDefinition, TreeMapWidgetDefinition * *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a * composed schema (allOf, anyOf, oneOf). @@ -1973,6 +2024,10 @@ public void setActualInstance(Object instance) { super.setActualInstance(instance); return; } + if (JSON.isInstanceOf(SankeyWidgetDefinition.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } if (JSON.isInstanceOf(ServiceMapWidgetDefinition.class, instance, new HashSet>())) { super.setActualInstance(instance); return; @@ -2025,7 +2080,7 @@ public void setActualInstance(Object instance) { + " LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition, NoteWidgetDefinition," + " PowerpackWidgetDefinition, QueryValueWidgetDefinition, RunWorkflowWidgetDefinition," + " SLOListWidgetDefinition, SLOWidgetDefinition, ScatterPlotWidgetDefinition," - + " ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition," + + " SankeyWidgetDefinition, ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition," + " SplitGraphWidgetDefinition, SunburstWidgetDefinition, TableWidgetDefinition," + " TimeseriesWidgetDefinition, ToplistWidgetDefinition, TopologyMapWidgetDefinition," + " TreeMapWidgetDefinition"); @@ -2041,9 +2096,10 @@ public void setActualInstance(Object instance) { * LogStreamWidgetDefinition, MonitorSummaryWidgetDefinition, NoteWidgetDefinition, * PowerpackWidgetDefinition, QueryValueWidgetDefinition, RunWorkflowWidgetDefinition, * SLOListWidgetDefinition, SLOWidgetDefinition, ScatterPlotWidgetDefinition, - * ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition, SplitGraphWidgetDefinition, - * SunburstWidgetDefinition, TableWidgetDefinition, TimeseriesWidgetDefinition, - * ToplistWidgetDefinition, TopologyMapWidgetDefinition, TreeMapWidgetDefinition + * SankeyWidgetDefinition, ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition, + * SplitGraphWidgetDefinition, SunburstWidgetDefinition, TableWidgetDefinition, + * TimeseriesWidgetDefinition, ToplistWidgetDefinition, TopologyMapWidgetDefinition, + * TreeMapWidgetDefinition * * @return The actual instance (AlertGraphWidgetDefinition, AlertValueWidgetDefinition, * ChangeWidgetDefinition, CheckStatusWidgetDefinition, DistributionWidgetDefinition, @@ -2053,10 +2109,10 @@ public void setActualInstance(Object instance) { * ImageWidgetDefinition, ListStreamWidgetDefinition, LogStreamWidgetDefinition, * MonitorSummaryWidgetDefinition, NoteWidgetDefinition, PowerpackWidgetDefinition, * QueryValueWidgetDefinition, RunWorkflowWidgetDefinition, SLOListWidgetDefinition, - * SLOWidgetDefinition, ScatterPlotWidgetDefinition, ServiceMapWidgetDefinition, - * ServiceSummaryWidgetDefinition, SplitGraphWidgetDefinition, SunburstWidgetDefinition, - * TableWidgetDefinition, TimeseriesWidgetDefinition, ToplistWidgetDefinition, - * TopologyMapWidgetDefinition, TreeMapWidgetDefinition) + * SLOWidgetDefinition, ScatterPlotWidgetDefinition, SankeyWidgetDefinition, + * ServiceMapWidgetDefinition, ServiceSummaryWidgetDefinition, SplitGraphWidgetDefinition, + * SunburstWidgetDefinition, TableWidgetDefinition, TimeseriesWidgetDefinition, + * ToplistWidgetDefinition, TopologyMapWidgetDefinition, TreeMapWidgetDefinition) */ @Override public Object getActualInstance() { @@ -2340,6 +2396,17 @@ public ScatterPlotWidgetDefinition getScatterPlotWidgetDefinition() throws Class return (ScatterPlotWidgetDefinition) super.getActualInstance(); } + /** + * Get the actual instance of `SankeyWidgetDefinition`. If the actual instance is not + * `SankeyWidgetDefinition`, the ClassCastException will be thrown. + * + * @return The actual instance of `SankeyWidgetDefinition` + * @throws ClassCastException if the instance is not `SankeyWidgetDefinition` + */ + public SankeyWidgetDefinition getSankeyWidgetDefinition() throws ClassCastException { + return (SankeyWidgetDefinition) super.getActualInstance(); + } + /** * Get the actual instance of `ServiceMapWidgetDefinition`. If the actual instance is not * `ServiceMapWidgetDefinition`, the ClassCastException will be thrown. diff --git a/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java b/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java index 74172e6088e..4bcd3e5359e 100644 --- a/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java @@ -4,14 +4,16 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.DORADeploymentFetchResponse; import com.datadog.api.client.v2.model.DORADeploymentRequest; import com.datadog.api.client.v2.model.DORADeploymentResponse; +import com.datadog.api.client.v2.model.DORADeploymentsListResponse; +import com.datadog.api.client.v2.model.DORAFailureFetchResponse; import com.datadog.api.client.v2.model.DORAFailureRequest; import com.datadog.api.client.v2.model.DORAFailureResponse; -import com.datadog.api.client.v2.model.DORAFetchResponse; +import com.datadog.api.client.v2.model.DORAFailuresListResponse; import com.datadog.api.client.v2.model.DORAListDeploymentsRequest; import com.datadog.api.client.v2.model.DORAListFailuresRequest; -import com.datadog.api.client.v2.model.DORAListResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; @@ -741,10 +743,10 @@ public CompletableFuture> deleteDORAFailureWithHttpInfoAsync(S *

See {@link #getDORADeploymentWithHttpInfo}. * * @param deploymentId The ID of the deployment event. (required) - * @return DORAFetchResponse + * @return DORADeploymentFetchResponse * @throws ApiException if fails to make API call */ - public DORAFetchResponse getDORADeployment(String deploymentId) throws ApiException { + public DORADeploymentFetchResponse getDORADeployment(String deploymentId) throws ApiException { return getDORADeploymentWithHttpInfo(deploymentId).getData(); } @@ -754,9 +756,10 @@ public DORAFetchResponse getDORADeployment(String deploymentId) throws ApiExcept *

See {@link #getDORADeploymentWithHttpInfoAsync}. * * @param deploymentId The ID of the deployment event. (required) - * @return CompletableFuture<DORAFetchResponse> + * @return CompletableFuture<DORADeploymentFetchResponse> */ - public CompletableFuture getDORADeploymentAsync(String deploymentId) { + public CompletableFuture getDORADeploymentAsync( + String deploymentId) { return getDORADeploymentWithHttpInfoAsync(deploymentId) .thenApply( response -> { @@ -768,7 +771,7 @@ public CompletableFuture getDORADeploymentAsync(String deploy * Use this API endpoint to get a deployment event. * * @param deploymentId The ID of the deployment event. (required) - * @return ApiResponse<DORAFetchResponse> + * @return ApiResponse<DORADeploymentFetchResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -780,7 +783,7 @@ public CompletableFuture getDORADeploymentAsync(String deploy * *
429 Too many requests -
*/ - public ApiResponse getDORADeploymentWithHttpInfo(String deploymentId) + public ApiResponse getDORADeploymentWithHttpInfo(String deploymentId) throws ApiException { Object localVarPostBody = null; @@ -814,7 +817,7 @@ public ApiResponse getDORADeploymentWithHttpInfo(String deplo localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -823,15 +826,16 @@ public ApiResponse getDORADeploymentWithHttpInfo(String deplo *

See {@link #getDORADeploymentWithHttpInfo}. * * @param deploymentId The ID of the deployment event. (required) - * @return CompletableFuture<ApiResponse<DORAFetchResponse>> + * @return CompletableFuture<ApiResponse<DORADeploymentFetchResponse>> */ - public CompletableFuture> getDORADeploymentWithHttpInfoAsync( - String deploymentId) { + public CompletableFuture> + getDORADeploymentWithHttpInfoAsync(String deploymentId) { Object localVarPostBody = null; // verify the required parameter 'deploymentId' is set if (deploymentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'deploymentId' when calling getDORADeployment")); @@ -857,7 +861,8 @@ public CompletableFuture> getDORADeploymentWithHt new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -869,7 +874,7 @@ public CompletableFuture> getDORADeploymentWithHt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -878,10 +883,10 @@ public CompletableFuture> getDORADeploymentWithHt *

See {@link #getDORAFailureWithHttpInfo}. * * @param failureId The ID of the failure event. (required) - * @return DORAFetchResponse + * @return DORAFailureFetchResponse * @throws ApiException if fails to make API call */ - public DORAFetchResponse getDORAFailure(String failureId) throws ApiException { + public DORAFailureFetchResponse getDORAFailure(String failureId) throws ApiException { return getDORAFailureWithHttpInfo(failureId).getData(); } @@ -891,9 +896,9 @@ public DORAFetchResponse getDORAFailure(String failureId) throws ApiException { *

See {@link #getDORAFailureWithHttpInfoAsync}. * * @param failureId The ID of the failure event. (required) - * @return CompletableFuture<DORAFetchResponse> + * @return CompletableFuture<DORAFailureFetchResponse> */ - public CompletableFuture getDORAFailureAsync(String failureId) { + public CompletableFuture getDORAFailureAsync(String failureId) { return getDORAFailureWithHttpInfoAsync(failureId) .thenApply( response -> { @@ -905,7 +910,7 @@ public CompletableFuture getDORAFailureAsync(String failureId * Use this API endpoint to get a failure event. * * @param failureId The ID of the failure event. (required) - * @return ApiResponse<DORAFetchResponse> + * @return ApiResponse<DORAFailureFetchResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -917,7 +922,7 @@ public CompletableFuture getDORAFailureAsync(String failureId * *
429 Too many requests -
*/ - public ApiResponse getDORAFailureWithHttpInfo(String failureId) + public ApiResponse getDORAFailureWithHttpInfo(String failureId) throws ApiException { Object localVarPostBody = null; @@ -950,7 +955,7 @@ public ApiResponse getDORAFailureWithHttpInfo(String failureI localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -959,15 +964,15 @@ public ApiResponse getDORAFailureWithHttpInfo(String failureI *

See {@link #getDORAFailureWithHttpInfo}. * * @param failureId The ID of the failure event. (required) - * @return CompletableFuture<ApiResponse<DORAFetchResponse>> + * @return CompletableFuture<ApiResponse<DORAFailureFetchResponse>> */ - public CompletableFuture> getDORAFailureWithHttpInfoAsync( + public CompletableFuture> getDORAFailureWithHttpInfoAsync( String failureId) { Object localVarPostBody = null; // verify the required parameter 'failureId' is set if (failureId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'failureId' when calling getDORAFailure")); @@ -992,7 +997,7 @@ public CompletableFuture> getDORAFailureWithHttpI new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1004,7 +1009,7 @@ public CompletableFuture> getDORAFailureWithHttpI localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -1013,10 +1018,11 @@ public CompletableFuture> getDORAFailureWithHttpI *

See {@link #listDORADeploymentsWithHttpInfo}. * * @param body (required) - * @return DORAListResponse + * @return DORADeploymentsListResponse * @throws ApiException if fails to make API call */ - public DORAListResponse listDORADeployments(DORAListDeploymentsRequest body) throws ApiException { + public DORADeploymentsListResponse listDORADeployments(DORAListDeploymentsRequest body) + throws ApiException { return listDORADeploymentsWithHttpInfo(body).getData(); } @@ -1026,9 +1032,9 @@ public DORAListResponse listDORADeployments(DORAListDeploymentsRequest body) thr *

See {@link #listDORADeploymentsWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<DORAListResponse> + * @return CompletableFuture<DORADeploymentsListResponse> */ - public CompletableFuture listDORADeploymentsAsync( + public CompletableFuture listDORADeploymentsAsync( DORAListDeploymentsRequest body) { return listDORADeploymentsWithHttpInfoAsync(body) .thenApply( @@ -1041,7 +1047,7 @@ public CompletableFuture listDORADeploymentsAsync( * Use this API endpoint to get a list of deployment events. * * @param body (required) - * @return ApiResponse<DORAListResponse> + * @return ApiResponse<DORADeploymentsListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1053,7 +1059,7 @@ public CompletableFuture listDORADeploymentsAsync( * *
429 Too many requests -
*/ - public ApiResponse listDORADeploymentsWithHttpInfo( + public ApiResponse listDORADeploymentsWithHttpInfo( DORAListDeploymentsRequest body) throws ApiException { Object localVarPostBody = body; @@ -1084,7 +1090,7 @@ public ApiResponse listDORADeploymentsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -1093,15 +1099,16 @@ public ApiResponse listDORADeploymentsWithHttpInfo( *

See {@link #listDORADeploymentsWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<DORAListResponse>> + * @return CompletableFuture<ApiResponse<DORADeploymentsListResponse>> */ - public CompletableFuture> listDORADeploymentsWithHttpInfoAsync( - DORAListDeploymentsRequest body) { + public CompletableFuture> + listDORADeploymentsWithHttpInfoAsync(DORAListDeploymentsRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling listDORADeployments")); @@ -1124,7 +1131,8 @@ public CompletableFuture> listDORADeploymentsWithH new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1136,7 +1144,7 @@ public CompletableFuture> listDORADeploymentsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -1145,10 +1153,11 @@ public CompletableFuture> listDORADeploymentsWithH *

See {@link #listDORAFailuresWithHttpInfo}. * * @param body (required) - * @return DORAListResponse + * @return DORAFailuresListResponse * @throws ApiException if fails to make API call */ - public DORAListResponse listDORAFailures(DORAListFailuresRequest body) throws ApiException { + public DORAFailuresListResponse listDORAFailures(DORAListFailuresRequest body) + throws ApiException { return listDORAFailuresWithHttpInfo(body).getData(); } @@ -1158,9 +1167,10 @@ public DORAListResponse listDORAFailures(DORAListFailuresRequest body) throws Ap *

See {@link #listDORAFailuresWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<DORAListResponse> + * @return CompletableFuture<DORAFailuresListResponse> */ - public CompletableFuture listDORAFailuresAsync(DORAListFailuresRequest body) { + public CompletableFuture listDORAFailuresAsync( + DORAListFailuresRequest body) { return listDORAFailuresWithHttpInfoAsync(body) .thenApply( response -> { @@ -1172,7 +1182,7 @@ public CompletableFuture listDORAFailuresAsync(DORAListFailure * Use this API endpoint to get a list of failure events. * * @param body (required) - * @return ApiResponse<DORAListResponse> + * @return ApiResponse<DORAFailuresListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1184,8 +1194,8 @@ public CompletableFuture listDORAFailuresAsync(DORAListFailure * *
429 Too many requests -
*/ - public ApiResponse listDORAFailuresWithHttpInfo(DORAListFailuresRequest body) - throws ApiException { + public ApiResponse listDORAFailuresWithHttpInfo( + DORAListFailuresRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -1215,7 +1225,7 @@ public ApiResponse listDORAFailuresWithHttpInfo(DORAListFailur localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -1224,15 +1234,15 @@ public ApiResponse listDORAFailuresWithHttpInfo(DORAListFailur *

See {@link #listDORAFailuresWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<DORAListResponse>> + * @return CompletableFuture<ApiResponse<DORAFailuresListResponse>> */ - public CompletableFuture> listDORAFailuresWithHttpInfoAsync( + public CompletableFuture> listDORAFailuresWithHttpInfoAsync( DORAListFailuresRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling listDORAFailures")); @@ -1255,7 +1265,7 @@ public CompletableFuture> listDORAFailuresWithHttp new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1267,6 +1277,6 @@ public CompletableFuture> listDORAFailuresWithHttp localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } } diff --git a/src/main/java/com/datadog/api/client/v2/model/CaseCreateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/CaseCreateAttributes.java index 17d1094c02c..1d35f9fb34e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CaseCreateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/CaseCreateAttributes.java @@ -19,7 +19,6 @@ /** Case creation attributes */ @JsonPropertyOrder({ - CaseCreateAttributes.JSON_PROPERTY_CUSTOM_ATTRIBUTES, CaseCreateAttributes.JSON_PROPERTY_DESCRIPTION, CaseCreateAttributes.JSON_PROPERTY_PRIORITY, CaseCreateAttributes.JSON_PROPERTY_TITLE, @@ -29,9 +28,6 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CaseCreateAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_CUSTOM_ATTRIBUTES = "custom_attributes"; - private Map customAttributes = null; - public static final String JSON_PROPERTY_DESCRIPTION = "description"; private String description; @@ -54,36 +50,6 @@ public CaseCreateAttributes( this.typeId = typeId; } - public CaseCreateAttributes customAttributes(Map customAttributes) { - this.customAttributes = customAttributes; - return this; - } - - public CaseCreateAttributes putCustomAttributesItem( - String key, CustomAttributeValue customAttributesItem) { - if (this.customAttributes == null) { - this.customAttributes = new HashMap<>(); - } - this.customAttributes.put(key, customAttributesItem); - return this; - } - - /** - * Case custom attributes - * - * @return customAttributes - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CUSTOM_ATTRIBUTES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Map getCustomAttributes() { - return customAttributes; - } - - public void setCustomAttributes(Map customAttributes) { - this.customAttributes = customAttributes; - } - public CaseCreateAttributes description(String description) { this.description = description; return this; @@ -226,8 +192,7 @@ public boolean equals(Object o) { return false; } CaseCreateAttributes caseCreateAttributes = (CaseCreateAttributes) o; - return Objects.equals(this.customAttributes, caseCreateAttributes.customAttributes) - && Objects.equals(this.description, caseCreateAttributes.description) + return Objects.equals(this.description, caseCreateAttributes.description) && Objects.equals(this.priority, caseCreateAttributes.priority) && Objects.equals(this.title, caseCreateAttributes.title) && Objects.equals(this.typeId, caseCreateAttributes.typeId) @@ -236,15 +201,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash( - customAttributes, description, priority, title, typeId, additionalProperties); + return Objects.hash(description, priority, title, typeId, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CaseCreateAttributes {\n"); - sb.append(" customAttributes: ").append(toIndentedString(customAttributes)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/CustomAttributeType.java b/src/main/java/com/datadog/api/client/v2/model/CustomAttributeType.java index 006294fcda4..52453089872 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CustomAttributeType.java +++ b/src/main/java/com/datadog/api/client/v2/model/CustomAttributeType.java @@ -23,12 +23,11 @@ public class CustomAttributeType extends ModelEnum { private static final Set allowedValues = - new HashSet(Arrays.asList("URL", "TEXT", "NUMBER", "SELECT")); + new HashSet(Arrays.asList("URL", "TEXT", "NUMBER")); public static final CustomAttributeType URL = new CustomAttributeType("URL"); public static final CustomAttributeType TEXT = new CustomAttributeType("TEXT"); public static final CustomAttributeType NUMBER = new CustomAttributeType("NUMBER"); - public static final CustomAttributeType SELECT = new CustomAttributeType("SELECT"); CustomAttributeType(String value) { super(value, allowedValues); diff --git a/src/main/java/com/datadog/api/client/v2/model/DORADeploymentFetchResponse.java b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentFetchResponse.java new file mode 100644 index 00000000000..df8b7be5594 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentFetchResponse.java @@ -0,0 +1,137 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response for fetching a single deployment event. */ +@JsonPropertyOrder({DORADeploymentFetchResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORADeploymentFetchResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DORADeploymentObject data; + + public DORADeploymentFetchResponse data(DORADeploymentObject data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A DORA deployment event. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DORADeploymentObject getData() { + return data; + } + + public void setData(DORADeploymentObject 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 DORADeploymentFetchResponse + */ + @JsonAnySetter + public DORADeploymentFetchResponse 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 DORADeploymentFetchResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORADeploymentFetchResponse doraDeploymentFetchResponse = (DORADeploymentFetchResponse) o; + return Objects.equals(this.data, doraDeploymentFetchResponse.data) + && Objects.equals( + this.additionalProperties, doraDeploymentFetchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORADeploymentFetchResponse {\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/DORADeploymentObject.java b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentObject.java new file mode 100644 index 00000000000..eae9d3ebacf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentObject.java @@ -0,0 +1,196 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A DORA deployment event. */ +@JsonPropertyOrder({ + DORADeploymentObject.JSON_PROPERTY_ATTRIBUTES, + DORADeploymentObject.JSON_PROPERTY_ID, + DORADeploymentObject.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORADeploymentObject { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DORADeploymentObjectAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DORADeploymentType type = DORADeploymentType.DORA_DEPLOYMENT; + + public DORADeploymentObject attributes(DORADeploymentObjectAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of the deployment event. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DORADeploymentObjectAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DORADeploymentObjectAttributes attributes) { + this.attributes = attributes; + } + + public DORADeploymentObject id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the deployment event. + * + * @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 DORADeploymentObject type(DORADeploymentType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API type for DORA deployment events. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DORADeploymentType getType() { + return type; + } + + public void setType(DORADeploymentType 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 DORADeploymentObject + */ + @JsonAnySetter + public DORADeploymentObject 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 DORADeploymentObject object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORADeploymentObject doraDeploymentObject = (DORADeploymentObject) o; + return Objects.equals(this.attributes, doraDeploymentObject.attributes) + && Objects.equals(this.id, doraDeploymentObject.id) + && Objects.equals(this.type, doraDeploymentObject.type) + && Objects.equals(this.additionalProperties, doraDeploymentObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORADeploymentObject {\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/DORADeploymentObjectAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentObjectAttributes.java new file mode 100644 index 00000000000..7ca9d60809e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentObjectAttributes.java @@ -0,0 +1,366 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The attributes of the deployment event. */ +@JsonPropertyOrder({ + DORADeploymentObjectAttributes.JSON_PROPERTY_CUSTOM_TAGS, + DORADeploymentObjectAttributes.JSON_PROPERTY_ENV, + DORADeploymentObjectAttributes.JSON_PROPERTY_FINISHED_AT, + DORADeploymentObjectAttributes.JSON_PROPERTY_GIT, + DORADeploymentObjectAttributes.JSON_PROPERTY_SERVICE, + DORADeploymentObjectAttributes.JSON_PROPERTY_STARTED_AT, + DORADeploymentObjectAttributes.JSON_PROPERTY_TEAM, + DORADeploymentObjectAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORADeploymentObjectAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags"; + private JsonNullable> customTags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ENV = "env"; + private String env; + + public static final String JSON_PROPERTY_FINISHED_AT = "finished_at"; + private Long finishedAt; + + public static final String JSON_PROPERTY_GIT = "git"; + private DORAGitInfo git; + + public static final String JSON_PROPERTY_SERVICE = "service"; + private String service; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private Long startedAt; + + public static final String JSON_PROPERTY_TEAM = "team"; + private String team; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public DORADeploymentObjectAttributes() {} + + @JsonCreator + public DORADeploymentObjectAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_FINISHED_AT) Long finishedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service, + @JsonProperty(required = true, value = JSON_PROPERTY_STARTED_AT) Long startedAt) { + this.finishedAt = finishedAt; + this.service = service; + this.startedAt = startedAt; + } + + public DORADeploymentObjectAttributes customTags(List customTags) { + this.customTags = JsonNullable.>of(customTags); + return this; + } + + public DORADeploymentObjectAttributes addCustomTagsItem(String customTagsItem) { + if (this.customTags == null || !this.customTags.isPresent()) { + this.customTags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.customTags.get().add(customTagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * A list of user-defined tags. The tags must follow the key:value pattern. Up to 100 + * may be added per event. + * + * @return customTags + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getCustomTags() { + return customTags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getCustomTags_JsonNullable() { + return customTags; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + public void setCustomTags_JsonNullable(JsonNullable> customTags) { + this.customTags = customTags; + } + + public void setCustomTags(List customTags) { + this.customTags = JsonNullable.>of(customTags); + } + + public DORADeploymentObjectAttributes env(String env) { + this.env = env; + return this; + } + + /** + * Environment name to where the service was deployed. + * + * @return env + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEnv() { + return env; + } + + public void setEnv(String env) { + this.env = env; + } + + public DORADeploymentObjectAttributes finishedAt(Long finishedAt) { + this.finishedAt = finishedAt; + return this; + } + + /** + * Unix timestamp when the deployment finished. + * + * @return finishedAt + */ + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFinishedAt() { + return finishedAt; + } + + public void setFinishedAt(Long finishedAt) { + this.finishedAt = finishedAt; + } + + public DORADeploymentObjectAttributes git(DORAGitInfo git) { + this.git = git; + this.unparsed |= git.unparsed; + return this; + } + + /** + * Git info for DORA Metrics events. + * + * @return git + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DORAGitInfo getGit() { + return git; + } + + public void setGit(DORAGitInfo git) { + this.git = git; + } + + public DORADeploymentObjectAttributes service(String service) { + this.service = service; + return this; + } + + /** + * Service name. + * + * @return service + */ + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getService() { + return service; + } + + public void setService(String service) { + this.service = service; + } + + public DORADeploymentObjectAttributes startedAt(Long startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * Unix timestamp when the deployment started. + * + * @return startedAt + */ + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getStartedAt() { + return startedAt; + } + + public void setStartedAt(Long startedAt) { + this.startedAt = startedAt; + } + + public DORADeploymentObjectAttributes team(String team) { + this.team = team; + return this; + } + + /** + * Name of the team owning the deployed service. + * + * @return team + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTeam() { + return team; + } + + public void setTeam(String team) { + this.team = team; + } + + public DORADeploymentObjectAttributes version(String version) { + this.version = version; + return this; + } + + /** + * Version to correlate with APM Deployment Tracking. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * 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 DORADeploymentObjectAttributes + */ + @JsonAnySetter + public DORADeploymentObjectAttributes 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 DORADeploymentObjectAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORADeploymentObjectAttributes doraDeploymentObjectAttributes = + (DORADeploymentObjectAttributes) o; + return Objects.equals(this.customTags, doraDeploymentObjectAttributes.customTags) + && Objects.equals(this.env, doraDeploymentObjectAttributes.env) + && Objects.equals(this.finishedAt, doraDeploymentObjectAttributes.finishedAt) + && Objects.equals(this.git, doraDeploymentObjectAttributes.git) + && Objects.equals(this.service, doraDeploymentObjectAttributes.service) + && Objects.equals(this.startedAt, doraDeploymentObjectAttributes.startedAt) + && Objects.equals(this.team, doraDeploymentObjectAttributes.team) + && Objects.equals(this.version, doraDeploymentObjectAttributes.version) + && Objects.equals( + this.additionalProperties, doraDeploymentObjectAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + customTags, env, finishedAt, git, service, startedAt, team, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORADeploymentObjectAttributes {\n"); + sb.append(" customTags: ").append(toIndentedString(customTags)).append("\n"); + sb.append(" env: ").append(toIndentedString(env)).append("\n"); + sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n"); + sb.append(" git: ").append(toIndentedString(git)).append("\n"); + sb.append(" service: ").append(toIndentedString(service)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" team: ").append(toIndentedString(team)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/DORADeploymentsListResponse.java b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentsListResponse.java new file mode 100644 index 00000000000..eeb731b59ad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentsListResponse.java @@ -0,0 +1,150 @@ +/* + * 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; + +/** Response for the list deployments endpoint. */ +@JsonPropertyOrder({DORADeploymentsListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORADeploymentsListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public DORADeploymentsListResponse data(List data) { + this.data = data; + for (DORADeploymentObject item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DORADeploymentsListResponse addDataItem(DORADeploymentObject dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The list of DORA deployment events. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DORADeploymentsListResponse + */ + @JsonAnySetter + public DORADeploymentsListResponse 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 DORADeploymentsListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORADeploymentsListResponse doraDeploymentsListResponse = (DORADeploymentsListResponse) o; + return Objects.equals(this.data, doraDeploymentsListResponse.data) + && Objects.equals( + this.additionalProperties, doraDeploymentsListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORADeploymentsListResponse {\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/DORAFetchResponse.java b/src/main/java/com/datadog/api/client/v2/model/DORAFailureFetchResponse.java similarity index 79% rename from src/main/java/com/datadog/api/client/v2/model/DORAFetchResponse.java rename to src/main/java/com/datadog/api/client/v2/model/DORAFailureFetchResponse.java index b06321fae34..278530d0160 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DORAFetchResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/DORAFailureFetchResponse.java @@ -16,34 +16,34 @@ import java.util.Map; import java.util.Objects; -/** Response for the DORA fetch endpoints. */ -@JsonPropertyOrder({DORAFetchResponse.JSON_PROPERTY_DATA}) +/** Response for fetching a single failure event. */ +@JsonPropertyOrder({DORAFailureFetchResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class DORAFetchResponse { +public class DORAFailureFetchResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private DORAEvent data; + private DORAIncidentObject data; - public DORAFetchResponse data(DORAEvent data) { + public DORAFailureFetchResponse data(DORAIncidentObject data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * A DORA event. + * A DORA incident event. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DORAEvent getData() { + public DORAIncidentObject getData() { return data; } - public void setData(DORAEvent data) { + public void setData(DORAIncidentObject data) { this.data = data; } @@ -59,10 +59,10 @@ public void setData(DORAEvent data) { * * @param key The arbitrary key to set * @param value The associated value - * @return DORAFetchResponse + * @return DORAFailureFetchResponse */ @JsonAnySetter - public DORAFetchResponse putAdditionalProperty(String key, Object value) { + public DORAFailureFetchResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -93,7 +93,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this DORAFetchResponse object is equal to o. */ + /** Return true if this DORAFailureFetchResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,9 +102,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DORAFetchResponse doraFetchResponse = (DORAFetchResponse) o; - return Objects.equals(this.data, doraFetchResponse.data) - && Objects.equals(this.additionalProperties, doraFetchResponse.additionalProperties); + DORAFailureFetchResponse doraFailureFetchResponse = (DORAFailureFetchResponse) o; + return Objects.equals(this.data, doraFailureFetchResponse.data) + && Objects.equals(this.additionalProperties, doraFailureFetchResponse.additionalProperties); } @Override @@ -115,7 +115,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DORAFetchResponse {\n"); + sb.append("class DORAFailureFetchResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAListResponse.java b/src/main/java/com/datadog/api/client/v2/model/DORAFailuresListResponse.java similarity index 77% rename from src/main/java/com/datadog/api/client/v2/model/DORAListResponse.java rename to src/main/java/com/datadog/api/client/v2/model/DORAFailuresListResponse.java index 3199fd3b3a9..1860de0abf4 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DORAListResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/DORAFailuresListResponse.java @@ -18,24 +18,24 @@ import java.util.Map; import java.util.Objects; -/** Response for the DORA list endpoints. */ -@JsonPropertyOrder({DORAListResponse.JSON_PROPERTY_DATA}) +/** Response for the list failures endpoint. */ +@JsonPropertyOrder({DORAFailuresListResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class DORAListResponse { +public class DORAFailuresListResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = null; - public DORAListResponse data(List data) { + public DORAFailuresListResponse data(List data) { this.data = data; - for (DORAEvent item : data) { + for (DORAIncidentObject item : data) { this.unparsed |= item.unparsed; } return this; } - public DORAListResponse addDataItem(DORAEvent dataItem) { + public DORAFailuresListResponse addDataItem(DORAIncidentObject dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -45,18 +45,18 @@ public DORAListResponse addDataItem(DORAEvent dataItem) { } /** - * The list of DORA events. + * The list of DORA incident events. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { + public List getData() { return data; } - public void setData(List data) { + public void setData(List data) { this.data = data; } @@ -72,10 +72,10 @@ public void setData(List data) { * * @param key The arbitrary key to set * @param value The associated value - * @return DORAListResponse + * @return DORAFailuresListResponse */ @JsonAnySetter - public DORAListResponse putAdditionalProperty(String key, Object value) { + public DORAFailuresListResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -106,7 +106,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this DORAListResponse object is equal to o. */ + /** Return true if this DORAFailuresListResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -115,9 +115,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DORAListResponse doraListResponse = (DORAListResponse) o; - return Objects.equals(this.data, doraListResponse.data) - && Objects.equals(this.additionalProperties, doraListResponse.additionalProperties); + DORAFailuresListResponse doraFailuresListResponse = (DORAFailuresListResponse) o; + return Objects.equals(this.data, doraFailuresListResponse.data) + && Objects.equals(this.additionalProperties, doraFailuresListResponse.additionalProperties); } @Override @@ -128,7 +128,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DORAListResponse {\n"); + sb.append("class DORAFailuresListResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAEvent.java b/src/main/java/com/datadog/api/client/v2/model/DORAIncidentObject.java similarity index 73% rename from src/main/java/com/datadog/api/client/v2/model/DORAEvent.java rename to src/main/java/com/datadog/api/client/v2/model/DORAIncidentObject.java index 16d0764e0f1..31995912458 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DORAEvent.java +++ b/src/main/java/com/datadog/api/client/v2/model/DORAIncidentObject.java @@ -16,53 +16,54 @@ import java.util.Map; import java.util.Objects; -/** A DORA event. */ +/** A DORA incident event. */ @JsonPropertyOrder({ - DORAEvent.JSON_PROPERTY_ATTRIBUTES, - DORAEvent.JSON_PROPERTY_ID, - DORAEvent.JSON_PROPERTY_TYPE + DORAIncidentObject.JSON_PROPERTY_ATTRIBUTES, + DORAIncidentObject.JSON_PROPERTY_ID, + DORAIncidentObject.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class DORAEvent { +public class DORAIncidentObject { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private Object attributes; + private DORAIncidentObjectAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + private DORAFailureType type = DORAFailureType.DORA_FAILURE; - public DORAEvent attributes(Object attributes) { + public DORAIncidentObject attributes(DORAIncidentObjectAttributes attributes) { this.attributes = attributes; + this.unparsed |= attributes.unparsed; return this; } /** - * The attributes of the event. + * The attributes of the incident event. * * @return attributes */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getAttributes() { + public DORAIncidentObjectAttributes getAttributes() { return attributes; } - public void setAttributes(Object attributes) { + public void setAttributes(DORAIncidentObjectAttributes attributes) { this.attributes = attributes; } - public DORAEvent id(String id) { + public DORAIncidentObject id(String id) { this.id = id; return this; } /** - * The ID of the event. + * The ID of the incident event. * * @return id */ @@ -77,24 +78,28 @@ public void setId(String id) { this.id = id; } - public DORAEvent type(String type) { + public DORAIncidentObject type(DORAFailureType type) { this.type = type; + this.unparsed |= !type.isValid(); return this; } /** - * The type of the event. + * JSON:API type for DORA failure events. * * @return type */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { + public DORAFailureType getType() { return type; } - public void setType(String type) { + public void setType(DORAFailureType type) { + if (!type.isValid()) { + this.unparsed = true; + } this.type = type; } @@ -110,10 +115,10 @@ public void setType(String type) { * * @param key The arbitrary key to set * @param value The associated value - * @return DORAEvent + * @return DORAIncidentObject */ @JsonAnySetter - public DORAEvent putAdditionalProperty(String key, Object value) { + public DORAIncidentObject putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -144,7 +149,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this DORAEvent object is equal to o. */ + /** Return true if this DORAIncidentObject object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -153,11 +158,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DORAEvent doraEvent = (DORAEvent) o; - return Objects.equals(this.attributes, doraEvent.attributes) - && Objects.equals(this.id, doraEvent.id) - && Objects.equals(this.type, doraEvent.type) - && Objects.equals(this.additionalProperties, doraEvent.additionalProperties); + DORAIncidentObject doraIncidentObject = (DORAIncidentObject) o; + return Objects.equals(this.attributes, doraIncidentObject.attributes) + && Objects.equals(this.id, doraIncidentObject.id) + && Objects.equals(this.type, doraIncidentObject.type) + && Objects.equals(this.additionalProperties, doraIncidentObject.additionalProperties); } @Override @@ -168,7 +173,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DORAEvent {\n"); + sb.append("class DORAIncidentObject {\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"); diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAIncidentObjectAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DORAIncidentObjectAttributes.java new file mode 100644 index 00000000000..123a70da8ff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORAIncidentObjectAttributes.java @@ -0,0 +1,435 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The attributes of the incident event. */ +@JsonPropertyOrder({ + DORAIncidentObjectAttributes.JSON_PROPERTY_CUSTOM_TAGS, + DORAIncidentObjectAttributes.JSON_PROPERTY_ENV, + DORAIncidentObjectAttributes.JSON_PROPERTY_FINISHED_AT, + DORAIncidentObjectAttributes.JSON_PROPERTY_GIT, + DORAIncidentObjectAttributes.JSON_PROPERTY_NAME, + DORAIncidentObjectAttributes.JSON_PROPERTY_SERVICES, + DORAIncidentObjectAttributes.JSON_PROPERTY_SEVERITY, + DORAIncidentObjectAttributes.JSON_PROPERTY_STARTED_AT, + DORAIncidentObjectAttributes.JSON_PROPERTY_TEAM, + DORAIncidentObjectAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORAIncidentObjectAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags"; + private JsonNullable> customTags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ENV = "env"; + private String env; + + public static final String JSON_PROPERTY_FINISHED_AT = "finished_at"; + private Long finishedAt; + + public static final String JSON_PROPERTY_GIT = "git"; + private DORAGitInfo git; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SERVICES = "services"; + private List services = null; + + public static final String JSON_PROPERTY_SEVERITY = "severity"; + private String severity; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private Long startedAt; + + public static final String JSON_PROPERTY_TEAM = "team"; + private String team; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public DORAIncidentObjectAttributes() {} + + @JsonCreator + public DORAIncidentObjectAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_STARTED_AT) Long startedAt) { + this.startedAt = startedAt; + } + + public DORAIncidentObjectAttributes customTags(List customTags) { + this.customTags = JsonNullable.>of(customTags); + return this; + } + + public DORAIncidentObjectAttributes addCustomTagsItem(String customTagsItem) { + if (this.customTags == null || !this.customTags.isPresent()) { + this.customTags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.customTags.get().add(customTagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * A list of user-defined tags. The tags must follow the key:value pattern. Up to 100 + * may be added per event. + * + * @return customTags + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getCustomTags() { + return customTags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getCustomTags_JsonNullable() { + return customTags; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + public void setCustomTags_JsonNullable(JsonNullable> customTags) { + this.customTags = customTags; + } + + public void setCustomTags(List customTags) { + this.customTags = JsonNullable.>of(customTags); + } + + public DORAIncidentObjectAttributes env(String env) { + this.env = env; + return this; + } + + /** + * Environment name that was impacted by the incident. + * + * @return env + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEnv() { + return env; + } + + public void setEnv(String env) { + this.env = env; + } + + public DORAIncidentObjectAttributes finishedAt(Long finishedAt) { + this.finishedAt = finishedAt; + return this; + } + + /** + * Unix timestamp when the incident finished. + * + * @return finishedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFinishedAt() { + return finishedAt; + } + + public void setFinishedAt(Long finishedAt) { + this.finishedAt = finishedAt; + } + + public DORAIncidentObjectAttributes git(DORAGitInfo git) { + this.git = git; + this.unparsed |= git.unparsed; + return this; + } + + /** + * Git info for DORA Metrics events. + * + * @return git + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DORAGitInfo getGit() { + return git; + } + + public void setGit(DORAGitInfo git) { + this.git = git; + } + + public DORAIncidentObjectAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Incident 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 DORAIncidentObjectAttributes services(List services) { + this.services = services; + return this; + } + + public DORAIncidentObjectAttributes addServicesItem(String servicesItem) { + if (this.services == null) { + this.services = new ArrayList<>(); + } + this.services.add(servicesItem); + return this; + } + + /** + * Service names impacted by the incident. + * + * @return services + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getServices() { + return services; + } + + public void setServices(List services) { + this.services = services; + } + + public DORAIncidentObjectAttributes severity(String severity) { + this.severity = severity; + return this; + } + + /** + * Incident severity. + * + * @return severity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSeverity() { + return severity; + } + + public void setSeverity(String severity) { + this.severity = severity; + } + + public DORAIncidentObjectAttributes startedAt(Long startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * Unix timestamp when the incident started. + * + * @return startedAt + */ + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getStartedAt() { + return startedAt; + } + + public void setStartedAt(Long startedAt) { + this.startedAt = startedAt; + } + + public DORAIncidentObjectAttributes team(String team) { + this.team = team; + return this; + } + + /** + * Name of the team owning the services impacted. + * + * @return team + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTeam() { + return team; + } + + public void setTeam(String team) { + this.team = team; + } + + public DORAIncidentObjectAttributes version(String version) { + this.version = version; + return this; + } + + /** + * Version to correlate with APM Deployment Tracking. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * 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 DORAIncidentObjectAttributes + */ + @JsonAnySetter + public DORAIncidentObjectAttributes 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 DORAIncidentObjectAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORAIncidentObjectAttributes doraIncidentObjectAttributes = (DORAIncidentObjectAttributes) o; + return Objects.equals(this.customTags, doraIncidentObjectAttributes.customTags) + && Objects.equals(this.env, doraIncidentObjectAttributes.env) + && Objects.equals(this.finishedAt, doraIncidentObjectAttributes.finishedAt) + && Objects.equals(this.git, doraIncidentObjectAttributes.git) + && Objects.equals(this.name, doraIncidentObjectAttributes.name) + && Objects.equals(this.services, doraIncidentObjectAttributes.services) + && Objects.equals(this.severity, doraIncidentObjectAttributes.severity) + && Objects.equals(this.startedAt, doraIncidentObjectAttributes.startedAt) + && Objects.equals(this.team, doraIncidentObjectAttributes.team) + && Objects.equals(this.version, doraIncidentObjectAttributes.version) + && Objects.equals( + this.additionalProperties, doraIncidentObjectAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + customTags, + env, + finishedAt, + git, + name, + services, + severity, + startedAt, + team, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORAIncidentObjectAttributes {\n"); + sb.append(" customTags: ").append(toIndentedString(customTags)).append("\n"); + sb.append(" env: ").append(toIndentedString(env)).append("\n"); + sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n"); + sb.append(" git: ").append(toIndentedString(git)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" services: ").append(toIndentedString(services)).append("\n"); + sb.append(" severity: ").append(toIndentedString(severity)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" team: ").append(toIndentedString(team)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).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/DORAListDeploymentsRequestData.java b/src/main/java/com/datadog/api/client/v2/model/DORAListDeploymentsRequestData.java index 91c08451c33..5802c413e6c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DORAListDeploymentsRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/DORAListDeploymentsRequestData.java @@ -30,7 +30,8 @@ public class DORAListDeploymentsRequestData { private DORAListDeploymentsRequestAttributes attributes; public static final String JSON_PROPERTY_TYPE = "type"; - private DORAListDeploymentsRequestDataType type; + private DORAListDeploymentsRequestDataType type = + DORAListDeploymentsRequestDataType.DORA_DEPLOYMENTS_LIST_REQUEST; public DORAListDeploymentsRequestData() {} diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAListFailuresRequestData.java b/src/main/java/com/datadog/api/client/v2/model/DORAListFailuresRequestData.java index 77fd5209e95..8810af50dac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DORAListFailuresRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/DORAListFailuresRequestData.java @@ -30,7 +30,8 @@ public class DORAListFailuresRequestData { private DORAListFailuresRequestAttributes attributes; public static final String JSON_PROPERTY_TYPE = "type"; - private DORAListFailuresRequestDataType type; + private DORAListFailuresRequestDataType type = + DORAListFailuresRequestDataType.DORA_FAILURES_LIST_REQUEST; public DORAListFailuresRequestData() {} diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_network_data_source.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_network_data_source.freeze new file mode 100644 index 00000000000..819ff420241 --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_network_data_source.freeze @@ -0,0 +1 @@ +2026-01-02T15:26:45.908Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_network_data_source.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_network_data_source.json new file mode 100644 index 00000000000..4e1ec77ce9d --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_network_data_source.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"description\":\"\",\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_sankey_widget_and_network_data_source-1767367605\",\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"network\",\"group_by\":[\"source\",\"destination\"],\"limit\":100,\"query_string\":\"*\"},\"request_type\":\"netflow_sankey\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"sankey\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v1/dashboard", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"id\":\"ngh-vn6-nqq\",\"title\":\"Test-Create_a_new_dashboard_with_sankey_widget_and_network_data_source-1767367605\",\"description\":\"\",\"author_handle\":\"sophie.cao@datadoghq.com\",\"author_name\":\"Sophie Cao\",\"layout_type\":\"free\",\"url\":\"/dashboard/ngh-vn6-nqq/test-createanewdashboardwithsankeywidgetandnetworkdatasource-1767367605\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"network\",\"group_by\":[\"source\",\"destination\"],\"limit\":100,\"query_string\":\"*\"},\"request_type\":\"netflow_sankey\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"sankey\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":4009219214466684}],\"notify_list\":[],\"created_at\":\"2026-01-02T15:26:46.118136+00:00\",\"modified_at\":\"2026-01-02T15:26:46.118136+00:00\",\"restricted_roles\":[]}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "05785a12-bb7d-2936-0e2f-bb3622fc33d9" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v1/dashboard/ngh-vn6-nqq", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"deleted_dashboard_id\":\"ngh-vn6-nqq\"}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "9c0d340a-b4d7-8451-b849-b8f5cb338e4d" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_product_analytics_data_source.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_product_analytics_data_source.freeze new file mode 100644 index 00000000000..d7f34013375 --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_product_analytics_data_source.freeze @@ -0,0 +1 @@ +2026-01-02T15:27:06.013Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_product_analytics_data_source.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_product_analytics_data_source.json new file mode 100644 index 00000000000..c839d9f77a2 --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_product_analytics_data_source.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"description\":\"\",\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_sankey_widget_and_product_analytics_data_source-1767367626\",\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"product_analytics\",\"mode\":\"source\",\"query_string\":\"@type:session\"},\"request_type\":\"sankey\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"sankey\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v1/dashboard", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"id\":\"y6u-yab-bdi\",\"title\":\"Test-Create_a_new_dashboard_with_sankey_widget_and_product_analytics_data_source-1767367626\",\"description\":\"\",\"author_handle\":\"sophie.cao@datadoghq.com\",\"author_name\":\"Sophie Cao\",\"layout_type\":\"free\",\"url\":\"/dashboard/y6u-yab-bdi/test-createanewdashboardwithsankeywidgetandproductanalyticsdatasource-1767367626\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"product_analytics\",\"mode\":\"source\",\"query_string\":\"@type:session\"},\"request_type\":\"sankey\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"sankey\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":7919851856522238}],\"notify_list\":[],\"created_at\":\"2026-01-02T15:27:06.177915+00:00\",\"modified_at\":\"2026-01-02T15:27:06.177915+00:00\",\"restricted_roles\":[]}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5d27f2ce-d55c-4ad7-cf36-49de340a533c" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v1/dashboard/y6u-yab-bdi", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"deleted_dashboard_id\":\"y6u-yab-bdi\"}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2b138fda-2740-445d-10a9-6aa55a4283a5" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.freeze b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.freeze new file mode 100644 index 00000000000..6f1ee04a8ff --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.freeze @@ -0,0 +1 @@ +2026-01-02T15:26:19.626Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.json b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.json new file mode 100644 index 00000000000..6ebe96a5ece --- /dev/null +++ b/src/test/resources/cassettes/features/v1/Create_a_new_dashboard_with_sankey_widget_and_rum_data_source.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"description\":\"\",\"layout_type\":\"free\",\"notify_list\":[],\"template_variables\":[],\"title\":\"Test-Create_a_new_dashboard_with_sankey_widget_and_rum_data_source-1767367579\",\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"rum\",\"mode\":\"source\",\"query_string\":\"@type:view\"},\"request_type\":\"sankey\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"sankey\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0}}]}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v1/dashboard", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"id\":\"pgj-vt6-zeg\",\"title\":\"Test-Create_a_new_dashboard_with_sankey_widget_and_rum_data_source-1767367579\",\"description\":\"\",\"author_handle\":\"sophie.cao@datadoghq.com\",\"author_name\":\"Sophie Cao\",\"layout_type\":\"free\",\"url\":\"/dashboard/pgj-vt6-zeg/test-createanewdashboardwithsankeywidgetandrumdatasource-1767367579\",\"template_variables\":[],\"widgets\":[{\"definition\":{\"requests\":[{\"query\":{\"data_source\":\"rum\",\"mode\":\"source\",\"query_string\":\"@type:view\"},\"request_type\":\"sankey\"}],\"title\":\"\",\"title_align\":\"left\",\"title_size\":\"16\",\"type\":\"sankey\"},\"layout\":{\"height\":15,\"width\":47,\"x\":0,\"y\":0},\"id\":1607494419972582}],\"notify_list\":[],\"created_at\":\"2026-01-02T15:26:19.817734+00:00\",\"modified_at\":\"2026-01-02T15:26:19.817734+00:00\",\"restricted_roles\":[]}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e50096f8-701d-2695-ccb5-e4bb8dc80a98" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v1/dashboard/pgj-vt6-zeg", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"deleted_dashboard_id\":\"pgj-vt6-zeg\"}", + "headers": { + "Content-Type": [ + "application/json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3597b2c2-f955-8709-af84-283c2af5a46b" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.freeze index 73056732d9d..586a14bae6e 100644 --- a/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:44.747Z \ No newline at end of file +2025-10-01T12:46:29.817Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json index 73ccee50ec7..559428de639 100644 --- a/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Archive_case_returns_Bad_Request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"e3f011bc-8ae6-4ec2-b80d-3069e73bc6a1\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:45.033566Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"e3f011bc-8ae6-4ec2-b80d-3069e73bc6a1\",\"key\":\"DDFC-98805\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99261\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"3601878d-b851-43b6-900f-0deb35e536d7\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:30.261735Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"3601878d-b851-43b6-900f-0deb35e536d7\",\"key\":\"DDFC-82968\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83056\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,7 +37,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/e3f011bc-8ae6-4ec2-b80d-3069e73bc6a1/archive", + "path": "/api/v2/cases/3601878d-b851-43b6-900f-0deb35e536d7/archive", "keepAlive": false, "secure": true }, @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "ab7d7635-9dd8-75bc-f0cf-3417055b82d9" + "id": "e1a10cf1-3e3c-c706-790a-1973ce7c87c7" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.freeze index 49fdfee8b6d..12270626115 100644 --- a/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:45.212Z \ No newline at end of file +2025-10-01T12:46:31.029Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json index 4462748bb01..129c2364491 100644 --- a/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Archive_case_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"926e6b8a-4af6-43b2-8a29-33813af68594\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:45.269528Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"926e6b8a-4af6-43b2-8a29-33813af68594\",\"key\":\"DDFC-98806\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99262\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"b5cf9b44-cb77-4487-a436-0e3ef4e88d49\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:31.456149Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"b5cf9b44-cb77-4487-a436-0e3ef4e88d49\",\"key\":\"DDFC-82969\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83057\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/926e6b8a-4af6-43b2-8a29-33813af68594/archive", + "path": "/api/v2/cases/b5cf9b44-cb77-4487-a436-0e3ef4e88d49/archive", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"926e6b8a-4af6-43b2-8a29-33813af68594\",\"type\":\"case\",\"attributes\":{\"archived_at\":\"2025-12-30T13:49:45.40368576Z\",\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:45.269528Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"926e6b8a-4af6-43b2-8a29-33813af68594\",\"key\":\"DDFC-98806\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-12-30T13:49:45.403686Z\",\"priority\":\"P4\",\"public_id\":\"99262\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"b5cf9b44-cb77-4487-a436-0e3ef4e88d49\",\"type\":\"case\",\"attributes\":{\"archived_at\":\"2025-10-01T12:46:31.920596976Z\",\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:31.456149Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"b5cf9b44-cb77-4487-a436-0e3ef4e88d49\",\"key\":\"DDFC-82969\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-10-01T12:46:31.920597Z\",\"priority\":\"P4\",\"public_id\":\"83057\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "d9673a60-73f9-7390-7584-792968835a2b" + "id": "57529eb3-3888-9ea0-582e-398aac78c8cc" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.freeze index 2fd4c4e8f03..ea5b97b0a6d 100644 --- a/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:45.450Z \ No newline at end of file +2025-10-01T12:46:31.968Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json index 97d2e012fb0..244a30dd57f 100644 --- a/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Assign_case_returns_Bad_Request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"b3cef7a0-9637-43fb-88cf-d9ac56310a7b\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:45.508531Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"b3cef7a0-9637-43fb-88cf-d9ac56310a7b\",\"key\":\"DDFC-98807\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99263\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"1beeecc8-5c4f-4194-a785-e5c60234e263\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:32.453117Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"1beeecc8-5c4f-4194-a785-e5c60234e263\",\"key\":\"DDFC-82970\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83058\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,7 +37,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/b3cef7a0-9637-43fb-88cf-d9ac56310a7b/assign", + "path": "/api/v2/cases/1beeecc8-5c4f-4194-a785-e5c60234e263/assign", "keepAlive": false, "secure": true }, @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "ed3d10de-dc2d-ee05-2933-dd494eefe952" + "id": "30bda267-2a5e-f496-0edc-0461cb732a9b" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.freeze index ff2fee4b644..791da7476a0 100644 --- a/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:45.709Z \ No newline at end of file +2025-10-01T12:46:34.590Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.json index c791186e6fd..075165fbc98 100644 --- a/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Assign_case_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"0bb969fd-0864-46a1-8e6d-35434e677004\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:45.922467Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"0bb969fd-0864-46a1-8e6d-35434e677004\",\"key\":\"DDFC-98808\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99264\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"3266bb95-e129-4377-a6a1-16cbd3e07395\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:35.065341Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"3266bb95-e129-4377-a6a1-16cbd3e07395\",\"key\":\"DDFC-82971\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83059\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,7 +33,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Assign_case_returns_OK_response-1767102585@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + "json": "{\"data\":{\"attributes\":{\"email\":\"Test-Assign_case_returns_OK_response-1759322794@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" }, "headers": {}, "method": "POST", @@ -42,7 +42,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"users\",\"id\":\"06fe1d45-8040-47eb-b161-837f416635e7\",\"attributes\":{\"name\":null,\"handle\":\"test-assign_case_returns_ok_response-1767102585@datadoghq.com\",\"created_at\":\"2025-12-30T13:49:46.123532+00:00\",\"modified_at\":\"2025-12-30T13:49:46.123532+00:00\",\"email\":\"test-assign_case_returns_ok_response-1767102585@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/7ef6584479871df45cdfa7868fcc1849?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", + "body": "{\"data\":{\"type\":\"users\",\"id\":\"aa4556b9-9ec4-11f0-8e55-4666095c4509\",\"attributes\":{\"name\":null,\"handle\":\"test-assign_case_returns_ok_response-1759322794@datadoghq.com\",\"created_at\":\"2025-10-01T12:46:35.593518+00:00\",\"modified_at\":\"2025-10-01T12:46:35.593518+00:00\",\"email\":\"test-assign_case_returns_ok_response-1759322794@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/0b128b1184e8a9942ff24d7a55b04d84?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", "headers": { "Content-Type": [ "application/json" @@ -57,22 +57,22 @@ "timeToLive": { "unlimited": true }, - "id": "1aea590a-b5c0-4088-8dbd-4421362dcb28" + "id": "4b743354-44f9-b130-5659-6ada19cf5360" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"assignee_id\":\"06fe1d45-8040-47eb-b161-837f416635e7\"},\"type\":\"case\"}}" + "json": "{\"data\":{\"attributes\":{\"assignee_id\":\"aa4556b9-9ec4-11f0-8e55-4666095c4509\"},\"type\":\"case\"}}" }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/0bb969fd-0864-46a1-8e6d-35434e677004/assign", + "path": "/api/v2/cases/3266bb95-e129-4377-a6a1-16cbd3e07395/assign", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"0bb969fd-0864-46a1-8e6d-35434e677004\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:45.922467Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"0bb969fd-0864-46a1-8e6d-35434e677004\",\"key\":\"DDFC-98808\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-12-30T13:49:46.211933Z\",\"priority\":\"P4\",\"public_id\":\"99264\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"06fe1d45-8040-47eb-b161-837f416635e7\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}},{\"id\":\"06fe1d45-8040-47eb-b161-837f416635e7\",\"type\":\"user\",\"attributes\":{\"active\":false,\"email\":\"test-assign_case_returns_ok_response-1767102585@datadoghq.com\",\"handle\":\"test-assign_case_returns_ok_response-1767102585@datadoghq.com\",\"name\":\"\"}}]}", + "body": "{\"data\":{\"id\":\"3266bb95-e129-4377-a6a1-16cbd3e07395\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:35.065341Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"3266bb95-e129-4377-a6a1-16cbd3e07395\",\"key\":\"DDFC-82971\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-10-01T12:46:36.127269Z\",\"priority\":\"P4\",\"public_id\":\"83059\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"aa4556b9-9ec4-11f0-8e55-4666095c4509\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}},{\"id\":\"aa4556b9-9ec4-11f0-8e55-4666095c4509\",\"type\":\"user\",\"attributes\":{\"active\":false,\"email\":\"test-assign_case_returns_ok_response-1759322794@datadoghq.com\",\"handle\":\"test-assign_case_returns_ok_response-1759322794@datadoghq.com\",\"name\":\"\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -87,13 +87,13 @@ "timeToLive": { "unlimited": true }, - "id": "a9b52545-c8c8-50f0-0133-1578de88c3c6" + "id": "13bc6938-d07a-ad87-fcb8-ea5ff6f91d23" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/users/06fe1d45-8040-47eb-b161-837f416635e7", + "path": "/api/v2/users/aa4556b9-9ec4-11f0-8e55-4666095c4509", "keepAlive": false, "secure": true }, @@ -108,6 +108,6 @@ "timeToLive": { "unlimited": true }, - "id": "eb370e23-b433-00af-a8bd-5fd68296bf84" + "id": "ce688cf4-a7e2-c67b-c28a-6c0b211f2d33" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.freeze index 7a164c32e7a..bea3893eb21 100644 --- a/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:46.568Z \ No newline at end of file +2025-10-01T12:46:36.797Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json index ad9498044cf..e7fba0da841 100644 --- a/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Comment_case_returns_Bad_Request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"dabff9f7-18d4-40ac-acd5-50b2d311ff53\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:46.622659Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"dabff9f7-18d4-40ac-acd5-50b2d311ff53\",\"key\":\"DDFC-98809\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99265\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"5ce18aba-c435-4b23-9818-bf79e97dcc66\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:37.280816Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"5ce18aba-c435-4b23-9818-bf79e97dcc66\",\"key\":\"DDFC-82972\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83060\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,7 +37,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/dabff9f7-18d4-40ac-acd5-50b2d311ff53/comment", + "path": "/api/v2/cases/5ce18aba-c435-4b23-9818-bf79e97dcc66/comment", "keepAlive": false, "secure": true }, @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "01952a50-d07b-3802-2f0e-0c782d816608" + "id": "565c699f-09b1-73bd-c8fa-7550bcbc4135" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.freeze index 98b9d1fc74b..654ac6feecc 100644 --- a/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:46.777Z \ No newline at end of file +2025-10-01T12:46:38.181Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json index 7a1d8329345..b8a295d04c6 100644 --- a/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Comment_case_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"84a0af3b-6609-442a-b4de-b082652354cf\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:46.840801Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"84a0af3b-6609-442a-b4de-b082652354cf\",\"key\":\"DDFC-98810\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99266\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"1e943f20-0e96-4833-bc3f-728b8991d32e\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:38.628783Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"1e943f20-0e96-4833-bc3f-728b8991d32e\",\"key\":\"DDFC-82973\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83061\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/84a0af3b-6609-442a-b4de-b082652354cf/comment", + "path": "/api/v2/cases/1e943f20-0e96-4833-bc3f-728b8991d32e/comment", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":[{\"id\":\"2df6429f-8148-440c-a959-e6503f42709b\",\"type\":\"timeline_cell\",\"attributes\":{\"author\":{\"type\":\"USER\",\"content\":{\"ID\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\",\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"active\":true}},\"cell_content\":{\"message\":\"Hello World !\"},\"content\":\"{\\\"message\\\":\\\"Hello World !\\\"}\",\"created_at\":\"2025-12-30T13:49:46.968106806Z\",\"type\":\"COMMENT\"}}]}", + "body": "{\"data\":[{\"id\":\"d18d2a69-215e-40e6-a186-445ac1291dee\",\"type\":\"timeline_cell\",\"attributes\":{\"author\":{\"type\":\"USER\",\"content\":{\"ID\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"name\":\"frog\",\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"active\":true}},\"cell_content\":{\"message\":\"Hello World !\"},\"content\":\"{\\\"message\\\":\\\"Hello World !\\\"}\",\"created_at\":\"2025-10-01T12:46:39.051704699Z\",\"type\":\"COMMENT\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "58b7b9f2-697c-5379-6b82-7cf1e5fa1155" + "id": "44eb7d93-b01e-d6bc-e444-07428474e0a3" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.freeze index 86ab74d050c..e7e401d337b 100644 --- a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:47.018Z \ No newline at end of file +2025-10-01T12:46:41.670Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.json index 4a4af70d4d6..afc14299adc 100644 --- a/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_case_comment_returns_Not_Found_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"e48aba34-ea79-45c7-a425-56d5b09c9fc4\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:47.073795Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"e48aba34-ea79-45c7-a425-56d5b09c9fc4\",\"key\":\"DDFC-98811\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99267\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"41de4d6f-9ed2-478f-b180-3a383c14dc64\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:42.111632Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"41de4d6f-9ed2-478f-b180-3a383c14dc64\",\"key\":\"DDFC-82975\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83064\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,12 +33,12 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/cases/e48aba34-ea79-45c7-a425-56d5b09c9fc4/comment/23fca2aa-4967-4936-bdd7-9157d9e456d7", + "path": "/api/v2/cases/41de4d6f-9ed2-478f-b180-3a383c14dc64/comment/23fca2aa-4967-4936-bdd7-9157d9e456d7", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"failed to get timeline cell: timeline cell not found\"}]}", + "body": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"timeline cell not found\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "4b3038dd-0bd3-d0d1-cb5b-2cf2b69eae26" + "id": "c736bcd4-97f0-ef9b-9852-4bdb89d929ad" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.freeze index fe06c3881a9..437e011d446 100644 --- a/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:47.272Z \ No newline at end of file +2025-10-01T12:46:42.614Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json index 4d6f43f87bf..0c846427a6c 100644 --- a/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_custom_attribute_from_case_returns_Not_Found_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"83a5e059-3fde-48b5-b4d4-8bcc5227db32\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:47.318549Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"83a5e059-3fde-48b5-b4d4-8bcc5227db32\",\"key\":\"DDFC-98812\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99268\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"16b310dd-5329-48c5-82fe-ccd2b39cb0e5\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:43.066117Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"16b310dd-5329-48c5-82fe-ccd2b39cb0e5\",\"key\":\"DDFC-82976\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83065\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,12 +33,12 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/cases/83a5e059-3fde-48b5-b4d4-8bcc5227db32/custom_attributes/invalid_key", + "path": "/api/v2/cases/16b310dd-5329-48c5-82fe-ccd2b39cb0e5/custom_attributes/invalid_key", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"failed to update batch: failed to apply command: failed to apply domain.RemoveCustomAttribute command: custom attribute configuration not found\",\"meta\":{\"key\":\"invalid_key\"}}]}", + "body": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"failed to update case (command func error): custom attribute configuration not found\",\"meta\":{\"key\":\"invalid_key\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "183879c8-ce93-a6d7-59d6-feafa3cbe38d" + "id": "230dc6ce-a811-89ee-78ea-c567ccd8e048" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.freeze index 64799d65807..10a2481a020 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:47.488Z \ No newline at end of file +2025-10-01T12:46:44.009Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json index 5b5d81e7265..ec14e25a720 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Get_the_details_of_a_case_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"9daaa414-8843-46e2-8360-c36d3713285f\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:47.542749Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"9daaa414-8843-46e2-8360-c36d3713285f\",\"key\":\"DDFC-98813\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99269\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"da266ceb-843c-4af1-9190-9f1ab13fd4f4\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:44.422586Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"da266ceb-843c-4af1-9190-9f1ab13fd4f4\",\"key\":\"DDFC-82977\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83066\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -33,12 +33,12 @@ "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/cases/9daaa414-8843-46e2-8360-c36d3713285f", + "path": "/api/v2/cases/da266ceb-843c-4af1-9190-9f1ab13fd4f4", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"9daaa414-8843-46e2-8360-c36d3713285f\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:47.542749Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"9daaa414-8843-46e2-8360-c36d3713285f\",\"key\":\"DDFC-98813\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99269\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"da266ceb-843c-4af1-9190-9f1ab13fd4f4\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:44.422586Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"da266ceb-843c-4af1-9190-9f1ab13fd4f4\",\"key\":\"DDFC-82977\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83066\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,6 +53,6 @@ "timeToLive": { "unlimited": true }, - "id": "5356bd53-4c9d-a707-e73f-dc2eec98011f" + "id": "79ba9a29-6735-bbf1-bd2a-c825ed36150a" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.freeze index b5329637a40..7fe2db8b1d4 100644 --- a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:47.735Z \ No newline at end of file +2025-10-01T12:46:44.940Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json index 5e1eff89d33..008ab19ac30 100644 --- a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_Bad_Request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"21c1b181-cee4-4b72-bf96-38859d367da4\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:47.783537Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"21c1b181-cee4-4b72-bf96-38859d367da4\",\"key\":\"DDFC-98814\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99270\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"add421a8-61e3-416e-85ec-9db7440bc951\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:45.339926Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"add421a8-61e3-416e-85ec-9db7440bc951\",\"key\":\"DDFC-82978\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83067\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,7 +37,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/21c1b181-cee4-4b72-bf96-38859d367da4/unarchive", + "path": "/api/v2/cases/add421a8-61e3-416e-85ec-9db7440bc951/unarchive", "keepAlive": false, "secure": true }, @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "05a0a4d3-a117-a4c9-1a25-59a8b73c2e09" + "id": "8727092a-b76e-793e-8833-3319aae69e02" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.freeze index eee04a8be38..5a7cef238be 100644 --- a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:47.992Z \ No newline at end of file +2025-10-01T12:46:46.650Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json index 60a873eea23..5b97823cb04 100644 --- a/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Unarchive_case_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"a02bcfe0-5678-49bb-a696-86544bde2bee\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:48.042966Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"a02bcfe0-5678-49bb-a696-86544bde2bee\",\"key\":\"DDFC-98815\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99271\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"6f53ae15-54ca-418d-b3bc-ae2b039dbb5c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:47.573675Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"6f53ae15-54ca-418d-b3bc-ae2b039dbb5c\",\"key\":\"DDFC-82979\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83068\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/a02bcfe0-5678-49bb-a696-86544bde2bee/unarchive", + "path": "/api/v2/cases/6f53ae15-54ca-418d-b3bc-ae2b039dbb5c/unarchive", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"a02bcfe0-5678-49bb-a696-86544bde2bee\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:48.042966Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"a02bcfe0-5678-49bb-a696-86544bde2bee\",\"key\":\"DDFC-98815\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99271\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"6f53ae15-54ca-418d-b3bc-ae2b039dbb5c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:47.573675Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"6f53ae15-54ca-418d-b3bc-ae2b039dbb5c\",\"key\":\"DDFC-82979\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83068\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "583aac04-758f-f452-e82f-34b94ecc5b40" + "id": "0d959302-a31b-60d1-3dd9-f3356b4f4618" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.freeze index c94e0251e1c..0400accbe4b 100644 --- a/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:48.267Z \ No newline at end of file +2025-10-01T12:46:48.330Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json index 30ea1068d6c..536e468388d 100644 --- a/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Unassign_case_returns_Bad_Request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"5fa6cf48-aa31-40bc-9d17-f8f78eea95be\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:48.323172Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"5fa6cf48-aa31-40bc-9d17-f8f78eea95be\",\"key\":\"DDFC-98816\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99272\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"976a6c59-d5b2-477a-95e4-00d154bcf447\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:48.896678Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"976a6c59-d5b2-477a-95e4-00d154bcf447\",\"key\":\"DDFC-82980\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83069\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,7 +37,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/5fa6cf48-aa31-40bc-9d17-f8f78eea95be/unassign", + "path": "/api/v2/cases/976a6c59-d5b2-477a-95e4-00d154bcf447/unassign", "keepAlive": false, "secure": true }, @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "d94b7518-df87-6583-b57a-bf4e0005df5e" + "id": "5c813948-145f-9b61-4df2-1155a36ee278" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.freeze index ec79ed792bc..9fe15caf998 100644 --- a/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:48.487Z \ No newline at end of file +2025-10-01T12:46:50.389Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.json index 49fb8cc064c..1655523c8e2 100644 --- a/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Unassign_case_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"6491a991-9117-46dc-9762-ea2cc244e5b3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:48.538223Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"6491a991-9117-46dc-9762-ea2cc244e5b3\",\"key\":\"DDFC-98817\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99273\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"83f41574-2062-47de-be0e-b3c2ae43ef5c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:50.896205Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"83f41574-2062-47de-be0e-b3c2ae43ef5c\",\"key\":\"DDFC-82981\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83070\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/6491a991-9117-46dc-9762-ea2cc244e5b3/unassign", + "path": "/api/v2/cases/83f41574-2062-47de-be0e-b3c2ae43ef5c/unassign", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"6491a991-9117-46dc-9762-ea2cc244e5b3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:48.538223Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"6491a991-9117-46dc-9762-ea2cc244e5b3\",\"key\":\"DDFC-98817\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99273\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"83f41574-2062-47de-be0e-b3c2ae43ef5c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:50.896205Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"83f41574-2062-47de-be0e-b3c2ae43ef5c\",\"key\":\"DDFC-82981\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83070\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "464bb4be-df35-70da-f0f2-e0e7ef1d5841" + "id": "5eb29ce2-3f49-70ae-cf29-0825ada34982" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.freeze index 279957c450f..9619ed45f87 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:48.699Z \ No newline at end of file +2025-10-01T12:46:52.908Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json index d2688342500..5aa43032332 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_attributes_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"8c6346d6-448d-43a0-b957-b38773438c4f\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:48.757052Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"8c6346d6-448d-43a0-b957-b38773438c4f\",\"key\":\"DDFC-98818\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99274\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"916e1b61-25b1-4da9-b3a3-000150b675f6\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:53.522427Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"916e1b61-25b1-4da9-b3a3-000150b675f6\",\"key\":\"DDFC-82982\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83071\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/8c6346d6-448d-43a0-b957-b38773438c4f/attributes", + "path": "/api/v2/cases/916e1b61-25b1-4da9-b3a3-000150b675f6/attributes", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"8c6346d6-448d-43a0-b957-b38773438c4f\",\"type\":\"case\",\"attributes\":{\"attributes\":{\"env\":[\"test\"],\"service\":[\"web-store\",\"web-api\"],\"team\":[\"engineer\"]},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:48.757052Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"8c6346d6-448d-43a0-b957-b38773438c4f\",\"key\":\"DDFC-98818\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-12-30T13:49:48.927381Z\",\"priority\":\"P4\",\"public_id\":\"99274\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"916e1b61-25b1-4da9-b3a3-000150b675f6\",\"type\":\"case\",\"attributes\":{\"attributes\":{\"env\":[\"test\"],\"service\":[\"web-store\",\"web-api\"],\"team\":[\"engineer\"]},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:53.522427Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"916e1b61-25b1-4da9-b3a3-000150b675f6\",\"key\":\"DDFC-82982\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-10-01T12:46:54.057858Z\",\"priority\":\"P4\",\"public_id\":\"83071\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "c1d9e605-98be-8f34-4fbd-ff0cb1b5c1bf" + "id": "d5b91317-cfef-6581-e933-8a16f2c399d8" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.freeze index ffe59d3bc44..3f6e4336b9c 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:48.998Z \ No newline at end of file +2025-10-01T12:46:54.092Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json index 87c697b97a9..6ac2a8d7015 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_custom_attribute_returns_Not_Found_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"6ace1538-7ef1-4a00-a0bd-67c8ed9a3cd3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:49.048411Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"6ace1538-7ef1-4a00-a0bd-67c8ed9a3cd3\",\"key\":\"DDFC-98819\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99275\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"8e87c755-54a9-470a-9118-62a0942ec870\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:54.666096Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"8e87c755-54a9-470a-9118-62a0942ec870\",\"key\":\"DDFC-82983\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83072\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/6ace1538-7ef1-4a00-a0bd-67c8ed9a3cd3/custom_attributes/invalid_key", + "path": "/api/v2/cases/8e87c755-54a9-470a-9118-62a0942ec870/custom_attributes/invalid_key", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"failed to update batch: failed to apply command: failed to apply domain.UpdateCustomAttribute command: custom attribute configuration not found\",\"meta\":{\"key\":\"invalid_key\"}}]}", + "body": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"failed to update case (command func error): custom attribute configuration not found\",\"meta\":{\"key\":\"invalid_key\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "00969290-ec0b-585c-709e-232af7bbf179" + "id": "ae0c1365-24e0-cce5-9084-21fddee76fb1" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.freeze index 338af624d51..f5684a8e2aa 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:49.217Z \ No newline at end of file +2025-10-01T12:46:56.936Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json index 0facddc7bca..b0c0bef8a87 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_description_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"a4887f3f-c7a8-47d7-ae65-a1f7ce9687c5\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:49.259766Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"a4887f3f-c7a8-47d7-ae65-a1f7ce9687c5\",\"key\":\"DDFC-98820\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99276\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"bb8284e0-959e-43db-9920-adf55f37ed7d\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:57.927663Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"bb8284e0-959e-43db-9920-adf55f37ed7d\",\"key\":\"DDFC-82984\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83073\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/a4887f3f-c7a8-47d7-ae65-a1f7ce9687c5/description", + "path": "/api/v2/cases/bb8284e0-959e-43db-9920-adf55f37ed7d/description", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"a4887f3f-c7a8-47d7-ae65-a1f7ce9687c5\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:49.259766Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"Seeing some weird memory increase... Updating the description\",\"insights\":[],\"internal_id\":\"a4887f3f-c7a8-47d7-ae65-a1f7ce9687c5\",\"key\":\"DDFC-98820\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-12-30T13:49:49.395812Z\",\"priority\":\"P4\",\"public_id\":\"99276\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"bb8284e0-959e-43db-9920-adf55f37ed7d\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:46:57.927663Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"Seeing some weird memory increase... Updating the description\",\"insights\":[],\"internal_id\":\"bb8284e0-959e-43db-9920-adf55f37ed7d\",\"key\":\"DDFC-82984\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-10-01T12:46:59.32863Z\",\"priority\":\"P4\",\"public_id\":\"83073\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "7a9d973e-0b9a-d469-f700-a64cea1c9faf" + "id": "2a758c5a-a7aa-f4ad-a5ec-47150a1c5f20" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.freeze index 40e66d12a7b..a4821efc16f 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:49.426Z \ No newline at end of file +2025-10-01T12:46:59.356Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json index f17e853b338..4eb6a1d4d89 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_Bad_Request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"4ef03b27-6d40-455b-8dd8-3f3224a34a7a\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:49.483012Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"4ef03b27-6d40-455b-8dd8-3f3224a34a7a\",\"key\":\"DDFC-98821\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99277\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"66eb3131-0b3b-489b-b672-2781600cc1e6\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:47:00.373489Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"66eb3131-0b3b-489b-b672-2781600cc1e6\",\"key\":\"DDFC-82985\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83074\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/4ef03b27-6d40-455b-8dd8-3f3224a34a7a/priority", + "path": "/api/v2/cases/66eb3131-0b3b-489b-b672-2781600cc1e6/priority", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid priority P1234. Must be one of P1, P2, P3, P4, P5, NOT_DEFINED\"}]}", + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid priority P1234. Must be one of NOT_DEFINED, P1, P2, P3, P4, P5\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "dba3cadb-08bb-5cbe-cc24-c2cc04d8bd68" + "id": "43319c4b-1308-2ac9-2bd4-eedd3e613c7d" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.freeze index 08ad7529379..da62d2e6f68 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:49.632Z \ No newline at end of file +2025-10-01T12:47:01.924Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json index f58f1fcd76c..56d9bae88eb 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_priority_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"511f7667-3d80-4498-8118-416211a1a131\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:49.67893Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"511f7667-3d80-4498-8118-416211a1a131\",\"key\":\"DDFC-98822\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99278\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"d42afb74-0480-4535-bf4d-af0353d32c1c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:47:02.764285Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"d42afb74-0480-4535-bf4d-af0353d32c1c\",\"key\":\"DDFC-82986\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83075\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/511f7667-3d80-4498-8118-416211a1a131/priority", + "path": "/api/v2/cases/d42afb74-0480-4535-bf4d-af0353d32c1c/priority", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"511f7667-3d80-4498-8118-416211a1a131\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:49.67893Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"511f7667-3d80-4498-8118-416211a1a131\",\"key\":\"DDFC-98822\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-12-30T13:49:49.835308Z\",\"priority\":\"P3\",\"public_id\":\"99278\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"d42afb74-0480-4535-bf4d-af0353d32c1c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:47:02.764285Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"d42afb74-0480-4535-bf4d-af0353d32c1c\",\"key\":\"DDFC-82986\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-10-01T12:47:03.296015Z\",\"priority\":\"P3\",\"public_id\":\"83075\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "05d211f6-4059-525d-71a7-49ce1b406c63" + "id": "a48226ee-212a-02a3-0d63-59437a27c03f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.freeze index b4042237f55..fa70f7c3252 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:49.865Z \ No newline at end of file +2025-10-01T12:47:03.345Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json index c89fd84ffe7..caa06d06b79 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_status_returns_Bad_Request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"ae30545d-e705-493d-a672-7210315ccec2\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:49.916511Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"ae30545d-e705-493d-a672-7210315ccec2\",\"key\":\"DDFC-98823\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99279\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"53897bb0-8e8b-4652-985b-0b9e2e8c3a30\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:47:04.237961Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"53897bb0-8e8b-4652-985b-0b9e2e8c3a30\",\"key\":\"DDFC-82987\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83076\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/ae30545d-e705-493d-a672-7210315ccec2/status", + "path": "/api/v2/cases/53897bb0-8e8b-4652-985b-0b9e2e8c3a30/status", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid status OPENED. Must be one of NOT_STARTED, IN_PROGRESS, CLOSED, ACKNOWLEDGED, TRIGGERED, PENDING_APPROVAL, COMPLETED, CANCELLED, DECLINED, SUNKNOWN, OPEN, RESOLVED, APPROVED, IMPLEMENTING\"}]}", + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid status OPENED. Must be one of CANCELLED, DECLINED, NOT_STARTED, SUNKNOWN, IN_PROGRESS, ACKNOWLEDGED, TRIGGERED, PENDING_APPROVAL, IMPLEMENTING, COMPLETED, OPEN, CLOSED, RESOLVED, APPROVED\"}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "77ccf915-0520-8a3a-e795-1ff4ecc34af3" + "id": "fa695953-ee18-d658-7966-9142f8b79819" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.freeze index 79276a9d782..447e0043d27 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:50.079Z \ No newline at end of file +2025-10-01T12:47:05.138Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json index 9843435430c..12566dc0383 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_status_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"d417f9be-d247-4ce8-b3e4-ae7a9283f3d6\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:50.123131Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"d417f9be-d247-4ce8-b3e4-ae7a9283f3d6\",\"key\":\"DDFC-98824\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99280\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"e030702b-1f81-4ff0-94ba-ff9650823cf3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:47:05.547127Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"e030702b-1f81-4ff0-94ba-ff9650823cf3\",\"key\":\"DDFC-82988\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83077\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/d417f9be-d247-4ce8-b3e4-ae7a9283f3d6/status", + "path": "/api/v2/cases/e030702b-1f81-4ff0-94ba-ff9650823cf3/status", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"d417f9be-d247-4ce8-b3e4-ae7a9283f3d6\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:50.123131Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"d417f9be-d247-4ce8-b3e4-ae7a9283f3d6\",\"key\":\"DDFC-98824\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-12-30T13:49:50.289934Z\",\"priority\":\"P4\",\"public_id\":\"99280\",\"status\":\"IN_PROGRESS\",\"status_group\":\"SG_IN_PROGRESS\",\"status_name\":\"In Progress\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"e030702b-1f81-4ff0-94ba-ff9650823cf3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:47:05.547127Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"e030702b-1f81-4ff0-94ba-ff9650823cf3\",\"key\":\"DDFC-82988\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-10-01T12:47:05.982532Z\",\"priority\":\"P4\",\"public_id\":\"83077\",\"status\":\"IN_PROGRESS\",\"status_name\":\"In Progress\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "3b4cf2cd-48a7-ed80-eea5-45c831cc770f" + "id": "69253082-0f2e-d31f-e1e0-70a9f50ccb2f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.freeze index 3cfdb82bc08..ca09c6cf32d 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:50.328Z \ No newline at end of file +2025-10-01T12:47:06.013Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json index eb21dfe7899..5b71267e4f0 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_title_returns_Bad_Request_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"00a64fed-4338-458b-9af5-77ba6e6c9d7b\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:50.377668Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"00a64fed-4338-458b-9af5-77ba6e6c9d7b\",\"key\":\"DDFC-98825\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99281\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"de7cd20f-3755-44aa-9f89-846b6ae37124\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:47:06.439831Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"de7cd20f-3755-44aa-9f89-846b6ae37124\",\"key\":\"DDFC-82989\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83078\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,7 +37,7 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/00a64fed-4338-458b-9af5-77ba6e6c9d7b/title", + "path": "/api/v2/cases/de7cd20f-3755-44aa-9f89-846b6ae37124/title", "keepAlive": false, "secure": true }, @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "75a4bc10-5f5e-97e9-fb31-d5da8cd3e4c3" + "id": "884ef7cf-369c-0d48-d024-100b746703c7" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.freeze index 7cd7790590b..898a971bbd3 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.freeze +++ b/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.freeze @@ -1 +1 @@ -2025-12-30T13:49:50.596Z \ No newline at end of file +2025-10-01T12:47:07.351Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json index b0f714f21ea..50866402a79 100644 --- a/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_case_title_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"03ec656b-5d21-41c4-a655-ccb18b0aa990\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:50.642707Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"03ec656b-5d21-41c4-a655-ccb18b0aa990\",\"key\":\"DDFC-98826\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"99282\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"4c4bfc12-4f7c-4891-a8d0-70a15a0f29c2\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:47:07.778878Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"4c4bfc12-4f7c-4891-a8d0-70a15a0f29c2\",\"key\":\"DDFC-82990\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"83079\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -37,12 +37,12 @@ }, "headers": {}, "method": "POST", - "path": "/api/v2/cases/03ec656b-5d21-41c4-a655-ccb18b0aa990/title", + "path": "/api/v2/cases/4c4bfc12-4f7c-4891-a8d0-70a15a0f29c2/title", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"03ec656b-5d21-41c4-a655-ccb18b0aa990\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-12-30T13:49:50.642707Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"03ec656b-5d21-41c4-a655-ccb18b0aa990\",\"key\":\"DDFC-98826\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-12-30T13:49:50.769335Z\",\"priority\":\"P4\",\"public_id\":\"99282\",\"status\":\"OPEN\",\"status_group\":\"SG_OPEN\",\"status_name\":\"Open\",\"title\":\"[UPDATED] Memory leak investigation on API\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "body": "{\"data\":{\"id\":\"4c4bfc12-4f7c-4891-a8d0-70a15a0f29c2\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-10-01T12:47:07.778878Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"4c4bfc12-4f7c-4891-a8d0-70a15a0f29c2\",\"key\":\"DDFC-82990\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-10-01T12:47:08.214456Z\",\"priority\":\"P4\",\"public_id\":\"83079\",\"status\":\"OPEN\",\"status_name\":\"Open\",\"title\":\"[UPDATED] Memory leak investigation on API\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,6 +57,6 @@ "timeToLive": { "unlimited": true }, - "id": "2a0f7a91-92a6-6b12-38bc-0b94b64b72f5" + "id": "76ae267d-127e-fb17-a7b1-449d572b5eb5" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature b/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature index 588c609cedd..9e1c3472092 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/dashboards.feature @@ -705,6 +705,43 @@ Feature: Dashboards And the response "widgets[0].definition.workflow_id" is equal to "2e055f16-8b6a-4cdd-b452-17a34c44b160" And the response "widgets[0].definition.inputs[0]" is equal to {"name": "environment", "value": "$env.value"} + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with sankey widget and network data source + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/sankey_network_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "sankey" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "network" + And the response "widgets[0].definition.requests[0].query.query_string" is equal to "*" + And the response "widgets[0].definition.requests[0].query.group_by" is equal to ["source", "destination"] + And the response "widgets[0].definition.requests[0].query.limit" is equal to 100 + And the response "widgets[0].definition.requests[0].request_type" is equal to "netflow_sankey" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with sankey widget and product analytics data source + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/sankey_product_analytics_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "sankey" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "product_analytics" + And the response "widgets[0].definition.requests[0].query.query_string" is equal to "@type:session" + And the response "widgets[0].definition.requests[0].query.mode" is equal to "source" + And the response "widgets[0].definition.requests[0].request_type" is equal to "sankey" + + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with sankey widget and rum data source + Given new "CreateDashboard" request + And body from file "dashboards_json_payload/sankey_rum_widget.json" + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.type" is equal to "sankey" + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "rum" + And the response "widgets[0].definition.requests[0].query.query_string" is equal to "@type:view" + And the response "widgets[0].definition.requests[0].query.mode" is equal to "source" + And the response "widgets[0].definition.requests[0].request_type" is equal to "sankey" + @team:DataDog/dashboards-backend Scenario: Create a new dashboard with scatterplot widget Given new "CreateDashboard" request diff --git a/src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_network_widget.json b/src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_network_widget.json new file mode 100644 index 00000000000..1f237af8f2f --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_network_widget.json @@ -0,0 +1,41 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"sankey", + "requests":[ + { + "query":{ + "data_source":"network", + "query_string":"*", + "group_by":[ + "source", + "destination" + ], + "limit":100 + }, + "request_type":"netflow_sankey" + } + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "notify_list":[ + + ] +} diff --git a/src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_product_analytics_widget.json b/src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_product_analytics_widget.json new file mode 100644 index 00000000000..c81edb69c6d --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_product_analytics_widget.json @@ -0,0 +1,37 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"sankey", + "requests":[ + { + "query":{ + "data_source":"product_analytics", + "query_string":"@type:session", + "mode":"source" + }, + "request_type":"sankey" + } + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "notify_list":[ + + ] +} diff --git a/src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_rum_widget.json b/src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_rum_widget.json new file mode 100644 index 00000000000..b8a833ee375 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v1/api/dashboards_json_payload/sankey_rum_widget.json @@ -0,0 +1,37 @@ +{ + "title":"{{ unique }}", + "description":"", + "widgets":[ + { + "layout":{ + "x":0, + "y":0, + "width":47, + "height":15 + }, + "definition":{ + "title":"", + "title_size":"16", + "title_align":"left", + "type":"sankey", + "requests":[ + { + "query":{ + "data_source":"rum", + "query_string":"@type:view", + "mode":"source" + }, + "request_type":"sankey" + } + ] + } + } + ], + "template_variables":[ + + ], + "layout_type":"free", + "notify_list":[ + + ] +}