From df52ee2ce69d0f3e7f079ee564e50b2c71f553c5 Mon Sep 17 00:00:00 2001 From: amaskara-dd <175134603+amaskara-dd@users.noreply.github.com> Date: Wed, 25 Mar 2026 13:24:57 -0400 Subject: [PATCH 1/5] =?UTF-8?q?Revert=20"Fix=20consistency=20issues=20in?= =?UTF-8?q?=20security=20monitoring=20signal=20triage=20routes=20(#?= =?UTF-8?q?=E2=80=A6"=20(#3165)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 976fdbb2c86b0c9531f6b0c2926fadeb0a9aa1bf. --- .generator/schemas/v2/openapi.yaml | 70 ++++++++++++------- .../v2/api/security_monitoring_api.rb | 6 +- ...curity_monitoring_signal_archive_reason.rb | 1 - 3 files changed, 48 insertions(+), 29 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 8a84cbd83c51..30adedda3d38 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -57909,7 +57909,6 @@ components: - none - false_positive - testing_or_maintenance - - remediated - investigated_case_opened - true_positive_benign - true_positive_malicious @@ -57919,7 +57918,6 @@ components: - NONE - FALSE_POSITIVE - TESTING_OR_MAINTENANCE - - REMEDIATED - INVESTIGATED_CASE_OPENED - TRUE_POSITIVE_BENIGN - TRUE_POSITIVE_MALICIOUS @@ -102449,8 +102447,6 @@ paths: schema: $ref: "#/components/schemas/SecurityMonitoringSignalResponse" description: OK - "403": - $ref: "#/components/responses/NotAuthorizedResponse" "404": $ref: "#/components/responses/NotFoundResponse" "429": @@ -102488,17 +102484,25 @@ paths: $ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request "403": - $ref: "#/components/responses/NotAuthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] summary: Modify the triage assignee of a security signal tags: ["Security Monitoring"] x-codegen-request-body-name: body @@ -102528,17 +102532,25 @@ paths: $ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request "403": - $ref: "#/components/responses/NotAuthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] summary: Change the related incidents of a security signal tags: ["Security Monitoring"] x-codegen-request-body-name: body @@ -102568,17 +102580,25 @@ paths: $ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Bad Request "403": - $ref: "#/components/responses/NotAuthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: [] summary: Change the triage state of a security signal tags: ["Security Monitoring"] x-codegen-request-body-name: body diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index 79b61d34a40a..3192e46a021f 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -1925,7 +1925,7 @@ def edit_security_monitoring_signal_assignee_with_http_info(signal_id, body, opt return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalTriageUpdateResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( :operation => :edit_security_monitoring_signal_assignee, @@ -1997,7 +1997,7 @@ def edit_security_monitoring_signal_incidents_with_http_info(signal_id, body, op return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalTriageUpdateResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( :operation => :edit_security_monitoring_signal_incidents, @@ -2069,7 +2069,7 @@ def edit_security_monitoring_signal_state_with_http_info(signal_id, body, opts = return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalTriageUpdateResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( :operation => :edit_security_monitoring_signal_state, diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_archive_reason.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_archive_reason.rb index 1e4628de7aec..7cea17a372e1 100644 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_archive_reason.rb +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_archive_reason.rb @@ -24,7 +24,6 @@ class SecurityMonitoringSignalArchiveReason NONE = "none".freeze FALSE_POSITIVE = "false_positive".freeze TESTING_OR_MAINTENANCE = "testing_or_maintenance".freeze - REMEDIATED = "remediated".freeze INVESTIGATED_CASE_OPENED = "investigated_case_opened".freeze TRUE_POSITIVE_BENIGN = "true_positive_benign".freeze TRUE_POSITIVE_MALICIOUS = "true_positive_malicious".freeze From 523254f9f31ba26eaf47a9e8aa67c7d0f033d7e1 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 14:47:49 -0400 Subject: [PATCH 2/5] Regenerate client from commit b484595 of spec repo (#3166) Co-authored-by: ci.datadog-api-spec --- ...Network-Path-test-returns-OK-response.frozen | 2 +- ...-a-Network-Path-test-returns-OK-response.yml | 13 ++++++------- ...eate-a-test-suite-returns-OK-response.frozen | 2 +- .../Create-a-test-suite-returns-OK-response.yml | 17 ++++++++--------- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.frozen b/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.frozen index d30828c2f767..1eb59a7e760d 100644 --- a/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.frozen +++ b/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.frozen @@ -1 +1 @@ -2026-02-02T10:35:23.539Z \ No newline at end of file +2026-02-18T16:57:03.696Z \ No newline at end of file diff --git a/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.yml b/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.yml index 721f66293b80..fc6edbd9967b 100644 --- a/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.yml +++ b/cassettes/features/v2/synthetics/Create-a-Network-Path-test-returns-OK-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Mon, 02 Feb 2026 10:35:23 GMT +- recorded_at: Wed, 18 Feb 2026 16:57:03 GMT request: body: encoding: UTF-8 @@ -15,9 +15,8 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"network_test","attributes":{"public_id":"iab-wcx-mhp","name":"Example - Network Path test","locations":["aws:us-east-1","agent:my-agent-name"],"subtype":"tcp","status":"live","options":{"tick_every":60},"config":{"assertions":[{"operator":"lessThan","property":"avg","target":500,"type":"latency"}],"request":{"max_ttl":30,"tcp_method":"prefer_sack","host":"example.com","traceroute_queries":3,"e2e_queries":50,"port":443}},"type":"network","tags":["env:production"],"message":"Network - Path test notification"},"id":"iab-wcx-mhp"}} + string: '{"data":{"type":"network_test","attributes":{"config":{"request":{"max_ttl":30,"tcp_method":"prefer_sack","host":"example.com","e2e_queries":50,"traceroute_queries":3,"port":443},"assertions":[{"operator":"lessThan","property":"avg","target":500,"type":"latency"}]},"message":"Network + Path test notification","name":"Example Network Path test","tags":["env:production"],"options":{"tick_every":60},"type":"network","public_id":"b2j-fw3-qr5","subtype":"tcp","locations":["aws:us-east-1","agent:my-agent-name"],"status":"live"},"id":"b2j-fw3-qr5"}} ' headers: @@ -26,11 +25,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Mon, 02 Feb 2026 10:35:23 GMT +- recorded_at: Wed, 18 Feb 2026 16:57:03 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"public_ids":["iab-wcx-mhp"]},"type":"delete_tests_request"}}' + string: '{"data":{"attributes":{"public_ids":["b2j-fw3-qr5"]},"type":"delete_tests_request"}}' headers: Accept: - application/json @@ -41,7 +40,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":[{"type":"delete_tests","attributes":{"deleted_at":"2026-02-02T10:35:25.382918+00:00","public_id":"iab-wcx-mhp"},"id":"iab-wcx-mhp"}]} + string: '{"data":[{"type":"delete_tests","attributes":{"deleted_at":"2026-02-18T16:57:04.752457+00:00","public_id":"b2j-fw3-qr5"},"id":"b2j-fw3-qr5"}]} ' headers: diff --git a/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen b/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen index 62723cd8d29a..957e037f23c0 100644 --- a/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen +++ b/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.frozen @@ -1 +1 @@ -2026-01-07T12:38:45.716Z \ No newline at end of file +2026-02-18T16:57:05.121Z \ No newline at end of file diff --git a/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.yml b/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.yml index 8a68218d5475..5296a6bd3d57 100644 --- a/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.yml +++ b/cassettes/features/v2/synthetics/Create-a-test-suite-returns-OK-response.yml @@ -1,5 +1,5 @@ http_interactions: -- recorded_at: Wed, 07 Jan 2026 12:38:45 GMT +- recorded_at: Wed, 18 Feb 2026 16:57:05 GMT request: body: encoding: UTF-8 @@ -15,10 +15,10 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":{"type":"suites","id":"36n-bb6-njj","attributes":{"tags":["env:production"],"type":"suite","created_by":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"created_at":"2026-01-07T12:38:46.109472+00:00","modified_at":"2026-01-07T12:38:46.109472+00:00","message":"Notification - message","public_id":"36n-bb6-njj","options":{},"modified_by":{"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI - Account"},"tests":[],"name":"Example suite name","org_id":321813,"monitor_id":249141773}}} + string: '{"data":{"type":"suites","attributes":{"type":"suite","monitor_id":259845717,"name":"Example + suite name","options":{},"tests":[],"tags":["env:production"],"public_id":"hik-xp5-9q6","created_at":"2026-02-18T16:57:05.583051+00:00","modified_at":"2026-02-18T16:57:05.583051+00:00","created_by":{"name":"Corentin + Girard","email":"corentin.girard@datadoghq.com","handle":"corentin.girard@datadoghq.com"},"message":"Notification + message","org_id":321813,"modified_by":{"name":"Corentin Girard","email":"corentin.girard@datadoghq.com","handle":"corentin.girard@datadoghq.com"}},"id":"hik-xp5-9q6"}} ' headers: @@ -27,11 +27,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Wed, 07 Jan 2026 12:38:45 GMT +- recorded_at: Wed, 18 Feb 2026 16:57:05 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"public_ids":["36n-bb6-njj"]},"type":"delete_suites_request"}}' + string: '{"data":{"attributes":{"public_ids":["hik-xp5-9q6"]},"type":"delete_suites_request"}}' headers: Accept: - application/json @@ -42,8 +42,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"data":[{"type":"suites","attributes":{"public_id":"36n-bb6-njj","deleted_at":"2026-01-07 - 12:38:46.679914"},"id":"36n-bb6-njj"}]} + string: '{"data":[{"type":"suites","attributes":{"deleted_at":"2026-02-18 16:57:06.420679","public_id":"hik-xp5-9q6"},"id":"hik-xp5-9q6"}]} ' headers: From c123f9486c4fec890eb16e57d4d7180e3b178627 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 19:58:30 +0000 Subject: [PATCH 3/5] [OMG-1161] Update BDD tests for Teams API (#3161) Co-authored-by: ci.datadog-api-spec --- ...-a-team-returns-No-Content-response.frozen | 1 + ...rom-a-team-returns-No-Content-response.yml | 144 ++++++++++++++++++ ...-partial-update-returns-OK-response.frozen | 1 + ...ith-partial-update-returns-OK-response.yml | 66 ++++++++ examples/v2/teams/DeleteTeamMembership.rb | 5 +- examples/v2/teams/UpdateTeam_780342264.rb | 20 +++ features/v2/teams.feature | 25 ++- 7 files changed, 256 insertions(+), 6 deletions(-) create mode 100644 cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.frozen create mode 100644 cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.yml create mode 100644 examples/v2/teams/UpdateTeam_780342264.rb diff --git a/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.frozen b/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.frozen new file mode 100644 index 000000000000..252ef6511875 --- /dev/null +++ b/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-03-25T10:51:13.320Z \ No newline at end of file diff --git a/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.yml b/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.yml new file mode 100644 index 000000000000..762efeeaaee9 --- /dev/null +++ b/cassettes/features/v2/teams/Remove-a-user-from-a-team-returns-No-Content-response.yml @@ -0,0 +1,144 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"handle":"test-handle-789e569afaa52bde","name":"test-name-789e569afaa52bde"},"type":"team"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"1d059472-0eff-4857-a6c8-5e5041448b54","type":"team","attributes":{"avatar":null,"banner":5,"created_at":"2026-03-25T10:51:13.938804+00:00","description":null,"handle":"test-handle-789e569afaa52bde","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-03-25T10:51:13.938804+00:00","name":"test-name-789e569afaa52bde","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54/permission-settings"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"email":"Test-Remove_a_user_from_a_team_returns_No_Content_response-1774435873@datadoghq.com","title":"user + title"},"type":"users"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/users + response: + body: + encoding: UTF-8 + string: '{"data": {"type": "users", "id": "66e25b0b-3f3b-427e-b162-e779f4535abb", + "attributes": {"name": null, "handle": "test-remove_a_user_from_a_team_returns_no_content_response-1774435873@datadoghq.com", + "created_at": "2026-03-25T10:51:14.481612+00:00", "modified_at": "2026-03-25T10:51:14.481612+00:00", + "email": "test-remove_a_user_from_a_team_returns_no_content_response-1774435873@datadoghq.com", + "icon": "https://secure.gravatar.com/avatar/be9f1c5abecde28b4c01cc8aa0680377?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"}}}}}' + headers: + Content-Type: + - application/json + status: + code: 201 + message: Created +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"role":"admin"},"relationships":{"user":{"data":{"id":"66e25b0b-3f3b-427e-b162-e779f4535abb","type":"users"}}},"type":"team_memberships"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54/memberships + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"TeamMembership-1d059472-0eff-4857-a6c8-5e5041448b54-66092046","type":"team_memberships","attributes":{"provisioned_by":null,"provisioned_by_id":"a1d5ff5a-c6dd-11f0-9cb6-06640ca27ad4","role":"admin"},"relationships":{"user":{"data":{"id":"66e25b0b-3f3b-427e-b162-e779f4535abb","type":"users"}}}},"included":[{"id":"66e25b0b-3f3b-427e-b162-e779f4535abb","type":"users","attributes":{"disabled":false,"email":"test-remove_a_user_from_a_team_returns_no_content_response-1774435873@datadoghq.com","handle":"test-remove_a_user_from_a_team_returns_no_content_response-1774435873@datadoghq.com","icon":"https://secure.gravatar.com/avatar/be9f1c5abecde28b4c01cc8aa0680377?d=retro\u0026s=48","name":null,"service_account":false,"status":"Pending"}}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54/memberships/66e25b0b-3f3b-427e-b162-e779f4535abb + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54/memberships/66e25b0b-3f3b-427e-b162-e779f4535abb + response: + body: + encoding: UTF-8 + string: '{"errors":["User 66e25b0b-3f3b-427e-b162-e779f4535abb is not a member + of Team 1d059472-0eff-4857-a6c8-5e5041448b54 not found"]}' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/users/66e25b0b-3f3b-427e-b162-e779f4535abb + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Wed, 25 Mar 2026 10:51:13 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/1d059472-0eff-4857-a6c8-5e5041448b54 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.frozen b/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.frozen new file mode 100644 index 000000000000..e997c2a92baa --- /dev/null +++ b/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-03-25T11:58:33.497Z \ No newline at end of file diff --git a/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.yml b/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.yml new file mode 100644 index 000000000000..d8cf82fa10fd --- /dev/null +++ b/cassettes/features/v2/teams/Update-a-team-with-partial-update-returns-OK-response.yml @@ -0,0 +1,66 @@ +http_interactions: +- recorded_at: Wed, 25 Mar 2026 11:58:33 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"handle":"test-handle-1aa8ea88c040ca48","name":"test-name-1aa8ea88c040ca48"},"type":"team"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/team + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"5f6e649c-340c-46e7-96bc-bc5ececc7839","type":"team","attributes":{"avatar":null,"banner":15,"created_at":"2026-03-25T11:58:34.181069+00:00","description":null,"handle":"test-handle-1aa8ea88c040ca48","hidden_modules":null,"is_managed":false,"link_count":0,"modified_at":"2026-03-25T11:58:34.181069+00:00","name":"test-name-1aa8ea88c040ca48","summary":null,"user_count":0,"visible_modules":null},"relationships":{"team_links":{"data":[],"links":{"related":"/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839/links"}},"user_team_permissions":{"data":null,"links":{"related":"/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839/permission-settings"}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 201 + message: Created +- recorded_at: Wed, 25 Mar 2026 11:58:33 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"handle":"test-handle-1aa8ea88c040ca48","name":"test-name-1aa8ea88c040ca48 + updated"},"type":"team"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839 + response: + body: + encoding: UTF-8 + string: '{"data":{"type":"team","id":"5f6e649c-340c-46e7-96bc-bc5ececc7839","attributes":{"name":"test-name-1aa8ea88c040ca48 + updated","handle":"test-handle-1aa8ea88c040ca48","summary":null,"description":null,"avatar":null,"banner":15,"visible_modules":null,"hidden_modules":null,"created_at":"2026-03-25T11:58:34.181069+00:00","modified_at":"2026-03-25T11:58:34.727617+00:00","user_count":0,"link_count":0,"is_managed":false},"relationships":{"team_links":{"links":{"related":"/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839/permission-settings"}}}}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 25 Mar 2026 11:58:33 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/team/5f6e649c-340c-46e7-96bc-bc5ececc7839 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/examples/v2/teams/DeleteTeamMembership.rb b/examples/v2/teams/DeleteTeamMembership.rb index 1352083354e3..7ff28a9174a8 100644 --- a/examples/v2/teams/DeleteTeamMembership.rb +++ b/examples/v2/teams/DeleteTeamMembership.rb @@ -5,4 +5,7 @@ # there is a valid "dd_team" in the system DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] -api_instance.delete_team_membership(DD_TEAM_DATA_ID, "user_id") + +# there is a valid "user" in the system +USER_DATA_ID = ENV["USER_DATA_ID"] +api_instance.delete_team_membership(DD_TEAM_DATA_ID, USER_DATA_ID) diff --git a/examples/v2/teams/UpdateTeam_780342264.rb b/examples/v2/teams/UpdateTeam_780342264.rb new file mode 100644 index 000000000000..a911f4e2dc8b --- /dev/null +++ b/examples/v2/teams/UpdateTeam_780342264.rb @@ -0,0 +1,20 @@ +# Update a team with partial update returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::TeamsAPI.new + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ATTRIBUTES_HANDLE = ENV["DD_TEAM_DATA_ATTRIBUTES_HANDLE"] +DD_TEAM_DATA_ATTRIBUTES_NAME = ENV["DD_TEAM_DATA_ATTRIBUTES_NAME"] +DD_TEAM_DATA_ID = ENV["DD_TEAM_DATA_ID"] + +body = DatadogAPIClient::V2::TeamUpdateRequest.new({ + data: DatadogAPIClient::V2::TeamUpdate.new({ + attributes: DatadogAPIClient::V2::TeamUpdateAttributes.new({ + handle: DD_TEAM_DATA_ATTRIBUTES_HANDLE, + name: "Example Team updated", + }), + type: DatadogAPIClient::V2::TeamType::TEAM, + }), +}) +p api_instance.update_team(DD_TEAM_DATA_ID, body) diff --git a/features/v2/teams.feature b/features/v2/teams.feature index 480e3215e994..50f7f314684d 100644 --- a/features/v2/teams.feature +++ b/features/v2/teams.feature @@ -573,12 +573,14 @@ Feature: Teams When the request is sent Then the response status is 404 API error response. - @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Remove a user from a team returns "No Content" response Given new "DeleteTeamMembership" request And there is a valid "dd_team" in the system + And there is a valid "user" in the system + And there is a valid "team_membership" in the system And request contains "team_id" parameter from "dd_team.data.id" - And request contains "user_id" parameter from "REPLACE.ME" + And request contains "user_id" parameter from "user.data.id" When the request is sent Then the response status is 204 No Content @@ -607,11 +609,13 @@ Feature: Teams And the response "data.attributes.label" is equal to "New Label" And the response "data.attributes.url" is equal to "https://example.com" - @generated @skip @team:DataDog/aaa-omg + @skip @team:DataDog/aaa-omg Scenario: Update a team returns "API error response." response Given new "UpdateTeam" request - And request contains "team_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"avatar": "\ud83e\udd51", "banner": null, "handle": "example-team", "hidden_modules": [], "name": "Example Team", "visible_modules": []}, "relationships": {"team_links": {"data": [{"id": "f9bb8444-af7f-11ec-ac2c-da7ad0900001", "type": "team_links"}], "links": {"related": "/api/v2/team/c75a4a8e-20c7-11ee-a3a5-da7ad0900002/links"}}}, "type": "team"}} + And there is a valid "dd_team" in the system + And there is a valid "dd_team_2" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And body with value {"data": {"attributes": {"handle": "{{dd_team_2.data.attributes.handle}}", "name": "{{dd_team.data.attributes.name}}"}, "type": "team"}} When the request is sent Then the response status is 409 API error response. @@ -631,6 +635,17 @@ Feature: Teams And the response "data.attributes.hidden_modules" is equal to ["m3"] And the response "data.attributes.visible_modules" is equal to ["m1", "m2"] + @team:DataDog/aaa-omg + Scenario: Update a team with partial update returns "OK" response + Given new "UpdateTeam" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And body with value {"data": {"attributes": {"handle": "{{dd_team.data.attributes.handle}}", "name": "{{dd_team.data.attributes.name}} updated"}, "type": "team"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.name" is equal to "{{dd_team.data.attributes.name}} updated" + And the response "data.attributes.handle" is equal to "{{dd_team.data.attributes.handle}}" + @team:DataDog/aaa-omg Scenario: Update a user's membership attributes on a team returns "API error response." response Given new "UpdateTeamMembership" request From df4330166e0d6588866f6cd3a9518d3aa6e310cf Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 20:28:02 +0000 Subject: [PATCH 4/5] Add Sankey widget definition to Dashboards api specs (#2880) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v1/openapi.yaml | 330 ++++++++++++++++++ ...nkey-widget-and-network-data-source.frozen | 1 + ...-sankey-widget-and-network-data-source.yml | 43 +++ ...t-and-product-analytics-data-source.frozen | 1 + ...dget-and-product-analytics-data-source.yml | 43 +++ ...h-sankey-widget-and-rum-data-source.frozen | 1 + ...with-sankey-widget-and-rum-data-source.yml | 43 +++ .../dashboards/CreateDashboard_258152475.rb | 43 +++ .../dashboards/CreateDashboard_2932151909.rb | 39 +++ .../dashboards/CreateDashboard_373890042.rb | 39 +++ features/v1/dashboards.feature | 37 ++ .../sankey_network_widget.json | 41 +++ .../sankey_product_analytics_widget.json | 37 ++ .../sankey_rum_widget.json | 37 ++ lib/datadog_api_client/inflector.rb | 22 ++ .../v1/models/events_aggregation.rb | 63 ++++ .../v1/models/events_aggregation_value.rb | 36 ++ ...uct_analytics_audience_account_subquery.rb | 115 ++++++ .../product_analytics_audience_filters.rb | 141 ++++++++ ...ct_analytics_audience_occurrence_filter.rb | 115 ++++++ ...uct_analytics_audience_segment_subquery.rb | 115 ++++++ ...roduct_analytics_audience_user_subquery.rb | 115 ++++++ .../v1/models/sankey_join_keys.rb | 110 ++++++ .../v1/models/sankey_network_data_source.rb | 27 ++ .../v1/models/sankey_network_query.rb | 203 +++++++++++ .../v1/models/sankey_network_query_compute.rb | 119 +++++++ .../v1/models/sankey_network_query_mode.rb | 26 ++ .../v1/models/sankey_network_query_sort.rb | 115 ++++++ .../v1/models/sankey_network_request.rb | 119 +++++++ .../v1/models/sankey_network_request_type.rb | 26 ++ .../v1/models/sankey_rum_data_source.rb | 27 ++ .../v1/models/sankey_rum_query.rb | 220 ++++++++++++ .../v1/models/sankey_rum_query_mode.rb | 27 ++ .../v1/models/sankey_rum_request.rb | 119 +++++++ .../v1/models/sankey_widget_definition.rb | 185 ++++++++++ .../models/sankey_widget_definition_type.rb | 26 ++ .../v1/models/sankey_widget_request.rb | 63 ++++ .../v1/models/widget_definition.rb | 1 + 38 files changed, 2870 insertions(+) create mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.frozen create mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.yml create mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.frozen create mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.yml create mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.frozen create mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.yml create mode 100644 examples/v1/dashboards/CreateDashboard_258152475.rb create mode 100644 examples/v1/dashboards/CreateDashboard_2932151909.rb create mode 100644 examples/v1/dashboards/CreateDashboard_373890042.rb create mode 100644 features/v1/dashboards_json_payload/sankey_network_widget.json create mode 100644 features/v1/dashboards_json_payload/sankey_product_analytics_widget.json create mode 100644 features/v1/dashboards_json_payload/sankey_rum_widget.json create mode 100644 lib/datadog_api_client/v1/models/events_aggregation.rb create mode 100644 lib/datadog_api_client/v1/models/events_aggregation_value.rb create mode 100644 lib/datadog_api_client/v1/models/product_analytics_audience_account_subquery.rb create mode 100644 lib/datadog_api_client/v1/models/product_analytics_audience_filters.rb create mode 100644 lib/datadog_api_client/v1/models/product_analytics_audience_occurrence_filter.rb create mode 100644 lib/datadog_api_client/v1/models/product_analytics_audience_segment_subquery.rb create mode 100644 lib/datadog_api_client/v1/models/product_analytics_audience_user_subquery.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_join_keys.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_network_data_source.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_network_query.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_network_query_compute.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_network_query_mode.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_network_query_sort.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_network_request.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_network_request_type.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_rum_data_source.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_rum_query.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_rum_query_mode.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_rum_request.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_widget_definition.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_widget_definition_type.rb create mode 100644 lib/datadog_api_client/v1/models/sankey_widget_request.rb diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 2e8cfcd7772a..ede89abbaaef 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -2594,6 +2594,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: @@ -10981,6 +11018,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. @@ -12739,6 +12825,249 @@ 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: @@ -23817,6 +24146,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/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.frozen b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.frozen new file mode 100644 index 000000000000..819ff4202413 --- /dev/null +++ b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.frozen @@ -0,0 +1 @@ +2026-01-02T15:26:45.908Z \ No newline at end of file diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.yml b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.yml new file mode 100644 index 000000000000..21c30202e799 --- /dev/null +++ b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.yml @@ -0,0 +1,43 @@ +http_interactions: +- recorded_at: Fri, 02 Jan 2026 15:26:45 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 02 Jan 2026 15:26:45 GMT + request: + body: null + headers: + Accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/ngh-vn6-nqq + response: + body: + encoding: UTF-8 + string: '{"deleted_dashboard_id":"ngh-vn6-nqq"}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.frozen b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.frozen new file mode 100644 index 000000000000..d7f340133751 --- /dev/null +++ b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.frozen @@ -0,0 +1 @@ +2026-01-02T15:27:06.013Z \ No newline at end of file diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.yml b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.yml new file mode 100644 index 000000000000..7edc3f0c17db --- /dev/null +++ b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.yml @@ -0,0 +1,43 @@ +http_interactions: +- recorded_at: Fri, 02 Jan 2026 15:27:06 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 02 Jan 2026 15:27:06 GMT + request: + body: null + headers: + Accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/y6u-yab-bdi + response: + body: + encoding: UTF-8 + string: '{"deleted_dashboard_id":"y6u-yab-bdi"}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.frozen b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.frozen new file mode 100644 index 000000000000..6f1ee04a8ff4 --- /dev/null +++ b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.frozen @@ -0,0 +1 @@ +2026-01-02T15:26:19.626Z \ No newline at end of file diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.yml b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.yml new file mode 100644 index 000000000000..e4a24d1c69f6 --- /dev/null +++ b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.yml @@ -0,0 +1,43 @@ +http_interactions: +- recorded_at: Fri, 02 Jan 2026 15:26:19 GMT + request: + body: + encoding: UTF-8 + string: '{"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: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/dashboard + response: + body: + encoding: UTF-8 + string: '{"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 + status: + code: 200 + message: OK +- recorded_at: Fri, 02 Jan 2026 15:26:19 GMT + request: + body: null + headers: + Accept: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v1/dashboard/pgj-vt6-zeg + response: + body: + encoding: UTF-8 + string: '{"deleted_dashboard_id":"pgj-vt6-zeg"}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v1/dashboards/CreateDashboard_258152475.rb b/examples/v1/dashboards/CreateDashboard_258152475.rb new file mode 100644 index 000000000000..87c12fc7270e --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_258152475.rb @@ -0,0 +1,43 @@ +# Create a new dashboard with sankey widget and network data source + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::DashboardsAPI.new + +body = DatadogAPIClient::V1::Dashboard.new({ + title: "Example-Dashboard", + description: "", + widgets: [ + DatadogAPIClient::V1::Widget.new({ + layout: DatadogAPIClient::V1::WidgetLayout.new({ + x: 0, + y: 0, + width: 47, + height: 15, + }), + definition: DatadogAPIClient::V1::SankeyWidgetDefinition.new({ + title: "", + title_size: "16", + title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT, + type: DatadogAPIClient::V1::SankeyWidgetDefinitionType::SANKEY, + requests: [ + DatadogAPIClient::V1::SankeyNetworkRequest.new({ + query: DatadogAPIClient::V1::SankeyNetworkQuery.new({ + data_source: DatadogAPIClient::V1::SankeyNetworkDataSource::NETWORK, + query_string: "*", + group_by: [ + "source", + "destination", + ], + limit: 100, + }), + request_type: DatadogAPIClient::V1::SankeyNetworkRequestType::NETFLOW_SANKEY, + }), + ], + }), + }), + ], + template_variables: [], + layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE, + notify_list: [], +}) +p api_instance.create_dashboard(body) diff --git a/examples/v1/dashboards/CreateDashboard_2932151909.rb b/examples/v1/dashboards/CreateDashboard_2932151909.rb new file mode 100644 index 000000000000..66734e573da7 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_2932151909.rb @@ -0,0 +1,39 @@ +# Create a new dashboard with sankey widget and rum data source + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::DashboardsAPI.new + +body = DatadogAPIClient::V1::Dashboard.new({ + title: "Example-Dashboard", + description: "", + widgets: [ + DatadogAPIClient::V1::Widget.new({ + layout: DatadogAPIClient::V1::WidgetLayout.new({ + x: 0, + y: 0, + width: 47, + height: 15, + }), + definition: DatadogAPIClient::V1::SankeyWidgetDefinition.new({ + title: "", + title_size: "16", + title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT, + type: DatadogAPIClient::V1::SankeyWidgetDefinitionType::SANKEY, + requests: [ + DatadogAPIClient::V1::SankeyRumRequest.new({ + query: DatadogAPIClient::V1::SankeyRumQuery.new({ + data_source: DatadogAPIClient::V1::SankeyRumDataSource::RUM, + query_string: "@type:view", + mode: DatadogAPIClient::V1::SankeyRumQueryMode::SOURCE, + }), + request_type: DatadogAPIClient::V1::SankeyWidgetDefinitionType::SANKEY, + }), + ], + }), + }), + ], + template_variables: [], + layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE, + notify_list: [], +}) +p api_instance.create_dashboard(body) diff --git a/examples/v1/dashboards/CreateDashboard_373890042.rb b/examples/v1/dashboards/CreateDashboard_373890042.rb new file mode 100644 index 000000000000..59e0103cf409 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_373890042.rb @@ -0,0 +1,39 @@ +# Create a new dashboard with sankey widget and product analytics data source + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::DashboardsAPI.new + +body = DatadogAPIClient::V1::Dashboard.new({ + title: "Example-Dashboard", + description: "", + widgets: [ + DatadogAPIClient::V1::Widget.new({ + layout: DatadogAPIClient::V1::WidgetLayout.new({ + x: 0, + y: 0, + width: 47, + height: 15, + }), + definition: DatadogAPIClient::V1::SankeyWidgetDefinition.new({ + title: "", + title_size: "16", + title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT, + type: DatadogAPIClient::V1::SankeyWidgetDefinitionType::SANKEY, + requests: [ + DatadogAPIClient::V1::SankeyRumRequest.new({ + query: DatadogAPIClient::V1::SankeyRumQuery.new({ + data_source: DatadogAPIClient::V1::SankeyRumDataSource::PRODUCT_ANALYTICS, + query_string: "@type:session", + mode: DatadogAPIClient::V1::SankeyRumQueryMode::SOURCE, + }), + request_type: DatadogAPIClient::V1::SankeyWidgetDefinitionType::SANKEY, + }), + ], + }), + }), + ], + template_variables: [], + layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE, + notify_list: [], +}) +p api_instance.create_dashboard(body) diff --git a/features/v1/dashboards.feature b/features/v1/dashboards.feature index 1d88b5bbc9da..bf8e47ce3b67 100644 --- a/features/v1/dashboards.feature +++ b/features/v1/dashboards.feature @@ -801,6 +801,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/features/v1/dashboards_json_payload/sankey_network_widget.json b/features/v1/dashboards_json_payload/sankey_network_widget.json new file mode 100644 index 000000000000..1f237af8f2f8 --- /dev/null +++ b/features/v1/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/features/v1/dashboards_json_payload/sankey_product_analytics_widget.json b/features/v1/dashboards_json_payload/sankey_product_analytics_widget.json new file mode 100644 index 000000000000..c81edb69c6dc --- /dev/null +++ b/features/v1/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/features/v1/dashboards_json_payload/sankey_rum_widget.json b/features/v1/dashboards_json_payload/sankey_rum_widget.json new file mode 100644 index 000000000000..b8a833ee3758 --- /dev/null +++ b/features/v1/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":[ + + ] +} diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index a3054c026def..f42e819d682d 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -123,6 +123,8 @@ def overrides "v1.event_priority" => "EventPriority", "v1.event_query_definition" => "EventQueryDefinition", "v1.event_response" => "EventResponse", + "v1.events_aggregation" => "EventsAggregation", + "v1.events_aggregation_value" => "EventsAggregationValue", "v1.event_stream_widget_definition" => "EventStreamWidgetDefinition", "v1.event_stream_widget_definition_type" => "EventStreamWidgetDefinitionType", "v1.event_timeline_widget_definition" => "EventTimelineWidgetDefinition", @@ -479,6 +481,11 @@ def overrides "v1.powerpack_widget_definition" => "PowerpackWidgetDefinition", "v1.powerpack_widget_definition_type" => "PowerpackWidgetDefinitionType", "v1.process_query_definition" => "ProcessQueryDefinition", + "v1.product_analytics_audience_account_subquery" => "ProductAnalyticsAudienceAccountSubquery", + "v1.product_analytics_audience_filters" => "ProductAnalyticsAudienceFilters", + "v1.product_analytics_audience_occurrence_filter" => "ProductAnalyticsAudienceOccurrenceFilter", + "v1.product_analytics_audience_segment_subquery" => "ProductAnalyticsAudienceSegmentSubquery", + "v1.product_analytics_audience_user_subquery" => "ProductAnalyticsAudienceUserSubquery", "v1.query_sort_order" => "QuerySortOrder", "v1.query_value_widget_definition" => "QueryValueWidgetDefinition", "v1.query_value_widget_definition_type" => "QueryValueWidgetDefinitionType", @@ -489,6 +496,21 @@ def overrides "v1.run_workflow_widget_definition" => "RunWorkflowWidgetDefinition", "v1.run_workflow_widget_definition_type" => "RunWorkflowWidgetDefinitionType", "v1.run_workflow_widget_input" => "RunWorkflowWidgetInput", + "v1.sankey_join_keys" => "SankeyJoinKeys", + "v1.sankey_network_data_source" => "SankeyNetworkDataSource", + "v1.sankey_network_query" => "SankeyNetworkQuery", + "v1.sankey_network_query_compute" => "SankeyNetworkQueryCompute", + "v1.sankey_network_query_mode" => "SankeyNetworkQueryMode", + "v1.sankey_network_query_sort" => "SankeyNetworkQuerySort", + "v1.sankey_network_request" => "SankeyNetworkRequest", + "v1.sankey_network_request_type" => "SankeyNetworkRequestType", + "v1.sankey_rum_data_source" => "SankeyRumDataSource", + "v1.sankey_rum_query" => "SankeyRumQuery", + "v1.sankey_rum_query_mode" => "SankeyRumQueryMode", + "v1.sankey_rum_request" => "SankeyRumRequest", + "v1.sankey_widget_definition" => "SankeyWidgetDefinition", + "v1.sankey_widget_definition_type" => "SankeyWidgetDefinitionType", + "v1.sankey_widget_request" => "SankeyWidgetRequest", "v1.scatterplot_dimension" => "ScatterplotDimension", "v1.scatter_plot_request" => "ScatterPlotRequest", "v1.scatterplot_table_request" => "ScatterplotTableRequest", diff --git a/lib/datadog_api_client/v1/models/events_aggregation.rb b/lib/datadog_api_client/v1/models/events_aggregation.rb new file mode 100644 index 000000000000..976e2896a1ef --- /dev/null +++ b/lib/datadog_api_client/v1/models/events_aggregation.rb @@ -0,0 +1,63 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # The type of aggregation that can be performed on events-based queries. + module EventsAggregation + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'EventsAggregationValue', + :'String' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v1/models/events_aggregation_value.rb b/lib/datadog_api_client/v1/models/events_aggregation_value.rb new file mode 100644 index 000000000000..102277da157a --- /dev/null +++ b/lib/datadog_api_client/v1/models/events_aggregation_value.rb @@ -0,0 +1,36 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Standard aggregation types for events-based queries. + class EventsAggregationValue + include BaseEnumModel + + AVG = "avg".freeze + CARDINALITY = "cardinality".freeze + COUNT = "count".freeze + DELTA = "delta".freeze + EARLIEST = "earliest".freeze + LATEST = "latest".freeze + MAX = "max".freeze + MEDIAN = "median".freeze + MIN = "min".freeze + MOST_FREQUENT = "most_frequent".freeze + SUM = "sum".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/product_analytics_audience_account_subquery.rb b/lib/datadog_api_client/v1/models/product_analytics_audience_account_subquery.rb new file mode 100644 index 000000000000..d112a42c07f9 --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_audience_account_subquery.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Product Analytics audience account subquery. + class ProductAnalyticsAudienceAccountSubquery + include BaseGenericModel + + # + attr_accessor :name + + # + attr_accessor :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'query' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsAudienceAccountSubquery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/product_analytics_audience_filters.rb b/lib/datadog_api_client/v1/models/product_analytics_audience_filters.rb new file mode 100644 index 000000000000..65132499059f --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_audience_filters.rb @@ -0,0 +1,141 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Product Analytics/RUM audience filters. + class ProductAnalyticsAudienceFilters + include BaseGenericModel + + # + attr_accessor :accounts + + # + attr_accessor :filter_condition + + # + attr_accessor :segments + + # + attr_accessor :users + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'accounts' => :'accounts', + :'filter_condition' => :'filter_condition', + :'segments' => :'segments', + :'users' => :'users' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'accounts' => :'Array', + :'filter_condition' => :'String', + :'segments' => :'Array', + :'users' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsAudienceFilters` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'accounts') + if (value = attributes[:'accounts']).is_a?(Array) + self.accounts = value + end + end + + if attributes.key?(:'filter_condition') + self.filter_condition = attributes[:'filter_condition'] + end + + if attributes.key?(:'segments') + if (value = attributes[:'segments']).is_a?(Array) + self.segments = value + end + end + + if attributes.key?(:'users') + if (value = attributes[:'users']).is_a?(Array) + self.users = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + accounts == o.accounts && + filter_condition == o.filter_condition && + segments == o.segments && + users == o.users && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [accounts, filter_condition, segments, users, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/product_analytics_audience_occurrence_filter.rb b/lib/datadog_api_client/v1/models/product_analytics_audience_occurrence_filter.rb new file mode 100644 index 000000000000..dd05a1aef74c --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_audience_occurrence_filter.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # + class ProductAnalyticsAudienceOccurrenceFilter + include BaseGenericModel + + # + attr_accessor :operator + + # + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'operator' => :'operator', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'operator' => :'String', + :'value' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsAudienceOccurrenceFilter` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'operator') + self.operator = attributes[:'operator'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + operator == o.operator && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [operator, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/product_analytics_audience_segment_subquery.rb b/lib/datadog_api_client/v1/models/product_analytics_audience_segment_subquery.rb new file mode 100644 index 000000000000..d1bed71c20d8 --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_audience_segment_subquery.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Product Analytics audience segment subquery. + class ProductAnalyticsAudienceSegmentSubquery + include BaseGenericModel + + # + attr_accessor :name + + # + attr_accessor :segment_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'segment_id' => :'segment_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'segment_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsAudienceSegmentSubquery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'segment_id') + self.segment_id = attributes[:'segment_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + segment_id == o.segment_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, segment_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/product_analytics_audience_user_subquery.rb b/lib/datadog_api_client/v1/models/product_analytics_audience_user_subquery.rb new file mode 100644 index 000000000000..e73df00e5c87 --- /dev/null +++ b/lib/datadog_api_client/v1/models/product_analytics_audience_user_subquery.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Product Analytics audience user subquery. + class ProductAnalyticsAudienceUserSubquery + include BaseGenericModel + + # + attr_accessor :name + + # + attr_accessor :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'query' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsAudienceUserSubquery` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_join_keys.rb b/lib/datadog_api_client/v1/models/sankey_join_keys.rb new file mode 100644 index 000000000000..ac3cb11c6d66 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_join_keys.rb @@ -0,0 +1,110 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Join keys. + class SankeyJoinKeys + include BaseGenericModel + + # Primary join key. + attr_reader :primary + + # Secondary join keys. + attr_accessor :secondary + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'primary' => :'primary', + :'secondary' => :'secondary' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'primary' => :'String', + :'secondary' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyJoinKeys` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyJoinKeys`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'primary') + self.primary = attributes[:'primary'] + end + + if attributes.key?(:'secondary') + if (value = attributes[:'secondary']).is_a?(Array) + self.secondary = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @primary.nil? + true + end + + # Custom attribute writer method with validation + # @param primary [Object] Object to be assigned + # @!visibility private + def primary=(primary) + if primary.nil? + fail ArgumentError, 'invalid value for "primary", primary cannot be nil.' + end + @primary = primary + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + primary == o.primary && + secondary == o.secondary + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [primary, secondary].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_network_data_source.rb b/lib/datadog_api_client/v1/models/sankey_network_data_source.rb new file mode 100644 index 000000000000..3159a976c0b3 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_network_data_source.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Network data source type. + class SankeyNetworkDataSource + include BaseEnumModel + + NETWORK_DEVICE_FLOWS = "network_device_flows".freeze + NETWORK = "network".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_network_query.rb b/lib/datadog_api_client/v1/models/sankey_network_query.rb new file mode 100644 index 000000000000..c6b247efdb4f --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_network_query.rb @@ -0,0 +1,203 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Query configuration for Sankey network widget. + class SankeyNetworkQuery + include BaseGenericModel + + # Compute aggregation for network queries. + attr_accessor :compute + + # Network data source type. + attr_reader :data_source + + # Fields to group by. + attr_reader :group_by + + # Maximum number of results. + attr_reader :limit + + # Sankey mode for network queries. + attr_accessor :mode + + # Query string for filtering network data. + attr_reader :query_string + + # Whether to exclude missing values. + attr_accessor :should_exclude_missing + + # Sort configuration for network queries. + attr_accessor :sort + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compute' => :'compute', + :'data_source' => :'data_source', + :'group_by' => :'group_by', + :'limit' => :'limit', + :'mode' => :'mode', + :'query_string' => :'query_string', + :'should_exclude_missing' => :'should_exclude_missing', + :'sort' => :'sort' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compute' => :'SankeyNetworkQueryCompute', + :'data_source' => :'SankeyNetworkDataSource', + :'group_by' => :'Array', + :'limit' => :'Integer', + :'mode' => :'SankeyNetworkQueryMode', + :'query_string' => :'String', + :'should_exclude_missing' => :'Boolean', + :'sort' => :'SankeyNetworkQuerySort' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyNetworkQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyNetworkQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'compute') + self.compute = attributes[:'compute'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + end + + if attributes.key?(:'query_string') + self.query_string = attributes[:'query_string'] + end + + if attributes.key?(:'should_exclude_missing') + self.should_exclude_missing = attributes[:'should_exclude_missing'] + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @group_by.nil? + return false if @limit.nil? + return false if @query_string.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param group_by [Object] Object to be assigned + # @!visibility private + def group_by=(group_by) + if group_by.nil? + fail ArgumentError, 'invalid value for "group_by", group_by cannot be nil.' + end + @group_by = group_by + end + + # Custom attribute writer method with validation + # @param limit [Object] Object to be assigned + # @!visibility private + def limit=(limit) + if limit.nil? + fail ArgumentError, 'invalid value for "limit", limit cannot be nil.' + end + @limit = limit + end + + # Custom attribute writer method with validation + # @param query_string [Object] Object to be assigned + # @!visibility private + def query_string=(query_string) + if query_string.nil? + fail ArgumentError, 'invalid value for "query_string", query_string cannot be nil.' + end + @query_string = query_string + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + compute == o.compute && + data_source == o.data_source && + group_by == o.group_by && + limit == o.limit && + mode == o.mode && + query_string == o.query_string && + should_exclude_missing == o.should_exclude_missing && + sort == o.sort + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compute, data_source, group_by, limit, mode, query_string, should_exclude_missing, sort].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_network_query_compute.rb b/lib/datadog_api_client/v1/models/sankey_network_query_compute.rb new file mode 100644 index 000000000000..b0309dc60f07 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_network_query_compute.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Compute aggregation for network queries. + class SankeyNetworkQueryCompute + include BaseGenericModel + + # The type of aggregation that can be performed on events-based queries. + attr_reader :aggregation + + # Metric to aggregate. + attr_reader :metric + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregation' => :'aggregation', + :'metric' => :'metric' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregation' => :'EventsAggregation', + :'metric' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyNetworkQueryCompute` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyNetworkQueryCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'aggregation') + self.aggregation = attributes[:'aggregation'] + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @aggregation.nil? + return false if @metric.nil? + true + end + + # Custom attribute writer method with validation + # @param aggregation [Object] Object to be assigned + # @!visibility private + def aggregation=(aggregation) + if aggregation.nil? + fail ArgumentError, 'invalid value for "aggregation", aggregation cannot be nil.' + end + @aggregation = aggregation + end + + # Custom attribute writer method with validation + # @param metric [Object] Object to be assigned + # @!visibility private + def metric=(metric) + if metric.nil? + fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' + end + @metric = metric + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + aggregation == o.aggregation && + metric == o.metric + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregation, metric].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_network_query_mode.rb b/lib/datadog_api_client/v1/models/sankey_network_query_mode.rb new file mode 100644 index 000000000000..19377104be60 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_network_query_mode.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Sankey mode for network queries. + class SankeyNetworkQueryMode + include BaseEnumModel + + TARGET = "target".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_network_query_sort.rb b/lib/datadog_api_client/v1/models/sankey_network_query_sort.rb new file mode 100644 index 000000000000..47efafffc4fc --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_network_query_sort.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Sort configuration for network queries. + class SankeyNetworkQuerySort + include BaseGenericModel + + # Field to sort by. + attr_accessor :field + + # Widget sorting methods. + attr_accessor :order + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'field' => :'field', + :'order' => :'order' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'field' => :'String', + :'order' => :'WidgetSort' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyNetworkQuerySort` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.key?(:'order') + self.order = attributes[:'order'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + field == o.field && + order == o.order && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [field, order, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_network_request.rb b/lib/datadog_api_client/v1/models/sankey_network_request.rb new file mode 100644 index 000000000000..0c5ed4d59d23 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_network_request.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Sankey widget request for network data source. + class SankeyNetworkRequest + include BaseGenericModel + + # Query configuration for Sankey network widget. + attr_reader :query + + # Type of request for network Sankey widget. + attr_reader :request_type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'query' => :'query', + :'request_type' => :'request_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'query' => :'SankeyNetworkQuery', + :'request_type' => :'SankeyNetworkRequestType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyNetworkRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyNetworkRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'request_type') + self.request_type = attributes[:'request_type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @query.nil? + return false if @request_type.nil? + true + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + end + + # Custom attribute writer method with validation + # @param request_type [Object] Object to be assigned + # @!visibility private + def request_type=(request_type) + if request_type.nil? + fail ArgumentError, 'invalid value for "request_type", request_type cannot be nil.' + end + @request_type = request_type + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + query == o.query && + request_type == o.request_type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [query, request_type].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_network_request_type.rb b/lib/datadog_api_client/v1/models/sankey_network_request_type.rb new file mode 100644 index 000000000000..7229ae6fdb15 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_network_request_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Type of request for network Sankey widget. + class SankeyNetworkRequestType + include BaseEnumModel + + NETFLOW_SANKEY = "netflow_sankey".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_rum_data_source.rb b/lib/datadog_api_client/v1/models/sankey_rum_data_source.rb new file mode 100644 index 000000000000..c40507426083 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_rum_data_source.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Sankey widget with RUM data source. + class SankeyRumDataSource + include BaseEnumModel + + RUM = "rum".freeze + PRODUCT_ANALYTICS = "product_analytics".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_rum_query.rb b/lib/datadog_api_client/v1/models/sankey_rum_query.rb new file mode 100644 index 000000000000..b0b96020dadf --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_rum_query.rb @@ -0,0 +1,220 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Sankey widget with RUM data source query. + class SankeyRumQuery + include BaseGenericModel + + # Product Analytics/RUM audience filters. + attr_accessor :audience_filters + + # Sankey widget with RUM data source. + attr_reader :data_source + + # Entries per step. + attr_accessor :entries_per_step + + # Join keys. + attr_accessor :join_keys + + # Sankey mode for RUM queries. + attr_reader :mode + + # Number of steps. + attr_accessor :number_of_steps + + # + attr_accessor :occurrences + + # Query string. + attr_reader :query_string + + # Source. + attr_accessor :source + + # Subquery ID. + attr_accessor :subquery_id + + # Target. + attr_accessor :target + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'audience_filters' => :'audience_filters', + :'data_source' => :'data_source', + :'entries_per_step' => :'entries_per_step', + :'join_keys' => :'join_keys', + :'mode' => :'mode', + :'number_of_steps' => :'number_of_steps', + :'occurrences' => :'occurrences', + :'query_string' => :'query_string', + :'source' => :'source', + :'subquery_id' => :'subquery_id', + :'target' => :'target' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'audience_filters' => :'ProductAnalyticsAudienceFilters', + :'data_source' => :'SankeyRumDataSource', + :'entries_per_step' => :'Integer', + :'join_keys' => :'SankeyJoinKeys', + :'mode' => :'SankeyRumQueryMode', + :'number_of_steps' => :'Integer', + :'occurrences' => :'ProductAnalyticsAudienceOccurrenceFilter', + :'query_string' => :'String', + :'source' => :'String', + :'subquery_id' => :'String', + :'target' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyRumQuery` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyRumQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'audience_filters') + self.audience_filters = attributes[:'audience_filters'] + end + + if attributes.key?(:'data_source') + self.data_source = attributes[:'data_source'] + end + + if attributes.key?(:'entries_per_step') + self.entries_per_step = attributes[:'entries_per_step'] + end + + if attributes.key?(:'join_keys') + self.join_keys = attributes[:'join_keys'] + end + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + end + + if attributes.key?(:'number_of_steps') + self.number_of_steps = attributes[:'number_of_steps'] + end + + if attributes.key?(:'occurrences') + self.occurrences = attributes[:'occurrences'] + end + + if attributes.key?(:'query_string') + self.query_string = attributes[:'query_string'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'subquery_id') + self.subquery_id = attributes[:'subquery_id'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data_source.nil? + return false if @mode.nil? + return false if @query_string.nil? + true + end + + # Custom attribute writer method with validation + # @param data_source [Object] Object to be assigned + # @!visibility private + def data_source=(data_source) + if data_source.nil? + fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' + end + @data_source = data_source + end + + # Custom attribute writer method with validation + # @param mode [Object] Object to be assigned + # @!visibility private + def mode=(mode) + if mode.nil? + fail ArgumentError, 'invalid value for "mode", mode cannot be nil.' + end + @mode = mode + end + + # Custom attribute writer method with validation + # @param query_string [Object] Object to be assigned + # @!visibility private + def query_string=(query_string) + if query_string.nil? + fail ArgumentError, 'invalid value for "query_string", query_string cannot be nil.' + end + @query_string = query_string + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + audience_filters == o.audience_filters && + data_source == o.data_source && + entries_per_step == o.entries_per_step && + join_keys == o.join_keys && + mode == o.mode && + number_of_steps == o.number_of_steps && + occurrences == o.occurrences && + query_string == o.query_string && + source == o.source && + subquery_id == o.subquery_id && + target == o.target + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [audience_filters, data_source, entries_per_step, join_keys, mode, number_of_steps, occurrences, query_string, source, subquery_id, target].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_rum_query_mode.rb b/lib/datadog_api_client/v1/models/sankey_rum_query_mode.rb new file mode 100644 index 000000000000..8939876b0cf1 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_rum_query_mode.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Sankey mode for RUM queries. + class SankeyRumQueryMode + include BaseEnumModel + + SOURCE = "source".freeze + TARGET = "target".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_rum_request.rb b/lib/datadog_api_client/v1/models/sankey_rum_request.rb new file mode 100644 index 000000000000..dac587556744 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_rum_request.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Sankey widget with RUM data source. + class SankeyRumRequest + include BaseGenericModel + + # Sankey widget with RUM data source query. + attr_reader :query + + # Type of the Sankey widget. + attr_reader :request_type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'query' => :'query', + :'request_type' => :'request_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'query' => :'SankeyRumQuery', + :'request_type' => :'SankeyWidgetDefinitionType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyRumRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyRumRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'request_type') + self.request_type = attributes[:'request_type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @query.nil? + return false if @request_type.nil? + true + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + end + + # Custom attribute writer method with validation + # @param request_type [Object] Object to be assigned + # @!visibility private + def request_type=(request_type) + if request_type.nil? + fail ArgumentError, 'invalid value for "request_type", request_type cannot be nil.' + end + @request_type = request_type + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + query == o.query && + request_type == o.request_type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [query, request_type].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_widget_definition.rb b/lib/datadog_api_client/v1/models/sankey_widget_definition.rb new file mode 100644 index 000000000000..8bb9bd33c408 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_widget_definition.rb @@ -0,0 +1,185 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # The Sankey diagram visualizes the flow of data between categories, stages or sets of values. + class SankeyWidgetDefinition + include BaseGenericModel + + # List of Sankey widget requests. + attr_reader :requests + + # Whether to show links for "other" category. + attr_accessor :show_other_links + + # Whether to sort nodes in the Sankey diagram. + attr_accessor :sort_nodes + + # Time setting for the widget. + attr_accessor :time + + # Title of your widget. + attr_accessor :title + + # How to align the text on the widget. + attr_accessor :title_align + + # Size of the title. + attr_accessor :title_size + + # Type of the Sankey widget. + attr_reader :type + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'requests' => :'requests', + :'show_other_links' => :'show_other_links', + :'sort_nodes' => :'sort_nodes', + :'time' => :'time', + :'title' => :'title', + :'title_align' => :'title_align', + :'title_size' => :'title_size', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'requests' => :'Array', + :'show_other_links' => :'Boolean', + :'sort_nodes' => :'Boolean', + :'time' => :'WidgetTime', + :'title' => :'String', + :'title_align' => :'WidgetTextAlign', + :'title_size' => :'String', + :'type' => :'SankeyWidgetDefinitionType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyWidgetDefinition` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'requests') + if (value = attributes[:'requests']).is_a?(Array) + self.requests = value + end + end + + if attributes.key?(:'show_other_links') + self.show_other_links = attributes[:'show_other_links'] + end + + if attributes.key?(:'sort_nodes') + self.sort_nodes = attributes[:'sort_nodes'] + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'title_align') + self.title_align = attributes[:'title_align'] + end + + if attributes.key?(:'title_size') + self.title_size = attributes[:'title_size'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @requests.nil? + return false if @requests.length < 1 + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param requests [Object] Object to be assigned + # @!visibility private + def requests=(requests) + if requests.nil? + fail ArgumentError, 'invalid value for "requests", requests cannot be nil.' + end + if requests.length < 1 + fail ArgumentError, 'invalid value for "requests", number of items must be greater than or equal to 1.' + end + @requests = requests + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + requests == o.requests && + show_other_links == o.show_other_links && + sort_nodes == o.sort_nodes && + time == o.time && + title == o.title && + title_align == o.title_align && + title_size == o.title_size && + type == o.type + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [requests, show_other_links, sort_nodes, time, title, title_align, title_size, type].hash + end + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_widget_definition_type.rb b/lib/datadog_api_client/v1/models/sankey_widget_definition_type.rb new file mode 100644 index 000000000000..6d3eec96b94d --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_widget_definition_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Type of the Sankey widget. + class SankeyWidgetDefinitionType + include BaseEnumModel + + SANKEY = "sankey".freeze + end +end diff --git a/lib/datadog_api_client/v1/models/sankey_widget_request.rb b/lib/datadog_api_client/v1/models/sankey_widget_request.rb new file mode 100644 index 000000000000..7eb3ef52f658 --- /dev/null +++ b/lib/datadog_api_client/v1/models/sankey_widget_request.rb @@ -0,0 +1,63 @@ +=begin +#Datadog API V1 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V1 + # Request definition for Sankey widget. + module SankeyWidgetRequest + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'SankeyRumRequest', + :'SankeyNetworkRequest' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v1/models/widget_definition.rb b/lib/datadog_api_client/v1/models/widget_definition.rb index 897fd778977e..c7c3f6f992e4 100644 --- a/lib/datadog_api_client/v1/models/widget_definition.rb +++ b/lib/datadog_api_client/v1/models/widget_definition.rb @@ -52,6 +52,7 @@ def openapi_one_of :'SLOListWidgetDefinition', :'SLOWidgetDefinition', :'ScatterPlotWidgetDefinition', + :'SankeyWidgetDefinition', :'ServiceMapWidgetDefinition', :'ServiceSummaryWidgetDefinition', :'SplitGraphWidgetDefinition', From 885ad337a4121aec978b863ff96ccac700ba3d57 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 21:21:47 +0000 Subject: [PATCH 5/5] add max/min/defaults to description (#3168) Co-authored-by: ci.datadog-api-spec --- .generator/schemas/v1/openapi.yaml | 330 ------------------ .generator/schemas/v2/openapi.yaml | 6 +- ...nkey-widget-and-network-data-source.frozen | 1 - ...-sankey-widget-and-network-data-source.yml | 43 --- ...t-and-product-analytics-data-source.frozen | 1 - ...dget-and-product-analytics-data-source.yml | 43 --- ...h-sankey-widget-and-rum-data-source.frozen | 1 - ...with-sankey-widget-and-rum-data-source.yml | 43 --- .../dashboards/CreateDashboard_258152475.rb | 43 --- .../dashboards/CreateDashboard_2932151909.rb | 39 --- .../dashboards/CreateDashboard_373890042.rb | 39 --- features/v1/dashboards.feature | 37 -- lib/datadog_api_client/inflector.rb | 22 -- .../v1/models/events_aggregation.rb | 63 ---- .../v1/models/events_aggregation_value.rb | 36 -- ...uct_analytics_audience_account_subquery.rb | 115 ------ .../product_analytics_audience_filters.rb | 141 -------- ...ct_analytics_audience_occurrence_filter.rb | 115 ------ ...uct_analytics_audience_segment_subquery.rb | 115 ------ ...roduct_analytics_audience_user_subquery.rb | 115 ------ .../v1/models/sankey_join_keys.rb | 110 ------ .../v1/models/sankey_network_data_source.rb | 27 -- .../v1/models/sankey_network_query.rb | 203 ----------- .../v1/models/sankey_network_query_compute.rb | 119 ------- .../v1/models/sankey_network_query_mode.rb | 26 -- .../v1/models/sankey_network_query_sort.rb | 115 ------ .../v1/models/sankey_network_request.rb | 119 ------- .../v1/models/sankey_network_request_type.rb | 26 -- .../v1/models/sankey_rum_data_source.rb | 27 -- .../v1/models/sankey_rum_query.rb | 220 ------------ .../v1/models/sankey_rum_query_mode.rb | 27 -- .../v1/models/sankey_rum_request.rb | 119 ------- .../v1/models/sankey_widget_definition.rb | 185 ---------- .../models/sankey_widget_definition_type.rb | 26 -- .../v1/models/sankey_widget_request.rb | 63 ---- .../v1/models/widget_definition.rb | 1 - lib/datadog_api_client/v2/api/metrics_api.rb | 6 +- 37 files changed, 6 insertions(+), 2761 deletions(-) delete mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.frozen delete mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.yml delete mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.frozen delete mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.yml delete mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.frozen delete mode 100644 cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.yml delete mode 100644 examples/v1/dashboards/CreateDashboard_258152475.rb delete mode 100644 examples/v1/dashboards/CreateDashboard_2932151909.rb delete mode 100644 examples/v1/dashboards/CreateDashboard_373890042.rb delete mode 100644 lib/datadog_api_client/v1/models/events_aggregation.rb delete mode 100644 lib/datadog_api_client/v1/models/events_aggregation_value.rb delete mode 100644 lib/datadog_api_client/v1/models/product_analytics_audience_account_subquery.rb delete mode 100644 lib/datadog_api_client/v1/models/product_analytics_audience_filters.rb delete mode 100644 lib/datadog_api_client/v1/models/product_analytics_audience_occurrence_filter.rb delete mode 100644 lib/datadog_api_client/v1/models/product_analytics_audience_segment_subquery.rb delete mode 100644 lib/datadog_api_client/v1/models/product_analytics_audience_user_subquery.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_join_keys.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_network_data_source.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_network_query.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_network_query_compute.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_network_query_mode.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_network_query_sort.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_network_request.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_network_request_type.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_rum_data_source.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_rum_query.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_rum_query_mode.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_rum_request.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_widget_definition.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_widget_definition_type.rb delete mode 100644 lib/datadog_api_client/v1/models/sankey_widget_request.rb diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index ede89abbaaef..2e8cfcd7772a 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -2594,43 +2594,6 @@ 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: @@ -11018,55 +10981,6 @@ 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. @@ -12825,249 +12739,6 @@ 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: @@ -24146,7 +23817,6 @@ 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 30adedda3d38..338a55710a52 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -91070,7 +91070,7 @@ paths: schema: type: boolean - description: |- - Only return metrics that have been queried or not queried in the specified window. Dependent on being sent with `filter[queried]`. + Only return metrics that have been queried or not queried in the specified window. Dependent on being sent with `filter[queried]`. The default value is 2,592,000 seconds (30 days), the maximum value is 15,552,000 seconds (180 days), and the minimum value is 1 second. example: 15552000 in: query name: filter[queried][window][seconds] @@ -91098,7 +91098,7 @@ paths: schema: type: boolean - description: |- - Only return metrics that have been actively reporting in the specified window. + Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second. example: 3600 in: query name: window[seconds] @@ -91109,7 +91109,7 @@ paths: maximum: 2592000 minimum: 1 type: integer - - description: Maximum number of results per page. Use with `page[cursor]` for pagination. + - description: Maximum number of results per page. Use with `page[cursor]` for pagination. The default value is 10000, the maximum value is 10000, and the minimum value is 1. in: query name: page[size] required: false diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.frozen b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.frozen deleted file mode 100644 index 819ff4202413..000000000000 --- a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-02T15:26:45.908Z \ No newline at end of file diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.yml b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.yml deleted file mode 100644 index 21c30202e799..000000000000 --- a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-network-data-source.yml +++ /dev/null @@ -1,43 +0,0 @@ -http_interactions: -- recorded_at: Fri, 02 Jan 2026 15:26:45 GMT - request: - body: - encoding: UTF-8 - string: '{"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: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v1/dashboard - response: - body: - encoding: UTF-8 - string: '{"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 - status: - code: 200 - message: OK -- recorded_at: Fri, 02 Jan 2026 15:26:45 GMT - request: - body: null - headers: - Accept: - - application/json - method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/ngh-vn6-nqq - response: - body: - encoding: UTF-8 - string: '{"deleted_dashboard_id":"ngh-vn6-nqq"}' - headers: - Content-Type: - - application/json - status: - code: 200 - message: OK -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.frozen b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.frozen deleted file mode 100644 index d7f340133751..000000000000 --- a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-02T15:27:06.013Z \ No newline at end of file diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.yml b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.yml deleted file mode 100644 index 7edc3f0c17db..000000000000 --- a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-product-analytics-data-source.yml +++ /dev/null @@ -1,43 +0,0 @@ -http_interactions: -- recorded_at: Fri, 02 Jan 2026 15:27:06 GMT - request: - body: - encoding: UTF-8 - string: '{"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: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v1/dashboard - response: - body: - encoding: UTF-8 - string: '{"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 - status: - code: 200 - message: OK -- recorded_at: Fri, 02 Jan 2026 15:27:06 GMT - request: - body: null - headers: - Accept: - - application/json - method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/y6u-yab-bdi - response: - body: - encoding: UTF-8 - string: '{"deleted_dashboard_id":"y6u-yab-bdi"}' - headers: - Content-Type: - - application/json - status: - code: 200 - message: OK -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.frozen b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.frozen deleted file mode 100644 index 6f1ee04a8ff4..000000000000 --- a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-01-02T15:26:19.626Z \ No newline at end of file diff --git a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.yml b/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.yml deleted file mode 100644 index e4a24d1c69f6..000000000000 --- a/cassettes/features/v1/dashboards/Create-a-new-dashboard-with-sankey-widget-and-rum-data-source.yml +++ /dev/null @@ -1,43 +0,0 @@ -http_interactions: -- recorded_at: Fri, 02 Jan 2026 15:26:19 GMT - request: - body: - encoding: UTF-8 - string: '{"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: - Accept: - - application/json - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v1/dashboard - response: - body: - encoding: UTF-8 - string: '{"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 - status: - code: 200 - message: OK -- recorded_at: Fri, 02 Jan 2026 15:26:19 GMT - request: - body: null - headers: - Accept: - - application/json - method: DELETE - uri: https://api.datadoghq.com/api/v1/dashboard/pgj-vt6-zeg - response: - body: - encoding: UTF-8 - string: '{"deleted_dashboard_id":"pgj-vt6-zeg"}' - headers: - Content-Type: - - application/json - status: - code: 200 - message: OK -recorded_with: VCR 6.0.0 diff --git a/examples/v1/dashboards/CreateDashboard_258152475.rb b/examples/v1/dashboards/CreateDashboard_258152475.rb deleted file mode 100644 index 87c12fc7270e..000000000000 --- a/examples/v1/dashboards/CreateDashboard_258152475.rb +++ /dev/null @@ -1,43 +0,0 @@ -# Create a new dashboard with sankey widget and network data source - -require "datadog_api_client" -api_instance = DatadogAPIClient::V1::DashboardsAPI.new - -body = DatadogAPIClient::V1::Dashboard.new({ - title: "Example-Dashboard", - description: "", - widgets: [ - DatadogAPIClient::V1::Widget.new({ - layout: DatadogAPIClient::V1::WidgetLayout.new({ - x: 0, - y: 0, - width: 47, - height: 15, - }), - definition: DatadogAPIClient::V1::SankeyWidgetDefinition.new({ - title: "", - title_size: "16", - title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT, - type: DatadogAPIClient::V1::SankeyWidgetDefinitionType::SANKEY, - requests: [ - DatadogAPIClient::V1::SankeyNetworkRequest.new({ - query: DatadogAPIClient::V1::SankeyNetworkQuery.new({ - data_source: DatadogAPIClient::V1::SankeyNetworkDataSource::NETWORK, - query_string: "*", - group_by: [ - "source", - "destination", - ], - limit: 100, - }), - request_type: DatadogAPIClient::V1::SankeyNetworkRequestType::NETFLOW_SANKEY, - }), - ], - }), - }), - ], - template_variables: [], - layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE, - notify_list: [], -}) -p api_instance.create_dashboard(body) diff --git a/examples/v1/dashboards/CreateDashboard_2932151909.rb b/examples/v1/dashboards/CreateDashboard_2932151909.rb deleted file mode 100644 index 66734e573da7..000000000000 --- a/examples/v1/dashboards/CreateDashboard_2932151909.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Create a new dashboard with sankey widget and rum data source - -require "datadog_api_client" -api_instance = DatadogAPIClient::V1::DashboardsAPI.new - -body = DatadogAPIClient::V1::Dashboard.new({ - title: "Example-Dashboard", - description: "", - widgets: [ - DatadogAPIClient::V1::Widget.new({ - layout: DatadogAPIClient::V1::WidgetLayout.new({ - x: 0, - y: 0, - width: 47, - height: 15, - }), - definition: DatadogAPIClient::V1::SankeyWidgetDefinition.new({ - title: "", - title_size: "16", - title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT, - type: DatadogAPIClient::V1::SankeyWidgetDefinitionType::SANKEY, - requests: [ - DatadogAPIClient::V1::SankeyRumRequest.new({ - query: DatadogAPIClient::V1::SankeyRumQuery.new({ - data_source: DatadogAPIClient::V1::SankeyRumDataSource::RUM, - query_string: "@type:view", - mode: DatadogAPIClient::V1::SankeyRumQueryMode::SOURCE, - }), - request_type: DatadogAPIClient::V1::SankeyWidgetDefinitionType::SANKEY, - }), - ], - }), - }), - ], - template_variables: [], - layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE, - notify_list: [], -}) -p api_instance.create_dashboard(body) diff --git a/examples/v1/dashboards/CreateDashboard_373890042.rb b/examples/v1/dashboards/CreateDashboard_373890042.rb deleted file mode 100644 index 59e0103cf409..000000000000 --- a/examples/v1/dashboards/CreateDashboard_373890042.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Create a new dashboard with sankey widget and product analytics data source - -require "datadog_api_client" -api_instance = DatadogAPIClient::V1::DashboardsAPI.new - -body = DatadogAPIClient::V1::Dashboard.new({ - title: "Example-Dashboard", - description: "", - widgets: [ - DatadogAPIClient::V1::Widget.new({ - layout: DatadogAPIClient::V1::WidgetLayout.new({ - x: 0, - y: 0, - width: 47, - height: 15, - }), - definition: DatadogAPIClient::V1::SankeyWidgetDefinition.new({ - title: "", - title_size: "16", - title_align: DatadogAPIClient::V1::WidgetTextAlign::LEFT, - type: DatadogAPIClient::V1::SankeyWidgetDefinitionType::SANKEY, - requests: [ - DatadogAPIClient::V1::SankeyRumRequest.new({ - query: DatadogAPIClient::V1::SankeyRumQuery.new({ - data_source: DatadogAPIClient::V1::SankeyRumDataSource::PRODUCT_ANALYTICS, - query_string: "@type:session", - mode: DatadogAPIClient::V1::SankeyRumQueryMode::SOURCE, - }), - request_type: DatadogAPIClient::V1::SankeyWidgetDefinitionType::SANKEY, - }), - ], - }), - }), - ], - template_variables: [], - layout_type: DatadogAPIClient::V1::DashboardLayoutType::FREE, - notify_list: [], -}) -p api_instance.create_dashboard(body) diff --git a/features/v1/dashboards.feature b/features/v1/dashboards.feature index bf8e47ce3b67..1d88b5bbc9da 100644 --- a/features/v1/dashboards.feature +++ b/features/v1/dashboards.feature @@ -801,43 +801,6 @@ 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/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index f42e819d682d..a3054c026def 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -123,8 +123,6 @@ def overrides "v1.event_priority" => "EventPriority", "v1.event_query_definition" => "EventQueryDefinition", "v1.event_response" => "EventResponse", - "v1.events_aggregation" => "EventsAggregation", - "v1.events_aggregation_value" => "EventsAggregationValue", "v1.event_stream_widget_definition" => "EventStreamWidgetDefinition", "v1.event_stream_widget_definition_type" => "EventStreamWidgetDefinitionType", "v1.event_timeline_widget_definition" => "EventTimelineWidgetDefinition", @@ -481,11 +479,6 @@ def overrides "v1.powerpack_widget_definition" => "PowerpackWidgetDefinition", "v1.powerpack_widget_definition_type" => "PowerpackWidgetDefinitionType", "v1.process_query_definition" => "ProcessQueryDefinition", - "v1.product_analytics_audience_account_subquery" => "ProductAnalyticsAudienceAccountSubquery", - "v1.product_analytics_audience_filters" => "ProductAnalyticsAudienceFilters", - "v1.product_analytics_audience_occurrence_filter" => "ProductAnalyticsAudienceOccurrenceFilter", - "v1.product_analytics_audience_segment_subquery" => "ProductAnalyticsAudienceSegmentSubquery", - "v1.product_analytics_audience_user_subquery" => "ProductAnalyticsAudienceUserSubquery", "v1.query_sort_order" => "QuerySortOrder", "v1.query_value_widget_definition" => "QueryValueWidgetDefinition", "v1.query_value_widget_definition_type" => "QueryValueWidgetDefinitionType", @@ -496,21 +489,6 @@ def overrides "v1.run_workflow_widget_definition" => "RunWorkflowWidgetDefinition", "v1.run_workflow_widget_definition_type" => "RunWorkflowWidgetDefinitionType", "v1.run_workflow_widget_input" => "RunWorkflowWidgetInput", - "v1.sankey_join_keys" => "SankeyJoinKeys", - "v1.sankey_network_data_source" => "SankeyNetworkDataSource", - "v1.sankey_network_query" => "SankeyNetworkQuery", - "v1.sankey_network_query_compute" => "SankeyNetworkQueryCompute", - "v1.sankey_network_query_mode" => "SankeyNetworkQueryMode", - "v1.sankey_network_query_sort" => "SankeyNetworkQuerySort", - "v1.sankey_network_request" => "SankeyNetworkRequest", - "v1.sankey_network_request_type" => "SankeyNetworkRequestType", - "v1.sankey_rum_data_source" => "SankeyRumDataSource", - "v1.sankey_rum_query" => "SankeyRumQuery", - "v1.sankey_rum_query_mode" => "SankeyRumQueryMode", - "v1.sankey_rum_request" => "SankeyRumRequest", - "v1.sankey_widget_definition" => "SankeyWidgetDefinition", - "v1.sankey_widget_definition_type" => "SankeyWidgetDefinitionType", - "v1.sankey_widget_request" => "SankeyWidgetRequest", "v1.scatterplot_dimension" => "ScatterplotDimension", "v1.scatter_plot_request" => "ScatterPlotRequest", "v1.scatterplot_table_request" => "ScatterplotTableRequest", diff --git a/lib/datadog_api_client/v1/models/events_aggregation.rb b/lib/datadog_api_client/v1/models/events_aggregation.rb deleted file mode 100644 index 976e2896a1ef..000000000000 --- a/lib/datadog_api_client/v1/models/events_aggregation.rb +++ /dev/null @@ -1,63 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # The type of aggregation that can be performed on events-based queries. - module EventsAggregation - class << self - include BaseOneOfModel - include BaseOneOfModelNoDiscriminator - - # List of class defined in oneOf (OpenAPI v3) - def openapi_one_of - [ - :'EventsAggregationValue', - :'String' - ] - end - # Builds the object - # @param data [Mixed] Data to be matched against the list of oneOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of oneOf items and attempt to identify the appropriate one. - # Note: - # - We do not attempt to check whether exactly one item matches. - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_one_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - typed_data = find_and_cast_into_type(klass, data) - next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed - return typed_data if typed_data - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - if openapi_one_of.include?(:AnyType) - data - else - self._unparsed = true - DatadogAPIClient::UnparsedObject.new(data) - end - end - end - end -end diff --git a/lib/datadog_api_client/v1/models/events_aggregation_value.rb b/lib/datadog_api_client/v1/models/events_aggregation_value.rb deleted file mode 100644 index 102277da157a..000000000000 --- a/lib/datadog_api_client/v1/models/events_aggregation_value.rb +++ /dev/null @@ -1,36 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Standard aggregation types for events-based queries. - class EventsAggregationValue - include BaseEnumModel - - AVG = "avg".freeze - CARDINALITY = "cardinality".freeze - COUNT = "count".freeze - DELTA = "delta".freeze - EARLIEST = "earliest".freeze - LATEST = "latest".freeze - MAX = "max".freeze - MEDIAN = "median".freeze - MIN = "min".freeze - MOST_FREQUENT = "most_frequent".freeze - SUM = "sum".freeze - end -end diff --git a/lib/datadog_api_client/v1/models/product_analytics_audience_account_subquery.rb b/lib/datadog_api_client/v1/models/product_analytics_audience_account_subquery.rb deleted file mode 100644 index d112a42c07f9..000000000000 --- a/lib/datadog_api_client/v1/models/product_analytics_audience_account_subquery.rb +++ /dev/null @@ -1,115 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Product Analytics audience account subquery. - class ProductAnalyticsAudienceAccountSubquery - include BaseGenericModel - - # - attr_accessor :name - - # - attr_accessor :query - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name', - :'query' => :'query' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String', - :'query' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsAudienceAccountSubquery` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - query == o.query && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, query, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/product_analytics_audience_filters.rb b/lib/datadog_api_client/v1/models/product_analytics_audience_filters.rb deleted file mode 100644 index 65132499059f..000000000000 --- a/lib/datadog_api_client/v1/models/product_analytics_audience_filters.rb +++ /dev/null @@ -1,141 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Product Analytics/RUM audience filters. - class ProductAnalyticsAudienceFilters - include BaseGenericModel - - # - attr_accessor :accounts - - # - attr_accessor :filter_condition - - # - attr_accessor :segments - - # - attr_accessor :users - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'accounts' => :'accounts', - :'filter_condition' => :'filter_condition', - :'segments' => :'segments', - :'users' => :'users' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'accounts' => :'Array', - :'filter_condition' => :'String', - :'segments' => :'Array', - :'users' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsAudienceFilters` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'accounts') - if (value = attributes[:'accounts']).is_a?(Array) - self.accounts = value - end - end - - if attributes.key?(:'filter_condition') - self.filter_condition = attributes[:'filter_condition'] - end - - if attributes.key?(:'segments') - if (value = attributes[:'segments']).is_a?(Array) - self.segments = value - end - end - - if attributes.key?(:'users') - if (value = attributes[:'users']).is_a?(Array) - self.users = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - accounts == o.accounts && - filter_condition == o.filter_condition && - segments == o.segments && - users == o.users && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [accounts, filter_condition, segments, users, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/product_analytics_audience_occurrence_filter.rb b/lib/datadog_api_client/v1/models/product_analytics_audience_occurrence_filter.rb deleted file mode 100644 index dd05a1aef74c..000000000000 --- a/lib/datadog_api_client/v1/models/product_analytics_audience_occurrence_filter.rb +++ /dev/null @@ -1,115 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # - class ProductAnalyticsAudienceOccurrenceFilter - include BaseGenericModel - - # - attr_accessor :operator - - # - attr_accessor :value - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'operator' => :'operator', - :'value' => :'value' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'operator' => :'String', - :'value' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsAudienceOccurrenceFilter` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'operator') - self.operator = attributes[:'operator'] - end - - if attributes.key?(:'value') - self.value = attributes[:'value'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - operator == o.operator && - value == o.value && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [operator, value, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/product_analytics_audience_segment_subquery.rb b/lib/datadog_api_client/v1/models/product_analytics_audience_segment_subquery.rb deleted file mode 100644 index d1bed71c20d8..000000000000 --- a/lib/datadog_api_client/v1/models/product_analytics_audience_segment_subquery.rb +++ /dev/null @@ -1,115 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Product Analytics audience segment subquery. - class ProductAnalyticsAudienceSegmentSubquery - include BaseGenericModel - - # - attr_accessor :name - - # - attr_accessor :segment_id - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name', - :'segment_id' => :'segment_id' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String', - :'segment_id' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsAudienceSegmentSubquery` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'segment_id') - self.segment_id = attributes[:'segment_id'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - segment_id == o.segment_id && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, segment_id, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/product_analytics_audience_user_subquery.rb b/lib/datadog_api_client/v1/models/product_analytics_audience_user_subquery.rb deleted file mode 100644 index e73df00e5c87..000000000000 --- a/lib/datadog_api_client/v1/models/product_analytics_audience_user_subquery.rb +++ /dev/null @@ -1,115 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Product Analytics audience user subquery. - class ProductAnalyticsAudienceUserSubquery - include BaseGenericModel - - # - attr_accessor :name - - # - attr_accessor :query - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name', - :'query' => :'query' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String', - :'query' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::ProductAnalyticsAudienceUserSubquery` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - query == o.query && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, query, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_join_keys.rb b/lib/datadog_api_client/v1/models/sankey_join_keys.rb deleted file mode 100644 index ac3cb11c6d66..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_join_keys.rb +++ /dev/null @@ -1,110 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Join keys. - class SankeyJoinKeys - include BaseGenericModel - - # Primary join key. - attr_reader :primary - - # Secondary join keys. - attr_accessor :secondary - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'primary' => :'primary', - :'secondary' => :'secondary' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'primary' => :'String', - :'secondary' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyJoinKeys` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyJoinKeys`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'primary') - self.primary = attributes[:'primary'] - end - - if attributes.key?(:'secondary') - if (value = attributes[:'secondary']).is_a?(Array) - self.secondary = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @primary.nil? - true - end - - # Custom attribute writer method with validation - # @param primary [Object] Object to be assigned - # @!visibility private - def primary=(primary) - if primary.nil? - fail ArgumentError, 'invalid value for "primary", primary cannot be nil.' - end - @primary = primary - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - primary == o.primary && - secondary == o.secondary - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [primary, secondary].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_network_data_source.rb b/lib/datadog_api_client/v1/models/sankey_network_data_source.rb deleted file mode 100644 index 3159a976c0b3..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_network_data_source.rb +++ /dev/null @@ -1,27 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Network data source type. - class SankeyNetworkDataSource - include BaseEnumModel - - NETWORK_DEVICE_FLOWS = "network_device_flows".freeze - NETWORK = "network".freeze - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_network_query.rb b/lib/datadog_api_client/v1/models/sankey_network_query.rb deleted file mode 100644 index c6b247efdb4f..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_network_query.rb +++ /dev/null @@ -1,203 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Query configuration for Sankey network widget. - class SankeyNetworkQuery - include BaseGenericModel - - # Compute aggregation for network queries. - attr_accessor :compute - - # Network data source type. - attr_reader :data_source - - # Fields to group by. - attr_reader :group_by - - # Maximum number of results. - attr_reader :limit - - # Sankey mode for network queries. - attr_accessor :mode - - # Query string for filtering network data. - attr_reader :query_string - - # Whether to exclude missing values. - attr_accessor :should_exclude_missing - - # Sort configuration for network queries. - attr_accessor :sort - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'compute' => :'compute', - :'data_source' => :'data_source', - :'group_by' => :'group_by', - :'limit' => :'limit', - :'mode' => :'mode', - :'query_string' => :'query_string', - :'should_exclude_missing' => :'should_exclude_missing', - :'sort' => :'sort' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'compute' => :'SankeyNetworkQueryCompute', - :'data_source' => :'SankeyNetworkDataSource', - :'group_by' => :'Array', - :'limit' => :'Integer', - :'mode' => :'SankeyNetworkQueryMode', - :'query_string' => :'String', - :'should_exclude_missing' => :'Boolean', - :'sort' => :'SankeyNetworkQuerySort' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyNetworkQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyNetworkQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'compute') - self.compute = attributes[:'compute'] - end - - if attributes.key?(:'data_source') - self.data_source = attributes[:'data_source'] - end - - if attributes.key?(:'group_by') - if (value = attributes[:'group_by']).is_a?(Array) - self.group_by = value - end - end - - if attributes.key?(:'limit') - self.limit = attributes[:'limit'] - end - - if attributes.key?(:'mode') - self.mode = attributes[:'mode'] - end - - if attributes.key?(:'query_string') - self.query_string = attributes[:'query_string'] - end - - if attributes.key?(:'should_exclude_missing') - self.should_exclude_missing = attributes[:'should_exclude_missing'] - end - - if attributes.key?(:'sort') - self.sort = attributes[:'sort'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data_source.nil? - return false if @group_by.nil? - return false if @limit.nil? - return false if @query_string.nil? - true - end - - # Custom attribute writer method with validation - # @param data_source [Object] Object to be assigned - # @!visibility private - def data_source=(data_source) - if data_source.nil? - fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' - end - @data_source = data_source - end - - # Custom attribute writer method with validation - # @param group_by [Object] Object to be assigned - # @!visibility private - def group_by=(group_by) - if group_by.nil? - fail ArgumentError, 'invalid value for "group_by", group_by cannot be nil.' - end - @group_by = group_by - end - - # Custom attribute writer method with validation - # @param limit [Object] Object to be assigned - # @!visibility private - def limit=(limit) - if limit.nil? - fail ArgumentError, 'invalid value for "limit", limit cannot be nil.' - end - @limit = limit - end - - # Custom attribute writer method with validation - # @param query_string [Object] Object to be assigned - # @!visibility private - def query_string=(query_string) - if query_string.nil? - fail ArgumentError, 'invalid value for "query_string", query_string cannot be nil.' - end - @query_string = query_string - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - compute == o.compute && - data_source == o.data_source && - group_by == o.group_by && - limit == o.limit && - mode == o.mode && - query_string == o.query_string && - should_exclude_missing == o.should_exclude_missing && - sort == o.sort - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [compute, data_source, group_by, limit, mode, query_string, should_exclude_missing, sort].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_network_query_compute.rb b/lib/datadog_api_client/v1/models/sankey_network_query_compute.rb deleted file mode 100644 index b0309dc60f07..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_network_query_compute.rb +++ /dev/null @@ -1,119 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Compute aggregation for network queries. - class SankeyNetworkQueryCompute - include BaseGenericModel - - # The type of aggregation that can be performed on events-based queries. - attr_reader :aggregation - - # Metric to aggregate. - attr_reader :metric - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'aggregation' => :'aggregation', - :'metric' => :'metric' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'aggregation' => :'EventsAggregation', - :'metric' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyNetworkQueryCompute` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyNetworkQueryCompute`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'aggregation') - self.aggregation = attributes[:'aggregation'] - end - - if attributes.key?(:'metric') - self.metric = attributes[:'metric'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @aggregation.nil? - return false if @metric.nil? - true - end - - # Custom attribute writer method with validation - # @param aggregation [Object] Object to be assigned - # @!visibility private - def aggregation=(aggregation) - if aggregation.nil? - fail ArgumentError, 'invalid value for "aggregation", aggregation cannot be nil.' - end - @aggregation = aggregation - end - - # Custom attribute writer method with validation - # @param metric [Object] Object to be assigned - # @!visibility private - def metric=(metric) - if metric.nil? - fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' - end - @metric = metric - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - aggregation == o.aggregation && - metric == o.metric - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [aggregation, metric].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_network_query_mode.rb b/lib/datadog_api_client/v1/models/sankey_network_query_mode.rb deleted file mode 100644 index 19377104be60..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_network_query_mode.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Sankey mode for network queries. - class SankeyNetworkQueryMode - include BaseEnumModel - - TARGET = "target".freeze - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_network_query_sort.rb b/lib/datadog_api_client/v1/models/sankey_network_query_sort.rb deleted file mode 100644 index 47efafffc4fc..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_network_query_sort.rb +++ /dev/null @@ -1,115 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Sort configuration for network queries. - class SankeyNetworkQuerySort - include BaseGenericModel - - # Field to sort by. - attr_accessor :field - - # Widget sorting methods. - attr_accessor :order - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'field' => :'field', - :'order' => :'order' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'field' => :'String', - :'order' => :'WidgetSort' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyNetworkQuerySort` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'field') - self.field = attributes[:'field'] - end - - if attributes.key?(:'order') - self.order = attributes[:'order'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - field == o.field && - order == o.order && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [field, order, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_network_request.rb b/lib/datadog_api_client/v1/models/sankey_network_request.rb deleted file mode 100644 index 0c5ed4d59d23..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_network_request.rb +++ /dev/null @@ -1,119 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Sankey widget request for network data source. - class SankeyNetworkRequest - include BaseGenericModel - - # Query configuration for Sankey network widget. - attr_reader :query - - # Type of request for network Sankey widget. - attr_reader :request_type - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'query' => :'query', - :'request_type' => :'request_type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'query' => :'SankeyNetworkQuery', - :'request_type' => :'SankeyNetworkRequestType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyNetworkRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyNetworkRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @query.nil? - return false if @request_type.nil? - true - end - - # Custom attribute writer method with validation - # @param query [Object] Object to be assigned - # @!visibility private - def query=(query) - if query.nil? - fail ArgumentError, 'invalid value for "query", query cannot be nil.' - end - @query = query - end - - # Custom attribute writer method with validation - # @param request_type [Object] Object to be assigned - # @!visibility private - def request_type=(request_type) - if request_type.nil? - fail ArgumentError, 'invalid value for "request_type", request_type cannot be nil.' - end - @request_type = request_type - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - query == o.query && - request_type == o.request_type - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [query, request_type].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_network_request_type.rb b/lib/datadog_api_client/v1/models/sankey_network_request_type.rb deleted file mode 100644 index 7229ae6fdb15..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_network_request_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Type of request for network Sankey widget. - class SankeyNetworkRequestType - include BaseEnumModel - - NETFLOW_SANKEY = "netflow_sankey".freeze - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_rum_data_source.rb b/lib/datadog_api_client/v1/models/sankey_rum_data_source.rb deleted file mode 100644 index c40507426083..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_rum_data_source.rb +++ /dev/null @@ -1,27 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Sankey widget with RUM data source. - class SankeyRumDataSource - include BaseEnumModel - - RUM = "rum".freeze - PRODUCT_ANALYTICS = "product_analytics".freeze - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_rum_query.rb b/lib/datadog_api_client/v1/models/sankey_rum_query.rb deleted file mode 100644 index b0b96020dadf..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_rum_query.rb +++ /dev/null @@ -1,220 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Sankey widget with RUM data source query. - class SankeyRumQuery - include BaseGenericModel - - # Product Analytics/RUM audience filters. - attr_accessor :audience_filters - - # Sankey widget with RUM data source. - attr_reader :data_source - - # Entries per step. - attr_accessor :entries_per_step - - # Join keys. - attr_accessor :join_keys - - # Sankey mode for RUM queries. - attr_reader :mode - - # Number of steps. - attr_accessor :number_of_steps - - # - attr_accessor :occurrences - - # Query string. - attr_reader :query_string - - # Source. - attr_accessor :source - - # Subquery ID. - attr_accessor :subquery_id - - # Target. - attr_accessor :target - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'audience_filters' => :'audience_filters', - :'data_source' => :'data_source', - :'entries_per_step' => :'entries_per_step', - :'join_keys' => :'join_keys', - :'mode' => :'mode', - :'number_of_steps' => :'number_of_steps', - :'occurrences' => :'occurrences', - :'query_string' => :'query_string', - :'source' => :'source', - :'subquery_id' => :'subquery_id', - :'target' => :'target' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'audience_filters' => :'ProductAnalyticsAudienceFilters', - :'data_source' => :'SankeyRumDataSource', - :'entries_per_step' => :'Integer', - :'join_keys' => :'SankeyJoinKeys', - :'mode' => :'SankeyRumQueryMode', - :'number_of_steps' => :'Integer', - :'occurrences' => :'ProductAnalyticsAudienceOccurrenceFilter', - :'query_string' => :'String', - :'source' => :'String', - :'subquery_id' => :'String', - :'target' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyRumQuery` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyRumQuery`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'audience_filters') - self.audience_filters = attributes[:'audience_filters'] - end - - if attributes.key?(:'data_source') - self.data_source = attributes[:'data_source'] - end - - if attributes.key?(:'entries_per_step') - self.entries_per_step = attributes[:'entries_per_step'] - end - - if attributes.key?(:'join_keys') - self.join_keys = attributes[:'join_keys'] - end - - if attributes.key?(:'mode') - self.mode = attributes[:'mode'] - end - - if attributes.key?(:'number_of_steps') - self.number_of_steps = attributes[:'number_of_steps'] - end - - if attributes.key?(:'occurrences') - self.occurrences = attributes[:'occurrences'] - end - - if attributes.key?(:'query_string') - self.query_string = attributes[:'query_string'] - end - - if attributes.key?(:'source') - self.source = attributes[:'source'] - end - - if attributes.key?(:'subquery_id') - self.subquery_id = attributes[:'subquery_id'] - end - - if attributes.key?(:'target') - self.target = attributes[:'target'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data_source.nil? - return false if @mode.nil? - return false if @query_string.nil? - true - end - - # Custom attribute writer method with validation - # @param data_source [Object] Object to be assigned - # @!visibility private - def data_source=(data_source) - if data_source.nil? - fail ArgumentError, 'invalid value for "data_source", data_source cannot be nil.' - end - @data_source = data_source - end - - # Custom attribute writer method with validation - # @param mode [Object] Object to be assigned - # @!visibility private - def mode=(mode) - if mode.nil? - fail ArgumentError, 'invalid value for "mode", mode cannot be nil.' - end - @mode = mode - end - - # Custom attribute writer method with validation - # @param query_string [Object] Object to be assigned - # @!visibility private - def query_string=(query_string) - if query_string.nil? - fail ArgumentError, 'invalid value for "query_string", query_string cannot be nil.' - end - @query_string = query_string - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - audience_filters == o.audience_filters && - data_source == o.data_source && - entries_per_step == o.entries_per_step && - join_keys == o.join_keys && - mode == o.mode && - number_of_steps == o.number_of_steps && - occurrences == o.occurrences && - query_string == o.query_string && - source == o.source && - subquery_id == o.subquery_id && - target == o.target - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [audience_filters, data_source, entries_per_step, join_keys, mode, number_of_steps, occurrences, query_string, source, subquery_id, target].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_rum_query_mode.rb b/lib/datadog_api_client/v1/models/sankey_rum_query_mode.rb deleted file mode 100644 index 8939876b0cf1..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_rum_query_mode.rb +++ /dev/null @@ -1,27 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Sankey mode for RUM queries. - class SankeyRumQueryMode - include BaseEnumModel - - SOURCE = "source".freeze - TARGET = "target".freeze - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_rum_request.rb b/lib/datadog_api_client/v1/models/sankey_rum_request.rb deleted file mode 100644 index dac587556744..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_rum_request.rb +++ /dev/null @@ -1,119 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Sankey widget with RUM data source. - class SankeyRumRequest - include BaseGenericModel - - # Sankey widget with RUM data source query. - attr_reader :query - - # Type of the Sankey widget. - attr_reader :request_type - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'query' => :'query', - :'request_type' => :'request_type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'query' => :'SankeyRumQuery', - :'request_type' => :'SankeyWidgetDefinitionType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyRumRequest` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyRumRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.key?(:'request_type') - self.request_type = attributes[:'request_type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @query.nil? - return false if @request_type.nil? - true - end - - # Custom attribute writer method with validation - # @param query [Object] Object to be assigned - # @!visibility private - def query=(query) - if query.nil? - fail ArgumentError, 'invalid value for "query", query cannot be nil.' - end - @query = query - end - - # Custom attribute writer method with validation - # @param request_type [Object] Object to be assigned - # @!visibility private - def request_type=(request_type) - if request_type.nil? - fail ArgumentError, 'invalid value for "request_type", request_type cannot be nil.' - end - @request_type = request_type - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - query == o.query && - request_type == o.request_type - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [query, request_type].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_widget_definition.rb b/lib/datadog_api_client/v1/models/sankey_widget_definition.rb deleted file mode 100644 index 8bb9bd33c408..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_widget_definition.rb +++ /dev/null @@ -1,185 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # The Sankey diagram visualizes the flow of data between categories, stages or sets of values. - class SankeyWidgetDefinition - include BaseGenericModel - - # List of Sankey widget requests. - attr_reader :requests - - # Whether to show links for "other" category. - attr_accessor :show_other_links - - # Whether to sort nodes in the Sankey diagram. - attr_accessor :sort_nodes - - # Time setting for the widget. - attr_accessor :time - - # Title of your widget. - attr_accessor :title - - # How to align the text on the widget. - attr_accessor :title_align - - # Size of the title. - attr_accessor :title_size - - # Type of the Sankey widget. - attr_reader :type - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'requests' => :'requests', - :'show_other_links' => :'show_other_links', - :'sort_nodes' => :'sort_nodes', - :'time' => :'time', - :'title' => :'title', - :'title_align' => :'title_align', - :'title_size' => :'title_size', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'requests' => :'Array', - :'show_other_links' => :'Boolean', - :'sort_nodes' => :'Boolean', - :'time' => :'WidgetTime', - :'title' => :'String', - :'title_align' => :'WidgetTextAlign', - :'title_size' => :'String', - :'type' => :'SankeyWidgetDefinitionType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::SankeyWidgetDefinition` initialize method" - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SankeyWidgetDefinition`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect - end - h[k.to_sym] = v - } - - if attributes.key?(:'requests') - if (value = attributes[:'requests']).is_a?(Array) - self.requests = value - end - end - - if attributes.key?(:'show_other_links') - self.show_other_links = attributes[:'show_other_links'] - end - - if attributes.key?(:'sort_nodes') - self.sort_nodes = attributes[:'sort_nodes'] - end - - if attributes.key?(:'time') - self.time = attributes[:'time'] - end - - if attributes.key?(:'title') - self.title = attributes[:'title'] - end - - if attributes.key?(:'title_align') - self.title_align = attributes[:'title_align'] - end - - if attributes.key?(:'title_size') - self.title_size = attributes[:'title_size'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @requests.nil? - return false if @requests.length < 1 - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param requests [Object] Object to be assigned - # @!visibility private - def requests=(requests) - if requests.nil? - fail ArgumentError, 'invalid value for "requests", requests cannot be nil.' - end - if requests.length < 1 - fail ArgumentError, 'invalid value for "requests", number of items must be greater than or equal to 1.' - end - @requests = requests - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - requests == o.requests && - show_other_links == o.show_other_links && - sort_nodes == o.sort_nodes && - time == o.time && - title == o.title && - title_align == o.title_align && - title_size == o.title_size && - type == o.type - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [requests, show_other_links, sort_nodes, time, title, title_align, title_size, type].hash - end - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_widget_definition_type.rb b/lib/datadog_api_client/v1/models/sankey_widget_definition_type.rb deleted file mode 100644 index 6d3eec96b94d..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_widget_definition_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Type of the Sankey widget. - class SankeyWidgetDefinitionType - include BaseEnumModel - - SANKEY = "sankey".freeze - end -end diff --git a/lib/datadog_api_client/v1/models/sankey_widget_request.rb b/lib/datadog_api_client/v1/models/sankey_widget_request.rb deleted file mode 100644 index 7eb3ef52f658..000000000000 --- a/lib/datadog_api_client/v1/models/sankey_widget_request.rb +++ /dev/null @@ -1,63 +0,0 @@ -=begin -#Datadog API V1 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - 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 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V1 - # Request definition for Sankey widget. - module SankeyWidgetRequest - class << self - include BaseOneOfModel - include BaseOneOfModelNoDiscriminator - - # List of class defined in oneOf (OpenAPI v3) - def openapi_one_of - [ - :'SankeyRumRequest', - :'SankeyNetworkRequest' - ] - end - # Builds the object - # @param data [Mixed] Data to be matched against the list of oneOf items - # @return [Object] Returns the model or the data itself - def build(data) - # Go through the list of oneOf items and attempt to identify the appropriate one. - # Note: - # - We do not attempt to check whether exactly one item matches. - # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) - # due to the way the deserialization is made in the base_object template (it just casts without verifying). - # - TODO: scalar values are de facto behaving as if they were nullable. - # - TODO: logging when debugging is set. - openapi_one_of.each do |klass| - begin - next if klass == :AnyType # "nullable: true" - typed_data = find_and_cast_into_type(klass, data) - next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed - return typed_data if typed_data - rescue # rescue all errors so we keep iterating even if the current item lookup raises - end - end - - if openapi_one_of.include?(:AnyType) - data - else - self._unparsed = true - DatadogAPIClient::UnparsedObject.new(data) - end - end - end - end -end diff --git a/lib/datadog_api_client/v1/models/widget_definition.rb b/lib/datadog_api_client/v1/models/widget_definition.rb index c7c3f6f992e4..897fd778977e 100644 --- a/lib/datadog_api_client/v1/models/widget_definition.rb +++ b/lib/datadog_api_client/v1/models/widget_definition.rb @@ -52,7 +52,6 @@ def openapi_one_of :'SLOListWidgetDefinition', :'SLOWidgetDefinition', :'ScatterPlotWidgetDefinition', - :'SankeyWidgetDefinition', :'ServiceMapWidgetDefinition', :'ServiceSummaryWidgetDefinition', :'SplitGraphWidgetDefinition', diff --git a/lib/datadog_api_client/v2/api/metrics_api.rb b/lib/datadog_api_client/v2/api/metrics_api.rb index 3ff28445e4ab..654be940dd91 100644 --- a/lib/datadog_api_client/v2/api/metrics_api.rb +++ b/lib/datadog_api_client/v2/api/metrics_api.rb @@ -676,11 +676,11 @@ def list_tag_configurations(opts = {}) # @option opts [MetricTagConfigurationMetricTypeCategory] :filter_metric_type Only return metrics of the given metric type. # @option opts [Boolean] :filter_include_percentiles Only return distribution metrics that have percentile aggregations enabled (true) or disabled (false). # @option opts [Boolean] :filter_queried Only return metrics that have been queried (true) or not queried (false) in the look back window. Set the window with `filter[queried][window][seconds]`; if omitted, a default window is used. - # @option opts [Integer] :filter_queried_window_seconds Only return metrics that have been queried or not queried in the specified window. Dependent on being sent with `filter[queried]`. + # @option opts [Integer] :filter_queried_window_seconds Only return metrics that have been queried or not queried in the specified window. Dependent on being sent with `filter[queried]`. The default value is 2,592,000 seconds (30 days), the maximum value is 15,552,000 seconds (180 days), and the minimum value is 1 second. # @option opts [String] :filter_tags Only return metrics that were submitted with tags matching this expression. You can use AND, OR, IN, and wildcards (for example, service:web*). # @option opts [Boolean] :filter_related_assets Only return metrics that are used in at least one dashboard, monitor, notebook, or SLO. - # @option opts [Integer] :window_seconds Only return metrics that have been actively reporting in the specified window. - # @option opts [Integer] :page_size Maximum number of results per page. Use with `page[cursor]` for pagination. + # @option opts [Integer] :window_seconds Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second. + # @option opts [Integer] :page_size Maximum number of results per page. Use with `page[cursor]` for pagination. The default value is 10000, the maximum value is 10000, and the minimum value is 1. # @option opts [String] :page_cursor Cursor for pagination. Use `page[size]` to opt-in to pagination and get the first page; for subsequent pages, use the value from `meta.pagination.next_cursor` in the response. Pagination is complete when `next_cursor` is null. # @return [Array<(MetricsAndMetricTagConfigurationsResponse, Integer, Hash)>] MetricsAndMetricTagConfigurationsResponse data, response status code and response headers def list_tag_configurations_with_http_info(opts = {})