From 34d284d904f35ead4814d00de880fbf32a7b01a3 Mon Sep 17 00:00:00 2001 From: Jiri Kuncar Date: Mon, 17 Jan 2022 15:49:17 +0100 Subject: [PATCH 1/2] rm --- ...n-rule-returns-Bad-Request-response.frozen | 1 - ...tion-rule-returns-Bad-Request-response.yml | 19 - ...-detection-rule-returns-OK-response.frozen | 1 - ...e-a-detection-rule-returns-OK-response.yml | 35 - ...rkload-security-returns-OK-response.frozen | 1 - ...-workload-security-returns-OK-response.yml | 35 - ...security-filter-returns-OK-response.frozen | 1 - ...-a-security-filter-returns-OK-response.yml | 33 - ...-filter-returns-No-Content-response.frozen | 1 - ...ity-filter-returns-No-Content-response.yml | 49 - ...n-existing-rule-returns-OK-response.frozen | 1 - ...e-an-existing-rule-returns-OK-response.yml | 50 - ...security-filter-returns-OK-response.frozen | 1 - ...-a-security-filter-returns-OK-response.yml | 50 - ...ecurity-filters-returns-OK-response.frozen | 1 - ...l-security-filters-returns-OK-response.yml | 180 ---- ...security-filter-returns-OK-response.frozen | 1 - ...-a-security-filter-returns-OK-response.yml | 51 - .../CreateSecurityFilter.rb | 23 - .../CreateSecurityMonitoringRule.rb | 35 - .../CreateSecurityMonitoringRule_498211763.rb | 36 - .../DeleteSecurityFilter_555029489.rb | 8 - .../DeleteSecurityMonitoringRule.rb | 8 - .../security-monitoring/GetSecurityFilter.rb | 8 - .../ListSecurityFilters.rb | 5 - .../UpdateSecurityFilter.rb | 22 - features/v2/security_monitoring.feature | 228 ----- .../v2/api/security_monitoring_api.rb | 929 ------------------ .../v2/models/security_monitoring_filter.rb | 242 ----- .../security_monitoring_filter_action.rb | 39 - ...security_monitoring_list_rules_response.rb | 244 ----- .../models/security_monitoring_rule_case.rb | 264 ----- .../security_monitoring_rule_case_create.rb | 269 ----- ...security_monitoring_rule_create_payload.rb | 359 ------- ...curity_monitoring_rule_detection_method.rb | 40 - ...urity_monitoring_rule_evaluation_window.rb | 45 - .../security_monitoring_rule_keep_alive.rb | 47 - ...ity_monitoring_rule_max_signal_duration.rb | 49 - ...urity_monitoring_rule_new_value_options.rb | 241 ----- ...ing_rule_new_value_options_forget_after.rb | 43 - ...ule_new_value_options_learning_duration.rb | 40 - .../security_monitoring_rule_options.rb | 268 ----- .../models/security_monitoring_rule_query.rb | 286 ------ ...urity_monitoring_rule_query_aggregation.rb | 42 - .../security_monitoring_rule_query_create.rb | 291 ------ .../security_monitoring_rule_response.rb | 399 -------- .../security_monitoring_rule_severity.rb | 42 - .../security_monitoring_rule_type_create.rb | 39 - .../security_monitoring_rule_type_read.rb | 41 - ...security_monitoring_rule_update_payload.rb | 345 ------- .../security_monitoring_runtime_agent_rule.rb | 243 ----- .../v2/models/security_monitoring_signal.rb | 253 ----- .../security_monitoring_signal_attributes.rb | 267 ----- ...security_monitoring_signal_list_request.rb | 250 ----- ...y_monitoring_signal_list_request_filter.rb | 253 ----- ...ity_monitoring_signal_list_request_page.rb | 260 ----- .../models/security_monitoring_signal_type.rb | 38 - ...curity_monitoring_signals_list_response.rb | 253 ----- ..._monitoring_signals_list_response_links.rb | 233 ----- ...y_monitoring_signals_list_response_meta.rb | 232 ----- ...itoring_signals_list_response_meta_page.rb | 233 ----- .../security_monitoring_signals_sort.rb | 39 - spec/v2/api/security_monitoring_api_spec.rb | 189 ---- .../security_monitoring_filter_action_spec.rb | 31 - .../models/security_monitoring_filter_spec.rb | 43 - ...ity_monitoring_list_rules_response_spec.rb | 43 - ...curity_monitoring_rule_case_create_spec.rb | 55 -- .../security_monitoring_rule_case_spec.rb | 55 -- ...ity_monitoring_rule_create_payload_spec.rb | 91 -- ...y_monitoring_rule_detection_method_spec.rb | 31 - ..._monitoring_rule_evaluation_window_spec.rb | 31 - ...ecurity_monitoring_rule_keep_alive_spec.rb | 31 - ...onitoring_rule_max_signal_duration_spec.rb | 31 - ...ule_new_value_options_forget_after_spec.rb | 31 - ...ew_value_options_learning_duration_spec.rb | 31 - ..._monitoring_rule_new_value_options_spec.rb | 43 - .../security_monitoring_rule_options_spec.rb | 61 -- ..._monitoring_rule_query_aggregation_spec.rb | 31 - ...urity_monitoring_rule_query_create_spec.rb | 67 -- .../security_monitoring_rule_query_spec.rb | 67 -- .../security_monitoring_rule_response_spec.rb | 133 --- .../security_monitoring_rule_severity_spec.rb | 31 - ...curity_monitoring_rule_type_create_spec.rb | 31 - ...security_monitoring_rule_type_read_spec.rb | 31 - ...ity_monitoring_rule_update_payload_spec.rb | 91 -- ...urity_monitoring_signal_attributes_spec.rb | 55 -- ...itoring_signal_list_request_filter_spec.rb | 49 - ...onitoring_signal_list_request_page_spec.rb | 43 - ...ity_monitoring_signal_list_request_spec.rb | 49 - .../models/security_monitoring_signal_spec.rb | 49 - .../security_monitoring_signal_type_spec.rb | 31 - ...toring_signals_list_response_links_spec.rb | 37 - ...ng_signals_list_response_meta_page_spec.rb | 37 - ...itoring_signals_list_response_meta_spec.rb | 37 - ...y_monitoring_signals_list_response_spec.rb | 49 - .../security_monitoring_signals_sort_spec.rb | 31 - 96 files changed, 9788 deletions(-) delete mode 100644 cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-Bad-Request-response.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-Bad-Request-response.yml delete mode 100644 cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-OK-response.yml delete mode 100644 cassettes/features/v2/security_monitoring/Create-a-detection-rule-with-type-workload-security-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Create-a-detection-rule-with-type-workload-security-returns-OK-response.yml delete mode 100644 cassettes/features/v2/security_monitoring/Create-a-security-filter-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Create-a-security-filter-returns-OK-response.yml delete mode 100644 cassettes/features/v2/security_monitoring/Delete-a-security-filter-returns-No-Content-response.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Delete-a-security-filter-returns-No-Content-response.yml delete mode 100644 cassettes/features/v2/security_monitoring/Delete-an-existing-rule-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Delete-an-existing-rule-returns-OK-response.yml delete mode 100644 cassettes/features/v2/security_monitoring/Get-a-security-filter-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Get-a-security-filter-returns-OK-response.yml delete mode 100644 cassettes/features/v2/security_monitoring/Get-all-security-filters-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Get-all-security-filters-returns-OK-response.yml delete mode 100644 cassettes/features/v2/security_monitoring/Update-a-security-filter-returns-OK-response.frozen delete mode 100644 cassettes/features/v2/security_monitoring/Update-a-security-filter-returns-OK-response.yml delete mode 100644 examples/v2/security-monitoring/CreateSecurityFilter.rb delete mode 100644 examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb delete mode 100644 examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb delete mode 100644 examples/v2/security-monitoring/DeleteSecurityFilter_555029489.rb delete mode 100644 examples/v2/security-monitoring/DeleteSecurityMonitoringRule.rb delete mode 100644 examples/v2/security-monitoring/GetSecurityFilter.rb delete mode 100644 examples/v2/security-monitoring/ListSecurityFilters.rb delete mode 100644 examples/v2/security-monitoring/UpdateSecurityFilter.rb delete mode 100644 features/v2/security_monitoring.feature delete mode 100644 lib/datadog_api_client/v2/api/security_monitoring_api.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_filter.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_filter_action.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_max_signal_duration.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_duration.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_query_create.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_severity.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_runtime_agent_rule.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal_type.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb delete mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signals_sort.rb delete mode 100644 spec/v2/api/security_monitoring_api_spec.rb delete mode 100644 spec/v2/models/security_monitoring_filter_action_spec.rb delete mode 100644 spec/v2/models/security_monitoring_filter_spec.rb delete mode 100644 spec/v2/models/security_monitoring_list_rules_response_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_case_create_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_case_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_create_payload_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_detection_method_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_evaluation_window_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_keep_alive_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_max_signal_duration_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_new_value_options_forget_after_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_new_value_options_learning_duration_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_new_value_options_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_options_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_query_aggregation_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_query_create_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_query_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_response_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_severity_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_type_create_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_type_read_spec.rb delete mode 100644 spec/v2/models/security_monitoring_rule_update_payload_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signal_attributes_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signal_list_request_filter_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signal_list_request_page_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signal_list_request_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signal_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signal_type_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signals_list_response_links_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signals_list_response_meta_page_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signals_list_response_meta_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signals_list_response_spec.rb delete mode 100644 spec/v2/models/security_monitoring_signals_sort_spec.rb diff --git a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-Bad-Request-response.frozen b/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-Bad-Request-response.frozen deleted file mode 100644 index b9b28ab32fd5..000000000000 --- a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-Bad-Request-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2022-01-06T00:52:08.681Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-Bad-Request-response.yml b/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-Bad-Request-response.yml deleted file mode 100644 index 144607bf2bac..000000000000 --- a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-Bad-Request-response.yml +++ /dev/null @@ -1,19 +0,0 @@ -http_interactions: -- recorded_at: Thu, 06 Jan 2022 00:52:08 GMT - request: - body: - encoding: UTF-8 - string: '{"cases":[{"status":"info"}],"isEnabled":true,"message":"Test rule","name":"Test-Create_a_detection_rule_returns_Bad_Request_response-1641430328","options":{},"queries":[{"query":""}],"tags":[]}' - headers: - Content-Type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/rules - response: - body: - encoding: UTF-8 - string: '{"errors":["Internal error"]}' - status: - code: 400 - message: Bad Request -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-OK-response.frozen deleted file mode 100644 index 92a862ab426c..000000000000 --- a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2022-01-10T15:51:25.225Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-OK-response.yml deleted file mode 100644 index bb9fd26bc0c9..000000000000 --- a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-returns-OK-response.yml +++ /dev/null @@ -1,35 +0,0 @@ -http_interactions: -- recorded_at: Mon, 10 Jan 2022 15:51:25 GMT - request: - body: - encoding: UTF-8 - string: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test - rule","name":"Test-Create_a_detection_rule_returns_OK_response-1641829885","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metric":"","query":"@test:true"}],"tags":[]}' - headers: - Content-Type: - - application/json;charset=utf-8 - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/rules - response: - body: - encoding: UTF-8 - string: '{"creationAuthorId":1445416,"tags":[],"isEnabled":true,"hasExtendedTitle":false,"message":"Test - rule","options":{"detectionMethod":"threshold","evaluationWindow":900,"maxSignalDuration":86400,"keepAlive":3600},"version":1,"createdAt":1641829885620,"filters":[],"queries":[{"distinctFields":[],"name":"","metric":"","aggregation":"count","groupByFields":[],"query":"@test:true"}],"isDeleted":false,"cases":[{"status":"info","notifications":[],"name":"","condition":"a - > 0"}],"type":"log_detection","id":"mn1-f0b-u6w","isDefault":false,"name":"Test-Create_a_detection_rule_returns_OK_response-1641829885"}' - status: - code: 200 - message: OK -- recorded_at: Mon, 10 Jan 2022 15:51:25 GMT - request: - body: null - headers: {} - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/mn1-f0b-u6w - response: - body: - encoding: UTF-8 - string: '' - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-with-type-workload-security-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Create-a-detection-rule-with-type-workload-security-returns-OK-response.frozen deleted file mode 100644 index ecc632cc9795..000000000000 --- a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-with-type-workload-security-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2022-01-10T15:51:26.079Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-with-type-workload-security-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Create-a-detection-rule-with-type-workload-security-returns-OK-response.yml deleted file mode 100644 index 072eb790c6d8..000000000000 --- a/cassettes/features/v2/security_monitoring/Create-a-detection-rule-with-type-workload-security-returns-OK-response.yml +++ /dev/null @@ -1,35 +0,0 @@ -http_interactions: -- recorded_at: Mon, 10 Jan 2022 15:51:26 GMT - request: - body: - encoding: UTF-8 - string: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test - rule","name":"Test-Create_a_detection_rule_with_type_workload_security_returns_OK_response-1641829886","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metric":"","query":"@test:true"}],"tags":[],"type":"workload_security"}' - headers: - Content-Type: - - application/json;charset=utf-8 - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/rules - response: - body: - encoding: UTF-8 - string: '{"creationAuthorId":1445416,"tags":[],"isEnabled":true,"hasExtendedTitle":false,"message":"Test - rule","options":{"detectionMethod":"threshold","evaluationWindow":900,"maxSignalDuration":86400,"keepAlive":3600},"version":1,"createdAt":1641829886523,"filters":[],"queries":[{"distinctFields":[],"name":"","metric":"","aggregation":"count","groupByFields":[],"query":"@test:true"}],"isDeleted":false,"cases":[{"status":"info","notifications":[],"name":"","condition":"a - > 0"}],"type":"workload_security","id":"0zm-idp-p44","isDefault":false,"name":"Test-Create_a_detection_rule_with_type_workload_security_returns_OK_response-1641829886"}' - status: - code: 200 - message: OK -- recorded_at: Mon, 10 Jan 2022 15:51:26 GMT - request: - body: null - headers: {} - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/0zm-idp-p44 - response: - body: - encoding: UTF-8 - string: '' - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Create-a-security-filter-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Create-a-security-filter-returns-OK-response.frozen deleted file mode 100644 index 073040cf6c6c..000000000000 --- a/cassettes/features/v2/security_monitoring/Create-a-security-filter-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2022-01-10T15:51:26.921Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Create-a-security-filter-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Create-a-security-filter-returns-OK-response.yml deleted file mode 100644 index 16234a5adcb7..000000000000 --- a/cassettes/features/v2/security_monitoring/Create-a-security-filter-returns-OK-response.yml +++ /dev/null @@ -1,33 +0,0 @@ -http_interactions: -- recorded_at: Mon, 10 Jan 2022 15:51:26 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"exclusion_filters":[{"name":"Exclude staging","query":"source:staging"}],"filtered_data_type":"logs","is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1641829886","query":"service:TestCreateasecurityfilterreturnsOKresponse1641829886"},"type":"security_filters"}}' - headers: - Content-Type: - - application/json;charset=utf-8 - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters - response: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1641829886","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1641829886","is_builtin":false},"type":"security_filters","id":"l4b-4zi-o7l"}}' - status: - code: 200 - message: OK -- recorded_at: Mon, 10 Jan 2022 15:51:26 GMT - request: - body: null - headers: {} - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/l4b-4zi-o7l - response: - body: - encoding: UTF-8 - string: '' - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Delete-a-security-filter-returns-No-Content-response.frozen b/cassettes/features/v2/security_monitoring/Delete-a-security-filter-returns-No-Content-response.frozen deleted file mode 100644 index 000288226841..000000000000 --- a/cassettes/features/v2/security_monitoring/Delete-a-security-filter-returns-No-Content-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2022-01-10T14:56:27.982Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Delete-a-security-filter-returns-No-Content-response.yml b/cassettes/features/v2/security_monitoring/Delete-a-security-filter-returns-No-Content-response.yml deleted file mode 100644 index 74c8b7d8180b..000000000000 --- a/cassettes/features/v2/security_monitoring/Delete-a-security-filter-returns-No-Content-response.yml +++ /dev/null @@ -1,49 +0,0 @@ -http_interactions: -- recorded_at: Mon, 10 Jan 2022 14:56:27 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"exclusion_filters":[{"name":"Exclude logs from - staging","query":"source:staging"}],"filtered_data_type":"logs","is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1641826587","query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1641826587"},"type":"security_filters"}}' - headers: - Content-Type: - - application/json;charset=utf-8 - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters - response: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1641826587","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1641826587","is_builtin":false},"type":"security_filters","id":"whv-r8o-zmp"}}' - status: - code: 200 - message: OK -- recorded_at: Mon, 10 Jan 2022 14:56:27 GMT - request: - body: null - headers: {} - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/whv-r8o-zmp - response: - body: - encoding: UTF-8 - string: '' - status: - code: 204 - message: No Content -- recorded_at: Mon, 10 Jan 2022 14:56:27 GMT - request: - body: null - headers: - Content-Type: - - application/json - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/whv-r8o-zmp - response: - body: - encoding: UTF-8 - string: '{"errors":["not_found(Security filter with id ''whv-r8o-zmp'' not found)"]}' - status: - code: 404 - message: Not Found -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Delete-an-existing-rule-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Delete-an-existing-rule-returns-OK-response.frozen deleted file mode 100644 index 7f7266812560..000000000000 --- a/cassettes/features/v2/security_monitoring/Delete-an-existing-rule-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2022-01-10T14:56:29.249Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Delete-an-existing-rule-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Delete-an-existing-rule-returns-OK-response.yml deleted file mode 100644 index c5d54ab7dbc3..000000000000 --- a/cassettes/features/v2/security_monitoring/Delete-an-existing-rule-returns-OK-response.yml +++ /dev/null @@ -1,50 +0,0 @@ -http_interactions: -- recorded_at: Mon, 10 Jan 2022 14:56:29 GMT - request: - body: - encoding: UTF-8 - string: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test - rule","name":"Test-Delete_an_existing_rule_returns_OK_response-1641826589","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metric":"","query":"@test:true"}],"tags":[],"type":"log_detection"}' - headers: - Content-Type: - - application/json;charset=utf-8 - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/rules - response: - body: - encoding: UTF-8 - string: '{"creationAuthorId":1445416,"tags":[],"isEnabled":true,"hasExtendedTitle":false,"message":"Test - rule","options":{"detectionMethod":"threshold","evaluationWindow":900,"maxSignalDuration":86400,"keepAlive":3600},"version":1,"createdAt":1641826589685,"filters":[],"queries":[{"distinctFields":[],"name":"","metric":"","aggregation":"count","groupByFields":[],"query":"@test:true"}],"isDeleted":false,"cases":[{"status":"info","notifications":[],"name":"","condition":"a - > 0"}],"type":"log_detection","id":"cas-csx-jwf","isDefault":false,"name":"Test-Delete_an_existing_rule_returns_OK_response-1641826589"}' - status: - code: 200 - message: OK -- recorded_at: Mon, 10 Jan 2022 14:56:29 GMT - request: - body: null - headers: {} - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/cas-csx-jwf - response: - body: - encoding: UTF-8 - string: '' - status: - code: 204 - message: No Content -- recorded_at: Mon, 10 Jan 2022 14:56:29 GMT - request: - body: null - headers: - Content-Type: - - application/json - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/cas-csx-jwf - response: - body: - encoding: UTF-8 - string: '{"errors":["Threat detection rule not found: cas-csx-jwf"]}' - status: - code: 404 - message: Not Found -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Get-a-security-filter-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Get-a-security-filter-returns-OK-response.frozen deleted file mode 100644 index c3b47c8b801a..000000000000 --- a/cassettes/features/v2/security_monitoring/Get-a-security-filter-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2022-01-10T15:51:27.843Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-a-security-filter-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Get-a-security-filter-returns-OK-response.yml deleted file mode 100644 index e36dfefa3845..000000000000 --- a/cassettes/features/v2/security_monitoring/Get-a-security-filter-returns-OK-response.yml +++ /dev/null @@ -1,50 +0,0 @@ -http_interactions: -- recorded_at: Mon, 10 Jan 2022 15:51:27 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"exclusion_filters":[{"name":"Exclude logs from - staging","query":"source:staging"}],"filtered_data_type":"logs","is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1641829887","query":"service:TestGetasecurityfilterreturnsOKresponse1641829887"},"type":"security_filters"}}' - headers: - Content-Type: - - application/json;charset=utf-8 - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters - response: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1641829887","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1641829887","is_builtin":false},"type":"security_filters","id":"ixg-a5r-3st"}}' - status: - code: 200 - message: OK -- recorded_at: Mon, 10 Jan 2022 15:51:27 GMT - request: - body: null - headers: - Content-Type: - - application/json;charset=utf-8 - method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/ixg-a5r-3st - response: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1641829887","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1641829887","is_builtin":false},"type":"security_filters","id":"ixg-a5r-3st"}}' - status: - code: 200 - message: OK -- recorded_at: Mon, 10 Jan 2022 15:51:27 GMT - request: - body: null - headers: {} - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/ixg-a5r-3st - response: - body: - encoding: UTF-8 - string: '' - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Get-all-security-filters-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Get-all-security-filters-returns-OK-response.frozen deleted file mode 100644 index fb20fc2f8b9b..000000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-security-filters-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2022-01-06T00:52:13.157Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Get-all-security-filters-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Get-all-security-filters-returns-OK-response.yml deleted file mode 100644 index 2ff043c77e1a..000000000000 --- a/cassettes/features/v2/security_monitoring/Get-all-security-filters-returns-OK-response.yml +++ /dev/null @@ -1,180 +0,0 @@ -http_interactions: -- recorded_at: Thu, 06 Jan 2022 00:52:13 GMT - request: - body: null - headers: - Content-Type: - - application/json;charset=utf-8 - method: GET - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters - response: - body: - encoding: UTF-8 - string: '{"data":[{"attributes":{"is_enabled":true,"name":"all ingested logs","filtered_data_type":"logs","exclusion_filters":[],"version":1,"query":"*","is_builtin":true},"type":"security_filters","id":"bc0-fow-e4j"},{"attributes":{"is_enabled":true,"name":"Custom - security filter","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:api","is_builtin":false},"type":"security_filters","id":"qhn-iuy-4oc"},{"attributes":{"is_enabled":true,"name":"tf-TestAccDatadogSecurityMonitoringFilter-local-1626096168","filtered_data_type":"logs","exclusion_filters":[{"query":"does - not really match much","name":"first"},{"query":"neither does it","name":"second"}],"version":1,"query":"acceptance - rule triggered","is_builtin":false},"type":"security_filters","id":"7no-kjl-tnb"},{"attributes":{"is_enabled":true,"name":"tf-TestAccDatadogSecurityMonitoringFilterDatasource-local-1626104534","filtered_data_type":"logs","exclusion_filters":[{"query":"does - not really match much","name":"first"},{"query":"neither does it","name":"second"}],"version":1,"query":"ayayay - query","is_builtin":false},"type":"security_filters","id":"smf-png-gzf"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1631884327","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1631884327","is_builtin":false},"type":"security_filters","id":"hrp-l2l-xht"},{"attributes":{"is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1631884338","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1631884338","is_builtin":false},"type":"security_filters","id":"zr7-kgu-adi"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1631884338","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1631884338","is_builtin":false},"type":"security_filters","id":"wbd-e2v-yke"},{"attributes":{"is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1631884454","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1631884454","is_builtin":false},"type":"security_filters","id":"tek-udt-1ad"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1631884464","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1631884464","is_builtin":false},"type":"security_filters","id":"ctr-nal-eek"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1631884465","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1631884465","is_builtin":false},"type":"security_filters","id":"jpx-aky-hgq"},{"attributes":{"is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1631884670","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1631884670","is_builtin":false},"type":"security_filters","id":"otn-2vv-0xe"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1631884674","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1631884674","is_builtin":false},"type":"security_filters","id":"knf-be5-bhz"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1631884674","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1631884674","is_builtin":false},"type":"security_filters","id":"rjt-omi-ece"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1631884714","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1631884714","is_builtin":false},"type":"security_filters","id":"ebq-o3v-gdg"},{"attributes":{"is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1631884715","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1631884715","is_builtin":false},"type":"security_filters","id":"0pz-qyq-kqq"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1631884725","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1631884725","is_builtin":false},"type":"security_filters","id":"m9g-ncc-02a"},{"attributes":{"is_enabled":true,"name":"Test-Python-Delete_a_security_filter_returns_No_Content_response-1631886017","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestPythonDeleteasecurityfilterreturnsNoContentresponse1631886017","is_builtin":false},"type":"security_filters","id":"s8y-ndo-pmo"},{"attributes":{"is_enabled":true,"name":"Test-Python-Get_a_security_filter_returns_OK_response-1631886029","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestPythonGetasecurityfilterreturnsOKresponse1631886029","is_builtin":false},"type":"security_filters","id":"clz-vl4-04z"},{"attributes":{"is_enabled":true,"name":"Test-Python-Update_a_security_filter_returns_OK_response-1631886034","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestPythonUpdateasecurityfilterreturnsOKresponse1631886034","is_builtin":false},"type":"security_filters","id":"ind-p9s-w9j"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632817310","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632817310","is_builtin":false},"type":"security_filters","id":"opx-q1v-ckn"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632817310","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632817310","is_builtin":false},"type":"security_filters","id":"4mz-na2-ozw"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632817311","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632817311","is_builtin":false},"type":"security_filters","id":"tkf-gkv-ffv"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632820231","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632820231","is_builtin":false},"type":"security_filters","id":"x1a-p97-scf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632820231","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632820231","is_builtin":false},"type":"security_filters","id":"g85-tm8-yhe"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632820232","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632820232","is_builtin":false},"type":"security_filters","id":"obh-5cb-a0j"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632820436","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632820436","is_builtin":false},"type":"security_filters","id":"3cw-wzf-nsn"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632820437","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632820437","is_builtin":false},"type":"security_filters","id":"a2c-940-8x8"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632820438","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632820438","is_builtin":false},"type":"security_filters","id":"r8h-dyg-wgf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632821203","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632821203","is_builtin":false},"type":"security_filters","id":"eum-bss-dyi"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632821205","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632821205","is_builtin":false},"type":"security_filters","id":"6wj-zed-jv3"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632821205","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632821205","is_builtin":false},"type":"security_filters","id":"hbn-bix-9ia"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632821494","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632821494","is_builtin":false},"type":"security_filters","id":"paz-gwc-z4l"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632821495","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632821495","is_builtin":false},"type":"security_filters","id":"jce-5qr-qdy"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632821495","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632821495","is_builtin":false},"type":"security_filters","id":"bpr-rhq-xqj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632824855","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632824855","is_builtin":false},"type":"security_filters","id":"swf-vch-g9h"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632824856","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632824856","is_builtin":false},"type":"security_filters","id":"wtp-76p-ghf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632824857","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632824857","is_builtin":false},"type":"security_filters","id":"ogc-yrs-p4p"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632826434","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632826434","is_builtin":false},"type":"security_filters","id":"y08-eup-05l"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632826436","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632826436","is_builtin":false},"type":"security_filters","id":"wkz-wad-cbl"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632826436","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632826436","is_builtin":false},"type":"security_filters","id":"9kl-ojt-pmy"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632827408","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632827408","is_builtin":false},"type":"security_filters","id":"dh2-zr8-lam"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632827409","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632827409","is_builtin":false},"type":"security_filters","id":"hho-vt6-tws"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632827410","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632827410","is_builtin":false},"type":"security_filters","id":"ltk-chn-umu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632828993","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632828993","is_builtin":false},"type":"security_filters","id":"q3f-vnn-qmh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632828993","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632828993","is_builtin":false},"type":"security_filters","id":"pvi-byz-som"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632828994","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632828994","is_builtin":false},"type":"security_filters","id":"3zg-jqc-ftm"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632832892","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632832892","is_builtin":false},"type":"security_filters","id":"kpj-t46-vbn"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632832892","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632832892","is_builtin":false},"type":"security_filters","id":"0og-l8j-tsq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632832893","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632832893","is_builtin":false},"type":"security_filters","id":"jea-me2-ru1"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632833158","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632833158","is_builtin":false},"type":"security_filters","id":"04n-hit-fum"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632833159","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632833159","is_builtin":false},"type":"security_filters","id":"3rw-stk-rtz"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632833159","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632833159","is_builtin":false},"type":"security_filters","id":"zwb-63t-lpu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632836449","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632836449","is_builtin":false},"type":"security_filters","id":"vle-9cs-xlh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632836451","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632836451","is_builtin":false},"type":"security_filters","id":"82v-knv-p8b"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632836452","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632836452","is_builtin":false},"type":"security_filters","id":"jp2-7ys-ljn"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632839530","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632839530","is_builtin":false},"type":"security_filters","id":"up5-dkc-sbq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632839530","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632839530","is_builtin":false},"type":"security_filters","id":"viv-6rl-zxw"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632839530","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632839530","is_builtin":false},"type":"security_filters","id":"1ls-1xt-i8c"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632839555","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632839555","is_builtin":false},"type":"security_filters","id":"0bv-ryy-bup"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632839556","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632839556","is_builtin":false},"type":"security_filters","id":"wuj-q1l-beq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632839557","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632839557","is_builtin":false},"type":"security_filters","id":"usl-avk-v1a"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632839754","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632839754","is_builtin":false},"type":"security_filters","id":"cdu-xnm-7k9"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632839755","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632839755","is_builtin":false},"type":"security_filters","id":"dpq-4bx-fj2"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632839755","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632839755","is_builtin":false},"type":"security_filters","id":"cnt-1qa-1xp"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632841163","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632841163","is_builtin":false},"type":"security_filters","id":"htl-cat-7ye"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632841164","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632841164","is_builtin":false},"type":"security_filters","id":"zw3-fsy-7bh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632841165","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632841165","is_builtin":false},"type":"security_filters","id":"mwa-jkd-mg6"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632842479","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632842479","is_builtin":false},"type":"security_filters","id":"3ph-ztk-l8m"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632842482","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632842482","is_builtin":false},"type":"security_filters","id":"0lr-30a-qe8"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632842482","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632842482","is_builtin":false},"type":"security_filters","id":"b57-68u-t1d"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632843068","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632843068","is_builtin":false},"type":"security_filters","id":"46n-cov-z4x"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632843069","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632843069","is_builtin":false},"type":"security_filters","id":"57n-tai-vbl"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632843069","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632843069","is_builtin":false},"type":"security_filters","id":"elu-n9r-zdk"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632844019","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632844019","is_builtin":false},"type":"security_filters","id":"1rg-ja2-wc7"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632844020","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632844020","is_builtin":false},"type":"security_filters","id":"9sk-plb-lbm"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632844021","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632844021","is_builtin":false},"type":"security_filters","id":"33b-4ut-ydc"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632844135","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632844135","is_builtin":false},"type":"security_filters","id":"wzw-cyw-og7"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632844135","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632844135","is_builtin":false},"type":"security_filters","id":"vjk-qik-jdi"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632844135","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632844135","is_builtin":false},"type":"security_filters","id":"qun-iu6-n5g"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632846637","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632846637","is_builtin":false},"type":"security_filters","id":"lbv-ghg-b4a"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632846638","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632846638","is_builtin":false},"type":"security_filters","id":"etu-tzk-p4y"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632846639","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632846639","is_builtin":false},"type":"security_filters","id":"xgg-32m-9um"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632847599","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632847599","is_builtin":false},"type":"security_filters","id":"ysc-uz9-oct"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632847600","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632847600","is_builtin":false},"type":"security_filters","id":"j6p-hzw-4gg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632847601","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632847601","is_builtin":false},"type":"security_filters","id":"9zj-osj-io8"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632848092","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632848092","is_builtin":false},"type":"security_filters","id":"bn2-ytq-ezm"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632848094","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632848094","is_builtin":false},"type":"security_filters","id":"oz0-0sv-86g"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632848095","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632848095","is_builtin":false},"type":"security_filters","id":"dwk-qj9-kgd"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632848450","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632848450","is_builtin":false},"type":"security_filters","id":"jxw-wxr-tnx"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632848451","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632848451","is_builtin":false},"type":"security_filters","id":"sto-gxf-iy1"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632848451","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632848451","is_builtin":false},"type":"security_filters","id":"lol-5bi-6ik"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632848885","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632848885","is_builtin":false},"type":"security_filters","id":"tnk-8wf-v5c"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632848885","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632848885","is_builtin":false},"type":"security_filters","id":"hfa-dvd-bf1"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632848886","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632848886","is_builtin":false},"type":"security_filters","id":"cwp-o1a-zwo"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632849681","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632849681","is_builtin":false},"type":"security_filters","id":"f4c-bee-wyi"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632849683","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632849683","is_builtin":false},"type":"security_filters","id":"caf-zh1-vqf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632849684","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632849684","is_builtin":false},"type":"security_filters","id":"8pn-vrw-kn4"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632849896","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632849896","is_builtin":false},"type":"security_filters","id":"wh3-wcd-shk"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632849897","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632849897","is_builtin":false},"type":"security_filters","id":"6or-pfc-jsh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632849898","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632849898","is_builtin":false},"type":"security_filters","id":"atx-t02-qhu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632851126","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632851126","is_builtin":false},"type":"security_filters","id":"mqn-ec8-cys"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632851127","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632851127","is_builtin":false},"type":"security_filters","id":"er4-rot-i9q"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632851128","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632851128","is_builtin":false},"type":"security_filters","id":"7av-rff-z31"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632888517","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632888517","is_builtin":false},"type":"security_filters","id":"1xt-hsv-seu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632888518","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632888518","is_builtin":false},"type":"security_filters","id":"rwh-ge7-poj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632888518","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632888518","is_builtin":false},"type":"security_filters","id":"xxy-a4m-alu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632898979","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632898979","is_builtin":false},"type":"security_filters","id":"ple-dse-hhf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632898980","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632898980","is_builtin":false},"type":"security_filters","id":"xix-4vr-abm"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632898980","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632898980","is_builtin":false},"type":"security_filters","id":"l8o-bzf-1fs"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632899193","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632899193","is_builtin":false},"type":"security_filters","id":"ovk-9mh-i7q"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632899194","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632899194","is_builtin":false},"type":"security_filters","id":"z15-wxx-yix"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632899194","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632899194","is_builtin":false},"type":"security_filters","id":"ewr-qfb-hvx"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632902893","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632902893","is_builtin":false},"type":"security_filters","id":"jqo-9hq-3hz"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632902894","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632902894","is_builtin":false},"type":"security_filters","id":"nv8-a6r-uzu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632902894","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632902894","is_builtin":false},"type":"security_filters","id":"2zl-irh-u4x"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632903483","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632903483","is_builtin":false},"type":"security_filters","id":"ove-4eu-ocg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632903484","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632903484","is_builtin":false},"type":"security_filters","id":"wme-icd-q9j"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632903485","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632903485","is_builtin":false},"type":"security_filters","id":"mlu-006-hhl"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632904028","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632904028","is_builtin":false},"type":"security_filters","id":"qyd-yxv-qtf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632904028","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632904028","is_builtin":false},"type":"security_filters","id":"cdy-aqo-nos"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632904029","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632904029","is_builtin":false},"type":"security_filters","id":"nzp-j5a-jrb"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632907319","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632907319","is_builtin":false},"type":"security_filters","id":"w9b-vfx-oqz"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632907320","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632907320","is_builtin":false},"type":"security_filters","id":"wxm-54b-g9v"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632907320","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632907320","is_builtin":false},"type":"security_filters","id":"tqo-alk-oww"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632907341","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632907341","is_builtin":false},"type":"security_filters","id":"epg-zdn-8o4"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632907342","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632907342","is_builtin":false},"type":"security_filters","id":"bw7-nje-vtb"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632907342","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632907342","is_builtin":false},"type":"security_filters","id":"qaf-z5b-da7"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632908400","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632908400","is_builtin":false},"type":"security_filters","id":"r6d-4kz-mch"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632908401","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632908401","is_builtin":false},"type":"security_filters","id":"dar-afy-68w"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632908402","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632908402","is_builtin":false},"type":"security_filters","id":"mzl-r2s-3d3"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632909893","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632909893","is_builtin":false},"type":"security_filters","id":"amk-yqc-2jg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632909895","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632909895","is_builtin":false},"type":"security_filters","id":"jvp-lye-omw"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632909896","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632909896","is_builtin":false},"type":"security_filters","id":"mky-7xe-w96"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632910740","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632910740","is_builtin":false},"type":"security_filters","id":"cpn-5xa-qvr"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632910741","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632910741","is_builtin":false},"type":"security_filters","id":"gnd-qai-263"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632910742","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632910742","is_builtin":false},"type":"security_filters","id":"may-03m-8gc"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632913811","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632913811","is_builtin":false},"type":"security_filters","id":"3wl-tn0-g3p"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632913813","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632913813","is_builtin":false},"type":"security_filters","id":"kmc-6co-0xq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632913814","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632913814","is_builtin":false},"type":"security_filters","id":"cke-k5o-udo"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632918181","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632918181","is_builtin":false},"type":"security_filters","id":"g0n-ynp-vuj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632918181","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632918181","is_builtin":false},"type":"security_filters","id":"unp-wrp-w6s"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632918182","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632918182","is_builtin":false},"type":"security_filters","id":"ek7-jqe-hab"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632919352","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632919352","is_builtin":false},"type":"security_filters","id":"cza-so4-7se"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632919352","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632919352","is_builtin":false},"type":"security_filters","id":"lxy-qgf-rdw"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632919353","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632919353","is_builtin":false},"type":"security_filters","id":"0h6-4bl-gyy"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632919567","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632919567","is_builtin":false},"type":"security_filters","id":"j8u-cox-47o"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632919568","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632919568","is_builtin":false},"type":"security_filters","id":"wpj-eon-hhq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632919568","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632919568","is_builtin":false},"type":"security_filters","id":"gzy-dxq-y8c"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632921868","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632921868","is_builtin":false},"type":"security_filters","id":"1vw-prp-da3"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632921868","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632921868","is_builtin":false},"type":"security_filters","id":"cz9-r0k-77v"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632921869","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632921869","is_builtin":false},"type":"security_filters","id":"unn-qpz-hwg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632922202","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632922202","is_builtin":false},"type":"security_filters","id":"70w-v06-tzj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632922203","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632922203","is_builtin":false},"type":"security_filters","id":"a66-7u7-nad"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632922203","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632922203","is_builtin":false},"type":"security_filters","id":"d2p-7v7-avd"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632928250","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632928250","is_builtin":false},"type":"security_filters","id":"fgk-oxj-ftk"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632928250","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632928250","is_builtin":false},"type":"security_filters","id":"fpp-xqi-uu9"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632928251","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632928251","is_builtin":false},"type":"security_filters","id":"63r-qez-ybq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632933845","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632933845","is_builtin":false},"type":"security_filters","id":"gju-kit-iw5"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632933846","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632933846","is_builtin":false},"type":"security_filters","id":"1m4-2co-rpk"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632933847","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632933847","is_builtin":false},"type":"security_filters","id":"tir-l97-lp0"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632974965","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632974965","is_builtin":false},"type":"security_filters","id":"ogv-c35-zyi"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632974966","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632974966","is_builtin":false},"type":"security_filters","id":"mvz-r9p-fbq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632974966","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632974966","is_builtin":false},"type":"security_filters","id":"tbf-w69-aty"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632986086","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632986086","is_builtin":false},"type":"security_filters","id":"xzl-grv-7gm"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632986087","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632986087","is_builtin":false},"type":"security_filters","id":"jku-q85-vzi"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632986087","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632986087","is_builtin":false},"type":"security_filters","id":"awi-wik-sqv"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632989757","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632989757","is_builtin":false},"type":"security_filters","id":"zxt-ben-do9"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632989758","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632989758","is_builtin":false},"type":"security_filters","id":"ir8-h43-r0a"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632989758","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632989758","is_builtin":false},"type":"security_filters","id":"erz-srb-bn8"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632997311","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632997311","is_builtin":false},"type":"security_filters","id":"r75-jsq-jpu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632997312","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632997312","is_builtin":false},"type":"security_filters","id":"qq6-jjy-3tu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632997312","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632997312","is_builtin":false},"type":"security_filters","id":"tsp-qrn-n9x"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633000142","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633000142","is_builtin":false},"type":"security_filters","id":"4yc-4ge-ghb"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633000144","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633000144","is_builtin":false},"type":"security_filters","id":"bed-vic-suh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633000145","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633000145","is_builtin":false},"type":"security_filters","id":"put-2jd-2ib"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633003795","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633003795","is_builtin":false},"type":"security_filters","id":"y8f-naf-1cj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633003796","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633003796","is_builtin":false},"type":"security_filters","id":"1pt-6xr-7ic"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633003797","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633003797","is_builtin":false},"type":"security_filters","id":"rpo-lwd-fyr"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633004068","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633004068","is_builtin":false},"type":"security_filters","id":"euk-m8d-p2d"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633004069","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633004069","is_builtin":false},"type":"security_filters","id":"nhm-rho-ez9"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633004069","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633004069","is_builtin":false},"type":"security_filters","id":"zuo-60q-xbh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633006704","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633006704","is_builtin":false},"type":"security_filters","id":"3db-tgu-ays"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633006704","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633006704","is_builtin":false},"type":"security_filters","id":"6ou-tsb-hlx"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633006705","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633006705","is_builtin":false},"type":"security_filters","id":"ojr-mg7-oke"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633007542","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633007542","is_builtin":false},"type":"security_filters","id":"znq-ano-djg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633007542","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633007542","is_builtin":false},"type":"security_filters","id":"kmo-hwd-qq2"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633007543","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633007543","is_builtin":false},"type":"security_filters","id":"v8u-jjs-9vc"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633011104","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633011104","is_builtin":false},"type":"security_filters","id":"ld0-njn-zw1"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633011105","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633011105","is_builtin":false},"type":"security_filters","id":"w8u-g2z-xy8"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633011105","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633011105","is_builtin":false},"type":"security_filters","id":"mh9-5yo-qq2"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633011244","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633011244","is_builtin":false},"type":"security_filters","id":"vac-obe-n22"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633011246","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633011246","is_builtin":false},"type":"security_filters","id":"mpc-glp-h7w"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633011247","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633011247","is_builtin":false},"type":"security_filters","id":"qwx-au5-zve"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633015449","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633015449","is_builtin":false},"type":"security_filters","id":"saa-vzr-xsj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633015451","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633015451","is_builtin":false},"type":"security_filters","id":"pfl-vim-gje"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633015452","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633015452","is_builtin":false},"type":"security_filters","id":"2uh-zo8-nb5"},{"attributes":{"is_enabled":true,"name":"Test-Ruby-Get_a_security_filter_returns_OK_response-1634150224","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestRubyGetasecurityfilterreturnsOKresponse1634150224","is_builtin":false},"type":"security_filters","id":"egl-poh-kzn"},{"attributes":{"is_enabled":true,"name":"Test-Python-Get_a_security_filter_returns_OK_response-1635496812","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestPythonGetasecurityfilterreturnsOKresponse1635496812","is_builtin":false},"type":"security_filters","id":"gcz-3rz-y1w"},{"attributes":{"is_enabled":true,"name":"Test-Go-Get_a_security_filter_returns_OK_response-1636410254","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGoGetasecurityfilterreturnsOKresponse1636410254","is_builtin":false},"type":"security_filters","id":"csu-jez-ive"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1637063344","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1637063344","is_builtin":false},"type":"security_filters","id":"izh-ced-qmc"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1637063346","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1637063346","is_builtin":false},"type":"security_filters","id":"rtp-twm-nur"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1637063347","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1637063347","is_builtin":false},"type":"security_filters","id":"rin-h1e-8p1"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1637070528","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1637070528","is_builtin":false},"type":"security_filters","id":"thp-jp7-1is"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1637070533","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1637070533","is_builtin":false},"type":"security_filters","id":"jyk-ryj-r5v"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1637070535","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1637070535","is_builtin":false},"type":"security_filters","id":"5hn-7yt-vcx"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1637077967","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1637077967","is_builtin":false},"type":"security_filters","id":"vjx-2ei-qzt"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1637077969","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1637077969","is_builtin":false},"type":"security_filters","id":"trb-gqz-rw0"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1637077970","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1637077970","is_builtin":false},"type":"security_filters","id":"eam-ucg-ysc"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1637078478","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1637078478","is_builtin":false},"type":"security_filters","id":"nd2-4uw-ryq"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1637078481","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1637078481","is_builtin":false},"type":"security_filters","id":"mdt-vr8-lpi"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1637078482","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1637078482","is_builtin":false},"type":"security_filters","id":"0rq-mvi-cgj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1637089241","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1637089241","is_builtin":false},"type":"security_filters","id":"wn3-as7-moa"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1620751633","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1620751633","is_builtin":false},"type":"security_filters","id":"tqw-xay-uyv"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1620751634","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1620751634","is_builtin":false},"type":"security_filters","id":"5zc-uho-3kh"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1637141213","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1637141213","is_builtin":false},"type":"security_filters","id":"auv-76t-trj"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1637141215","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1637141215","is_builtin":false},"type":"security_filters","id":"d4t-p2p-tsw"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1637141217","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1637141217","is_builtin":false},"type":"security_filters","id":"vpi-vz6-pnj"},{"attributes":{"is_enabled":true,"name":"Test-Ruby-Get_a_security_filter_returns_OK_response-1637834808","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestRubyGetasecurityfilterreturnsOKresponse1637834808","is_builtin":false},"type":"security_filters","id":"eaa-jqt-qhz"},{"attributes":{"is_enabled":true,"name":"Test-Python-Get_a_security_filter_returns_OK_response-1638987050","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestPythonGetasecurityfilterreturnsOKresponse1638987050","is_builtin":false},"type":"security_filters","id":"rpt-0pp-r8j"},{"attributes":{"is_enabled":true,"name":"Test-Python-Delete_a_security_filter_returns_No_Content_response-1638987054","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestPythonDeleteasecurityfilterreturnsNoContentresponse1638987054","is_builtin":false},"type":"security_filters","id":"bkx-gg1-qlx"},{"attributes":{"is_enabled":true,"name":"Test-Python-Update_a_security_filter_returns_OK_response-1638987055","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestPythonUpdateasecurityfilterreturnsOKresponse1638987055","is_builtin":false},"type":"security_filters","id":"z67-o7h-hik"},{"attributes":{"is_enabled":true,"name":"Test-Python-Create_a_security_filter_returns_OK_response-1638987057","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestPythonCreateasecurityfilterreturnsOKresponse1638987057","is_builtin":false},"type":"security_filters","id":"mlx-awu-wg9"},{"attributes":{"is_enabled":true,"name":"Test-Python-Delete_a_security_filter_returns_No_Content_response-1639574360","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestPythonDeleteasecurityfilterreturnsNoContentresponse1639574360","is_builtin":false},"type":"security_filters","id":"ugq-7e0-rmg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1640111630","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1640111630","is_builtin":false},"type":"security_filters","id":"iue-buv-ynq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1640112776","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1640112776","is_builtin":false},"type":"security_filters","id":"qqm-ssh-ees"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1640112926","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1640112926","is_builtin":false},"type":"security_filters","id":"lkt-tz2-dfx"}]}' - status: - code: 200 - message: OK -recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/security_monitoring/Update-a-security-filter-returns-OK-response.frozen b/cassettes/features/v2/security_monitoring/Update-a-security-filter-returns-OK-response.frozen deleted file mode 100644 index 4cbb7d499be0..000000000000 --- a/cassettes/features/v2/security_monitoring/Update-a-security-filter-returns-OK-response.frozen +++ /dev/null @@ -1 +0,0 @@ -2022-01-10T15:51:29.112Z \ No newline at end of file diff --git a/cassettes/features/v2/security_monitoring/Update-a-security-filter-returns-OK-response.yml b/cassettes/features/v2/security_monitoring/Update-a-security-filter-returns-OK-response.yml deleted file mode 100644 index de4f02cdd0c0..000000000000 --- a/cassettes/features/v2/security_monitoring/Update-a-security-filter-returns-OK-response.yml +++ /dev/null @@ -1,51 +0,0 @@ -http_interactions: -- recorded_at: Mon, 10 Jan 2022 15:51:29 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"exclusion_filters":[{"name":"Exclude logs from - staging","query":"source:staging"}],"filtered_data_type":"logs","is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1641829889","query":"service:TestUpdateasecurityfilterreturnsOKresponse1641829889"},"type":"security_filters"}}' - headers: - Content-Type: - - application/json;charset=utf-8 - method: POST - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters - response: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1641829889","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude - logs from staging"}],"version":1,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1641829889","is_builtin":false},"type":"security_filters","id":"c8d-shz-sm1"}}' - status: - code: 200 - message: OK -- recorded_at: Mon, 10 Jan 2022 15:51:29 GMT - request: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"exclusion_filters":[],"filtered_data_type":"logs","is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1641829889","query":"service:TestUpdateasecurityfilterreturnsOKresponse1641829889","version":1},"type":"security_filters"}}' - headers: - Content-Type: - - application/json;charset=utf-8 - method: PATCH - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/c8d-shz-sm1 - response: - body: - encoding: UTF-8 - string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1641829889","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1641829889","is_builtin":false},"type":"security_filters","id":"c8d-shz-sm1"}}' - status: - code: 200 - message: OK -- recorded_at: Mon, 10 Jan 2022 15:51:29 GMT - request: - body: null - headers: {} - method: DELETE - uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/c8d-shz-sm1 - response: - body: - encoding: UTF-8 - string: '' - status: - code: 204 - message: No Content -recorded_with: VCR 6.0.0 diff --git a/examples/v2/security-monitoring/CreateSecurityFilter.rb b/examples/v2/security-monitoring/CreateSecurityFilter.rb deleted file mode 100644 index 75b743c46946..000000000000 --- a/examples/v2/security-monitoring/CreateSecurityFilter.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Create a security filter returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -body = DatadogAPIClient::V2::SecurityFilterCreateRequest.new({ - data: DatadogAPIClient::V2::SecurityFilterCreateData.new({ - attributes: DatadogAPIClient::V2::SecurityFilterCreateAttributes.new({ - exclusion_filters: [ - DatadogAPIClient::V2::SecurityFilterExclusionFilter.new({ - name: "Exclude staging", - query: "source:staging", - }), - ], - filtered_data_type: DatadogAPIClient::V2::SecurityFilterFilteredDataType::LOGS, - is_enabled: true, - name: "Example-Create_a_security_filter_returns_OK_response", - query: "service:ExampleCreateasecurityfilterreturnsOKresponse", - }), - type: DatadogAPIClient::V2::SecurityFilterType::SECURITY_FILTERS, - }), -}) -p api_instance.create_security_filter(body) diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb b/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb deleted file mode 100644 index 0877a851943d..000000000000 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule.rb +++ /dev/null @@ -1,35 +0,0 @@ -# Create a detection rule returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -body = DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload.new({ - name: "Example-Create_a_detection_rule_returns_OK_response", - queries: [ - DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate.new({ - query: "@test:true", - aggregation: DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation::COUNT, - group_by_fields: [], - distinct_fields: [], - metric: "", - }), - ], - filters: [], - cases: [ - DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new({ - name: "", - status: DatadogAPIClient::V2::SecurityMonitoringRuleSeverity::INFO, - condition: "a > 0", - notifications: [], - }), - ], - options: DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new({ - evaluation_window: DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow::FIFTEEN_MINUTES, - keep_alive: DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive::ONE_HOUR, - max_signal_duration: DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration::ONE_DAY, - }), - message: "Test rule", - tags: [], - is_enabled: true, -}) -p api_instance.create_security_monitoring_rule(body) diff --git a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb b/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb deleted file mode 100644 index 41c52ab310d2..000000000000 --- a/examples/v2/security-monitoring/CreateSecurityMonitoringRule_498211763.rb +++ /dev/null @@ -1,36 +0,0 @@ -# Create a detection rule with type 'workload_security' returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -body = DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload.new({ - name: "Example-Create_a_detection_rule_with_type_workload_security_returns_OK_response", - queries: [ - DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate.new({ - query: "@test:true", - aggregation: DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation::COUNT, - group_by_fields: [], - distinct_fields: [], - metric: "", - }), - ], - filters: [], - cases: [ - DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new({ - name: "", - status: DatadogAPIClient::V2::SecurityMonitoringRuleSeverity::INFO, - condition: "a > 0", - notifications: [], - }), - ], - options: DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new({ - evaluation_window: DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow::FIFTEEN_MINUTES, - keep_alive: DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive::ONE_HOUR, - max_signal_duration: DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration::ONE_DAY, - }), - message: "Test rule", - tags: [], - is_enabled: true, - type: DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate::WORKLOAD_SECURITY, -}) -p api_instance.create_security_monitoring_rule(body) diff --git a/examples/v2/security-monitoring/DeleteSecurityFilter_555029489.rb b/examples/v2/security-monitoring/DeleteSecurityFilter_555029489.rb deleted file mode 100644 index 2eb5fae699df..000000000000 --- a/examples/v2/security-monitoring/DeleteSecurityFilter_555029489.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a security filter returns "No Content" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -# there is a valid "security_filter" in the system -SECURITY_FILTER_DATA_ID = ENV["SECURITY_FILTER_DATA_ID"] -api_instance.delete_security_filter(SECURITY_FILTER_DATA_ID) diff --git a/examples/v2/security-monitoring/DeleteSecurityMonitoringRule.rb b/examples/v2/security-monitoring/DeleteSecurityMonitoringRule.rb deleted file mode 100644 index ab2ae5c93501..000000000000 --- a/examples/v2/security-monitoring/DeleteSecurityMonitoringRule.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete an existing rule returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -# there is a valid "security_rule" in the system -SECURITY_RULE_ID = ENV["SECURITY_RULE_ID"] -api_instance.delete_security_monitoring_rule(SECURITY_RULE_ID) diff --git a/examples/v2/security-monitoring/GetSecurityFilter.rb b/examples/v2/security-monitoring/GetSecurityFilter.rb deleted file mode 100644 index 47e4cb414d6a..000000000000 --- a/examples/v2/security-monitoring/GetSecurityFilter.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get a security filter returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -# there is a valid "security_filter" in the system -SECURITY_FILTER_DATA_ID = ENV["SECURITY_FILTER_DATA_ID"] -p api_instance.get_security_filter(SECURITY_FILTER_DATA_ID) diff --git a/examples/v2/security-monitoring/ListSecurityFilters.rb b/examples/v2/security-monitoring/ListSecurityFilters.rb deleted file mode 100644 index afcdf3ba6a65..000000000000 --- a/examples/v2/security-monitoring/ListSecurityFilters.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Get all security filters returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new -p api_instance.list_security_filters() diff --git a/examples/v2/security-monitoring/UpdateSecurityFilter.rb b/examples/v2/security-monitoring/UpdateSecurityFilter.rb deleted file mode 100644 index b0bd3b5bb70c..000000000000 --- a/examples/v2/security-monitoring/UpdateSecurityFilter.rb +++ /dev/null @@ -1,22 +0,0 @@ -# Update a security filter returns "OK" response - -require "datadog_api_client" -api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - -# there is a valid "security_filter" in the system -SECURITY_FILTER_DATA_ID = ENV["SECURITY_FILTER_DATA_ID"] - -body = DatadogAPIClient::V2::SecurityFilterUpdateRequest.new({ - data: DatadogAPIClient::V2::SecurityFilterUpdateData.new({ - attributes: DatadogAPIClient::V2::SecurityFilterUpdateAttributes.new({ - exclusion_filters: [], - filtered_data_type: DatadogAPIClient::V2::SecurityFilterFilteredDataType::LOGS, - is_enabled: true, - name: "Example-Update_a_security_filter_returns_OK_response", - query: "service:ExampleUpdateasecurityfilterreturnsOKresponse", - version: 1, - }), - type: DatadogAPIClient::V2::SecurityFilterType::SECURITY_FILTERS, - }), -}) -p api_instance.update_security_filter(SECURITY_FILTER_DATA_ID, body) diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature deleted file mode 100644 index 4a91d1f4c5d8..000000000000 --- a/features/v2/security_monitoring.feature +++ /dev/null @@ -1,228 +0,0 @@ -@endpoint(security-monitoring) @endpoint(security-monitoring-v2) -Feature: Security Monitoring - Detection rules for generating signals and listing of generated signals. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "SecurityMonitoring" API - - @team:DataDog/security-monitoring - Scenario: Create a detection rule returns "Bad Request" response - Given new "CreateSecurityMonitoringRule" request - And body with value {"name":"{{ unique }}", "queries":[{"query":""}],"cases":[{"status":"info"}],"options":{},"message":"Test rule","tags":[],"isEnabled":true} - When the request is sent - Then the response status is 400 Bad Request - - @team:DataDog/security-monitoring - Scenario: Create a detection rule returns "OK" response - Given new "CreateSecurityMonitoringRule" request - And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"metric":""}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true} - When the request is sent - Then the response status is 200 OK - - @team:DataDog/security-monitoring - Scenario: Create a detection rule with type 'workload_security' returns "OK" response - Given new "CreateSecurityMonitoringRule" request - And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"metric":""}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true, "type": "workload_security"} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/security-monitoring - Scenario: Create a security filter returns "Bad Request" response - Given new "CreateSecurityFilter" request - And body with value {"data": {"attributes": {"exclusion_filters": [{"name": "Exclude staging", "query": "source:staging"}], "filtered_data_type": "logs", "is_enabled": true, "name": "Custom security filter", "query": "service:api"}, "type": "security_filters"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/security-monitoring - Scenario: Create a security filter returns "Conflict" response - Given new "CreateSecurityFilter" request - And body with value {"data": {"attributes": {"exclusion_filters": [{"name": "Exclude staging", "query": "source:staging"}], "filtered_data_type": "logs", "is_enabled": true, "name": "Custom security filter", "query": "service:api"}, "type": "security_filters"}} - When the request is sent - Then the response status is 409 Conflict - - @team:DataDog/security-monitoring - Scenario: Create a security filter returns "OK" response - Given new "CreateSecurityFilter" request - And body with value {"data": {"attributes": {"exclusion_filters": [{"name": "Exclude staging", "query": "source:staging"}], "filtered_data_type": "logs", "is_enabled": true, "name": "{{ unique }}", "query": "service:{{ unique_alnum }}"}, "type": "security_filters"}} - When the request is sent - Then the response status is 200 OK - - @skip @team:DataDog/security-monitoring - Scenario: Delete a non existing rule returns "Not Found" response - Given new "DeleteSecurityMonitoringRule" request - And request contains "rule_id" parameter with value "ThisRuleIdProbablyDoesntExist" - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/security-monitoring - Scenario: Delete a security filter returns "No Content" response - Given there is a valid "security_filter" in the system - And new "DeleteSecurityFilter" request - And request contains "security_filter_id" parameter from "security_filter.data.id" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/security-monitoring - Scenario: Delete a security filter returns "Not Found" response - Given new "DeleteSecurityFilter" request - And request contains "security_filter_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @skip @team:DataDog/security-monitoring - Scenario: Delete a security filter returns "OK" response - Given new "DeleteSecurityFilter" request - And request contains "security_filter_id" parameter from "" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/security-monitoring - Scenario: Delete an existing rule returns "Not Found" response - Given new "DeleteSecurityMonitoringRule" request - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/security-monitoring - Scenario: Delete an existing rule returns "OK" response - Given there is a valid "security_rule" in the system - And new "DeleteSecurityMonitoringRule" request - And request contains "rule_id" parameter from "security_rule.id" - When the request is sent - Then the response status is 204 OK - - @generated @skip @team:DataDog/security-monitoring - Scenario: Get a list of security signals returns "Bad Request" response - Given operation "SearchSecurityMonitoringSignals" enabled - And new "SearchSecurityMonitoringSignals" request - And body with value {"filter": {"from": "2019-01-02T09:42:36.320Z", "query": "security:attack status:high", "to": "2019-01-03T09:42:36.320Z"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/security-monitoring - Scenario: Get a list of security signals returns "OK" response - Given operation "SearchSecurityMonitoringSignals" enabled - And new "SearchSecurityMonitoringSignals" request - And body with value {"filter": {"from": "2019-01-02T09:42:36.320Z", "query": "security:attack status:high", "to": "2019-01-03T09:42:36.320Z"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/security-monitoring - Scenario: Get a quick list of security signals returns "Bad Request" response - Given operation "ListSecurityMonitoringSignals" enabled - And new "ListSecurityMonitoringSignals" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/security-monitoring - Scenario: Get a quick list of security signals returns "OK" response - Given operation "ListSecurityMonitoringSignals" enabled - And new "ListSecurityMonitoringSignals" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/security-monitoring - Scenario: Get a rule's details returns "Not Found" response - Given new "GetSecurityMonitoringRule" request - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/security-monitoring - Scenario: Get a rule's details returns "OK" response - Given new "GetSecurityMonitoringRule" request - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/security-monitoring - Scenario: Get a security filter returns "Not Found" response - Given new "GetSecurityFilter" request - And request contains "security_filter_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/security-monitoring - Scenario: Get a security filter returns "OK" response - Given there is a valid "security_filter" in the system - And new "GetSecurityFilter" request - And request contains "security_filter_id" parameter from "security_filter.data.id" - When the request is sent - Then the response status is 200 OK - - @team:DataDog/security-monitoring - Scenario: Get all security filters returns "OK" response - Given new "ListSecurityFilters" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/security-monitoring - Scenario: List rules returns "Bad Request" response - Given new "ListSecurityMonitoringRules" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/security-monitoring - Scenario: List rules returns "OK" response - Given new "ListSecurityMonitoringRules" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/security-monitoring - Scenario: Update a security filter returns "Bad Request" response - Given new "UpdateSecurityFilter" request - And request contains "security_filter_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"exclusion_filters": [], "filtered_data_type": "logs", "is_enabled": true, "name": "Custom security filter", "query": "service:api", "version": 1}, "type": "security_filters"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/security-monitoring - Scenario: Update a security filter returns "Concurrent Modification" response - Given new "UpdateSecurityFilter" request - And request contains "security_filter_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"exclusion_filters": [], "filtered_data_type": "logs", "is_enabled": true, "name": "Custom security filter", "query": "service:api", "version": 1}, "type": "security_filters"}} - When the request is sent - Then the response status is 409 Concurrent Modification - - @generated @skip @team:DataDog/security-monitoring - Scenario: Update a security filter returns "Not Found" response - Given new "UpdateSecurityFilter" request - And request contains "security_filter_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"exclusion_filters": [], "filtered_data_type": "logs", "is_enabled": true, "name": "Custom security filter", "query": "service:api", "version": 1}, "type": "security_filters"}} - When the request is sent - Then the response status is 404 Not Found - - @team:DataDog/security-monitoring - Scenario: Update a security filter returns "OK" response - Given new "UpdateSecurityFilter" request - And there is a valid "security_filter" in the system - And request contains "security_filter_id" parameter from "security_filter.data.id" - And body with value {"data": {"attributes": {"exclusion_filters": [], "filtered_data_type": "logs", "is_enabled": true, "name": "{{ unique }}", "query": "service:{{ unique_alnum }}", "version": 1}, "type": "security_filters"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/security-monitoring - Scenario: Update an existing rule returns "Bad Request" response - Given new "UpdateSecurityMonitoringRule" request - And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"cases": [{"condition": null, "name": null, "notifications": [null], "status": "critical"}], "filters": [{"action": "require", "query": null}], "hasExtendedTitle": true, "isEnabled": null, "message": null, "name": null, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0}}, "queries": [{"aggregation": "count", "distinctFields": [null], "groupByFields": [null], "metric": null, "name": null, "query": null}], "tags": [null], "version": 1} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/security-monitoring - Scenario: Update an existing rule returns "Not Found" response - Given new "UpdateSecurityMonitoringRule" request - And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"cases": [{"condition": null, "name": null, "notifications": [null], "status": "critical"}], "filters": [{"action": "require", "query": null}], "hasExtendedTitle": true, "isEnabled": null, "message": null, "name": null, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0}}, "queries": [{"aggregation": "count", "distinctFields": [null], "groupByFields": [null], "metric": null, "name": null, "query": null}], "tags": [null], "version": 1} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/security-monitoring - Scenario: Update an existing rule returns "OK" response - Given new "UpdateSecurityMonitoringRule" request - And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"cases": [{"condition": null, "name": null, "notifications": [null], "status": "critical"}], "filters": [{"action": "require", "query": null}], "hasExtendedTitle": true, "isEnabled": null, "message": null, "name": null, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0}}, "queries": [{"aggregation": "count", "distinctFields": [null], "groupByFields": [null], "metric": null, "name": null, "query": null}], "tags": [null], "version": 1} - When the request is sent - Then the response status is 200 OK diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb deleted file mode 100644 index 1a06ccb3e4f5..000000000000 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ /dev/null @@ -1,929 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'cgi' - -module DatadogAPIClient::V2 - class SecurityMonitoringAPI - attr_accessor :api_client - - def initialize(api_client = APIClient.default) - @api_client = api_client - end - # Create a security filter - # Create a security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. - # @param body [SecurityFilterCreateRequest] The definition of the new security filter. - # @param [Hash] opts the optional parameters - # @return [SecurityFilterResponse] - def create_security_filter(body, opts = {}) - data, _status_code, _headers = create_security_filter_with_http_info(body, opts) - data - end - - # Create a security filter - # Create a security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. - # @param body [SecurityFilterCreateRequest] The definition of the new security filter. - # @param [Hash] opts the optional parameters - # @return [Array<(SecurityFilterResponse, Integer, Hash)>] SecurityFilterResponse data, response status code and response headers - def create_security_filter_with_http_info(body, opts = {}) - - if @api_client.config.unstable_operations.has_key?(:create_security_filter) - unstable_enabled = @api_client.config.unstable_operations[:create_security_filter] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "create_security_filter") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_security_filter")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_security_filter ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.create_security_filter" - end - # resource path - local_var_path = '/api/v2/security_monitoring/configuration/security_filters' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'SecurityFilterResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :create_security_filter, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#create_security_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Create a detection rule - # Create a detection rule. - # @param body [SecurityMonitoringRuleCreatePayload] - # @param [Hash] opts the optional parameters - # @return [SecurityMonitoringRuleResponse] - def create_security_monitoring_rule(body, opts = {}) - data, _status_code, _headers = create_security_monitoring_rule_with_http_info(body, opts) - data - end - - # Create a detection rule - # Create a detection rule. - # @param body [SecurityMonitoringRuleCreatePayload] - # @param [Hash] opts the optional parameters - # @return [Array<(SecurityMonitoringRuleResponse, Integer, Hash)>] SecurityMonitoringRuleResponse data, response status code and response headers - def create_security_monitoring_rule_with_http_info(body, opts = {}) - - if @api_client.config.unstable_operations.has_key?(:create_security_monitoring_rule) - unstable_enabled = @api_client.config.unstable_operations[:create_security_monitoring_rule] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "create_security_monitoring_rule") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_security_monitoring_rule")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_security_monitoring_rule ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.create_security_monitoring_rule" - end - # resource path - local_var_path = '/api/v2/security_monitoring/rules' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'SecurityMonitoringRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :create_security_monitoring_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#create_security_monitoring_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a security filter - # Delete a specific security filter. - # @param security_filter_id [String] The ID of the security filter. - # @param [Hash] opts the optional parameters - # @return [nil] - def delete_security_filter(security_filter_id, opts = {}) - delete_security_filter_with_http_info(security_filter_id, opts) - nil - end - - # Delete a security filter - # Delete a specific security filter. - # @param security_filter_id [String] The ID of the security filter. - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_security_filter_with_http_info(security_filter_id, opts = {}) - - if @api_client.config.unstable_operations.has_key?(:delete_security_filter) - unstable_enabled = @api_client.config.unstable_operations[:delete_security_filter] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_security_filter") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_security_filter")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.delete_security_filter ...' - end - # verify the required parameter 'security_filter_id' is set - if @api_client.config.client_side_validation && security_filter_id.nil? - fail ArgumentError, "Missing the required parameter 'security_filter_id' when calling SecurityMonitoringAPI.delete_security_filter" - end - # resource path - local_var_path = '/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}'.sub('{' + 'security_filter_id' + '}', CGI.escape(security_filter_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :delete_security_filter, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#delete_security_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete an existing rule - # Delete an existing rule. Default rules cannot be deleted. - # @param rule_id [String] The ID of the rule. - # @param [Hash] opts the optional parameters - # @return [nil] - def delete_security_monitoring_rule(rule_id, opts = {}) - delete_security_monitoring_rule_with_http_info(rule_id, opts) - nil - end - - # Delete an existing rule - # Delete an existing rule. Default rules cannot be deleted. - # @param rule_id [String] The ID of the rule. - # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_security_monitoring_rule_with_http_info(rule_id, opts = {}) - - if @api_client.config.unstable_operations.has_key?(:delete_security_monitoring_rule) - unstable_enabled = @api_client.config.unstable_operations[:delete_security_monitoring_rule] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_security_monitoring_rule") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_security_monitoring_rule")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.delete_security_monitoring_rule ...' - end - # verify the required parameter 'rule_id' is set - if @api_client.config.client_side_validation && rule_id.nil? - fail ArgumentError, "Missing the required parameter 'rule_id' when calling SecurityMonitoringAPI.delete_security_monitoring_rule" - end - # resource path - local_var_path = '/api/v2/security_monitoring/rules/{rule_id}'.sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :delete_security_monitoring_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#delete_security_monitoring_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a security filter - # Get the details of a specific security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. - # @param security_filter_id [String] The ID of the security filter. - # @param [Hash] opts the optional parameters - # @return [SecurityFilterResponse] - def get_security_filter(security_filter_id, opts = {}) - data, _status_code, _headers = get_security_filter_with_http_info(security_filter_id, opts) - data - end - - # Get a security filter - # Get the details of a specific security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. - # @param security_filter_id [String] The ID of the security filter. - # @param [Hash] opts the optional parameters - # @return [Array<(SecurityFilterResponse, Integer, Hash)>] SecurityFilterResponse data, response status code and response headers - def get_security_filter_with_http_info(security_filter_id, opts = {}) - - if @api_client.config.unstable_operations.has_key?(:get_security_filter) - unstable_enabled = @api_client.config.unstable_operations[:get_security_filter] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "get_security_filter") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_security_filter")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_security_filter ...' - end - # verify the required parameter 'security_filter_id' is set - if @api_client.config.client_side_validation && security_filter_id.nil? - fail ArgumentError, "Missing the required parameter 'security_filter_id' when calling SecurityMonitoringAPI.get_security_filter" - end - # resource path - local_var_path = '/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}'.sub('{' + 'security_filter_id' + '}', CGI.escape(security_filter_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SecurityFilterResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :get_security_filter, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_security_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a rule's details - # Get a rule's details. - # @param rule_id [String] The ID of the rule. - # @param [Hash] opts the optional parameters - # @return [SecurityMonitoringRuleResponse] - def get_security_monitoring_rule(rule_id, opts = {}) - data, _status_code, _headers = get_security_monitoring_rule_with_http_info(rule_id, opts) - data - end - - # Get a rule's details - # Get a rule's details. - # @param rule_id [String] The ID of the rule. - # @param [Hash] opts the optional parameters - # @return [Array<(SecurityMonitoringRuleResponse, Integer, Hash)>] SecurityMonitoringRuleResponse data, response status code and response headers - def get_security_monitoring_rule_with_http_info(rule_id, opts = {}) - - if @api_client.config.unstable_operations.has_key?(:get_security_monitoring_rule) - unstable_enabled = @api_client.config.unstable_operations[:get_security_monitoring_rule] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "get_security_monitoring_rule") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_security_monitoring_rule")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.get_security_monitoring_rule ...' - end - # verify the required parameter 'rule_id' is set - if @api_client.config.client_side_validation && rule_id.nil? - fail ArgumentError, "Missing the required parameter 'rule_id' when calling SecurityMonitoringAPI.get_security_monitoring_rule" - end - # resource path - local_var_path = '/api/v2/security_monitoring/rules/{rule_id}'.sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SecurityMonitoringRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :get_security_monitoring_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#get_security_monitoring_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get all security filters - # Get the list of configured security filters with their definitions. - # @param [Hash] opts the optional parameters - # @return [SecurityFiltersResponse] - def list_security_filters(opts = {}) - data, _status_code, _headers = list_security_filters_with_http_info(opts) - data - end - - # Get all security filters - # Get the list of configured security filters with their definitions. - # @param [Hash] opts the optional parameters - # @return [Array<(SecurityFiltersResponse, Integer, Hash)>] SecurityFiltersResponse data, response status code and response headers - def list_security_filters_with_http_info(opts = {}) - - if @api_client.config.unstable_operations.has_key?(:list_security_filters) - unstable_enabled = @api_client.config.unstable_operations[:list_security_filters] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "list_security_filters") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_security_filters")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_filters ...' - end - # resource path - local_var_path = '/api/v2/security_monitoring/configuration/security_filters' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SecurityFiltersResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :list_security_filters, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_security_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List rules - # List rules. - # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Size for a given page. (default to 10) - # @option opts [Integer] :page_number Specific page number to return. (default to 0) - # @return [SecurityMonitoringListRulesResponse] - def list_security_monitoring_rules(opts = {}) - data, _status_code, _headers = list_security_monitoring_rules_with_http_info(opts) - data - end - - # List rules - # List rules. - # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Size for a given page. - # @option opts [Integer] :page_number Specific page number to return. - # @return [Array<(SecurityMonitoringListRulesResponse, Integer, Hash)>] SecurityMonitoringListRulesResponse data, response status code and response headers - def list_security_monitoring_rules_with_http_info(opts = {}) - - if @api_client.config.unstable_operations.has_key?(:list_security_monitoring_rules) - unstable_enabled = @api_client.config.unstable_operations[:list_security_monitoring_rules] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "list_security_monitoring_rules") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_security_monitoring_rules")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_monitoring_rules ...' - end - # resource path - local_var_path = '/api/v2/security_monitoring/rules' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SecurityMonitoringListRulesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :list_security_monitoring_rules, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_security_monitoring_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a quick list of security signals - # The list endpoint returns security signals that match a search query. Both this endpoint and the POST endpoint can be used interchangeably when listing security signals. - # @param [Hash] opts the optional parameters - # @option opts [String] :filter_query The search query for security signals. - # @option opts [Time] :filter_from The minimum timestamp for requested security signals. - # @option opts [Time] :filter_to The maximum timestamp for requested security signals. - # @option opts [SecurityMonitoringSignalsSort] :sort The order of the security signals in results. - # @option opts [String] :page_cursor A list of results using the cursor provided in the previous query. - # @option opts [Integer] :page_limit The maximum number of security signals in the response. (default to 10) - # @return [SecurityMonitoringSignalsListResponse] - def list_security_monitoring_signals(opts = {}) - data, _status_code, _headers = list_security_monitoring_signals_with_http_info(opts) - data - end - - # Get a quick list of security signals - # The list endpoint returns security signals that match a search query. Both this endpoint and the POST endpoint can be used interchangeably when listing security signals. - # @param [Hash] opts the optional parameters - # @option opts [String] :filter_query The search query for security signals. - # @option opts [Time] :filter_from The minimum timestamp for requested security signals. - # @option opts [Time] :filter_to The maximum timestamp for requested security signals. - # @option opts [SecurityMonitoringSignalsSort] :sort The order of the security signals in results. - # @option opts [String] :page_cursor A list of results using the cursor provided in the previous query. - # @option opts [Integer] :page_limit The maximum number of security signals in the response. - # @return [Array<(SecurityMonitoringSignalsListResponse, Integer, Hash)>] SecurityMonitoringSignalsListResponse data, response status code and response headers - def list_security_monitoring_signals_with_http_info(opts = {}) - - if @api_client.config.unstable_operations.has_key?(:list_security_monitoring_signals) - unstable_enabled = @api_client.config.unstable_operations[:list_security_monitoring_signals] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "list_security_monitoring_signals") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_security_monitoring_signals")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.list_security_monitoring_signals ...' - end - if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 1000 - fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling SecurityMonitoringAPI.list_security_monitoring_signals, must be smaller than or equal to 1000.' - end - - # resource path - local_var_path = '/api/v2/security_monitoring/signals' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'filter[query]'] = opts[:'filter_query'] if !opts[:'filter_query'].nil? - query_params[:'filter[from]'] = opts[:'filter_from'] if !opts[:'filter_from'].nil? - query_params[:'filter[to]'] = opts[:'filter_to'] if !opts[:'filter_to'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? - query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalsListResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :list_security_monitoring_signals, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#list_security_monitoring_signals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a list of security signals - # Returns security signals that match a search query. Both this endpoint and the GET endpoint can be used interchangeably for listing security signals. - # @param [Hash] opts the optional parameters - # @option opts [SecurityMonitoringSignalListRequest] :body - # @return [SecurityMonitoringSignalsListResponse] - def search_security_monitoring_signals(opts = {}) - data, _status_code, _headers = search_security_monitoring_signals_with_http_info(opts) - data - end - - # Get a list of security signals - # Returns security signals that match a search query. Both this endpoint and the GET endpoint can be used interchangeably for listing security signals. - # @param [Hash] opts the optional parameters - # @option opts [SecurityMonitoringSignalListRequest] :body - # @return [Array<(SecurityMonitoringSignalsListResponse, Integer, Hash)>] SecurityMonitoringSignalsListResponse data, response status code and response headers - def search_security_monitoring_signals_with_http_info(opts = {}) - - if @api_client.config.unstable_operations.has_key?(:search_security_monitoring_signals) - unstable_enabled = @api_client.config.unstable_operations[:search_security_monitoring_signals] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "search_security_monitoring_signals") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "search_security_monitoring_signals")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.search_security_monitoring_signals ...' - end - # resource path - local_var_path = '/api/v2/security_monitoring/signals/search' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) - - # return_type - return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalsListResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :search_security_monitoring_signals, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#search_security_monitoring_signals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update a security filter - # Update a specific security filter. Returns the security filter object when the request is successful. - # @param security_filter_id [String] The ID of the security filter. - # @param body [SecurityFilterUpdateRequest] New definition of the security filter. - # @param [Hash] opts the optional parameters - # @return [SecurityFilterResponse] - def update_security_filter(security_filter_id, body, opts = {}) - data, _status_code, _headers = update_security_filter_with_http_info(security_filter_id, body, opts) - data - end - - # Update a security filter - # Update a specific security filter. Returns the security filter object when the request is successful. - # @param security_filter_id [String] The ID of the security filter. - # @param body [SecurityFilterUpdateRequest] New definition of the security filter. - # @param [Hash] opts the optional parameters - # @return [Array<(SecurityFilterResponse, Integer, Hash)>] SecurityFilterResponse data, response status code and response headers - def update_security_filter_with_http_info(security_filter_id, body, opts = {}) - - if @api_client.config.unstable_operations.has_key?(:update_security_filter) - unstable_enabled = @api_client.config.unstable_operations[:update_security_filter] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "update_security_filter") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_security_filter")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.update_security_filter ...' - end - # verify the required parameter 'security_filter_id' is set - if @api_client.config.client_side_validation && security_filter_id.nil? - fail ArgumentError, "Missing the required parameter 'security_filter_id' when calling SecurityMonitoringAPI.update_security_filter" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.update_security_filter" - end - # resource path - local_var_path = '/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}'.sub('{' + 'security_filter_id' + '}', CGI.escape(security_filter_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'SecurityFilterResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :update_security_filter, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#update_security_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update an existing rule - # Update an existing rule. When updating `cases`, `queries` or `options`, the whole field must be included. For example, when modifying a query all queries must be included. Default rules can only be updated to be enabled and to change notifications. - # @param rule_id [String] The ID of the rule. - # @param body [SecurityMonitoringRuleUpdatePayload] - # @param [Hash] opts the optional parameters - # @return [SecurityMonitoringRuleResponse] - def update_security_monitoring_rule(rule_id, body, opts = {}) - data, _status_code, _headers = update_security_monitoring_rule_with_http_info(rule_id, body, opts) - data - end - - # Update an existing rule - # Update an existing rule. When updating `cases`, `queries` or `options`, the whole field must be included. For example, when modifying a query all queries must be included. Default rules can only be updated to be enabled and to change notifications. - # @param rule_id [String] The ID of the rule. - # @param body [SecurityMonitoringRuleUpdatePayload] - # @param [Hash] opts the optional parameters - # @return [Array<(SecurityMonitoringRuleResponse, Integer, Hash)>] SecurityMonitoringRuleResponse data, response status code and response headers - def update_security_monitoring_rule_with_http_info(rule_id, body, opts = {}) - - if @api_client.config.unstable_operations.has_key?(:update_security_monitoring_rule) - unstable_enabled = @api_client.config.unstable_operations[:update_security_monitoring_rule] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "update_security_monitoring_rule") - else - raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_security_monitoring_rule")) - end - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.update_security_monitoring_rule ...' - end - # verify the required parameter 'rule_id' is set - if @api_client.config.client_side_validation && rule_id.nil? - fail ArgumentError, "Missing the required parameter 'rule_id' when calling SecurityMonitoringAPI.update_security_monitoring_rule" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.update_security_monitoring_rule" - end - # resource path - local_var_path = '/api/v2/security_monitoring/rules/{rule_id}'.sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s)) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'SecurityMonitoringRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :update_security_monitoring_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type - ) - - data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: SecurityMonitoringAPI#update_security_monitoring_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_filter.rb b/lib/datadog_api_client/v2/models/security_monitoring_filter.rb deleted file mode 100644 index 22f96f03aebe..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_filter.rb +++ /dev/null @@ -1,242 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # The rule's suppression filter. - class SecurityMonitoringFilter - # whether the object has unparsed attributes - attr_accessor :_unparsed - - attr_accessor :action - - # Query for selecting logs to apply the filtering action. - attr_accessor :query - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'action' => :'action', - :'query' => :'query' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'action' => :'SecurityMonitoringFilterAction', - :'query' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringFilter` 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::V2::SecurityMonitoringFilter`. 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?(:'action') - self.action = attributes[:'action'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action == o.action && - query == o.query - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [action, query].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_filter_action.rb b/lib/datadog_api_client/v2/models/security_monitoring_filter_action.rb deleted file mode 100644 index 5c6ae988bdd1..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_filter_action.rb +++ /dev/null @@ -1,39 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringFilterAction - REQUIRE = "require".freeze - SUPPRESS = "suppress".freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringFilterAction.constants.select { |c| SecurityMonitoringFilterAction::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb deleted file mode 100644 index 3c0e48d6d0fe..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb +++ /dev/null @@ -1,244 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # List of rules. - class SecurityMonitoringListRulesResponse - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # Array containing the list of rules. - attr_accessor :data - - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'data' => :'data', - :'meta' => :'meta' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'data' => :'Array', - :'meta' => :'ResponseMetaAttributes' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringListRulesResponse` 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::V2::SecurityMonitoringListRulesResponse`. 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?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [data, meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb deleted file mode 100644 index d5e6e5855271..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb +++ /dev/null @@ -1,264 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Case when signal is generated. - class SecurityMonitoringRuleCase - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # A rule case contains logical operations (`>`,`>=`, `&&`, `||`) to determine if a signal should be generated based on the event counts in the previously defined queries. - attr_accessor :condition - - # Name of the case. - attr_accessor :name - - # Notification targets for each rule case. - attr_accessor :notifications - - attr_accessor :status - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'condition' => :'condition', - :'name' => :'name', - :'notifications' => :'notifications', - :'status' => :'status' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'condition' => :'String', - :'name' => :'String', - :'notifications' => :'Array', - :'status' => :'SecurityMonitoringRuleSeverity' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleCase` 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::V2::SecurityMonitoringRuleCase`. 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?(:'condition') - self.condition = attributes[:'condition'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'notifications') - if (value = attributes[:'notifications']).is_a?(Array) - self.notifications = value - end - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - condition == o.condition && - name == o.name && - notifications == o.notifications && - status == o.status - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [condition, name, notifications, status].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb deleted file mode 100644 index a4179d97f1e3..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb +++ /dev/null @@ -1,269 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Case when signal is generated. - class SecurityMonitoringRuleCaseCreate - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # A rule case contains logical operations (`>`,`>=`, `&&`, `||`) to determine if a signal should be generated based on the event counts in the previously defined queries. - attr_accessor :condition - - # Name of the case. - attr_accessor :name - - # Notification targets for each rule case. - attr_accessor :notifications - - attr_accessor :status - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'condition' => :'condition', - :'name' => :'name', - :'notifications' => :'notifications', - :'status' => :'status' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'condition' => :'String', - :'name' => :'String', - :'notifications' => :'Array', - :'status' => :'SecurityMonitoringRuleSeverity' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate` 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::V2::SecurityMonitoringRuleCaseCreate`. 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?(:'condition') - self.condition = attributes[:'condition'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'notifications') - if (value = attributes[:'notifications']).is_a?(Array) - self.notifications = value - end - end - - if attributes.key?(:'status') - self.status = attributes[:'status'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @status.nil? - invalid_properties.push('invalid value for "status", status cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @status.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - condition == o.condition && - name == o.name && - notifications == o.notifications && - status == o.status - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [condition, name, notifications, status].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb deleted file mode 100644 index 539e25acc3ea..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb +++ /dev/null @@ -1,359 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Create a new rule. - class SecurityMonitoringRuleCreatePayload - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # Cases for generating signals. - attr_accessor :cases - - # Additional queries to filter matched events before they are processed. - attr_accessor :filters - - # Whether the notifications include the triggering group-by values in their title. - attr_accessor :has_extended_title - - # Whether the rule is enabled. - attr_accessor :is_enabled - - # Message for generated signals. - attr_accessor :message - - # The name of the rule. - attr_accessor :name - - attr_accessor :options - - # Queries for selecting logs which are part of the rule. - attr_accessor :queries - - # Tags for generated signals. - attr_accessor :tags - - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'cases' => :'cases', - :'filters' => :'filters', - :'has_extended_title' => :'hasExtendedTitle', - :'is_enabled' => :'isEnabled', - :'message' => :'message', - :'name' => :'name', - :'options' => :'options', - :'queries' => :'queries', - :'tags' => :'tags', - :'type' => :'type' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'cases' => :'Array', - :'filters' => :'Array', - :'has_extended_title' => :'Boolean', - :'is_enabled' => :'Boolean', - :'message' => :'String', - :'name' => :'String', - :'options' => :'SecurityMonitoringRuleOptions', - :'queries' => :'Array', - :'tags' => :'Array', - :'type' => :'SecurityMonitoringRuleTypeCreate' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload` 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::V2::SecurityMonitoringRuleCreatePayload`. 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?(:'cases') - if (value = attributes[:'cases']).is_a?(Array) - self.cases = value - end - end - - if attributes.key?(:'filters') - if (value = attributes[:'filters']).is_a?(Array) - self.filters = value - end - end - - if attributes.key?(:'has_extended_title') - self.has_extended_title = attributes[:'has_extended_title'] - end - - if attributes.key?(:'is_enabled') - self.is_enabled = attributes[:'is_enabled'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'options') - self.options = attributes[:'options'] - end - - if attributes.key?(:'queries') - if (value = attributes[:'queries']).is_a?(Array) - self.queries = value - end - end - - if attributes.key?(:'tags') - if (value = attributes[:'tags']).is_a?(Array) - self.tags = value - end - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @cases.nil? - invalid_properties.push('invalid value for "cases", cases cannot be nil.') - end - - if @is_enabled.nil? - invalid_properties.push('invalid value for "is_enabled", is_enabled cannot be nil.') - end - - if @message.nil? - invalid_properties.push('invalid value for "message", message cannot be nil.') - end - - if @name.nil? - invalid_properties.push('invalid value for "name", name cannot be nil.') - end - - if @options.nil? - invalid_properties.push('invalid value for "options", options cannot be nil.') - end - - if @queries.nil? - invalid_properties.push('invalid value for "queries", queries cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @cases.nil? - return false if @is_enabled.nil? - return false if @message.nil? - return false if @name.nil? - return false if @options.nil? - return false if @queries.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - cases == o.cases && - filters == o.filters && - has_extended_title == o.has_extended_title && - is_enabled == o.is_enabled && - message == o.message && - name == o.name && - options == o.options && - queries == o.queries && - tags == o.tags && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [cases, filters, has_extended_title, is_enabled, message, name, options, queries, tags, type].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb deleted file mode 100644 index e8b642747838..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringRuleDetectionMethod - THRESHOLD = "threshold".freeze - NEW_VALUE = "new_value".freeze - ANOMALY_DETECTION = "anomaly_detection".freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringRuleDetectionMethod.constants.select { |c| SecurityMonitoringRuleDetectionMethod::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb deleted file mode 100644 index f698dec4f89d..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb +++ /dev/null @@ -1,45 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringRuleEvaluationWindow - ZERO_MINUTES = 0.freeze - ONE_MINUTE = 60.freeze - FIVE_MINUTES = 300.freeze - TEN_MINUTES = 600.freeze - FIFTEEN_MINUTES = 900.freeze - THIRTY_MINUTES = 1800.freeze - ONE_HOUR = 3600.freeze - TWO_HOURS = 7200.freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringRuleEvaluationWindow.constants.select { |c| SecurityMonitoringRuleEvaluationWindow::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb deleted file mode 100644 index 8439d99370e3..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb +++ /dev/null @@ -1,47 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringRuleKeepAlive - ZERO_MINUTES = 0.freeze - ONE_MINUTE = 60.freeze - FIVE_MINUTES = 300.freeze - TEN_MINUTES = 600.freeze - FIFTEEN_MINUTES = 900.freeze - THIRTY_MINUTES = 1800.freeze - ONE_HOUR = 3600.freeze - TWO_HOURS = 7200.freeze - THREE_HOURS = 10800.freeze - SIX_HOURS = 21600.freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringRuleKeepAlive.constants.select { |c| SecurityMonitoringRuleKeepAlive::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_max_signal_duration.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_max_signal_duration.rb deleted file mode 100644 index 22fa87ef37e4..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_max_signal_duration.rb +++ /dev/null @@ -1,49 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringRuleMaxSignalDuration - ZERO_MINUTES = 0.freeze - ONE_MINUTE = 60.freeze - FIVE_MINUTES = 300.freeze - TEN_MINUTES = 600.freeze - FIFTEEN_MINUTES = 900.freeze - THIRTY_MINUTES = 1800.freeze - ONE_HOUR = 3600.freeze - TWO_HOURS = 7200.freeze - THREE_HOURS = 10800.freeze - SIX_HOURS = 21600.freeze - TWELVE_HOURS = 43200.freeze - ONE_DAY = 86400.freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringRuleMaxSignalDuration.constants.select { |c| SecurityMonitoringRuleMaxSignalDuration::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb deleted file mode 100644 index d4f3a061767d..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb +++ /dev/null @@ -1,241 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Options on new value rules. - class SecurityMonitoringRuleNewValueOptions - # whether the object has unparsed attributes - attr_accessor :_unparsed - - attr_accessor :forget_after - - attr_accessor :learning_duration - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'forget_after' => :'forgetAfter', - :'learning_duration' => :'learningDuration' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'forget_after' => :'SecurityMonitoringRuleNewValueOptionsForgetAfter', - :'learning_duration' => :'SecurityMonitoringRuleNewValueOptionsLearningDuration' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions` 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::V2::SecurityMonitoringRuleNewValueOptions`. 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?(:'forget_after') - self.forget_after = attributes[:'forget_after'] - end - - if attributes.key?(:'learning_duration') - self.learning_duration = attributes[:'learning_duration'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - forget_after == o.forget_after && - learning_duration == o.learning_duration - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [forget_after, learning_duration].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb deleted file mode 100644 index c3c3bddbb63f..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringRuleNewValueOptionsForgetAfter - ONE_DAY = 1.freeze - TWO_DAYS = 2.freeze - ONE_WEEK = 7.freeze - TWO_WEEKS = 14.freeze - THREE_WEEKS = 21.freeze - FOUR_WEEKS = 28.freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringRuleNewValueOptionsForgetAfter.constants.select { |c| SecurityMonitoringRuleNewValueOptionsForgetAfter::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_duration.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_duration.rb deleted file mode 100644 index 7ff678531fb1..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_duration.rb +++ /dev/null @@ -1,40 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringRuleNewValueOptionsLearningDuration - ZERO_DAYS = 0.freeze - ONE_DAY = 1.freeze - SEVEN_DAYS = 7.freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringRuleNewValueOptionsLearningDuration.constants.select { |c| SecurityMonitoringRuleNewValueOptionsLearningDuration::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb deleted file mode 100644 index 37146adbd868..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb +++ /dev/null @@ -1,268 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Options on rules. - class SecurityMonitoringRuleOptions - # whether the object has unparsed attributes - attr_accessor :_unparsed - - attr_accessor :detection_method - - attr_accessor :evaluation_window - - attr_accessor :keep_alive - - attr_accessor :max_signal_duration - - attr_accessor :new_value_options - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'detection_method' => :'detectionMethod', - :'evaluation_window' => :'evaluationWindow', - :'keep_alive' => :'keepAlive', - :'max_signal_duration' => :'maxSignalDuration', - :'new_value_options' => :'newValueOptions' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'detection_method' => :'SecurityMonitoringRuleDetectionMethod', - :'evaluation_window' => :'SecurityMonitoringRuleEvaluationWindow', - :'keep_alive' => :'SecurityMonitoringRuleKeepAlive', - :'max_signal_duration' => :'SecurityMonitoringRuleMaxSignalDuration', - :'new_value_options' => :'SecurityMonitoringRuleNewValueOptions' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleOptions` 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::V2::SecurityMonitoringRuleOptions`. 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?(:'detection_method') - self.detection_method = attributes[:'detection_method'] - end - - if attributes.key?(:'evaluation_window') - self.evaluation_window = attributes[:'evaluation_window'] - end - - if attributes.key?(:'keep_alive') - self.keep_alive = attributes[:'keep_alive'] - end - - if attributes.key?(:'max_signal_duration') - self.max_signal_duration = attributes[:'max_signal_duration'] - end - - if attributes.key?(:'new_value_options') - self.new_value_options = attributes[:'new_value_options'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - detection_method == o.detection_method && - evaluation_window == o.evaluation_window && - keep_alive == o.keep_alive && - max_signal_duration == o.max_signal_duration && - new_value_options == o.new_value_options - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [detection_method, evaluation_window, keep_alive, max_signal_duration, new_value_options].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb deleted file mode 100644 index e3cf4ecf367f..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb +++ /dev/null @@ -1,286 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Query for matching rule. - class SecurityMonitoringRuleQuery - # whether the object has unparsed attributes - attr_accessor :_unparsed - - attr_accessor :aggregation - - # Field for which the cardinality is measured. Sent as an array. - attr_accessor :distinct_fields - - # Fields to group by. - attr_accessor :group_by_fields - - # The target field to aggregate over when using the sum or max aggregations. - attr_accessor :metric - - # Name of the query. - attr_accessor :name - - # Query to run on logs. - attr_accessor :query - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'aggregation' => :'aggregation', - :'distinct_fields' => :'distinctFields', - :'group_by_fields' => :'groupByFields', - :'metric' => :'metric', - :'name' => :'name', - :'query' => :'query' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'aggregation' => :'SecurityMonitoringRuleQueryAggregation', - :'distinct_fields' => :'Array', - :'group_by_fields' => :'Array', - :'metric' => :'String', - :'name' => :'String', - :'query' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleQuery` 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::V2::SecurityMonitoringRuleQuery`. 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?(:'distinct_fields') - if (value = attributes[:'distinct_fields']).is_a?(Array) - self.distinct_fields = value - end - end - - if attributes.key?(:'group_by_fields') - if (value = attributes[:'group_by_fields']).is_a?(Array) - self.group_by_fields = value - end - end - - if attributes.key?(:'metric') - self.metric = attributes[:'metric'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - aggregation == o.aggregation && - distinct_fields == o.distinct_fields && - group_by_fields == o.group_by_fields && - metric == o.metric && - name == o.name && - query == o.query - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [aggregation, distinct_fields, group_by_fields, metric, name, query].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb deleted file mode 100644 index 483bdace1ebc..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb +++ /dev/null @@ -1,42 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringRuleQueryAggregation - COUNT = "count".freeze - CARDINALITY = "cardinality".freeze - SUM = "sum".freeze - MAX = "max".freeze - NEW_VALUE = "new_value".freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringRuleQueryAggregation.constants.select { |c| SecurityMonitoringRuleQueryAggregation::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_query_create.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_query_create.rb deleted file mode 100644 index 92f0f1b09ece..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_query_create.rb +++ /dev/null @@ -1,291 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Query for matching rule. - class SecurityMonitoringRuleQueryCreate - # whether the object has unparsed attributes - attr_accessor :_unparsed - - attr_accessor :aggregation - - # Field for which the cardinality is measured. Sent as an array. - attr_accessor :distinct_fields - - # Fields to group by. - attr_accessor :group_by_fields - - # The target field to aggregate over when using the sum or max aggregations. - attr_accessor :metric - - # Name of the query. - attr_accessor :name - - # Query to run on logs. - attr_accessor :query - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'aggregation' => :'aggregation', - :'distinct_fields' => :'distinctFields', - :'group_by_fields' => :'groupByFields', - :'metric' => :'metric', - :'name' => :'name', - :'query' => :'query' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'aggregation' => :'SecurityMonitoringRuleQueryAggregation', - :'distinct_fields' => :'Array', - :'group_by_fields' => :'Array', - :'metric' => :'String', - :'name' => :'String', - :'query' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate` 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::V2::SecurityMonitoringRuleQueryCreate`. 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?(:'distinct_fields') - if (value = attributes[:'distinct_fields']).is_a?(Array) - self.distinct_fields = value - end - end - - if attributes.key?(:'group_by_fields') - if (value = attributes[:'group_by_fields']).is_a?(Array) - self.group_by_fields = value - end - end - - if attributes.key?(:'metric') - self.metric = attributes[:'metric'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if @query.nil? - invalid_properties.push('invalid value for "query", query cannot be nil.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if @query.nil? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - aggregation == o.aggregation && - distinct_fields == o.distinct_fields && - group_by_fields == o.group_by_fields && - metric == o.metric && - name == o.name && - query == o.query - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [aggregation, distinct_fields, group_by_fields, metric, name, query].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb deleted file mode 100644 index c6dc54dd9a32..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb +++ /dev/null @@ -1,399 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Rule. - class SecurityMonitoringRuleResponse - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # Cases for generating signals. - attr_accessor :cases - - # When the rule was created, timestamp in milliseconds. - attr_accessor :created_at - - # User ID of the user who created the rule. - attr_accessor :creation_author_id - - # Additional queries to filter matched events before they are processed. - attr_accessor :filters - - # Whether the notifications include the triggering group-by values in their title. - attr_accessor :has_extended_title - - # The ID of the rule. - attr_accessor :id - - # Whether the rule is included by default. - attr_accessor :is_default - - # Whether the rule has been deleted. - attr_accessor :is_deleted - - # Whether the rule is enabled. - attr_accessor :is_enabled - - # Message for generated signals. - attr_accessor :message - - # The name of the rule. - attr_accessor :name - - attr_accessor :options - - # Queries for selecting logs which are part of the rule. - attr_accessor :queries - - # Tags for generated signals. - attr_accessor :tags - - attr_accessor :type - - # User ID of the user who updated the rule. - attr_accessor :update_author_id - - # The version of the rule. - attr_accessor :version - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'cases' => :'cases', - :'created_at' => :'createdAt', - :'creation_author_id' => :'creationAuthorId', - :'filters' => :'filters', - :'has_extended_title' => :'hasExtendedTitle', - :'id' => :'id', - :'is_default' => :'isDefault', - :'is_deleted' => :'isDeleted', - :'is_enabled' => :'isEnabled', - :'message' => :'message', - :'name' => :'name', - :'options' => :'options', - :'queries' => :'queries', - :'tags' => :'tags', - :'type' => :'type', - :'update_author_id' => :'updateAuthorId', - :'version' => :'version' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'cases' => :'Array', - :'created_at' => :'Integer', - :'creation_author_id' => :'Integer', - :'filters' => :'Array', - :'has_extended_title' => :'Boolean', - :'id' => :'String', - :'is_default' => :'Boolean', - :'is_deleted' => :'Boolean', - :'is_enabled' => :'Boolean', - :'message' => :'String', - :'name' => :'String', - :'options' => :'SecurityMonitoringRuleOptions', - :'queries' => :'Array', - :'tags' => :'Array', - :'type' => :'SecurityMonitoringRuleTypeRead', - :'update_author_id' => :'Integer', - :'version' => :'Integer' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleResponse` 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::V2::SecurityMonitoringRuleResponse`. 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?(:'cases') - if (value = attributes[:'cases']).is_a?(Array) - self.cases = value - end - end - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'creation_author_id') - self.creation_author_id = attributes[:'creation_author_id'] - end - - if attributes.key?(:'filters') - if (value = attributes[:'filters']).is_a?(Array) - self.filters = value - end - end - - if attributes.key?(:'has_extended_title') - self.has_extended_title = attributes[:'has_extended_title'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'is_default') - self.is_default = attributes[:'is_default'] - end - - if attributes.key?(:'is_deleted') - self.is_deleted = attributes[:'is_deleted'] - end - - if attributes.key?(:'is_enabled') - self.is_enabled = attributes[:'is_enabled'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'options') - self.options = attributes[:'options'] - end - - if attributes.key?(:'queries') - if (value = attributes[:'queries']).is_a?(Array) - self.queries = value - end - end - - if attributes.key?(:'tags') - if (value = attributes[:'tags']).is_a?(Array) - self.tags = value - end - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'update_author_id') - self.update_author_id = attributes[:'update_author_id'] - end - - if attributes.key?(:'version') - self.version = attributes[:'version'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - cases == o.cases && - created_at == o.created_at && - creation_author_id == o.creation_author_id && - filters == o.filters && - has_extended_title == o.has_extended_title && - id == o.id && - is_default == o.is_default && - is_deleted == o.is_deleted && - is_enabled == o.is_enabled && - message == o.message && - name == o.name && - options == o.options && - queries == o.queries && - tags == o.tags && - type == o.type && - update_author_id == o.update_author_id && - version == o.version - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [cases, created_at, creation_author_id, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, type, update_author_id, version].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_severity.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_severity.rb deleted file mode 100644 index fb759c4fa487..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_severity.rb +++ /dev/null @@ -1,42 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringRuleSeverity - INFO = "info".freeze - LOW = "low".freeze - MEDIUM = "medium".freeze - HIGH = "high".freeze - CRITICAL = "critical".freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringRuleSeverity.constants.select { |c| SecurityMonitoringRuleSeverity::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb deleted file mode 100644 index e131e277b401..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb +++ /dev/null @@ -1,39 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringRuleTypeCreate - LOG_DETECTION = "log_detection".freeze - WORKLOAD_SECURITY = "workload_security".freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringRuleTypeCreate.constants.select { |c| SecurityMonitoringRuleTypeCreate::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb deleted file mode 100644 index 89989e3e30c0..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringRuleTypeRead - LOG_DETECTION = "log_detection".freeze - INFRASTRUCTURE_CONFIGURATION = "infrastructure_configuration".freeze - WORKLOAD_SECURITY = "workload_security".freeze - CLOUD_CONFIGURATION = "cloud_configuration".freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringRuleTypeRead.constants.select { |c| SecurityMonitoringRuleTypeRead::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb deleted file mode 100644 index b1a6f64e4abc..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb +++ /dev/null @@ -1,345 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Update an existing rule. - class SecurityMonitoringRuleUpdatePayload - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # Cases for generating signals. - attr_accessor :cases - - # Additional queries to filter matched events before they are processed. - attr_accessor :filters - - # Whether the notifications include the triggering group-by values in their title. - attr_accessor :has_extended_title - - # Whether the rule is enabled. - attr_accessor :is_enabled - - # Message for generated signals. - attr_accessor :message - - # Name of the rule. - attr_accessor :name - - attr_accessor :options - - # Queries for selecting logs which are part of the rule. - attr_accessor :queries - - # Tags for generated signals. - attr_accessor :tags - - # The version of the rule being updated. - attr_accessor :version - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'cases' => :'cases', - :'filters' => :'filters', - :'has_extended_title' => :'hasExtendedTitle', - :'is_enabled' => :'isEnabled', - :'message' => :'message', - :'name' => :'name', - :'options' => :'options', - :'queries' => :'queries', - :'tags' => :'tags', - :'version' => :'version' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'cases' => :'Array', - :'filters' => :'Array', - :'has_extended_title' => :'Boolean', - :'is_enabled' => :'Boolean', - :'message' => :'String', - :'name' => :'String', - :'options' => :'SecurityMonitoringRuleOptions', - :'queries' => :'Array', - :'tags' => :'Array', - :'version' => :'Integer' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload` 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::V2::SecurityMonitoringRuleUpdatePayload`. 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?(:'cases') - if (value = attributes[:'cases']).is_a?(Array) - self.cases = value - end - end - - if attributes.key?(:'filters') - if (value = attributes[:'filters']).is_a?(Array) - self.filters = value - end - end - - if attributes.key?(:'has_extended_title') - self.has_extended_title = attributes[:'has_extended_title'] - end - - if attributes.key?(:'is_enabled') - self.is_enabled = attributes[:'is_enabled'] - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'options') - self.options = attributes[:'options'] - end - - if attributes.key?(:'queries') - if (value = attributes[:'queries']).is_a?(Array) - self.queries = value - end - end - - if attributes.key?(:'tags') - if (value = attributes[:'tags']).is_a?(Array) - self.tags = value - end - end - - if attributes.key?(:'version') - self.version = attributes[:'version'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@version.nil? && @version > 2147483647 - invalid_properties.push('invalid value for "version", must be smaller than or equal to 2147483647.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@version.nil? && @version > 2147483647 - true - end - - # Custom attribute writer method with validation - # @param [Object] version Value to be assigned - def version=(version) - if !version.nil? && version > 2147483647 - fail ArgumentError, 'invalid value for "version", must be smaller than or equal to 2147483647.' - end - - @version = version - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - cases == o.cases && - filters == o.filters && - has_extended_title == o.has_extended_title && - is_enabled == o.is_enabled && - message == o.message && - name == o.name && - options == o.options && - queries == o.queries && - tags == o.tags && - version == o.version - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [cases, filters, has_extended_title, is_enabled, message, name, options, queries, tags, version].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_runtime_agent_rule.rb b/lib/datadog_api_client/v2/models/security_monitoring_runtime_agent_rule.rb deleted file mode 100644 index beebd350702f..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_runtime_agent_rule.rb +++ /dev/null @@ -1,243 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # The Agent rule. - class SecurityMonitoringRuntimeAgentRule - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # The Agent rule ID. Must be unique within the rule. - attr_accessor :agent_rule_id - - # A Runtime Security expression determines what activity should be collected by the Datadog Agent. These logical expressions can use predefined operators and attributes. Tags cannot be used in Runtime Security expressions. Instead, allow or deny based on tags under the advanced option. - attr_accessor :expression - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'agent_rule_id' => :'agentRuleId', - :'expression' => :'expression' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'agent_rule_id' => :'String', - :'expression' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuntimeAgentRule` 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::V2::SecurityMonitoringRuntimeAgentRule`. 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?(:'agent_rule_id') - self.agent_rule_id = attributes[:'agent_rule_id'] - end - - if attributes.key?(:'expression') - self.expression = attributes[:'expression'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - agent_rule_id == o.agent_rule_id && - expression == o.expression - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [agent_rule_id, expression].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal.rb deleted file mode 100644 index 8b23b0c809af..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal.rb +++ /dev/null @@ -1,253 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Object description of a security signal. - class SecurityMonitoringSignal - # whether the object has unparsed attributes - attr_accessor :_unparsed - - attr_accessor :attributes - - # The unique ID of the security signal. - attr_accessor :id - - attr_accessor :type - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'type' => :'type' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'attributes' => :'SecurityMonitoringSignalAttributes', - :'id' => :'String', - :'type' => :'SecurityMonitoringSignalType' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignal` 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::V2::SecurityMonitoringSignal`. 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?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - else - self.type = 'signal' - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - type == o.type - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [attributes, id, type].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb deleted file mode 100644 index b2dc5f0f80b6..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb +++ /dev/null @@ -1,267 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # The object containing all signal attributes and their associated values. - class SecurityMonitoringSignalAttributes - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # A JSON object of attributes in the security signal. - attr_accessor :attributes - - # The message in the security signal defined by the rule that generated the signal. - attr_accessor :message - - # An array of tags associated with the security signal. - attr_accessor :tags - - # The timestamp of the security signal. - attr_accessor :timestamp - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'attributes' => :'attributes', - :'message' => :'message', - :'tags' => :'tags', - :'timestamp' => :'timestamp' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'attributes' => :'Hash', - :'message' => :'String', - :'tags' => :'Array', - :'timestamp' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalAttributes` 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::V2::SecurityMonitoringSignalAttributes`. 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?(:'attributes') - if (value = attributes[:'attributes']).is_a?(Hash) - self.attributes = value - end - end - - if attributes.key?(:'message') - self.message = attributes[:'message'] - end - - if attributes.key?(:'tags') - if (value = attributes[:'tags']).is_a?(Array) - self.tags = value - end - end - - if attributes.key?(:'timestamp') - self.timestamp = attributes[:'timestamp'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - message == o.message && - tags == o.tags && - timestamp == o.timestamp - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [attributes, message, tags, timestamp].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb deleted file mode 100644 index ce1d651ae0f3..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb +++ /dev/null @@ -1,250 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # The request for a security signal list. - class SecurityMonitoringSignalListRequest - # whether the object has unparsed attributes - attr_accessor :_unparsed - - attr_accessor :filter - - attr_accessor :page - - attr_accessor :sort - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'filter' => :'filter', - :'page' => :'page', - :'sort' => :'sort' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'filter' => :'SecurityMonitoringSignalListRequestFilter', - :'page' => :'SecurityMonitoringSignalListRequestPage', - :'sort' => :'SecurityMonitoringSignalsSort' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequest` 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::V2::SecurityMonitoringSignalListRequest`. 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?(:'filter') - self.filter = attributes[:'filter'] - end - - if attributes.key?(:'page') - self.page = attributes[:'page'] - end - - if attributes.key?(:'sort') - self.sort = attributes[:'sort'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - filter == o.filter && - page == o.page && - sort == o.sort - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [filter, page, sort].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb deleted file mode 100644 index c0ed1bcba797..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb +++ /dev/null @@ -1,253 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Search filters for listing security signals. - class SecurityMonitoringSignalListRequestFilter - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # The minimum timestamp for requested security signals. - attr_accessor :from - - # Search query for listing security signals. - attr_accessor :query - - # The maximum timestamp for requested security signals. - attr_accessor :to - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'from' => :'from', - :'query' => :'query', - :'to' => :'to' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'from' => :'Time', - :'query' => :'String', - :'to' => :'Time' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter` 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::V2::SecurityMonitoringSignalListRequestFilter`. 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?(:'from') - self.from = attributes[:'from'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.key?(:'to') - self.to = attributes[:'to'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - from == o.from && - query == o.query && - to == o.to - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [from, query, to].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb deleted file mode 100644 index ca4ff46efc46..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb +++ /dev/null @@ -1,260 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # The paging attributes for listing security signals. - class SecurityMonitoringSignalListRequestPage - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # A list of results using the cursor provided in the previous query. - attr_accessor :cursor - - # The maximum number of security signals in the response. - attr_accessor :limit - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'cursor' => :'cursor', - :'limit' => :'limit' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'cursor' => :'String', - :'limit' => :'Integer' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage` 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::V2::SecurityMonitoringSignalListRequestPage`. 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?(:'cursor') - self.cursor = attributes[:'cursor'] - end - - if attributes.key?(:'limit') - self.limit = attributes[:'limit'] - else - self.limit = 10 - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - if !@limit.nil? && @limit > 1000 - invalid_properties.push('invalid value for "limit", must be smaller than or equal to 1000.') - end - - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - return false if !@limit.nil? && @limit > 1000 - true - end - - # Custom attribute writer method with validation - # @param [Object] limit Value to be assigned - def limit=(limit) - if !limit.nil? && limit > 1000 - fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 1000.' - end - - @limit = limit - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - cursor == o.cursor && - limit == o.limit - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [cursor, limit].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_type.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_type.rb deleted file mode 100644 index 52089d2c0a08..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signal_type.rb +++ /dev/null @@ -1,38 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringSignalType - SIGNAL = "signal".freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringSignalType.constants.select { |c| SecurityMonitoringSignalType::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb deleted file mode 100644 index be9cdeba6b17..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb +++ /dev/null @@ -1,253 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # The response object with all security signals matching the request and pagination information. - class SecurityMonitoringSignalsListResponse - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # An array of security signals matching the request. - attr_accessor :data - - attr_accessor :links - - attr_accessor :meta - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'data' => :'data', - :'links' => :'links', - :'meta' => :'meta' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'data' => :'Array', - :'links' => :'SecurityMonitoringSignalsListResponseLinks', - :'meta' => :'SecurityMonitoringSignalsListResponseMeta' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse` 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::V2::SecurityMonitoringSignalsListResponse`. 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?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - - if attributes.key?(:'links') - self.links = attributes[:'links'] - end - - if attributes.key?(:'meta') - self.meta = attributes[:'meta'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - links == o.links && - meta == o.meta - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [data, links, meta].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb deleted file mode 100644 index 02a0547ad427..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb +++ /dev/null @@ -1,233 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Links attributes. - class SecurityMonitoringSignalsListResponseLinks - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # The link for the next set of results. **Note**: The request can also be made using the POST endpoint. - attr_accessor :_next - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'_next' => :'next' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'_next' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks` 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::V2::SecurityMonitoringSignalsListResponseLinks`. 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?(:'_next') - self._next = attributes[:'_next'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - _next == o._next - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [_next].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb deleted file mode 100644 index e1a8a94b9ec3..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb +++ /dev/null @@ -1,232 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Meta attributes. - class SecurityMonitoringSignalsListResponseMeta - # whether the object has unparsed attributes - attr_accessor :_unparsed - - attr_accessor :page - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'page' => :'page' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'page' => :'SecurityMonitoringSignalsListResponseMetaPage' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta` 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::V2::SecurityMonitoringSignalsListResponseMeta`. 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?(:'page') - self.page = attributes[:'page'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - page == o.page - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [page].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb deleted file mode 100644 index 13da72f7be32..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb +++ /dev/null @@ -1,233 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - # Paging attributes. - class SecurityMonitoringSignalsListResponseMetaPage - # whether the object has unparsed attributes - attr_accessor :_unparsed - - # The cursor used to get the next results, if any. To make the next request, use the same parameters with the addition of the `page[cursor]`. - attr_accessor :after - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :'after' => :'after' - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.openapi_types - { - :'after' => :'String' - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new([ - ]) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage` 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::V2::SecurityMonitoringSignalsListResponseMetaPage`. 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?(:'after') - self.after = attributes[:'after'] - end - end - - # Show invalid properties with the reasons. Usually used together with valid? - # @return Array for valid properties with the reasons - def list_invalid_properties - invalid_properties = Array.new - invalid_properties - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - def valid? - true - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(o) - return true if self.equal?(o) - self.class == o.class && - after == o.after - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(o) - self == o - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [after].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - new.build_from_hash(attributes) - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - self.class.openapi_types.each_pair do |key, type| - if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) - self.send("#{key}=", nil) - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[self.class.attribute_map[key]].is_a?(Array) - self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) - end - elsif !attributes[self.class.attribute_map[key]].nil? - self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) - end - end - - self - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def _deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - when :Object - # generic object (usually a Hash), return directly - value - when :Array - # generic array, return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - else # model - # models (e.g. Pet) or oneOf - klass = DatadogAPIClient::V2.const_get(type) - res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) - if res.instance_of? DatadogAPIClient::V2::UnparsedObject - self._unparsed = true - end - res - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - 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 - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to? :to_hash - value.to_hash - else - value - end - end - - end - -end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_sort.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_sort.rb deleted file mode 100644 index 51f229923fad..000000000000 --- a/lib/datadog_api_client/v2/models/security_monitoring_signals_sort.rb +++ /dev/null @@ -1,39 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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::V2 - class SecurityMonitoringSignalsSort - TIMESTAMP_ASCENDING = "timestamp".freeze - TIMESTAMP_DESCENDING = "-timestamp".freeze - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def self.build_from_hash(value) - new.build_from_hash(value) - end - - # Builds the enum from string - # @param [String] The enum value in the form of the string - # @return [String] The enum value - def build_from_hash(value) - constantValues = SecurityMonitoringSignalsSort.constants.select { |c| SecurityMonitoringSignalsSort::const_get(c) == value } - constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value - end - end -end diff --git a/spec/v2/api/security_monitoring_api_spec.rb b/spec/v2/api/security_monitoring_api_spec.rb deleted file mode 100644 index 71e19e87a57b..000000000000 --- a/spec/v2/api/security_monitoring_api_spec.rb +++ /dev/null @@ -1,189 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringAPI -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe 'SecurityMonitoringAPI' do - before do - # run before each test - @api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new - end - - after do - # run after each test - end - - describe 'test an instance of SecurityMonitoringAPI' do - it 'should create an instance of SecurityMonitoringAPI' do - expect(@api_instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringAPI) - end - end - - # unit tests for create_security_filter - # Create a security filter - # Create a security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. - # @param body The definition of the new security filter. - # @param [Hash] opts the optional parameters - # @return [SecurityFilterResponse] - describe 'create_security_filter test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for create_security_monitoring_rule - # Create a detection rule - # Create a detection rule. - # @param body - # @param [Hash] opts the optional parameters - # @return [SecurityMonitoringRuleResponse] - describe 'create_security_monitoring_rule test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for delete_security_filter - # Delete a security filter - # Delete a specific security filter. - # @param security_filter_id The ID of the security filter. - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'delete_security_filter test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for delete_security_monitoring_rule - # Delete an existing rule - # Delete an existing rule. Default rules cannot be deleted. - # @param rule_id The ID of the rule. - # @param [Hash] opts the optional parameters - # @return [nil] - describe 'delete_security_monitoring_rule test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_security_filter - # Get a security filter - # Get the details of a specific security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. - # @param security_filter_id The ID of the security filter. - # @param [Hash] opts the optional parameters - # @return [SecurityFilterResponse] - describe 'get_security_filter test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for get_security_monitoring_rule - # Get a rule's details - # Get a rule's details. - # @param rule_id The ID of the rule. - # @param [Hash] opts the optional parameters - # @return [SecurityMonitoringRuleResponse] - describe 'get_security_monitoring_rule test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for list_security_filters - # Get all security filters - # Get the list of configured security filters with their definitions. - # @param [Hash] opts the optional parameters - # @return [SecurityFiltersResponse] - describe 'list_security_filters test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for list_security_monitoring_rules - # List rules - # List rules. - # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Size for a given page. - # @option opts [Integer] :page_number Specific page number to return. - # @return [SecurityMonitoringListRulesResponse] - describe 'list_security_monitoring_rules test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for list_security_monitoring_signals - # Get a quick list of security signals - # The list endpoint returns security signals that match a search query. Both this endpoint and the POST endpoint can be used interchangeably when listing security signals. - # @param [Hash] opts the optional parameters - # @option opts [String] :filter_query The search query for security signals. - # @option opts [Time] :filter_from The minimum timestamp for requested security signals. - # @option opts [Time] :filter_to The maximum timestamp for requested security signals. - # @option opts [SecurityMonitoringSignalsSort] :sort The order of the security signals in results. - # @option opts [String] :page_cursor A list of results using the cursor provided in the previous query. - # @option opts [Integer] :page_limit The maximum number of security signals in the response. - # @return [SecurityMonitoringSignalsListResponse] - describe 'list_security_monitoring_signals test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for search_security_monitoring_signals - # Get a list of security signals - # Returns security signals that match a search query. Both this endpoint and the GET endpoint can be used interchangeably for listing security signals. - # @param [Hash] opts the optional parameters - # @option opts [SecurityMonitoringSignalListRequest] :body - # @return [SecurityMonitoringSignalsListResponse] - describe 'search_security_monitoring_signals test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_security_filter - # Update a security filter - # Update a specific security filter. Returns the security filter object when the request is successful. - # @param security_filter_id The ID of the security filter. - # @param body New definition of the security filter. - # @param [Hash] opts the optional parameters - # @return [SecurityFilterResponse] - describe 'update_security_filter test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - # unit tests for update_security_monitoring_rule - # Update an existing rule - # Update an existing rule. When updating `cases`, `queries` or `options`, the whole field must be included. For example, when modifying a query all queries must be included. Default rules can only be updated to be enabled and to change notifications. - # @param rule_id The ID of the rule. - # @param body - # @param [Hash] opts the optional parameters - # @return [SecurityMonitoringRuleResponse] - describe 'update_security_monitoring_rule test' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_filter_action_spec.rb b/spec/v2/models/security_monitoring_filter_action_spec.rb deleted file mode 100644 index ef4e54f38e7a..000000000000 --- a/spec/v2/models/security_monitoring_filter_action_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringFilterAction -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringFilterAction do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringFilterAction.new } - - describe 'test an instance of SecurityMonitoringFilterAction' do - it 'should create an instance of SecurityMonitoringFilterAction' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringFilterAction) - end - end -end diff --git a/spec/v2/models/security_monitoring_filter_spec.rb b/spec/v2/models/security_monitoring_filter_spec.rb deleted file mode 100644 index 7809a44de70f..000000000000 --- a/spec/v2/models/security_monitoring_filter_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringFilter -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringFilter do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringFilter.new } - - describe 'test an instance of SecurityMonitoringFilter' do - it 'should create an instance of SecurityMonitoringFilter' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringFilter) - end - end - describe 'test attribute "action"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "query"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_list_rules_response_spec.rb b/spec/v2/models/security_monitoring_list_rules_response_spec.rb deleted file mode 100644 index a647f2d4d27c..000000000000 --- a/spec/v2/models/security_monitoring_list_rules_response_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringListRulesResponse -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringListRulesResponse do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringListRulesResponse.new } - - describe 'test an instance of SecurityMonitoringListRulesResponse' do - it 'should create an instance of SecurityMonitoringListRulesResponse' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringListRulesResponse) - end - end - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_rule_case_create_spec.rb b/spec/v2/models/security_monitoring_rule_case_create_spec.rb deleted file mode 100644 index f55300afe3bb..000000000000 --- a/spec/v2/models/security_monitoring_rule_case_create_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new } - - describe 'test an instance of SecurityMonitoringRuleCaseCreate' do - it 'should create an instance of SecurityMonitoringRuleCaseCreate' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate) - end - end - describe 'test attribute "condition"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "notifications"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_rule_case_spec.rb b/spec/v2/models/security_monitoring_rule_case_spec.rb deleted file mode 100644 index aed9b3cf2350..000000000000 --- a/spec/v2/models/security_monitoring_rule_case_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleCase -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleCase do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleCase.new } - - describe 'test an instance of SecurityMonitoringRuleCase' do - it 'should create an instance of SecurityMonitoringRuleCase' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleCase) - end - end - describe 'test attribute "condition"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "notifications"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "status"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_rule_create_payload_spec.rb b/spec/v2/models/security_monitoring_rule_create_payload_spec.rb deleted file mode 100644 index 87acdd00592a..000000000000 --- a/spec/v2/models/security_monitoring_rule_create_payload_spec.rb +++ /dev/null @@ -1,91 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload.new } - - describe 'test an instance of SecurityMonitoringRuleCreatePayload' do - it 'should create an instance of SecurityMonitoringRuleCreatePayload' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload) - end - end - describe 'test attribute "cases"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "filters"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "has_extended_title"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_enabled"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "options"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "queries"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "tags"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_rule_detection_method_spec.rb b/spec/v2/models/security_monitoring_rule_detection_method_spec.rb deleted file mode 100644 index 30405d4aa113..000000000000 --- a/spec/v2/models/security_monitoring_rule_detection_method_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod.new } - - describe 'test an instance of SecurityMonitoringRuleDetectionMethod' do - it 'should create an instance of SecurityMonitoringRuleDetectionMethod' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod) - end - end -end diff --git a/spec/v2/models/security_monitoring_rule_evaluation_window_spec.rb b/spec/v2/models/security_monitoring_rule_evaluation_window_spec.rb deleted file mode 100644 index 32eb5e10c9dc..000000000000 --- a/spec/v2/models/security_monitoring_rule_evaluation_window_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow.new } - - describe 'test an instance of SecurityMonitoringRuleEvaluationWindow' do - it 'should create an instance of SecurityMonitoringRuleEvaluationWindow' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow) - end - end -end diff --git a/spec/v2/models/security_monitoring_rule_keep_alive_spec.rb b/spec/v2/models/security_monitoring_rule_keep_alive_spec.rb deleted file mode 100644 index e419d60dde85..000000000000 --- a/spec/v2/models/security_monitoring_rule_keep_alive_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive.new } - - describe 'test an instance of SecurityMonitoringRuleKeepAlive' do - it 'should create an instance of SecurityMonitoringRuleKeepAlive' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive) - end - end -end diff --git a/spec/v2/models/security_monitoring_rule_max_signal_duration_spec.rb b/spec/v2/models/security_monitoring_rule_max_signal_duration_spec.rb deleted file mode 100644 index 240b2f6e402f..000000000000 --- a/spec/v2/models/security_monitoring_rule_max_signal_duration_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration.new } - - describe 'test an instance of SecurityMonitoringRuleMaxSignalDuration' do - it 'should create an instance of SecurityMonitoringRuleMaxSignalDuration' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration) - end - end -end diff --git a/spec/v2/models/security_monitoring_rule_new_value_options_forget_after_spec.rb b/spec/v2/models/security_monitoring_rule_new_value_options_forget_after_spec.rb deleted file mode 100644 index ee80efba23e4..000000000000 --- a/spec/v2/models/security_monitoring_rule_new_value_options_forget_after_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsForgetAfter -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsForgetAfter do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsForgetAfter.new } - - describe 'test an instance of SecurityMonitoringRuleNewValueOptionsForgetAfter' do - it 'should create an instance of SecurityMonitoringRuleNewValueOptionsForgetAfter' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsForgetAfter) - end - end -end diff --git a/spec/v2/models/security_monitoring_rule_new_value_options_learning_duration_spec.rb b/spec/v2/models/security_monitoring_rule_new_value_options_learning_duration_spec.rb deleted file mode 100644 index cfb3c6126900..000000000000 --- a/spec/v2/models/security_monitoring_rule_new_value_options_learning_duration_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningDuration -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningDuration do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningDuration.new } - - describe 'test an instance of SecurityMonitoringRuleNewValueOptionsLearningDuration' do - it 'should create an instance of SecurityMonitoringRuleNewValueOptionsLearningDuration' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningDuration) - end - end -end diff --git a/spec/v2/models/security_monitoring_rule_new_value_options_spec.rb b/spec/v2/models/security_monitoring_rule_new_value_options_spec.rb deleted file mode 100644 index 184f7e5f2f39..000000000000 --- a/spec/v2/models/security_monitoring_rule_new_value_options_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions.new } - - describe 'test an instance of SecurityMonitoringRuleNewValueOptions' do - it 'should create an instance of SecurityMonitoringRuleNewValueOptions' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions) - end - end - describe 'test attribute "forget_after"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "learning_duration"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_rule_options_spec.rb b/spec/v2/models/security_monitoring_rule_options_spec.rb deleted file mode 100644 index 9114828a4162..000000000000 --- a/spec/v2/models/security_monitoring_rule_options_spec.rb +++ /dev/null @@ -1,61 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleOptions -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleOptions do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new } - - describe 'test an instance of SecurityMonitoringRuleOptions' do - it 'should create an instance of SecurityMonitoringRuleOptions' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleOptions) - end - end - describe 'test attribute "detection_method"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "evaluation_window"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "keep_alive"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "max_signal_duration"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "new_value_options"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_rule_query_aggregation_spec.rb b/spec/v2/models/security_monitoring_rule_query_aggregation_spec.rb deleted file mode 100644 index 82c5fcca01bd..000000000000 --- a/spec/v2/models/security_monitoring_rule_query_aggregation_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation.new } - - describe 'test an instance of SecurityMonitoringRuleQueryAggregation' do - it 'should create an instance of SecurityMonitoringRuleQueryAggregation' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation) - end - end -end diff --git a/spec/v2/models/security_monitoring_rule_query_create_spec.rb b/spec/v2/models/security_monitoring_rule_query_create_spec.rb deleted file mode 100644 index f1144ac6addc..000000000000 --- a/spec/v2/models/security_monitoring_rule_query_create_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate.new } - - describe 'test an instance of SecurityMonitoringRuleQueryCreate' do - it 'should create an instance of SecurityMonitoringRuleQueryCreate' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate) - end - end - describe 'test attribute "aggregation"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "distinct_fields"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "group_by_fields"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "metric"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "query"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_rule_query_spec.rb b/spec/v2/models/security_monitoring_rule_query_spec.rb deleted file mode 100644 index 8f93df36e9ea..000000000000 --- a/spec/v2/models/security_monitoring_rule_query_spec.rb +++ /dev/null @@ -1,67 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleQuery -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleQuery do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleQuery.new } - - describe 'test an instance of SecurityMonitoringRuleQuery' do - it 'should create an instance of SecurityMonitoringRuleQuery' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleQuery) - end - end - describe 'test attribute "aggregation"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "distinct_fields"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "group_by_fields"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "metric"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "query"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_rule_response_spec.rb b/spec/v2/models/security_monitoring_rule_response_spec.rb deleted file mode 100644 index 3e1df9701bfb..000000000000 --- a/spec/v2/models/security_monitoring_rule_response_spec.rb +++ /dev/null @@ -1,133 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleResponse -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleResponse do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleResponse.new } - - describe 'test an instance of SecurityMonitoringRuleResponse' do - it 'should create an instance of SecurityMonitoringRuleResponse' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleResponse) - end - end - describe 'test attribute "cases"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "created_at"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "creation_author_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "filters"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "has_extended_title"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_default"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_deleted"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_enabled"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "options"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "queries"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "tags"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "update_author_id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "version"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_rule_severity_spec.rb b/spec/v2/models/security_monitoring_rule_severity_spec.rb deleted file mode 100644 index da6efa9a5cbf..000000000000 --- a/spec/v2/models/security_monitoring_rule_severity_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleSeverity -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleSeverity do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleSeverity.new } - - describe 'test an instance of SecurityMonitoringRuleSeverity' do - it 'should create an instance of SecurityMonitoringRuleSeverity' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleSeverity) - end - end -end diff --git a/spec/v2/models/security_monitoring_rule_type_create_spec.rb b/spec/v2/models/security_monitoring_rule_type_create_spec.rb deleted file mode 100644 index fcc4e27f08c9..000000000000 --- a/spec/v2/models/security_monitoring_rule_type_create_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate.new } - - describe 'test an instance of SecurityMonitoringRuleTypeCreate' do - it 'should create an instance of SecurityMonitoringRuleTypeCreate' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate) - end - end -end diff --git a/spec/v2/models/security_monitoring_rule_type_read_spec.rb b/spec/v2/models/security_monitoring_rule_type_read_spec.rb deleted file mode 100644 index f316ab2a961b..000000000000 --- a/spec/v2/models/security_monitoring_rule_type_read_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleTypeRead -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleTypeRead do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleTypeRead.new } - - describe 'test an instance of SecurityMonitoringRuleTypeRead' do - it 'should create an instance of SecurityMonitoringRuleTypeRead' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleTypeRead) - end - end -end diff --git a/spec/v2/models/security_monitoring_rule_update_payload_spec.rb b/spec/v2/models/security_monitoring_rule_update_payload_spec.rb deleted file mode 100644 index 27780584ce66..000000000000 --- a/spec/v2/models/security_monitoring_rule_update_payload_spec.rb +++ /dev/null @@ -1,91 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload.new } - - describe 'test an instance of SecurityMonitoringRuleUpdatePayload' do - it 'should create an instance of SecurityMonitoringRuleUpdatePayload' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload) - end - end - describe 'test attribute "cases"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "filters"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "has_extended_title"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "is_enabled"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "name"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "options"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "queries"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "tags"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "version"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_signal_attributes_spec.rb b/spec/v2/models/security_monitoring_signal_attributes_spec.rb deleted file mode 100644 index 9e2dc920fafc..000000000000 --- a/spec/v2/models/security_monitoring_signal_attributes_spec.rb +++ /dev/null @@ -1,55 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalAttributes -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignalAttributes do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalAttributes.new } - - describe 'test an instance of SecurityMonitoringSignalAttributes' do - it 'should create an instance of SecurityMonitoringSignalAttributes' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalAttributes) - end - end - describe 'test attribute "attributes"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "message"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "tags"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "timestamp"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_signal_list_request_filter_spec.rb b/spec/v2/models/security_monitoring_signal_list_request_filter_spec.rb deleted file mode 100644 index b8ba519c5b52..000000000000 --- a/spec/v2/models/security_monitoring_signal_list_request_filter_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter.new } - - describe 'test an instance of SecurityMonitoringSignalListRequestFilter' do - it 'should create an instance of SecurityMonitoringSignalListRequestFilter' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter) - end - end - describe 'test attribute "from"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "query"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "to"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_signal_list_request_page_spec.rb b/spec/v2/models/security_monitoring_signal_list_request_page_spec.rb deleted file mode 100644 index cab83bd3902c..000000000000 --- a/spec/v2/models/security_monitoring_signal_list_request_page_spec.rb +++ /dev/null @@ -1,43 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage.new } - - describe 'test an instance of SecurityMonitoringSignalListRequestPage' do - it 'should create an instance of SecurityMonitoringSignalListRequestPage' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage) - end - end - describe 'test attribute "cursor"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "limit"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_signal_list_request_spec.rb b/spec/v2/models/security_monitoring_signal_list_request_spec.rb deleted file mode 100644 index 5b6c337449c7..000000000000 --- a/spec/v2/models/security_monitoring_signal_list_request_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalListRequest -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignalListRequest do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalListRequest.new } - - describe 'test an instance of SecurityMonitoringSignalListRequest' do - it 'should create an instance of SecurityMonitoringSignalListRequest' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalListRequest) - end - end - describe 'test attribute "filter"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "page"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "sort"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_signal_spec.rb b/spec/v2/models/security_monitoring_signal_spec.rb deleted file mode 100644 index e16aff12dd9c..000000000000 --- a/spec/v2/models/security_monitoring_signal_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignal -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignal do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignal.new } - - describe 'test an instance of SecurityMonitoringSignal' do - it 'should create an instance of SecurityMonitoringSignal' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignal) - end - end - describe 'test attribute "attributes"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "id"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "type"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_signal_type_spec.rb b/spec/v2/models/security_monitoring_signal_type_spec.rb deleted file mode 100644 index 21a6be6b6de7..000000000000 --- a/spec/v2/models/security_monitoring_signal_type_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalType -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignalType do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalType.new } - - describe 'test an instance of SecurityMonitoringSignalType' do - it 'should create an instance of SecurityMonitoringSignalType' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalType) - end - end -end diff --git a/spec/v2/models/security_monitoring_signals_list_response_links_spec.rb b/spec/v2/models/security_monitoring_signals_list_response_links_spec.rb deleted file mode 100644 index 2f325f728d9b..000000000000 --- a/spec/v2/models/security_monitoring_signals_list_response_links_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks.new } - - describe 'test an instance of SecurityMonitoringSignalsListResponseLinks' do - it 'should create an instance of SecurityMonitoringSignalsListResponseLinks' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks) - end - end - describe 'test attribute "_next"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_signals_list_response_meta_page_spec.rb b/spec/v2/models/security_monitoring_signals_list_response_meta_page_spec.rb deleted file mode 100644 index cb07f73322f8..000000000000 --- a/spec/v2/models/security_monitoring_signals_list_response_meta_page_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage.new } - - describe 'test an instance of SecurityMonitoringSignalsListResponseMetaPage' do - it 'should create an instance of SecurityMonitoringSignalsListResponseMetaPage' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage) - end - end - describe 'test attribute "after"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_signals_list_response_meta_spec.rb b/spec/v2/models/security_monitoring_signals_list_response_meta_spec.rb deleted file mode 100644 index 08f5f7241846..000000000000 --- a/spec/v2/models/security_monitoring_signals_list_response_meta_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta.new } - - describe 'test an instance of SecurityMonitoringSignalsListResponseMeta' do - it 'should create an instance of SecurityMonitoringSignalsListResponseMeta' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta) - end - end - describe 'test attribute "page"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_signals_list_response_spec.rb b/spec/v2/models/security_monitoring_signals_list_response_spec.rb deleted file mode 100644 index da4f3aaed186..000000000000 --- a/spec/v2/models/security_monitoring_signals_list_response_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse.new } - - describe 'test an instance of SecurityMonitoringSignalsListResponse' do - it 'should create an instance of SecurityMonitoringSignalsListResponse' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse) - end - end - describe 'test attribute "data"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "links"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - - describe 'test attribute "meta"' do - it 'should work' do - # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers - end - end - -end diff --git a/spec/v2/models/security_monitoring_signals_sort_spec.rb b/spec/v2/models/security_monitoring_signals_sort_spec.rb deleted file mode 100644 index 53ed756ab4dd..000000000000 --- a/spec/v2/models/security_monitoring_signals_sort_spec.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://openapi-generator.tech - - 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 'spec_helper' -require 'json' -require 'date' - -# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalsSort -# Automatically generated by openapi-generator (https://openapi-generator.tech) -# Please update as you see appropriate -describe DatadogAPIClient::V2::SecurityMonitoringSignalsSort do - let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalsSort.new } - - describe 'test an instance of SecurityMonitoringSignalsSort' do - it 'should create an instance of SecurityMonitoringSignalsSort' do - expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalsSort) - end - end -end From 06c5a50669c06d000a1578ead5762bae11bb5be2 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 20 Jan 2022 10:35:45 +0000 Subject: [PATCH 2/2] Regenerate client from commit 764e4f4 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 36 +- ...n-rule-returns-Bad-Request-response.frozen | 1 + ...tion-rule-returns-Bad-Request-response.yml | 19 + ...-detection-rule-returns-OK-response.frozen | 1 + ...e-a-detection-rule-returns-OK-response.yml | 35 + ...rkload-security-returns-OK-response.frozen | 1 + ...-workload-security-returns-OK-response.yml | 35 + ...security-filter-returns-OK-response.frozen | 1 + ...-a-security-filter-returns-OK-response.yml | 33 + ...-filter-returns-No-Content-response.frozen | 1 + ...ity-filter-returns-No-Content-response.yml | 49 + ...n-existing-rule-returns-OK-response.frozen | 1 + ...e-an-existing-rule-returns-OK-response.yml | 50 + ...security-filter-returns-OK-response.frozen | 1 + ...-a-security-filter-returns-OK-response.yml | 50 + ...ecurity-filters-returns-OK-response.frozen | 1 + ...l-security-filters-returns-OK-response.yml | 180 ++++ ...security-filter-returns-OK-response.frozen | 1 + ...-a-security-filter-returns-OK-response.yml | 51 + docs/v2/CloudSIEMAPI.md | 766 +++++++++++++++ docs/v2/README.md | 34 +- .../v2/SecurityMonitoringRuleCreatePayload.md | 2 +- .../v2/cloud-siem/CreateSecurityFilter.rb | 23 + .../CreateSecurityMonitoringRule.rb | 35 + .../CreateSecurityMonitoringRule_498211763.rb | 36 + .../DeleteSecurityFilter_555029489.rb | 8 + .../DeleteSecurityMonitoringRule.rb | 8 + examples/v2/cloud-siem/GetSecurityFilter.rb | 8 + examples/v2/cloud-siem/ListSecurityFilters.rb | 5 + .../v2/cloud-siem/UpdateSecurityFilter.rb | 22 + features/v2/cloud_siem.feature | 230 +++++ features/v2/given.json | 4 +- features/v2/undo.json | 24 +- lib/datadog_api_client/v2.rb | 2 +- .../v2/api/cloud_siem_api.rb | 929 ++++++++++++++++++ lib/datadog_api_client/v2/configuration.rb | 4 +- .../v2/models/security_monitoring_filter.rb | 242 +++++ .../security_monitoring_filter_action.rb | 39 + ...security_monitoring_list_rules_response.rb | 244 +++++ .../models/security_monitoring_rule_case.rb | 264 +++++ .../security_monitoring_rule_case_create.rb | 269 +++++ ...security_monitoring_rule_create_payload.rb | 359 +++++++ ...curity_monitoring_rule_detection_method.rb | 40 + ...urity_monitoring_rule_evaluation_window.rb | 45 + .../security_monitoring_rule_keep_alive.rb | 47 + ...ity_monitoring_rule_max_signal_duration.rb | 49 + ...urity_monitoring_rule_new_value_options.rb | 241 +++++ ...ing_rule_new_value_options_forget_after.rb | 43 + ...ule_new_value_options_learning_duration.rb | 40 + .../security_monitoring_rule_options.rb | 268 +++++ .../models/security_monitoring_rule_query.rb | 286 ++++++ ...urity_monitoring_rule_query_aggregation.rb | 42 + .../security_monitoring_rule_query_create.rb | 291 ++++++ .../security_monitoring_rule_response.rb | 399 ++++++++ .../security_monitoring_rule_severity.rb | 42 + .../security_monitoring_rule_type_create.rb | 39 + .../security_monitoring_rule_type_read.rb | 41 + ...security_monitoring_rule_update_payload.rb | 345 +++++++ .../v2/models/security_monitoring_signal.rb | 253 +++++ .../security_monitoring_signal_attributes.rb | 267 +++++ ...security_monitoring_signal_list_request.rb | 250 +++++ ...y_monitoring_signal_list_request_filter.rb | 253 +++++ ...ity_monitoring_signal_list_request_page.rb | 260 +++++ .../models/security_monitoring_signal_type.rb | 38 + ...curity_monitoring_signals_list_response.rb | 253 +++++ ..._monitoring_signals_list_response_links.rb | 233 +++++ ...y_monitoring_signals_list_response_meta.rb | 232 +++++ ...itoring_signals_list_response_meta_page.rb | 233 +++++ .../security_monitoring_signals_sort.rb | 39 + spec/v2/api/cloud_siem_api_spec.rb | 189 ++++ .../security_monitoring_filter_action_spec.rb | 31 + .../models/security_monitoring_filter_spec.rb | 43 + ...ity_monitoring_list_rules_response_spec.rb | 43 + ...curity_monitoring_rule_case_create_spec.rb | 55 ++ .../security_monitoring_rule_case_spec.rb | 55 ++ ...ity_monitoring_rule_create_payload_spec.rb | 91 ++ ...y_monitoring_rule_detection_method_spec.rb | 31 + ..._monitoring_rule_evaluation_window_spec.rb | 31 + ...ecurity_monitoring_rule_keep_alive_spec.rb | 31 + ...onitoring_rule_max_signal_duration_spec.rb | 31 + ...ule_new_value_options_forget_after_spec.rb | 31 + ...ew_value_options_learning_duration_spec.rb | 31 + ..._monitoring_rule_new_value_options_spec.rb | 43 + .../security_monitoring_rule_options_spec.rb | 61 ++ ..._monitoring_rule_query_aggregation_spec.rb | 31 + ...urity_monitoring_rule_query_create_spec.rb | 67 ++ .../security_monitoring_rule_query_spec.rb | 67 ++ .../security_monitoring_rule_response_spec.rb | 133 +++ .../security_monitoring_rule_severity_spec.rb | 31 + ...curity_monitoring_rule_type_create_spec.rb | 31 + ...security_monitoring_rule_type_read_spec.rb | 31 + ...ity_monitoring_rule_update_payload_spec.rb | 91 ++ ...urity_monitoring_signal_attributes_spec.rb | 55 ++ ...itoring_signal_list_request_filter_spec.rb | 49 + ...onitoring_signal_list_request_page_spec.rb | 43 + ...ity_monitoring_signal_list_request_spec.rb | 49 + .../models/security_monitoring_signal_spec.rb | 49 + .../security_monitoring_signal_type_spec.rb | 31 + ...toring_signals_list_response_links_spec.rb | 37 + ...ng_signals_list_response_meta_page_spec.rb | 37 + ...itoring_signals_list_response_meta_spec.rb | 37 + ...y_monitoring_signals_list_response_spec.rb | 49 + .../security_monitoring_signals_sort_spec.rb | 31 + 104 files changed, 10371 insertions(+), 56 deletions(-) create mode 100644 cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-Bad-Request-response.frozen create mode 100644 cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-Bad-Request-response.yml create mode 100644 cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_siem/Create-a-detection-rule-with-type-workload-security-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_siem/Create-a-detection-rule-with-type-workload-security-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_siem/Create-a-security-filter-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_siem/Create-a-security-filter-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_siem/Delete-a-security-filter-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/cloud_siem/Delete-a-security-filter-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/cloud_siem/Delete-an-existing-rule-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_siem/Delete-an-existing-rule-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_siem/Get-a-security-filter-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_siem/Get-a-security-filter-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_siem/Get-all-security-filters-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_siem/Get-all-security-filters-returns-OK-response.yml create mode 100644 cassettes/features/v2/cloud_siem/Update-a-security-filter-returns-OK-response.frozen create mode 100644 cassettes/features/v2/cloud_siem/Update-a-security-filter-returns-OK-response.yml create mode 100644 docs/v2/CloudSIEMAPI.md create mode 100644 examples/v2/cloud-siem/CreateSecurityFilter.rb create mode 100644 examples/v2/cloud-siem/CreateSecurityMonitoringRule.rb create mode 100644 examples/v2/cloud-siem/CreateSecurityMonitoringRule_498211763.rb create mode 100644 examples/v2/cloud-siem/DeleteSecurityFilter_555029489.rb create mode 100644 examples/v2/cloud-siem/DeleteSecurityMonitoringRule.rb create mode 100644 examples/v2/cloud-siem/GetSecurityFilter.rb create mode 100644 examples/v2/cloud-siem/ListSecurityFilters.rb create mode 100644 examples/v2/cloud-siem/UpdateSecurityFilter.rb create mode 100644 features/v2/cloud_siem.feature create mode 100644 lib/datadog_api_client/v2/api/cloud_siem_api.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_filter.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_filter_action.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_max_signal_duration.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_duration.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_query_create.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_severity.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signal_type.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb create mode 100644 lib/datadog_api_client/v2/models/security_monitoring_signals_sort.rb create mode 100644 spec/v2/api/cloud_siem_api_spec.rb create mode 100644 spec/v2/models/security_monitoring_filter_action_spec.rb create mode 100644 spec/v2/models/security_monitoring_filter_spec.rb create mode 100644 spec/v2/models/security_monitoring_list_rules_response_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_case_create_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_case_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_create_payload_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_detection_method_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_evaluation_window_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_keep_alive_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_max_signal_duration_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_new_value_options_forget_after_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_new_value_options_learning_duration_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_new_value_options_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_options_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_query_aggregation_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_query_create_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_query_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_response_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_severity_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_type_create_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_type_read_spec.rb create mode 100644 spec/v2/models/security_monitoring_rule_update_payload_spec.rb create mode 100644 spec/v2/models/security_monitoring_signal_attributes_spec.rb create mode 100644 spec/v2/models/security_monitoring_signal_list_request_filter_spec.rb create mode 100644 spec/v2/models/security_monitoring_signal_list_request_page_spec.rb create mode 100644 spec/v2/models/security_monitoring_signal_list_request_spec.rb create mode 100644 spec/v2/models/security_monitoring_signal_spec.rb create mode 100644 spec/v2/models/security_monitoring_signal_type_spec.rb create mode 100644 spec/v2/models/security_monitoring_signals_list_response_links_spec.rb create mode 100644 spec/v2/models/security_monitoring_signals_list_response_meta_page_spec.rb create mode 100644 spec/v2/models/security_monitoring_signals_list_response_meta_spec.rb create mode 100644 spec/v2/models/security_monitoring_signals_list_response_spec.rb create mode 100644 spec/v2/models/security_monitoring_signals_sort_spec.rb diff --git a/.apigentools-info b/.apigentools-info index cb2745dfe881..1bed9f459dcd 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.1", - "regenerated": "2022-01-18 11:51:58.575036", - "spec_repo_commit": "5808ab7" + "regenerated": "2022-01-20 10:34:27.935708", + "spec_repo_commit": "764e4f4" }, "v2": { "apigentools_version": "1.6.1", - "regenerated": "2022-01-18 11:51:58.597917", - "spec_repo_commit": "5808ab7" + "regenerated": "2022-01-20 10:34:27.962445", + "spec_repo_commit": "764e4f4" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6d0f001437e0..4dd371f06346 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -4710,7 +4710,7 @@ components: type: string name: description: The name of the rule. - example: My security monitoring rule. + example: My Cloud SIEM rule. type: string options: $ref: '#/components/schemas/SecurityMonitoringRuleOptions' @@ -8888,7 +8888,7 @@ paths: - security_monitoring_filters_read summary: Get all security filters tags: - - Security Monitoring + - Cloud SIEM x-undo: type: safe post: @@ -8928,7 +8928,7 @@ paths: - security_monitoring_filters_write summary: Create a security filter tags: - - Security Monitoring + - Cloud SIEM x-codegen-request-body-name: body x-given: security_filter: @@ -8969,7 +8969,7 @@ paths: - security_monitoring_filters_write summary: Delete a security filter tags: - - Security Monitoring + - Cloud SIEM x-undo: type: idempotent get: @@ -9002,7 +9002,7 @@ paths: - security_monitoring_filters_read summary: Get a security filter tags: - - Security Monitoring + - Cloud SIEM x-undo: type: safe patch: @@ -9043,7 +9043,7 @@ paths: - security_monitoring_filters_write summary: Update a security filter tags: - - Security Monitoring + - Cloud SIEM x-codegen-request-body-name: body x-undo: type: idempotent @@ -9072,7 +9072,7 @@ paths: - security_monitoring_rules_read summary: List rules tags: - - Security Monitoring + - Cloud SIEM x-menu-order: 1 x-undo: type: safe @@ -9105,7 +9105,7 @@ paths: - security_monitoring_rules_write summary: Create a detection rule tags: - - Security Monitoring + - Cloud SIEM x-codegen-request-body-name: body x-given: security_rule: @@ -9149,7 +9149,7 @@ paths: - security_monitoring_rules_write summary: Delete an existing rule tags: - - Security Monitoring + - Cloud SIEM x-menu-order: 5 x-undo: type: idempotent @@ -9176,7 +9176,7 @@ paths: - security_monitoring_rules_read summary: Get a rule's details tags: - - Security Monitoring + - Cloud SIEM x-menu-order: 3 x-undo: type: safe @@ -9221,7 +9221,7 @@ paths: - security_monitoring_rules_write summary: Update an existing rule tags: - - Security Monitoring + - Cloud SIEM x-codegen-request-body-name: body x-menu-order: 4 x-undo: @@ -9303,7 +9303,7 @@ paths: - security_monitoring_signals_read summary: Get a quick list of security signals tags: - - Security Monitoring + - Cloud SIEM x-menu-order: 7 x-undo: type: safe @@ -9344,7 +9344,7 @@ paths: - security_monitoring_signals_read summary: Get a list of security signals tags: - - Security Monitoring + - Cloud SIEM x-codegen-request-body-name: body x-menu-order: 6 x-undo: @@ -10501,6 +10501,12 @@ servers: default: api description: The subdomain where the API is deployed. tags: +- description: '**Note**: Datadog Security Monitoring is now [Datadog Cloud SIEM](https://docs.datadoghq.com/security_platform/cloud_siem/). + + Detection rules for generating signals and listing of generated + + signals.' + name: Cloud SIEM - description: Workload activity security rules for generating events using the Datadog security Agent. name: Cloud Workload Security @@ -10573,10 +10579,6 @@ tags: [Pipelines page](https://app.datadoghq.com/logs/pipelines).' name: Roles -- description: 'Detection rules for generating signals and listing of generated - - signals.' - name: Security Monitoring - description: Create, edit, and disable service accounts. name: Service Accounts - description: Create, edit, and disable users. diff --git a/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-Bad-Request-response.frozen b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..b9b28ab32fd5 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2022-01-06T00:52:08.681Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-Bad-Request-response.yml b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..144607bf2bac --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-Bad-Request-response.yml @@ -0,0 +1,19 @@ +http_interactions: +- recorded_at: Thu, 06 Jan 2022 00:52:08 GMT + request: + body: + encoding: UTF-8 + string: '{"cases":[{"status":"info"}],"isEnabled":true,"message":"Test rule","name":"Test-Create_a_detection_rule_returns_Bad_Request_response-1641430328","options":{},"queries":[{"query":""}],"tags":[]}' + headers: + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules + response: + body: + encoding: UTF-8 + string: '{"errors":["Internal error"]}' + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-OK-response.frozen b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-OK-response.frozen new file mode 100644 index 000000000000..92a862ab426c --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-OK-response.frozen @@ -0,0 +1 @@ +2022-01-10T15:51:25.225Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-OK-response.yml b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-OK-response.yml new file mode 100644 index 000000000000..bb9fd26bc0c9 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-returns-OK-response.yml @@ -0,0 +1,35 @@ +http_interactions: +- recorded_at: Mon, 10 Jan 2022 15:51:25 GMT + request: + body: + encoding: UTF-8 + string: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test + rule","name":"Test-Create_a_detection_rule_returns_OK_response-1641829885","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metric":"","query":"@test:true"}],"tags":[]}' + headers: + Content-Type: + - application/json;charset=utf-8 + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules + response: + body: + encoding: UTF-8 + string: '{"creationAuthorId":1445416,"tags":[],"isEnabled":true,"hasExtendedTitle":false,"message":"Test + rule","options":{"detectionMethod":"threshold","evaluationWindow":900,"maxSignalDuration":86400,"keepAlive":3600},"version":1,"createdAt":1641829885620,"filters":[],"queries":[{"distinctFields":[],"name":"","metric":"","aggregation":"count","groupByFields":[],"query":"@test:true"}],"isDeleted":false,"cases":[{"status":"info","notifications":[],"name":"","condition":"a + > 0"}],"type":"log_detection","id":"mn1-f0b-u6w","isDefault":false,"name":"Test-Create_a_detection_rule_returns_OK_response-1641829885"}' + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Jan 2022 15:51:25 GMT + request: + body: null + headers: {} + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/mn1-f0b-u6w + response: + body: + encoding: UTF-8 + string: '' + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_siem/Create-a-detection-rule-with-type-workload-security-returns-OK-response.frozen b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-with-type-workload-security-returns-OK-response.frozen new file mode 100644 index 000000000000..ecc632cc9795 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-with-type-workload-security-returns-OK-response.frozen @@ -0,0 +1 @@ +2022-01-10T15:51:26.079Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_siem/Create-a-detection-rule-with-type-workload-security-returns-OK-response.yml b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-with-type-workload-security-returns-OK-response.yml new file mode 100644 index 000000000000..072eb790c6d8 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Create-a-detection-rule-with-type-workload-security-returns-OK-response.yml @@ -0,0 +1,35 @@ +http_interactions: +- recorded_at: Mon, 10 Jan 2022 15:51:26 GMT + request: + body: + encoding: UTF-8 + string: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test + rule","name":"Test-Create_a_detection_rule_with_type_workload_security_returns_OK_response-1641829886","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metric":"","query":"@test:true"}],"tags":[],"type":"workload_security"}' + headers: + Content-Type: + - application/json;charset=utf-8 + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules + response: + body: + encoding: UTF-8 + string: '{"creationAuthorId":1445416,"tags":[],"isEnabled":true,"hasExtendedTitle":false,"message":"Test + rule","options":{"detectionMethod":"threshold","evaluationWindow":900,"maxSignalDuration":86400,"keepAlive":3600},"version":1,"createdAt":1641829886523,"filters":[],"queries":[{"distinctFields":[],"name":"","metric":"","aggregation":"count","groupByFields":[],"query":"@test:true"}],"isDeleted":false,"cases":[{"status":"info","notifications":[],"name":"","condition":"a + > 0"}],"type":"workload_security","id":"0zm-idp-p44","isDefault":false,"name":"Test-Create_a_detection_rule_with_type_workload_security_returns_OK_response-1641829886"}' + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Jan 2022 15:51:26 GMT + request: + body: null + headers: {} + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/0zm-idp-p44 + response: + body: + encoding: UTF-8 + string: '' + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_siem/Create-a-security-filter-returns-OK-response.frozen b/cassettes/features/v2/cloud_siem/Create-a-security-filter-returns-OK-response.frozen new file mode 100644 index 000000000000..073040cf6c6c --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Create-a-security-filter-returns-OK-response.frozen @@ -0,0 +1 @@ +2022-01-10T15:51:26.921Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_siem/Create-a-security-filter-returns-OK-response.yml b/cassettes/features/v2/cloud_siem/Create-a-security-filter-returns-OK-response.yml new file mode 100644 index 000000000000..16234a5adcb7 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Create-a-security-filter-returns-OK-response.yml @@ -0,0 +1,33 @@ +http_interactions: +- recorded_at: Mon, 10 Jan 2022 15:51:26 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"exclusion_filters":[{"name":"Exclude staging","query":"source:staging"}],"filtered_data_type":"logs","is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1641829886","query":"service:TestCreateasecurityfilterreturnsOKresponse1641829886"},"type":"security_filters"}}' + headers: + Content-Type: + - application/json;charset=utf-8 + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters + response: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1641829886","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1641829886","is_builtin":false},"type":"security_filters","id":"l4b-4zi-o7l"}}' + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Jan 2022 15:51:26 GMT + request: + body: null + headers: {} + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/l4b-4zi-o7l + response: + body: + encoding: UTF-8 + string: '' + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_siem/Delete-a-security-filter-returns-No-Content-response.frozen b/cassettes/features/v2/cloud_siem/Delete-a-security-filter-returns-No-Content-response.frozen new file mode 100644 index 000000000000..000288226841 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Delete-a-security-filter-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2022-01-10T14:56:27.982Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_siem/Delete-a-security-filter-returns-No-Content-response.yml b/cassettes/features/v2/cloud_siem/Delete-a-security-filter-returns-No-Content-response.yml new file mode 100644 index 000000000000..74c8b7d8180b --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Delete-a-security-filter-returns-No-Content-response.yml @@ -0,0 +1,49 @@ +http_interactions: +- recorded_at: Mon, 10 Jan 2022 14:56:27 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"exclusion_filters":[{"name":"Exclude logs from + staging","query":"source:staging"}],"filtered_data_type":"logs","is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1641826587","query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1641826587"},"type":"security_filters"}}' + headers: + Content-Type: + - application/json;charset=utf-8 + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters + response: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1641826587","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1641826587","is_builtin":false},"type":"security_filters","id":"whv-r8o-zmp"}}' + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Jan 2022 14:56:27 GMT + request: + body: null + headers: {} + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/whv-r8o-zmp + response: + body: + encoding: UTF-8 + string: '' + status: + code: 204 + message: No Content +- recorded_at: Mon, 10 Jan 2022 14:56:27 GMT + request: + body: null + headers: + Content-Type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/whv-r8o-zmp + response: + body: + encoding: UTF-8 + string: '{"errors":["not_found(Security filter with id ''whv-r8o-zmp'' not found)"]}' + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_siem/Delete-an-existing-rule-returns-OK-response.frozen b/cassettes/features/v2/cloud_siem/Delete-an-existing-rule-returns-OK-response.frozen new file mode 100644 index 000000000000..7f7266812560 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Delete-an-existing-rule-returns-OK-response.frozen @@ -0,0 +1 @@ +2022-01-10T14:56:29.249Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_siem/Delete-an-existing-rule-returns-OK-response.yml b/cassettes/features/v2/cloud_siem/Delete-an-existing-rule-returns-OK-response.yml new file mode 100644 index 000000000000..c5d54ab7dbc3 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Delete-an-existing-rule-returns-OK-response.yml @@ -0,0 +1,50 @@ +http_interactions: +- recorded_at: Mon, 10 Jan 2022 14:56:29 GMT + request: + body: + encoding: UTF-8 + string: '{"cases":[{"condition":"a > 0","name":"","notifications":[],"status":"info"}],"filters":[],"isEnabled":true,"message":"Test + rule","name":"Test-Delete_an_existing_rule_returns_OK_response-1641826589","options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"queries":[{"aggregation":"count","distinctFields":[],"groupByFields":[],"metric":"","query":"@test:true"}],"tags":[],"type":"log_detection"}' + headers: + Content-Type: + - application/json;charset=utf-8 + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules + response: + body: + encoding: UTF-8 + string: '{"creationAuthorId":1445416,"tags":[],"isEnabled":true,"hasExtendedTitle":false,"message":"Test + rule","options":{"detectionMethod":"threshold","evaluationWindow":900,"maxSignalDuration":86400,"keepAlive":3600},"version":1,"createdAt":1641826589685,"filters":[],"queries":[{"distinctFields":[],"name":"","metric":"","aggregation":"count","groupByFields":[],"query":"@test:true"}],"isDeleted":false,"cases":[{"status":"info","notifications":[],"name":"","condition":"a + > 0"}],"type":"log_detection","id":"cas-csx-jwf","isDefault":false,"name":"Test-Delete_an_existing_rule_returns_OK_response-1641826589"}' + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Jan 2022 14:56:29 GMT + request: + body: null + headers: {} + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/cas-csx-jwf + response: + body: + encoding: UTF-8 + string: '' + status: + code: 204 + message: No Content +- recorded_at: Mon, 10 Jan 2022 14:56:29 GMT + request: + body: null + headers: + Content-Type: + - application/json + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/rules/cas-csx-jwf + response: + body: + encoding: UTF-8 + string: '{"errors":["Threat detection rule not found: cas-csx-jwf"]}' + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_siem/Get-a-security-filter-returns-OK-response.frozen b/cassettes/features/v2/cloud_siem/Get-a-security-filter-returns-OK-response.frozen new file mode 100644 index 000000000000..c3b47c8b801a --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Get-a-security-filter-returns-OK-response.frozen @@ -0,0 +1 @@ +2022-01-10T15:51:27.843Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_siem/Get-a-security-filter-returns-OK-response.yml b/cassettes/features/v2/cloud_siem/Get-a-security-filter-returns-OK-response.yml new file mode 100644 index 000000000000..e36dfefa3845 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Get-a-security-filter-returns-OK-response.yml @@ -0,0 +1,50 @@ +http_interactions: +- recorded_at: Mon, 10 Jan 2022 15:51:27 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"exclusion_filters":[{"name":"Exclude logs from + staging","query":"source:staging"}],"filtered_data_type":"logs","is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1641829887","query":"service:TestGetasecurityfilterreturnsOKresponse1641829887"},"type":"security_filters"}}' + headers: + Content-Type: + - application/json;charset=utf-8 + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters + response: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1641829887","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1641829887","is_builtin":false},"type":"security_filters","id":"ixg-a5r-3st"}}' + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Jan 2022 15:51:27 GMT + request: + body: null + headers: + Content-Type: + - application/json;charset=utf-8 + method: GET + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/ixg-a5r-3st + response: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1641829887","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1641829887","is_builtin":false},"type":"security_filters","id":"ixg-a5r-3st"}}' + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Jan 2022 15:51:27 GMT + request: + body: null + headers: {} + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/ixg-a5r-3st + response: + body: + encoding: UTF-8 + string: '' + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_siem/Get-all-security-filters-returns-OK-response.frozen b/cassettes/features/v2/cloud_siem/Get-all-security-filters-returns-OK-response.frozen new file mode 100644 index 000000000000..fb20fc2f8b9b --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Get-all-security-filters-returns-OK-response.frozen @@ -0,0 +1 @@ +2022-01-06T00:52:13.157Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_siem/Get-all-security-filters-returns-OK-response.yml b/cassettes/features/v2/cloud_siem/Get-all-security-filters-returns-OK-response.yml new file mode 100644 index 000000000000..2ff043c77e1a --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Get-all-security-filters-returns-OK-response.yml @@ -0,0 +1,180 @@ +http_interactions: +- recorded_at: Thu, 06 Jan 2022 00:52:13 GMT + request: + body: null + headers: + Content-Type: + - application/json;charset=utf-8 + method: GET + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters + response: + body: + encoding: UTF-8 + string: '{"data":[{"attributes":{"is_enabled":true,"name":"all ingested logs","filtered_data_type":"logs","exclusion_filters":[],"version":1,"query":"*","is_builtin":true},"type":"security_filters","id":"bc0-fow-e4j"},{"attributes":{"is_enabled":true,"name":"Custom + security filter","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:api","is_builtin":false},"type":"security_filters","id":"qhn-iuy-4oc"},{"attributes":{"is_enabled":true,"name":"tf-TestAccDatadogSecurityMonitoringFilter-local-1626096168","filtered_data_type":"logs","exclusion_filters":[{"query":"does + not really match much","name":"first"},{"query":"neither does it","name":"second"}],"version":1,"query":"acceptance + rule triggered","is_builtin":false},"type":"security_filters","id":"7no-kjl-tnb"},{"attributes":{"is_enabled":true,"name":"tf-TestAccDatadogSecurityMonitoringFilterDatasource-local-1626104534","filtered_data_type":"logs","exclusion_filters":[{"query":"does + not really match much","name":"first"},{"query":"neither does it","name":"second"}],"version":1,"query":"ayayay + query","is_builtin":false},"type":"security_filters","id":"smf-png-gzf"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1631884327","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1631884327","is_builtin":false},"type":"security_filters","id":"hrp-l2l-xht"},{"attributes":{"is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1631884338","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1631884338","is_builtin":false},"type":"security_filters","id":"zr7-kgu-adi"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1631884338","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1631884338","is_builtin":false},"type":"security_filters","id":"wbd-e2v-yke"},{"attributes":{"is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1631884454","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1631884454","is_builtin":false},"type":"security_filters","id":"tek-udt-1ad"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1631884464","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1631884464","is_builtin":false},"type":"security_filters","id":"ctr-nal-eek"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1631884465","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1631884465","is_builtin":false},"type":"security_filters","id":"jpx-aky-hgq"},{"attributes":{"is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1631884670","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1631884670","is_builtin":false},"type":"security_filters","id":"otn-2vv-0xe"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1631884674","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1631884674","is_builtin":false},"type":"security_filters","id":"knf-be5-bhz"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1631884674","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1631884674","is_builtin":false},"type":"security_filters","id":"rjt-omi-ece"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1631884714","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1631884714","is_builtin":false},"type":"security_filters","id":"ebq-o3v-gdg"},{"attributes":{"is_enabled":true,"name":"Test-Delete_a_security_filter_returns_No_Content_response-1631884715","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestDeleteasecurityfilterreturnsNoContentresponse1631884715","is_builtin":false},"type":"security_filters","id":"0pz-qyq-kqq"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1631884725","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1631884725","is_builtin":false},"type":"security_filters","id":"m9g-ncc-02a"},{"attributes":{"is_enabled":true,"name":"Test-Python-Delete_a_security_filter_returns_No_Content_response-1631886017","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestPythonDeleteasecurityfilterreturnsNoContentresponse1631886017","is_builtin":false},"type":"security_filters","id":"s8y-ndo-pmo"},{"attributes":{"is_enabled":true,"name":"Test-Python-Get_a_security_filter_returns_OK_response-1631886029","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestPythonGetasecurityfilterreturnsOKresponse1631886029","is_builtin":false},"type":"security_filters","id":"clz-vl4-04z"},{"attributes":{"is_enabled":true,"name":"Test-Python-Update_a_security_filter_returns_OK_response-1631886034","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestPythonUpdateasecurityfilterreturnsOKresponse1631886034","is_builtin":false},"type":"security_filters","id":"ind-p9s-w9j"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632817310","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632817310","is_builtin":false},"type":"security_filters","id":"opx-q1v-ckn"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632817310","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632817310","is_builtin":false},"type":"security_filters","id":"4mz-na2-ozw"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632817311","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632817311","is_builtin":false},"type":"security_filters","id":"tkf-gkv-ffv"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632820231","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632820231","is_builtin":false},"type":"security_filters","id":"x1a-p97-scf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632820231","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632820231","is_builtin":false},"type":"security_filters","id":"g85-tm8-yhe"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632820232","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632820232","is_builtin":false},"type":"security_filters","id":"obh-5cb-a0j"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632820436","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632820436","is_builtin":false},"type":"security_filters","id":"3cw-wzf-nsn"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632820437","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632820437","is_builtin":false},"type":"security_filters","id":"a2c-940-8x8"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632820438","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632820438","is_builtin":false},"type":"security_filters","id":"r8h-dyg-wgf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632821203","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632821203","is_builtin":false},"type":"security_filters","id":"eum-bss-dyi"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632821205","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632821205","is_builtin":false},"type":"security_filters","id":"6wj-zed-jv3"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632821205","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632821205","is_builtin":false},"type":"security_filters","id":"hbn-bix-9ia"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632821494","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632821494","is_builtin":false},"type":"security_filters","id":"paz-gwc-z4l"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632821495","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632821495","is_builtin":false},"type":"security_filters","id":"jce-5qr-qdy"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632821495","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632821495","is_builtin":false},"type":"security_filters","id":"bpr-rhq-xqj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632824855","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632824855","is_builtin":false},"type":"security_filters","id":"swf-vch-g9h"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632824856","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632824856","is_builtin":false},"type":"security_filters","id":"wtp-76p-ghf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632824857","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632824857","is_builtin":false},"type":"security_filters","id":"ogc-yrs-p4p"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632826434","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632826434","is_builtin":false},"type":"security_filters","id":"y08-eup-05l"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632826436","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632826436","is_builtin":false},"type":"security_filters","id":"wkz-wad-cbl"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632826436","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632826436","is_builtin":false},"type":"security_filters","id":"9kl-ojt-pmy"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632827408","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632827408","is_builtin":false},"type":"security_filters","id":"dh2-zr8-lam"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632827409","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632827409","is_builtin":false},"type":"security_filters","id":"hho-vt6-tws"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632827410","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632827410","is_builtin":false},"type":"security_filters","id":"ltk-chn-umu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632828993","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632828993","is_builtin":false},"type":"security_filters","id":"q3f-vnn-qmh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632828993","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632828993","is_builtin":false},"type":"security_filters","id":"pvi-byz-som"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632828994","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632828994","is_builtin":false},"type":"security_filters","id":"3zg-jqc-ftm"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632832892","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632832892","is_builtin":false},"type":"security_filters","id":"kpj-t46-vbn"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632832892","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632832892","is_builtin":false},"type":"security_filters","id":"0og-l8j-tsq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632832893","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632832893","is_builtin":false},"type":"security_filters","id":"jea-me2-ru1"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632833158","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632833158","is_builtin":false},"type":"security_filters","id":"04n-hit-fum"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632833159","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632833159","is_builtin":false},"type":"security_filters","id":"3rw-stk-rtz"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632833159","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632833159","is_builtin":false},"type":"security_filters","id":"zwb-63t-lpu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632836449","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632836449","is_builtin":false},"type":"security_filters","id":"vle-9cs-xlh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632836451","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632836451","is_builtin":false},"type":"security_filters","id":"82v-knv-p8b"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632836452","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632836452","is_builtin":false},"type":"security_filters","id":"jp2-7ys-ljn"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632839530","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632839530","is_builtin":false},"type":"security_filters","id":"up5-dkc-sbq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632839530","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632839530","is_builtin":false},"type":"security_filters","id":"viv-6rl-zxw"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632839530","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632839530","is_builtin":false},"type":"security_filters","id":"1ls-1xt-i8c"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632839555","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632839555","is_builtin":false},"type":"security_filters","id":"0bv-ryy-bup"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632839556","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632839556","is_builtin":false},"type":"security_filters","id":"wuj-q1l-beq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632839557","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632839557","is_builtin":false},"type":"security_filters","id":"usl-avk-v1a"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632839754","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632839754","is_builtin":false},"type":"security_filters","id":"cdu-xnm-7k9"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632839755","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632839755","is_builtin":false},"type":"security_filters","id":"dpq-4bx-fj2"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632839755","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632839755","is_builtin":false},"type":"security_filters","id":"cnt-1qa-1xp"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632841163","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632841163","is_builtin":false},"type":"security_filters","id":"htl-cat-7ye"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632841164","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632841164","is_builtin":false},"type":"security_filters","id":"zw3-fsy-7bh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632841165","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632841165","is_builtin":false},"type":"security_filters","id":"mwa-jkd-mg6"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632842479","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632842479","is_builtin":false},"type":"security_filters","id":"3ph-ztk-l8m"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632842482","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632842482","is_builtin":false},"type":"security_filters","id":"0lr-30a-qe8"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632842482","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632842482","is_builtin":false},"type":"security_filters","id":"b57-68u-t1d"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632843068","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632843068","is_builtin":false},"type":"security_filters","id":"46n-cov-z4x"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632843069","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632843069","is_builtin":false},"type":"security_filters","id":"57n-tai-vbl"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632843069","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632843069","is_builtin":false},"type":"security_filters","id":"elu-n9r-zdk"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632844019","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632844019","is_builtin":false},"type":"security_filters","id":"1rg-ja2-wc7"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632844020","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632844020","is_builtin":false},"type":"security_filters","id":"9sk-plb-lbm"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632844021","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632844021","is_builtin":false},"type":"security_filters","id":"33b-4ut-ydc"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632844135","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632844135","is_builtin":false},"type":"security_filters","id":"wzw-cyw-og7"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632844135","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632844135","is_builtin":false},"type":"security_filters","id":"vjk-qik-jdi"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632844135","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632844135","is_builtin":false},"type":"security_filters","id":"qun-iu6-n5g"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632846637","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632846637","is_builtin":false},"type":"security_filters","id":"lbv-ghg-b4a"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632846638","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632846638","is_builtin":false},"type":"security_filters","id":"etu-tzk-p4y"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632846639","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632846639","is_builtin":false},"type":"security_filters","id":"xgg-32m-9um"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632847599","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632847599","is_builtin":false},"type":"security_filters","id":"ysc-uz9-oct"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632847600","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632847600","is_builtin":false},"type":"security_filters","id":"j6p-hzw-4gg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632847601","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632847601","is_builtin":false},"type":"security_filters","id":"9zj-osj-io8"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632848092","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632848092","is_builtin":false},"type":"security_filters","id":"bn2-ytq-ezm"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632848094","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632848094","is_builtin":false},"type":"security_filters","id":"oz0-0sv-86g"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632848095","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632848095","is_builtin":false},"type":"security_filters","id":"dwk-qj9-kgd"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632848450","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632848450","is_builtin":false},"type":"security_filters","id":"jxw-wxr-tnx"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632848451","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632848451","is_builtin":false},"type":"security_filters","id":"sto-gxf-iy1"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632848451","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632848451","is_builtin":false},"type":"security_filters","id":"lol-5bi-6ik"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632848885","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632848885","is_builtin":false},"type":"security_filters","id":"tnk-8wf-v5c"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632848885","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632848885","is_builtin":false},"type":"security_filters","id":"hfa-dvd-bf1"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632848886","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632848886","is_builtin":false},"type":"security_filters","id":"cwp-o1a-zwo"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632849681","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632849681","is_builtin":false},"type":"security_filters","id":"f4c-bee-wyi"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632849683","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632849683","is_builtin":false},"type":"security_filters","id":"caf-zh1-vqf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632849684","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632849684","is_builtin":false},"type":"security_filters","id":"8pn-vrw-kn4"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632849896","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632849896","is_builtin":false},"type":"security_filters","id":"wh3-wcd-shk"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632849897","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632849897","is_builtin":false},"type":"security_filters","id":"6or-pfc-jsh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632849898","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632849898","is_builtin":false},"type":"security_filters","id":"atx-t02-qhu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632851126","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632851126","is_builtin":false},"type":"security_filters","id":"mqn-ec8-cys"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632851127","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632851127","is_builtin":false},"type":"security_filters","id":"er4-rot-i9q"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632851128","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632851128","is_builtin":false},"type":"security_filters","id":"7av-rff-z31"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632888517","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632888517","is_builtin":false},"type":"security_filters","id":"1xt-hsv-seu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632888518","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632888518","is_builtin":false},"type":"security_filters","id":"rwh-ge7-poj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632888518","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632888518","is_builtin":false},"type":"security_filters","id":"xxy-a4m-alu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632898979","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632898979","is_builtin":false},"type":"security_filters","id":"ple-dse-hhf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632898980","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632898980","is_builtin":false},"type":"security_filters","id":"xix-4vr-abm"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632898980","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632898980","is_builtin":false},"type":"security_filters","id":"l8o-bzf-1fs"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632899193","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632899193","is_builtin":false},"type":"security_filters","id":"ovk-9mh-i7q"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632899194","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632899194","is_builtin":false},"type":"security_filters","id":"z15-wxx-yix"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632899194","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632899194","is_builtin":false},"type":"security_filters","id":"ewr-qfb-hvx"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632902893","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632902893","is_builtin":false},"type":"security_filters","id":"jqo-9hq-3hz"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632902894","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632902894","is_builtin":false},"type":"security_filters","id":"nv8-a6r-uzu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632902894","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632902894","is_builtin":false},"type":"security_filters","id":"2zl-irh-u4x"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632903483","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632903483","is_builtin":false},"type":"security_filters","id":"ove-4eu-ocg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632903484","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632903484","is_builtin":false},"type":"security_filters","id":"wme-icd-q9j"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632903485","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632903485","is_builtin":false},"type":"security_filters","id":"mlu-006-hhl"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632904028","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632904028","is_builtin":false},"type":"security_filters","id":"qyd-yxv-qtf"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632904028","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632904028","is_builtin":false},"type":"security_filters","id":"cdy-aqo-nos"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632904029","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632904029","is_builtin":false},"type":"security_filters","id":"nzp-j5a-jrb"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632907319","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632907319","is_builtin":false},"type":"security_filters","id":"w9b-vfx-oqz"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632907320","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632907320","is_builtin":false},"type":"security_filters","id":"wxm-54b-g9v"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632907320","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632907320","is_builtin":false},"type":"security_filters","id":"tqo-alk-oww"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632907341","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632907341","is_builtin":false},"type":"security_filters","id":"epg-zdn-8o4"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632907342","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632907342","is_builtin":false},"type":"security_filters","id":"bw7-nje-vtb"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632907342","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632907342","is_builtin":false},"type":"security_filters","id":"qaf-z5b-da7"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632908400","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632908400","is_builtin":false},"type":"security_filters","id":"r6d-4kz-mch"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632908401","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632908401","is_builtin":false},"type":"security_filters","id":"dar-afy-68w"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632908402","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632908402","is_builtin":false},"type":"security_filters","id":"mzl-r2s-3d3"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632909893","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632909893","is_builtin":false},"type":"security_filters","id":"amk-yqc-2jg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632909895","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632909895","is_builtin":false},"type":"security_filters","id":"jvp-lye-omw"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632909896","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632909896","is_builtin":false},"type":"security_filters","id":"mky-7xe-w96"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632910740","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632910740","is_builtin":false},"type":"security_filters","id":"cpn-5xa-qvr"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632910741","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632910741","is_builtin":false},"type":"security_filters","id":"gnd-qai-263"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632910742","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632910742","is_builtin":false},"type":"security_filters","id":"may-03m-8gc"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632913811","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632913811","is_builtin":false},"type":"security_filters","id":"3wl-tn0-g3p"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632913813","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632913813","is_builtin":false},"type":"security_filters","id":"kmc-6co-0xq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632913814","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632913814","is_builtin":false},"type":"security_filters","id":"cke-k5o-udo"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632918181","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632918181","is_builtin":false},"type":"security_filters","id":"g0n-ynp-vuj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632918181","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632918181","is_builtin":false},"type":"security_filters","id":"unp-wrp-w6s"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632918182","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632918182","is_builtin":false},"type":"security_filters","id":"ek7-jqe-hab"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632919352","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632919352","is_builtin":false},"type":"security_filters","id":"cza-so4-7se"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632919352","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632919352","is_builtin":false},"type":"security_filters","id":"lxy-qgf-rdw"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632919353","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632919353","is_builtin":false},"type":"security_filters","id":"0h6-4bl-gyy"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632919567","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632919567","is_builtin":false},"type":"security_filters","id":"j8u-cox-47o"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632919568","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632919568","is_builtin":false},"type":"security_filters","id":"wpj-eon-hhq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632919568","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632919568","is_builtin":false},"type":"security_filters","id":"gzy-dxq-y8c"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632921868","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632921868","is_builtin":false},"type":"security_filters","id":"1vw-prp-da3"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632921868","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632921868","is_builtin":false},"type":"security_filters","id":"cz9-r0k-77v"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632921869","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632921869","is_builtin":false},"type":"security_filters","id":"unn-qpz-hwg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632922202","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632922202","is_builtin":false},"type":"security_filters","id":"70w-v06-tzj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632922203","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632922203","is_builtin":false},"type":"security_filters","id":"a66-7u7-nad"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632922203","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632922203","is_builtin":false},"type":"security_filters","id":"d2p-7v7-avd"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632928250","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632928250","is_builtin":false},"type":"security_filters","id":"fgk-oxj-ftk"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632928250","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632928250","is_builtin":false},"type":"security_filters","id":"fpp-xqi-uu9"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632928251","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632928251","is_builtin":false},"type":"security_filters","id":"63r-qez-ybq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632933845","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632933845","is_builtin":false},"type":"security_filters","id":"gju-kit-iw5"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632933846","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632933846","is_builtin":false},"type":"security_filters","id":"1m4-2co-rpk"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632933847","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632933847","is_builtin":false},"type":"security_filters","id":"tir-l97-lp0"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632974965","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632974965","is_builtin":false},"type":"security_filters","id":"ogv-c35-zyi"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632974966","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632974966","is_builtin":false},"type":"security_filters","id":"mvz-r9p-fbq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632974966","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632974966","is_builtin":false},"type":"security_filters","id":"tbf-w69-aty"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632986086","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632986086","is_builtin":false},"type":"security_filters","id":"xzl-grv-7gm"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632986087","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632986087","is_builtin":false},"type":"security_filters","id":"jku-q85-vzi"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632986087","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632986087","is_builtin":false},"type":"security_filters","id":"awi-wik-sqv"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632989757","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632989757","is_builtin":false},"type":"security_filters","id":"zxt-ben-do9"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632989758","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632989758","is_builtin":false},"type":"security_filters","id":"ir8-h43-r0a"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632989758","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632989758","is_builtin":false},"type":"security_filters","id":"erz-srb-bn8"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1632997311","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1632997311","is_builtin":false},"type":"security_filters","id":"r75-jsq-jpu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1632997312","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1632997312","is_builtin":false},"type":"security_filters","id":"qq6-jjy-3tu"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1632997312","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1632997312","is_builtin":false},"type":"security_filters","id":"tsp-qrn-n9x"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633000142","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633000142","is_builtin":false},"type":"security_filters","id":"4yc-4ge-ghb"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633000144","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633000144","is_builtin":false},"type":"security_filters","id":"bed-vic-suh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633000145","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633000145","is_builtin":false},"type":"security_filters","id":"put-2jd-2ib"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633003795","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633003795","is_builtin":false},"type":"security_filters","id":"y8f-naf-1cj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633003796","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633003796","is_builtin":false},"type":"security_filters","id":"1pt-6xr-7ic"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633003797","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633003797","is_builtin":false},"type":"security_filters","id":"rpo-lwd-fyr"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633004068","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633004068","is_builtin":false},"type":"security_filters","id":"euk-m8d-p2d"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633004069","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633004069","is_builtin":false},"type":"security_filters","id":"nhm-rho-ez9"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633004069","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633004069","is_builtin":false},"type":"security_filters","id":"zuo-60q-xbh"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633006704","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633006704","is_builtin":false},"type":"security_filters","id":"3db-tgu-ays"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633006704","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633006704","is_builtin":false},"type":"security_filters","id":"6ou-tsb-hlx"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633006705","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633006705","is_builtin":false},"type":"security_filters","id":"ojr-mg7-oke"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633007542","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633007542","is_builtin":false},"type":"security_filters","id":"znq-ano-djg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633007542","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633007542","is_builtin":false},"type":"security_filters","id":"kmo-hwd-qq2"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633007543","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633007543","is_builtin":false},"type":"security_filters","id":"v8u-jjs-9vc"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633011104","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633011104","is_builtin":false},"type":"security_filters","id":"ld0-njn-zw1"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633011105","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633011105","is_builtin":false},"type":"security_filters","id":"w8u-g2z-xy8"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633011105","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633011105","is_builtin":false},"type":"security_filters","id":"mh9-5yo-qq2"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633011244","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633011244","is_builtin":false},"type":"security_filters","id":"vac-obe-n22"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633011246","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633011246","is_builtin":false},"type":"security_filters","id":"mpc-glp-h7w"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633011247","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633011247","is_builtin":false},"type":"security_filters","id":"qwx-au5-zve"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1633015449","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1633015449","is_builtin":false},"type":"security_filters","id":"saa-vzr-xsj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Get_a_security_filter_returns_OK_response-1633015451","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestTypescriptGetasecurityfilterreturnsOKresponse1633015451","is_builtin":false},"type":"security_filters","id":"pfl-vim-gje"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Update_a_security_filter_returns_OK_response-1633015452","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestTypescriptUpdateasecurityfilterreturnsOKresponse1633015452","is_builtin":false},"type":"security_filters","id":"2uh-zo8-nb5"},{"attributes":{"is_enabled":true,"name":"Test-Ruby-Get_a_security_filter_returns_OK_response-1634150224","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestRubyGetasecurityfilterreturnsOKresponse1634150224","is_builtin":false},"type":"security_filters","id":"egl-poh-kzn"},{"attributes":{"is_enabled":true,"name":"Test-Python-Get_a_security_filter_returns_OK_response-1635496812","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestPythonGetasecurityfilterreturnsOKresponse1635496812","is_builtin":false},"type":"security_filters","id":"gcz-3rz-y1w"},{"attributes":{"is_enabled":true,"name":"Test-Go-Get_a_security_filter_returns_OK_response-1636410254","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGoGetasecurityfilterreturnsOKresponse1636410254","is_builtin":false},"type":"security_filters","id":"csu-jez-ive"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1637063344","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1637063344","is_builtin":false},"type":"security_filters","id":"izh-ced-qmc"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1637063346","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1637063346","is_builtin":false},"type":"security_filters","id":"rtp-twm-nur"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1637063347","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1637063347","is_builtin":false},"type":"security_filters","id":"rin-h1e-8p1"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1637070528","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1637070528","is_builtin":false},"type":"security_filters","id":"thp-jp7-1is"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1637070533","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1637070533","is_builtin":false},"type":"security_filters","id":"jyk-ryj-r5v"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1637070535","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1637070535","is_builtin":false},"type":"security_filters","id":"5hn-7yt-vcx"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1637077967","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1637077967","is_builtin":false},"type":"security_filters","id":"vjx-2ei-qzt"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1637077969","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1637077969","is_builtin":false},"type":"security_filters","id":"trb-gqz-rw0"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1637077970","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1637077970","is_builtin":false},"type":"security_filters","id":"eam-ucg-ysc"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1637078478","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1637078478","is_builtin":false},"type":"security_filters","id":"nd2-4uw-ryq"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1637078481","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1637078481","is_builtin":false},"type":"security_filters","id":"mdt-vr8-lpi"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1637078482","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1637078482","is_builtin":false},"type":"security_filters","id":"0rq-mvi-cgj"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1637089241","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1637089241","is_builtin":false},"type":"security_filters","id":"wn3-as7-moa"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1620751633","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1620751633","is_builtin":false},"type":"security_filters","id":"tqw-xay-uyv"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1620751634","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1620751634","is_builtin":false},"type":"security_filters","id":"5zc-uho-3kh"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1637141213","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1637141213","is_builtin":false},"type":"security_filters","id":"auv-76t-trj"},{"attributes":{"is_enabled":true,"name":"Test-Get_a_security_filter_returns_OK_response-1637141215","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestGetasecurityfilterreturnsOKresponse1637141215","is_builtin":false},"type":"security_filters","id":"d4t-p2p-tsw"},{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1637141217","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1637141217","is_builtin":false},"type":"security_filters","id":"vpi-vz6-pnj"},{"attributes":{"is_enabled":true,"name":"Test-Ruby-Get_a_security_filter_returns_OK_response-1637834808","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestRubyGetasecurityfilterreturnsOKresponse1637834808","is_builtin":false},"type":"security_filters","id":"eaa-jqt-qhz"},{"attributes":{"is_enabled":true,"name":"Test-Python-Get_a_security_filter_returns_OK_response-1638987050","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestPythonGetasecurityfilterreturnsOKresponse1638987050","is_builtin":false},"type":"security_filters","id":"rpt-0pp-r8j"},{"attributes":{"is_enabled":true,"name":"Test-Python-Delete_a_security_filter_returns_No_Content_response-1638987054","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestPythonDeleteasecurityfilterreturnsNoContentresponse1638987054","is_builtin":false},"type":"security_filters","id":"bkx-gg1-qlx"},{"attributes":{"is_enabled":true,"name":"Test-Python-Update_a_security_filter_returns_OK_response-1638987055","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestPythonUpdateasecurityfilterreturnsOKresponse1638987055","is_builtin":false},"type":"security_filters","id":"z67-o7h-hik"},{"attributes":{"is_enabled":true,"name":"Test-Python-Create_a_security_filter_returns_OK_response-1638987057","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestPythonCreateasecurityfilterreturnsOKresponse1638987057","is_builtin":false},"type":"security_filters","id":"mlx-awu-wg9"},{"attributes":{"is_enabled":true,"name":"Test-Python-Delete_a_security_filter_returns_No_Content_response-1639574360","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestPythonDeleteasecurityfilterreturnsNoContentresponse1639574360","is_builtin":false},"type":"security_filters","id":"ugq-7e0-rmg"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1640111630","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1640111630","is_builtin":false},"type":"security_filters","id":"iue-buv-ynq"},{"attributes":{"is_enabled":true,"name":"Test-Typescript-Create_a_security_filter_returns_OK_response-1640112776","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestTypescriptCreateasecurityfilterreturnsOKresponse1640112776","is_builtin":false},"type":"security_filters","id":"qqm-ssh-ees"},{"attributes":{"is_enabled":true,"name":"Test-Create_a_security_filter_returns_OK_response-1640112926","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + staging"}],"version":1,"query":"service:TestCreateasecurityfilterreturnsOKresponse1640112926","is_builtin":false},"type":"security_filters","id":"lkt-tz2-dfx"}]}' + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/cloud_siem/Update-a-security-filter-returns-OK-response.frozen b/cassettes/features/v2/cloud_siem/Update-a-security-filter-returns-OK-response.frozen new file mode 100644 index 000000000000..4cbb7d499be0 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Update-a-security-filter-returns-OK-response.frozen @@ -0,0 +1 @@ +2022-01-10T15:51:29.112Z \ No newline at end of file diff --git a/cassettes/features/v2/cloud_siem/Update-a-security-filter-returns-OK-response.yml b/cassettes/features/v2/cloud_siem/Update-a-security-filter-returns-OK-response.yml new file mode 100644 index 000000000000..de4f02cdd0c0 --- /dev/null +++ b/cassettes/features/v2/cloud_siem/Update-a-security-filter-returns-OK-response.yml @@ -0,0 +1,51 @@ +http_interactions: +- recorded_at: Mon, 10 Jan 2022 15:51:29 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"exclusion_filters":[{"name":"Exclude logs from + staging","query":"source:staging"}],"filtered_data_type":"logs","is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1641829889","query":"service:TestUpdateasecurityfilterreturnsOKresponse1641829889"},"type":"security_filters"}}' + headers: + Content-Type: + - application/json;charset=utf-8 + method: POST + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters + response: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1641829889","filtered_data_type":"logs","exclusion_filters":[{"query":"source:staging","name":"Exclude + logs from staging"}],"version":1,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1641829889","is_builtin":false},"type":"security_filters","id":"c8d-shz-sm1"}}' + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Jan 2022 15:51:29 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"exclusion_filters":[],"filtered_data_type":"logs","is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1641829889","query":"service:TestUpdateasecurityfilterreturnsOKresponse1641829889","version":1},"type":"security_filters"}}' + headers: + Content-Type: + - application/json;charset=utf-8 + method: PATCH + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/c8d-shz-sm1 + response: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"is_enabled":true,"name":"Test-Update_a_security_filter_returns_OK_response-1641829889","filtered_data_type":"logs","exclusion_filters":[],"version":2,"query":"service:TestUpdateasecurityfilterreturnsOKresponse1641829889","is_builtin":false},"type":"security_filters","id":"c8d-shz-sm1"}}' + status: + code: 200 + message: OK +- recorded_at: Mon, 10 Jan 2022 15:51:29 GMT + request: + body: null + headers: {} + method: DELETE + uri: https://api.datadoghq.com/api/v2/security_monitoring/configuration/security_filters/c8d-shz-sm1 + response: + body: + encoding: UTF-8 + string: '' + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/docs/v2/CloudSIEMAPI.md b/docs/v2/CloudSIEMAPI.md new file mode 100644 index 000000000000..c10488fbd563 --- /dev/null +++ b/docs/v2/CloudSIEMAPI.md @@ -0,0 +1,766 @@ +# DatadogAPIClient::V2::CloudSIEMAPI + +All URIs are relative to *https://api.datadoghq.com* + +| Method | HTTP request | Description | +| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------ | +| [**create_security_filter**](CloudSIEMAPI.md#create_security_filter) | **POST** /api/v2/security_monitoring/configuration/security_filters | Create a security filter | +| [**create_security_monitoring_rule**](CloudSIEMAPI.md#create_security_monitoring_rule) | **POST** /api/v2/security_monitoring/rules | Create a detection rule | +| [**delete_security_filter**](CloudSIEMAPI.md#delete_security_filter) | **DELETE** /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Delete a security filter | +| [**delete_security_monitoring_rule**](CloudSIEMAPI.md#delete_security_monitoring_rule) | **DELETE** /api/v2/security_monitoring/rules/{rule_id} | Delete an existing rule | +| [**get_security_filter**](CloudSIEMAPI.md#get_security_filter) | **GET** /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Get a security filter | +| [**get_security_monitoring_rule**](CloudSIEMAPI.md#get_security_monitoring_rule) | **GET** /api/v2/security_monitoring/rules/{rule_id} | Get a rule's details | +| [**list_security_filters**](CloudSIEMAPI.md#list_security_filters) | **GET** /api/v2/security_monitoring/configuration/security_filters | Get all security filters | +| [**list_security_monitoring_rules**](CloudSIEMAPI.md#list_security_monitoring_rules) | **GET** /api/v2/security_monitoring/rules | List rules | +| [**list_security_monitoring_signals**](CloudSIEMAPI.md#list_security_monitoring_signals) | **GET** /api/v2/security_monitoring/signals | Get a quick list of security signals | +| [**search_security_monitoring_signals**](CloudSIEMAPI.md#search_security_monitoring_signals) | **POST** /api/v2/security_monitoring/signals/search | Get a list of security signals | +| [**update_security_filter**](CloudSIEMAPI.md#update_security_filter) | **PATCH** /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Update a security filter | +| [**update_security_monitoring_rule**](CloudSIEMAPI.md#update_security_monitoring_rule) | **PUT** /api/v2/security_monitoring/rules/{rule_id} | Update an existing rule | + +## create_security_filter + +> create_security_filter(body) + +Create a security filter. + +See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) +for more examples. + +### Examples + +```ruby +require 'datadog_api_client' +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +body = DatadogAPIClient::V2::SecurityFilterCreateRequest.new({data: DatadogAPIClient::V2::SecurityFilterCreateData.new({attributes: DatadogAPIClient::V2::SecurityFilterCreateAttributes.new({exclusion_filters: [DatadogAPIClient::V2::SecurityFilterExclusionFilter.new({name: 'Exclude staging', query: 'source:staging'})], filtered_data_type: DatadogAPIClient::V2::SecurityFilterFilteredDataType::LOGS, is_enabled: true, name: 'Custom security filter', query: 'service:api'}), type: DatadogAPIClient::V2::SecurityFilterType::SECURITY_FILTERS})}) # SecurityFilterCreateRequest | The definition of the new security filter. + +begin + # Create a security filter + result = api_instance.create_security_filter(body) + p result +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->create_security_filter: #{e}" +end +``` + +#### Using the create_security_filter_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_security_filter_with_http_info(body) + +```ruby +begin + # Create a security filter + data, status_code, headers = api_instance.create_security_filter_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->create_security_filter_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------- | ----------------------------------------------------------------- | ------------------------------------------ | ----- | +| **body** | [**SecurityFilterCreateRequest**](SecurityFilterCreateRequest.md) | The definition of the new security filter. | | + +### Return type + +[**SecurityFilterResponse**](SecurityFilterResponse.md) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +## create_security_monitoring_rule + +> create_security_monitoring_rule(body) + +Create a detection rule. + +### Examples + +```ruby +require 'datadog_api_client' +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +body = DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload.new({cases: [DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new({status: DatadogAPIClient::V2::SecurityMonitoringRuleSeverity::INFO})], is_enabled: true, message: 'message_example', name: 'My Cloud SIEM rule.', options: DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new, queries: [DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate.new({query: 'a > 3'})]}) # SecurityMonitoringRuleCreatePayload | + +begin + # Create a detection rule + result = api_instance.create_security_monitoring_rule(body) + p result +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->create_security_monitoring_rule: #{e}" +end +``` + +#### Using the create_security_monitoring_rule_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_security_monitoring_rule_with_http_info(body) + +```ruby +begin + # Create a detection rule + data, status_code, headers = api_instance.create_security_monitoring_rule_with_http_info(body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->create_security_monitoring_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------- | --------------------------------------------------------------------------------- | ----------- | ----- | +| **body** | [**SecurityMonitoringRuleCreatePayload**](SecurityMonitoringRuleCreatePayload.md) | | | + +### Return type + +[**SecurityMonitoringRuleResponse**](SecurityMonitoringRuleResponse.md) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +## delete_security_filter + +> delete_security_filter(security_filter_id) + +Delete a specific security filter. + +### Examples + +```ruby +require 'datadog_api_client' +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +security_filter_id = 'security_filter_id_example' # String | The ID of the security filter. + +begin + # Delete a security filter + api_instance.delete_security_filter(security_filter_id) +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->delete_security_filter: #{e}" +end +``` + +#### Using the delete_security_filter_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_security_filter_with_http_info(security_filter_id) + +```ruby +begin + # Delete a security filter + data, status_code, headers = api_instance.delete_security_filter_with_http_info(security_filter_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->delete_security_filter_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---------------------- | ---------- | ------------------------------ | ----- | +| **security_filter_id** | **String** | The ID of the security filter. | | + +### Return type + +nil (empty response body) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## delete_security_monitoring_rule + +> delete_security_monitoring_rule(rule_id) + +Delete an existing rule. Default rules cannot be deleted. + +### Examples + +```ruby +require 'datadog_api_client' +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +rule_id = 'rule_id_example' # String | The ID of the rule. + +begin + # Delete an existing rule + api_instance.delete_security_monitoring_rule(rule_id) +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->delete_security_monitoring_rule: #{e}" +end +``` + +#### Using the delete_security_monitoring_rule_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> delete_security_monitoring_rule_with_http_info(rule_id) + +```ruby +begin + # Delete an existing rule + data, status_code, headers = api_instance.delete_security_monitoring_rule_with_http_info(rule_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->delete_security_monitoring_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ----------- | ---------- | ------------------- | ----- | +| **rule_id** | **String** | The ID of the rule. | | + +### Return type + +nil (empty response body) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## get_security_filter + +> get_security_filter(security_filter_id) + +Get the details of a specific security filter. + +See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) +for more examples. + +### Examples + +```ruby +require 'datadog_api_client' +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +security_filter_id = 'security_filter_id_example' # String | The ID of the security filter. + +begin + # Get a security filter + result = api_instance.get_security_filter(security_filter_id) + p result +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->get_security_filter: #{e}" +end +``` + +#### Using the get_security_filter_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_security_filter_with_http_info(security_filter_id) + +```ruby +begin + # Get a security filter + data, status_code, headers = api_instance.get_security_filter_with_http_info(security_filter_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->get_security_filter_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---------------------- | ---------- | ------------------------------ | ----- | +| **security_filter_id** | **String** | The ID of the security filter. | | + +### Return type + +[**SecurityFilterResponse**](SecurityFilterResponse.md) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## get_security_monitoring_rule + +> get_security_monitoring_rule(rule_id) + +Get a rule's details. + +### Examples + +```ruby +require 'datadog_api_client' +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +rule_id = 'rule_id_example' # String | The ID of the rule. + +begin + # Get a rule's details + result = api_instance.get_security_monitoring_rule(rule_id) + p result +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->get_security_monitoring_rule: #{e}" +end +``` + +#### Using the get_security_monitoring_rule_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_security_monitoring_rule_with_http_info(rule_id) + +```ruby +begin + # Get a rule's details + data, status_code, headers = api_instance.get_security_monitoring_rule_with_http_info(rule_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->get_security_monitoring_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ----------- | ---------- | ------------------- | ----- | +| **rule_id** | **String** | The ID of the rule. | | + +### Return type + +[**SecurityMonitoringRuleResponse**](SecurityMonitoringRuleResponse.md) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## list_security_filters + +> list_security_filters + +Get the list of configured security filters with their definitions. + +### Examples + +```ruby +require 'datadog_api_client' +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new + +begin + # Get all security filters + result = api_instance.list_security_filters + p result +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->list_security_filters: #{e}" +end +``` + +#### Using the list_security_filters_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_security_filters_with_http_info + +```ruby +begin + # Get all security filters + data, status_code, headers = api_instance.list_security_filters_with_http_info + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->list_security_filters_with_http_info: #{e}" +end +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**SecurityFiltersResponse**](SecurityFiltersResponse.md) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## list_security_monitoring_rules + +> list_security_monitoring_rules(opts) + +List rules. + +### Examples + +```ruby +require 'datadog_api_client' +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +opts = { + page_size: 10, # Integer | Size for a given page. + page_number: 0 # Integer | Specific page number to return. +} + +begin + # List rules + result = api_instance.list_security_monitoring_rules(opts) + p result +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->list_security_monitoring_rules: #{e}" +end +``` + +#### Using the list_security_monitoring_rules_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_security_monitoring_rules_with_http_info(opts) + +```ruby +begin + # List rules + data, status_code, headers = api_instance.list_security_monitoring_rules_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->list_security_monitoring_rules_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| --------------- | ----------- | ------------------------------- | ------------------------- | +| **page_size** | **Integer** | Size for a given page. | [optional][default to 10] | +| **page_number** | **Integer** | Specific page number to return. | [optional][default to 0] | + +### Return type + +[**SecurityMonitoringListRulesResponse**](SecurityMonitoringListRulesResponse.md) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## list_security_monitoring_signals + +> list_security_monitoring_signals(opts) + +The list endpoint returns security signals that match a search query. +Both this endpoint and the POST endpoint can be used interchangeably when listing +security signals. + +### Examples + +```ruby +require 'datadog_api_client' + +DatadogAPIClient::V2.configure do |config| + config.unstable_operations[:list_security_monitoring_signals] = true +end + +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +opts = { + filter_query: 'security:attack status:high', # String | The search query for security signals. + filter_from: Time.parse('2019-01-02T09:42:36.320Z'), # Time | The minimum timestamp for requested security signals. + filter_to: Time.parse('2019-01-03T09:42:36.320Z'), # Time | The maximum timestamp for requested security signals. + sort: DatadogAPIClient::V2::SecurityMonitoringSignalsSort::TIMESTAMP_ASCENDING, # SecurityMonitoringSignalsSort | The order of the security signals in results. + page_cursor: 'eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==', # String | A list of results using the cursor provided in the previous query. + page_limit: 25 # Integer | The maximum number of security signals in the response. +} + +begin + # Get a quick list of security signals + result = api_instance.list_security_monitoring_signals(opts) + p result +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->list_security_monitoring_signals: #{e}" +end +``` + +#### Using the list_security_monitoring_signals_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_security_monitoring_signals_with_http_info(opts) + +```ruby +begin + # Get a quick list of security signals + data, status_code, headers = api_instance.list_security_monitoring_signals_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->list_security_monitoring_signals_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---------------- | --------------------------------- | ------------------------------------------------------------------ | ------------------------- | +| **filter_query** | **String** | The search query for security signals. | [optional] | +| **filter_from** | **Time** | The minimum timestamp for requested security signals. | [optional] | +| **filter_to** | **Time** | The maximum timestamp for requested security signals. | [optional] | +| **sort** | **SecurityMonitoringSignalsSort** | The order of the security signals in results. | [optional] | +| **page_cursor** | **String** | A list of results using the cursor provided in the previous query. | [optional] | +| **page_limit** | **Integer** | The maximum number of security signals in the response. | [optional][default to 10] | + +### Return type + +[**SecurityMonitoringSignalsListResponse**](SecurityMonitoringSignalsListResponse.md) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +## search_security_monitoring_signals + +> search_security_monitoring_signals(opts) + +Returns security signals that match a search query. +Both this endpoint and the GET endpoint can be used interchangeably for listing +security signals. + +### Examples + +```ruby +require 'datadog_api_client' + +DatadogAPIClient::V2.configure do |config| + config.unstable_operations[:search_security_monitoring_signals] = true +end + +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +opts = { + body: DatadogAPIClient::V2::SecurityMonitoringSignalListRequest.new # SecurityMonitoringSignalListRequest | +} + +begin + # Get a list of security signals + result = api_instance.search_security_monitoring_signals(opts) + p result +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->search_security_monitoring_signals: #{e}" +end +``` + +#### Using the search_security_monitoring_signals_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> search_security_monitoring_signals_with_http_info(opts) + +```ruby +begin + # Get a list of security signals + data, status_code, headers = api_instance.search_security_monitoring_signals_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->search_security_monitoring_signals_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| -------- | --------------------------------------------------------------------------------- | ----------- | ---------- | +| **body** | [**SecurityMonitoringSignalListRequest**](SecurityMonitoringSignalListRequest.md) | | [optional] | + +### Return type + +[**SecurityMonitoringSignalsListResponse**](SecurityMonitoringSignalsListResponse.md) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +## update_security_filter + +> update_security_filter(security_filter_id, body) + +Update a specific security filter. +Returns the security filter object when the request is successful. + +### Examples + +```ruby +require 'datadog_api_client' +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +security_filter_id = 'security_filter_id_example' # String | The ID of the security filter. +body = DatadogAPIClient::V2::SecurityFilterUpdateRequest.new({data: DatadogAPIClient::V2::SecurityFilterUpdateData.new({attributes: DatadogAPIClient::V2::SecurityFilterUpdateAttributes.new, type: DatadogAPIClient::V2::SecurityFilterType::SECURITY_FILTERS})}) # SecurityFilterUpdateRequest | New definition of the security filter. + +begin + # Update a security filter + result = api_instance.update_security_filter(security_filter_id, body) + p result +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->update_security_filter: #{e}" +end +``` + +#### Using the update_security_filter_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_security_filter_with_http_info(security_filter_id, body) + +```ruby +begin + # Update a security filter + data, status_code, headers = api_instance.update_security_filter_with_http_info(security_filter_id, body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->update_security_filter_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---------------------- | ----------------------------------------------------------------- | -------------------------------------- | ----- | +| **security_filter_id** | **String** | The ID of the security filter. | | +| **body** | [**SecurityFilterUpdateRequest**](SecurityFilterUpdateRequest.md) | New definition of the security filter. | | + +### Return type + +[**SecurityFilterResponse**](SecurityFilterResponse.md) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +## update_security_monitoring_rule + +> update_security_monitoring_rule(rule_id, body) + +Update an existing rule. When updating `cases`, `queries` or `options`, the whole field +must be included. For example, when modifying a query all queries must be included. +Default rules can only be updated to be enabled and to change notifications. + +### Examples + +```ruby +require 'datadog_api_client' +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +rule_id = 'rule_id_example' # String | The ID of the rule. +body = DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload.new # SecurityMonitoringRuleUpdatePayload | + +begin + # Update an existing rule + result = api_instance.update_security_monitoring_rule(rule_id, body) + p result +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->update_security_monitoring_rule: #{e}" +end +``` + +#### Using the update_security_monitoring_rule_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_security_monitoring_rule_with_http_info(rule_id, body) + +```ruby +begin + # Update an existing rule + data, status_code, headers = api_instance.update_security_monitoring_rule_with_http_info(rule_id, body) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue DatadogAPIClient::V2::APIError => e + puts "Error when calling CloudSIEMAPI->update_security_monitoring_rule_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ----------- | --------------------------------------------------------------------------------- | ------------------- | ----- | +| **rule_id** | **String** | The ID of the rule. | | +| **body** | [**SecurityMonitoringRuleUpdatePayload**](SecurityMonitoringRuleUpdatePayload.md) | | | + +### Return type + +[**SecurityMonitoringRuleResponse**](SecurityMonitoringRuleResponse.md) + +### Authorization + +[AuthZ](README.md#AuthZ), [apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json diff --git a/docs/v2/README.md b/docs/v2/README.md index 613976ad41b9..c22bae4f8bb4 100644 --- a/docs/v2/README.md +++ b/docs/v2/README.md @@ -12,15 +12,15 @@ Please follow the [installation](#installation) procedure and then run the follo # Load the gem require 'datadog_api_client/v2' -api_instance = DatadogAPIClient::V2::CloudWorkloadSecurityAPI.new -body = DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateRequest.new({data: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateData.new({attributes: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleCreateAttributes.new({expression: 'exec.file.name == \"sh\"', name: 'my_agent_rule'}), type: DatadogAPIClient::V2::CloudWorkloadSecurityAgentRuleType::AGENT_RULE})}) # CloudWorkloadSecurityAgentRuleCreateRequest | The definition of the new Agent rule. +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +body = DatadogAPIClient::V2::SecurityFilterCreateRequest.new({data: DatadogAPIClient::V2::SecurityFilterCreateData.new({attributes: DatadogAPIClient::V2::SecurityFilterCreateAttributes.new({exclusion_filters: [DatadogAPIClient::V2::SecurityFilterExclusionFilter.new({name: 'Exclude staging', query: 'source:staging'})], filtered_data_type: DatadogAPIClient::V2::SecurityFilterFilteredDataType::LOGS, is_enabled: true, name: 'Custom security filter', query: 'service:api'}), type: DatadogAPIClient::V2::SecurityFilterType::SECURITY_FILTERS})}) # SecurityFilterCreateRequest | The definition of the new security filter. begin - #Create a Cloud Workload Security Agent rule - result = api_instance.create_cloud_workload_security_agent_rule(body) + #Create a security filter + result = api_instance.create_security_filter(body) p result rescue DatadogAPIClient::V2::APIError => e - puts "Exception when calling CloudWorkloadSecurityAPI->create_cloud_workload_security_agent_rule: #{e}" + puts "Exception when calling CloudSIEMAPI->create_security_filter: #{e}" end ``` @@ -31,6 +31,18 @@ All URIs are relative to *https://api.datadoghq.com* | Class | Method | HTTP request | Description | | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------- | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**create_security_filter**](CloudSIEMAPI.md#create_security_filter) | **POST** /api/v2/security_monitoring/configuration/security_filters | Create a security filter | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**create_security_monitoring_rule**](CloudSIEMAPI.md#create_security_monitoring_rule) | **POST** /api/v2/security_monitoring/rules | Create a detection rule | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**delete_security_filter**](CloudSIEMAPI.md#delete_security_filter) | **DELETE** /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Delete a security filter | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**delete_security_monitoring_rule**](CloudSIEMAPI.md#delete_security_monitoring_rule) | **DELETE** /api/v2/security_monitoring/rules/{rule_id} | Delete an existing rule | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**get_security_filter**](CloudSIEMAPI.md#get_security_filter) | **GET** /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Get a security filter | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**get_security_monitoring_rule**](CloudSIEMAPI.md#get_security_monitoring_rule) | **GET** /api/v2/security_monitoring/rules/{rule_id} | Get a rule's details | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**list_security_filters**](CloudSIEMAPI.md#list_security_filters) | **GET** /api/v2/security_monitoring/configuration/security_filters | Get all security filters | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**list_security_monitoring_rules**](CloudSIEMAPI.md#list_security_monitoring_rules) | **GET** /api/v2/security_monitoring/rules | List rules | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**list_security_monitoring_signals**](CloudSIEMAPI.md#list_security_monitoring_signals) | **GET** /api/v2/security_monitoring/signals | Get a quick list of security signals | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**search_security_monitoring_signals**](CloudSIEMAPI.md#search_security_monitoring_signals) | **POST** /api/v2/security_monitoring/signals/search | Get a list of security signals | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**update_security_filter**](CloudSIEMAPI.md#update_security_filter) | **PATCH** /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Update a security filter | +| _DatadogAPIClient::V2::CloudSIEMAPI_ | [**update_security_monitoring_rule**](CloudSIEMAPI.md#update_security_monitoring_rule) | **PUT** /api/v2/security_monitoring/rules/{rule_id} | Update an existing rule | | _DatadogAPIClient::V2::CloudWorkloadSecurityAPI_ | [**create_cloud_workload_security_agent_rule**](CloudWorkloadSecurityAPI.md#create_cloud_workload_security_agent_rule) | **POST** /api/v2/security_monitoring/cloud_workload_security/agent_rules | Create a Cloud Workload Security Agent rule | | _DatadogAPIClient::V2::CloudWorkloadSecurityAPI_ | [**delete_cloud_workload_security_agent_rule**](CloudWorkloadSecurityAPI.md#delete_cloud_workload_security_agent_rule) | **DELETE** /api/v2/security_monitoring/cloud_workload_security/agent_rules/{agent_rule_id} | Delete a Cloud Workload Security Agent rule | | _DatadogAPIClient::V2::CloudWorkloadSecurityAPI_ | [**download_cloud_workload_policy_file**](CloudWorkloadSecurityAPI.md#download_cloud_workload_policy_file) | **GET** /api/v2/security/cloud_workload/policy/download | Get the latest Cloud Workload Security policy | @@ -110,18 +122,6 @@ All URIs are relative to *https://api.datadoghq.com* | _DatadogAPIClient::V2::RolesAPI_ | [**remove_permission_from_role**](RolesAPI.md#remove_permission_from_role) | **DELETE** /api/v2/roles/{role_id}/permissions | Revoke permission | | _DatadogAPIClient::V2::RolesAPI_ | [**remove_user_from_role**](RolesAPI.md#remove_user_from_role) | **DELETE** /api/v2/roles/{role_id}/users | Remove a user from a role | | _DatadogAPIClient::V2::RolesAPI_ | [**update_role**](RolesAPI.md#update_role) | **PATCH** /api/v2/roles/{role_id} | Update a role | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**create_security_filter**](SecurityMonitoringAPI.md#create_security_filter) | **POST** /api/v2/security_monitoring/configuration/security_filters | Create a security filter | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**create_security_monitoring_rule**](SecurityMonitoringAPI.md#create_security_monitoring_rule) | **POST** /api/v2/security_monitoring/rules | Create a detection rule | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**delete_security_filter**](SecurityMonitoringAPI.md#delete_security_filter) | **DELETE** /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Delete a security filter | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**delete_security_monitoring_rule**](SecurityMonitoringAPI.md#delete_security_monitoring_rule) | **DELETE** /api/v2/security_monitoring/rules/{rule_id} | Delete an existing rule | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**get_security_filter**](SecurityMonitoringAPI.md#get_security_filter) | **GET** /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Get a security filter | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**get_security_monitoring_rule**](SecurityMonitoringAPI.md#get_security_monitoring_rule) | **GET** /api/v2/security_monitoring/rules/{rule_id} | Get a rule's details | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**list_security_filters**](SecurityMonitoringAPI.md#list_security_filters) | **GET** /api/v2/security_monitoring/configuration/security_filters | Get all security filters | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**list_security_monitoring_rules**](SecurityMonitoringAPI.md#list_security_monitoring_rules) | **GET** /api/v2/security_monitoring/rules | List rules | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**list_security_monitoring_signals**](SecurityMonitoringAPI.md#list_security_monitoring_signals) | **GET** /api/v2/security_monitoring/signals | Get a quick list of security signals | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**search_security_monitoring_signals**](SecurityMonitoringAPI.md#search_security_monitoring_signals) | **POST** /api/v2/security_monitoring/signals/search | Get a list of security signals | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**update_security_filter**](SecurityMonitoringAPI.md#update_security_filter) | **PATCH** /api/v2/security_monitoring/configuration/security_filters/{security_filter_id} | Update a security filter | -| _DatadogAPIClient::V2::SecurityMonitoringAPI_ | [**update_security_monitoring_rule**](SecurityMonitoringAPI.md#update_security_monitoring_rule) | **PUT** /api/v2/security_monitoring/rules/{rule_id} | Update an existing rule | | _DatadogAPIClient::V2::ServiceAccountsAPI_ | [**create_service_account_application_key**](ServiceAccountsAPI.md#create_service_account_application_key) | **POST** /api/v2/service_accounts/{service_account_id}/application_keys | Create an application key for this service account | | _DatadogAPIClient::V2::ServiceAccountsAPI_ | [**delete_service_account_application_key**](ServiceAccountsAPI.md#delete_service_account_application_key) | **DELETE** /api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id} | Delete an application key for this service account | | _DatadogAPIClient::V2::ServiceAccountsAPI_ | [**get_service_account_application_key**](ServiceAccountsAPI.md#get_service_account_application_key) | **GET** /api/v2/service_accounts/{service_account_id}/application_keys/{app_key_id} | Get one application key for this service account | diff --git a/docs/v2/SecurityMonitoringRuleCreatePayload.md b/docs/v2/SecurityMonitoringRuleCreatePayload.md index 8020b066b1b1..d8011097f232 100644 --- a/docs/v2/SecurityMonitoringRuleCreatePayload.md +++ b/docs/v2/SecurityMonitoringRuleCreatePayload.md @@ -26,7 +26,7 @@ instance = DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload.new( has_extended_title: true, is_enabled: true, message: , - name: My security monitoring rule., + name: My Cloud SIEM rule., options: null, queries: [], tags: ["env:prod","team:security"], diff --git a/examples/v2/cloud-siem/CreateSecurityFilter.rb b/examples/v2/cloud-siem/CreateSecurityFilter.rb new file mode 100644 index 000000000000..e1b62595ed96 --- /dev/null +++ b/examples/v2/cloud-siem/CreateSecurityFilter.rb @@ -0,0 +1,23 @@ +# Create a security filter returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new + +body = DatadogAPIClient::V2::SecurityFilterCreateRequest.new({ + data: DatadogAPIClient::V2::SecurityFilterCreateData.new({ + attributes: DatadogAPIClient::V2::SecurityFilterCreateAttributes.new({ + exclusion_filters: [ + DatadogAPIClient::V2::SecurityFilterExclusionFilter.new({ + name: "Exclude staging", + query: "source:staging", + }), + ], + filtered_data_type: DatadogAPIClient::V2::SecurityFilterFilteredDataType::LOGS, + is_enabled: true, + name: "Example-Create_a_security_filter_returns_OK_response", + query: "service:ExampleCreateasecurityfilterreturnsOKresponse", + }), + type: DatadogAPIClient::V2::SecurityFilterType::SECURITY_FILTERS, + }), +}) +p api_instance.create_security_filter(body) diff --git a/examples/v2/cloud-siem/CreateSecurityMonitoringRule.rb b/examples/v2/cloud-siem/CreateSecurityMonitoringRule.rb new file mode 100644 index 000000000000..aafd62c71f95 --- /dev/null +++ b/examples/v2/cloud-siem/CreateSecurityMonitoringRule.rb @@ -0,0 +1,35 @@ +# Create a detection rule returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new + +body = DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload.new({ + name: "Example-Create_a_detection_rule_returns_OK_response", + queries: [ + DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate.new({ + query: "@test:true", + aggregation: DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation::COUNT, + group_by_fields: [], + distinct_fields: [], + metric: "", + }), + ], + filters: [], + cases: [ + DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new({ + name: "", + status: DatadogAPIClient::V2::SecurityMonitoringRuleSeverity::INFO, + condition: "a > 0", + notifications: [], + }), + ], + options: DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new({ + evaluation_window: DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow::FIFTEEN_MINUTES, + keep_alive: DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive::ONE_HOUR, + max_signal_duration: DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration::ONE_DAY, + }), + message: "Test rule", + tags: [], + is_enabled: true, +}) +p api_instance.create_security_monitoring_rule(body) diff --git a/examples/v2/cloud-siem/CreateSecurityMonitoringRule_498211763.rb b/examples/v2/cloud-siem/CreateSecurityMonitoringRule_498211763.rb new file mode 100644 index 000000000000..07773309abb8 --- /dev/null +++ b/examples/v2/cloud-siem/CreateSecurityMonitoringRule_498211763.rb @@ -0,0 +1,36 @@ +# Create a detection rule with type 'workload_security' returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new + +body = DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload.new({ + name: "Example-Create_a_detection_rule_with_type_workload_security_returns_OK_response", + queries: [ + DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate.new({ + query: "@test:true", + aggregation: DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation::COUNT, + group_by_fields: [], + distinct_fields: [], + metric: "", + }), + ], + filters: [], + cases: [ + DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new({ + name: "", + status: DatadogAPIClient::V2::SecurityMonitoringRuleSeverity::INFO, + condition: "a > 0", + notifications: [], + }), + ], + options: DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new({ + evaluation_window: DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow::FIFTEEN_MINUTES, + keep_alive: DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive::ONE_HOUR, + max_signal_duration: DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration::ONE_DAY, + }), + message: "Test rule", + tags: [], + is_enabled: true, + type: DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate::WORKLOAD_SECURITY, +}) +p api_instance.create_security_monitoring_rule(body) diff --git a/examples/v2/cloud-siem/DeleteSecurityFilter_555029489.rb b/examples/v2/cloud-siem/DeleteSecurityFilter_555029489.rb new file mode 100644 index 000000000000..88c20a0868ba --- /dev/null +++ b/examples/v2/cloud-siem/DeleteSecurityFilter_555029489.rb @@ -0,0 +1,8 @@ +# Delete a security filter returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new + +# there is a valid "security_filter" in the system +SECURITY_FILTER_DATA_ID = ENV["SECURITY_FILTER_DATA_ID"] +api_instance.delete_security_filter(SECURITY_FILTER_DATA_ID) diff --git a/examples/v2/cloud-siem/DeleteSecurityMonitoringRule.rb b/examples/v2/cloud-siem/DeleteSecurityMonitoringRule.rb new file mode 100644 index 000000000000..e75d77ccd215 --- /dev/null +++ b/examples/v2/cloud-siem/DeleteSecurityMonitoringRule.rb @@ -0,0 +1,8 @@ +# Delete an existing rule returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new + +# there is a valid "security_rule" in the system +SECURITY_RULE_ID = ENV["SECURITY_RULE_ID"] +api_instance.delete_security_monitoring_rule(SECURITY_RULE_ID) diff --git a/examples/v2/cloud-siem/GetSecurityFilter.rb b/examples/v2/cloud-siem/GetSecurityFilter.rb new file mode 100644 index 000000000000..ae010be622ea --- /dev/null +++ b/examples/v2/cloud-siem/GetSecurityFilter.rb @@ -0,0 +1,8 @@ +# Get a security filter returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new + +# there is a valid "security_filter" in the system +SECURITY_FILTER_DATA_ID = ENV["SECURITY_FILTER_DATA_ID"] +p api_instance.get_security_filter(SECURITY_FILTER_DATA_ID) diff --git a/examples/v2/cloud-siem/ListSecurityFilters.rb b/examples/v2/cloud-siem/ListSecurityFilters.rb new file mode 100644 index 000000000000..a8c766d05717 --- /dev/null +++ b/examples/v2/cloud-siem/ListSecurityFilters.rb @@ -0,0 +1,5 @@ +# Get all security filters returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new +p api_instance.list_security_filters() diff --git a/examples/v2/cloud-siem/UpdateSecurityFilter.rb b/examples/v2/cloud-siem/UpdateSecurityFilter.rb new file mode 100644 index 000000000000..e8820222ad06 --- /dev/null +++ b/examples/v2/cloud-siem/UpdateSecurityFilter.rb @@ -0,0 +1,22 @@ +# Update a security filter returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new + +# there is a valid "security_filter" in the system +SECURITY_FILTER_DATA_ID = ENV["SECURITY_FILTER_DATA_ID"] + +body = DatadogAPIClient::V2::SecurityFilterUpdateRequest.new({ + data: DatadogAPIClient::V2::SecurityFilterUpdateData.new({ + attributes: DatadogAPIClient::V2::SecurityFilterUpdateAttributes.new({ + exclusion_filters: [], + filtered_data_type: DatadogAPIClient::V2::SecurityFilterFilteredDataType::LOGS, + is_enabled: true, + name: "Example-Update_a_security_filter_returns_OK_response", + query: "service:ExampleUpdateasecurityfilterreturnsOKresponse", + version: 1, + }), + type: DatadogAPIClient::V2::SecurityFilterType::SECURITY_FILTERS, + }), +}) +p api_instance.update_security_filter(SECURITY_FILTER_DATA_ID, body) diff --git a/features/v2/cloud_siem.feature b/features/v2/cloud_siem.feature new file mode 100644 index 000000000000..3bbd76011ed0 --- /dev/null +++ b/features/v2/cloud_siem.feature @@ -0,0 +1,230 @@ +@endpoint(cloud-siem) @endpoint(cloud-siem-v2) +Feature: Cloud SIEM + **Note**: Datadog Security Monitoring is now [Datadog Cloud + SIEM](https://docs.datadoghq.com/security_platform/cloud_siem/). Detection + rules for generating signals and listing of generated signals. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CloudSIEM" API + + @team:DataDog/security-monitoring + Scenario: Create a detection rule returns "Bad Request" response + Given new "CreateSecurityMonitoringRule" request + And body with value {"name":"{{ unique }}", "queries":[{"query":""}],"cases":[{"status":"info"}],"options":{},"message":"Test rule","tags":[],"isEnabled":true} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/security-monitoring + Scenario: Create a detection rule returns "OK" response + Given new "CreateSecurityMonitoringRule" request + And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"metric":""}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/security-monitoring + Scenario: Create a detection rule with type 'workload_security' returns "OK" response + Given new "CreateSecurityMonitoringRule" request + And body with value {"name":"{{ unique }}", "queries":[{"query":"@test:true","aggregation":"count","groupByFields":[],"distinctFields":[],"metric":""}],"filters":[],"cases":[{"name":"","status":"info","condition":"a > 0","notifications":[]}],"options":{"evaluationWindow":900,"keepAlive":3600,"maxSignalDuration":86400},"message":"Test rule","tags":[],"isEnabled":true, "type": "workload_security"} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/security-monitoring + Scenario: Create a security filter returns "Bad Request" response + Given new "CreateSecurityFilter" request + And body with value {"data": {"attributes": {"exclusion_filters": [{"name": "Exclude staging", "query": "source:staging"}], "filtered_data_type": "logs", "is_enabled": true, "name": "Custom security filter", "query": "service:api"}, "type": "security_filters"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/security-monitoring + Scenario: Create a security filter returns "Conflict" response + Given new "CreateSecurityFilter" request + And body with value {"data": {"attributes": {"exclusion_filters": [{"name": "Exclude staging", "query": "source:staging"}], "filtered_data_type": "logs", "is_enabled": true, "name": "Custom security filter", "query": "service:api"}, "type": "security_filters"}} + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/security-monitoring + Scenario: Create a security filter returns "OK" response + Given new "CreateSecurityFilter" request + And body with value {"data": {"attributes": {"exclusion_filters": [{"name": "Exclude staging", "query": "source:staging"}], "filtered_data_type": "logs", "is_enabled": true, "name": "{{ unique }}", "query": "service:{{ unique_alnum }}"}, "type": "security_filters"}} + When the request is sent + Then the response status is 200 OK + + @skip @team:DataDog/security-monitoring + Scenario: Delete a non existing rule returns "Not Found" response + Given new "DeleteSecurityMonitoringRule" request + And request contains "rule_id" parameter with value "ThisRuleIdProbablyDoesntExist" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/security-monitoring + Scenario: Delete a security filter returns "No Content" response + Given there is a valid "security_filter" in the system + And new "DeleteSecurityFilter" request + And request contains "security_filter_id" parameter from "security_filter.data.id" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/security-monitoring + Scenario: Delete a security filter returns "Not Found" response + Given new "DeleteSecurityFilter" request + And request contains "security_filter_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/security-monitoring + Scenario: Delete a security filter returns "OK" response + Given new "DeleteSecurityFilter" request + And request contains "security_filter_id" parameter from "" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/security-monitoring + Scenario: Delete an existing rule returns "Not Found" response + Given new "DeleteSecurityMonitoringRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/security-monitoring + Scenario: Delete an existing rule returns "OK" response + Given there is a valid "security_rule" in the system + And new "DeleteSecurityMonitoringRule" request + And request contains "rule_id" parameter from "security_rule.id" + When the request is sent + Then the response status is 204 OK + + @generated @skip @team:DataDog/security-monitoring + Scenario: Get a list of security signals returns "Bad Request" response + Given operation "SearchSecurityMonitoringSignals" enabled + And new "SearchSecurityMonitoringSignals" request + And body with value {"filter": {"from": "2019-01-02T09:42:36.320Z", "query": "security:attack status:high", "to": "2019-01-03T09:42:36.320Z"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/security-monitoring + Scenario: Get a list of security signals returns "OK" response + Given operation "SearchSecurityMonitoringSignals" enabled + And new "SearchSecurityMonitoringSignals" request + And body with value {"filter": {"from": "2019-01-02T09:42:36.320Z", "query": "security:attack status:high", "to": "2019-01-03T09:42:36.320Z"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/security-monitoring + Scenario: Get a quick list of security signals returns "Bad Request" response + Given operation "ListSecurityMonitoringSignals" enabled + And new "ListSecurityMonitoringSignals" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/security-monitoring + Scenario: Get a quick list of security signals returns "OK" response + Given operation "ListSecurityMonitoringSignals" enabled + And new "ListSecurityMonitoringSignals" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/security-monitoring + Scenario: Get a rule's details returns "Not Found" response + Given new "GetSecurityMonitoringRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/security-monitoring + Scenario: Get a rule's details returns "OK" response + Given new "GetSecurityMonitoringRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/security-monitoring + Scenario: Get a security filter returns "Not Found" response + Given new "GetSecurityFilter" request + And request contains "security_filter_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/security-monitoring + Scenario: Get a security filter returns "OK" response + Given there is a valid "security_filter" in the system + And new "GetSecurityFilter" request + And request contains "security_filter_id" parameter from "security_filter.data.id" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/security-monitoring + Scenario: Get all security filters returns "OK" response + Given new "ListSecurityFilters" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/security-monitoring + Scenario: List rules returns "Bad Request" response + Given new "ListSecurityMonitoringRules" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/security-monitoring + Scenario: List rules returns "OK" response + Given new "ListSecurityMonitoringRules" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/security-monitoring + Scenario: Update a security filter returns "Bad Request" response + Given new "UpdateSecurityFilter" request + And request contains "security_filter_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"exclusion_filters": [], "filtered_data_type": "logs", "is_enabled": true, "name": "Custom security filter", "query": "service:api", "version": 1}, "type": "security_filters"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/security-monitoring + Scenario: Update a security filter returns "Concurrent Modification" response + Given new "UpdateSecurityFilter" request + And request contains "security_filter_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"exclusion_filters": [], "filtered_data_type": "logs", "is_enabled": true, "name": "Custom security filter", "query": "service:api", "version": 1}, "type": "security_filters"}} + When the request is sent + Then the response status is 409 Concurrent Modification + + @generated @skip @team:DataDog/security-monitoring + Scenario: Update a security filter returns "Not Found" response + Given new "UpdateSecurityFilter" request + And request contains "security_filter_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"exclusion_filters": [], "filtered_data_type": "logs", "is_enabled": true, "name": "Custom security filter", "query": "service:api", "version": 1}, "type": "security_filters"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/security-monitoring + Scenario: Update a security filter returns "OK" response + Given new "UpdateSecurityFilter" request + And there is a valid "security_filter" in the system + And request contains "security_filter_id" parameter from "security_filter.data.id" + And body with value {"data": {"attributes": {"exclusion_filters": [], "filtered_data_type": "logs", "is_enabled": true, "name": "{{ unique }}", "query": "service:{{ unique_alnum }}", "version": 1}, "type": "security_filters"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/security-monitoring + Scenario: Update an existing rule returns "Bad Request" response + Given new "UpdateSecurityMonitoringRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"cases": [{"condition": null, "name": null, "notifications": [null], "status": "critical"}], "filters": [{"action": "require", "query": null}], "hasExtendedTitle": true, "isEnabled": null, "message": null, "name": null, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0}}, "queries": [{"aggregation": "count", "distinctFields": [null], "groupByFields": [null], "metric": null, "name": null, "query": null}], "tags": [null], "version": 1} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/security-monitoring + Scenario: Update an existing rule returns "Not Found" response + Given new "UpdateSecurityMonitoringRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"cases": [{"condition": null, "name": null, "notifications": [null], "status": "critical"}], "filters": [{"action": "require", "query": null}], "hasExtendedTitle": true, "isEnabled": null, "message": null, "name": null, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0}}, "queries": [{"aggregation": "count", "distinctFields": [null], "groupByFields": [null], "metric": null, "name": null, "query": null}], "tags": [null], "version": 1} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/security-monitoring + Scenario: Update an existing rule returns "OK" response + Given new "UpdateSecurityMonitoringRule" request + And request contains "rule_id" parameter from "REPLACE.ME" + And body with value {"cases": [{"condition": null, "name": null, "notifications": [null], "status": "critical"}], "filters": [{"action": "require", "query": null}], "hasExtendedTitle": true, "isEnabled": null, "message": null, "name": null, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0}}, "queries": [{"aggregation": "count", "distinctFields": [null], "groupByFields": [null], "metric": null, "name": null, "query": null}], "tags": [null], "version": 1} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/given.json b/features/v2/given.json index 96ec90d5b013..1964b68e27d9 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -135,7 +135,7 @@ ], "step": "there is a valid \"security_filter\" in the system", "key": "security_filter", - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "operationId": "CreateSecurityFilter" }, { @@ -147,7 +147,7 @@ ], "step": "there is a valid \"security_rule\" in the system", "key": "security_rule", - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "operationId": "CreateSecurityMonitoringRule" }, { diff --git a/features/v2/undo.json b/features/v2/undo.json index 87b3ef53d95c..57cfc4053c18 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -477,13 +477,13 @@ } }, "ListSecurityFilters": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "type": "safe" } }, "CreateSecurityFilter": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "operationId": "DeleteSecurityFilter", "parameters": [ @@ -496,31 +496,31 @@ } }, "DeleteSecurityFilter": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "type": "idempotent" } }, "GetSecurityFilter": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "type": "safe" } }, "UpdateSecurityFilter": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "type": "idempotent" } }, "ListSecurityMonitoringRules": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "type": "safe" } }, "CreateSecurityMonitoringRule": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "operationId": "DeleteSecurityMonitoringRule", "parameters": [ @@ -533,31 +533,31 @@ } }, "DeleteSecurityMonitoringRule": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "type": "idempotent" } }, "GetSecurityMonitoringRule": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "type": "safe" } }, "UpdateSecurityMonitoringRule": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "type": "idempotent" } }, "ListSecurityMonitoringSignals": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "type": "safe" } }, "SearchSecurityMonitoringSignals": { - "tag": "Security Monitoring", + "tag": "Cloud SIEM", "undo": { "type": "safe" } diff --git a/lib/datadog_api_client/v2.rb b/lib/datadog_api_client/v2.rb index 4f24764f04d6..e4bbf24da252 100644 --- a/lib/datadog_api_client/v2.rb +++ b/lib/datadog_api_client/v2.rb @@ -369,6 +369,7 @@ require 'datadog_api_client/v2/models/users_type' # APIs +require 'datadog_api_client/v2/api/cloud_siem_api' require 'datadog_api_client/v2/api/cloud_workload_security_api' require 'datadog_api_client/v2/api/dashboard_lists_api' require 'datadog_api_client/v2/api/incident_services_api' @@ -381,7 +382,6 @@ require 'datadog_api_client/v2/api/metrics_api' require 'datadog_api_client/v2/api/processes_api' require 'datadog_api_client/v2/api/roles_api' -require 'datadog_api_client/v2/api/security_monitoring_api' require 'datadog_api_client/v2/api/service_accounts_api' require 'datadog_api_client/v2/api/users_api' diff --git a/lib/datadog_api_client/v2/api/cloud_siem_api.rb b/lib/datadog_api_client/v2/api/cloud_siem_api.rb new file mode 100644 index 000000000000..1c2440c5c0cd --- /dev/null +++ b/lib/datadog_api_client/v2/api/cloud_siem_api.rb @@ -0,0 +1,929 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'cgi' + +module DatadogAPIClient::V2 + class CloudSIEMAPI + attr_accessor :api_client + + def initialize(api_client = APIClient.default) + @api_client = api_client + end + # Create a security filter + # Create a security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. + # @param body [SecurityFilterCreateRequest] The definition of the new security filter. + # @param [Hash] opts the optional parameters + # @return [SecurityFilterResponse] + def create_security_filter(body, opts = {}) + data, _status_code, _headers = create_security_filter_with_http_info(body, opts) + data + end + + # Create a security filter + # Create a security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. + # @param body [SecurityFilterCreateRequest] The definition of the new security filter. + # @param [Hash] opts the optional parameters + # @return [Array<(SecurityFilterResponse, Integer, Hash)>] SecurityFilterResponse data, response status code and response headers + def create_security_filter_with_http_info(body, opts = {}) + + if @api_client.config.unstable_operations.has_key?(:create_security_filter) + unstable_enabled = @api_client.config.unstable_operations[:create_security_filter] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "create_security_filter") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_security_filter")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.create_security_filter ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudSIEMAPI.create_security_filter" + end + # resource path + local_var_path = '/api/v2/security_monitoring/configuration/security_filters' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'SecurityFilterResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_security_filter, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#create_security_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Create a detection rule + # Create a detection rule. + # @param body [SecurityMonitoringRuleCreatePayload] + # @param [Hash] opts the optional parameters + # @return [SecurityMonitoringRuleResponse] + def create_security_monitoring_rule(body, opts = {}) + data, _status_code, _headers = create_security_monitoring_rule_with_http_info(body, opts) + data + end + + # Create a detection rule + # Create a detection rule. + # @param body [SecurityMonitoringRuleCreatePayload] + # @param [Hash] opts the optional parameters + # @return [Array<(SecurityMonitoringRuleResponse, Integer, Hash)>] SecurityMonitoringRuleResponse data, response status code and response headers + def create_security_monitoring_rule_with_http_info(body, opts = {}) + + if @api_client.config.unstable_operations.has_key?(:create_security_monitoring_rule) + unstable_enabled = @api_client.config.unstable_operations[:create_security_monitoring_rule] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "create_security_monitoring_rule") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "create_security_monitoring_rule")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.create_security_monitoring_rule ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudSIEMAPI.create_security_monitoring_rule" + end + # resource path + local_var_path = '/api/v2/security_monitoring/rules' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'SecurityMonitoringRuleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_security_monitoring_rule, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#create_security_monitoring_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a security filter + # Delete a specific security filter. + # @param security_filter_id [String] The ID of the security filter. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_security_filter(security_filter_id, opts = {}) + delete_security_filter_with_http_info(security_filter_id, opts) + nil + end + + # Delete a security filter + # Delete a specific security filter. + # @param security_filter_id [String] The ID of the security filter. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_security_filter_with_http_info(security_filter_id, opts = {}) + + if @api_client.config.unstable_operations.has_key?(:delete_security_filter) + unstable_enabled = @api_client.config.unstable_operations[:delete_security_filter] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_security_filter") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_security_filter")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.delete_security_filter ...' + end + # verify the required parameter 'security_filter_id' is set + if @api_client.config.client_side_validation && security_filter_id.nil? + fail ArgumentError, "Missing the required parameter 'security_filter_id' when calling CloudSIEMAPI.delete_security_filter" + end + # resource path + local_var_path = '/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}'.sub('{' + 'security_filter_id' + '}', CGI.escape(security_filter_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_security_filter, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#delete_security_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete an existing rule + # Delete an existing rule. Default rules cannot be deleted. + # @param rule_id [String] The ID of the rule. + # @param [Hash] opts the optional parameters + # @return [nil] + def delete_security_monitoring_rule(rule_id, opts = {}) + delete_security_monitoring_rule_with_http_info(rule_id, opts) + nil + end + + # Delete an existing rule + # Delete an existing rule. Default rules cannot be deleted. + # @param rule_id [String] The ID of the rule. + # @param [Hash] opts the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_security_monitoring_rule_with_http_info(rule_id, opts = {}) + + if @api_client.config.unstable_operations.has_key?(:delete_security_monitoring_rule) + unstable_enabled = @api_client.config.unstable_operations[:delete_security_monitoring_rule] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "delete_security_monitoring_rule") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "delete_security_monitoring_rule")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.delete_security_monitoring_rule ...' + end + # verify the required parameter 'rule_id' is set + if @api_client.config.client_side_validation && rule_id.nil? + fail ArgumentError, "Missing the required parameter 'rule_id' when calling CloudSIEMAPI.delete_security_monitoring_rule" + end + # resource path + local_var_path = '/api/v2/security_monitoring/rules/{rule_id}'.sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_security_monitoring_rule, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#delete_security_monitoring_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a security filter + # Get the details of a specific security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. + # @param security_filter_id [String] The ID of the security filter. + # @param [Hash] opts the optional parameters + # @return [SecurityFilterResponse] + def get_security_filter(security_filter_id, opts = {}) + data, _status_code, _headers = get_security_filter_with_http_info(security_filter_id, opts) + data + end + + # Get a security filter + # Get the details of a specific security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. + # @param security_filter_id [String] The ID of the security filter. + # @param [Hash] opts the optional parameters + # @return [Array<(SecurityFilterResponse, Integer, Hash)>] SecurityFilterResponse data, response status code and response headers + def get_security_filter_with_http_info(security_filter_id, opts = {}) + + if @api_client.config.unstable_operations.has_key?(:get_security_filter) + unstable_enabled = @api_client.config.unstable_operations[:get_security_filter] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "get_security_filter") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_security_filter")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.get_security_filter ...' + end + # verify the required parameter 'security_filter_id' is set + if @api_client.config.client_side_validation && security_filter_id.nil? + fail ArgumentError, "Missing the required parameter 'security_filter_id' when calling CloudSIEMAPI.get_security_filter" + end + # resource path + local_var_path = '/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}'.sub('{' + 'security_filter_id' + '}', CGI.escape(security_filter_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SecurityFilterResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_security_filter, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#get_security_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a rule's details + # Get a rule's details. + # @param rule_id [String] The ID of the rule. + # @param [Hash] opts the optional parameters + # @return [SecurityMonitoringRuleResponse] + def get_security_monitoring_rule(rule_id, opts = {}) + data, _status_code, _headers = get_security_monitoring_rule_with_http_info(rule_id, opts) + data + end + + # Get a rule's details + # Get a rule's details. + # @param rule_id [String] The ID of the rule. + # @param [Hash] opts the optional parameters + # @return [Array<(SecurityMonitoringRuleResponse, Integer, Hash)>] SecurityMonitoringRuleResponse data, response status code and response headers + def get_security_monitoring_rule_with_http_info(rule_id, opts = {}) + + if @api_client.config.unstable_operations.has_key?(:get_security_monitoring_rule) + unstable_enabled = @api_client.config.unstable_operations[:get_security_monitoring_rule] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "get_security_monitoring_rule") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "get_security_monitoring_rule")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.get_security_monitoring_rule ...' + end + # verify the required parameter 'rule_id' is set + if @api_client.config.client_side_validation && rule_id.nil? + fail ArgumentError, "Missing the required parameter 'rule_id' when calling CloudSIEMAPI.get_security_monitoring_rule" + end + # resource path + local_var_path = '/api/v2/security_monitoring/rules/{rule_id}'.sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SecurityMonitoringRuleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_security_monitoring_rule, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#get_security_monitoring_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get all security filters + # Get the list of configured security filters with their definitions. + # @param [Hash] opts the optional parameters + # @return [SecurityFiltersResponse] + def list_security_filters(opts = {}) + data, _status_code, _headers = list_security_filters_with_http_info(opts) + data + end + + # Get all security filters + # Get the list of configured security filters with their definitions. + # @param [Hash] opts the optional parameters + # @return [Array<(SecurityFiltersResponse, Integer, Hash)>] SecurityFiltersResponse data, response status code and response headers + def list_security_filters_with_http_info(opts = {}) + + if @api_client.config.unstable_operations.has_key?(:list_security_filters) + unstable_enabled = @api_client.config.unstable_operations[:list_security_filters] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "list_security_filters") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_security_filters")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.list_security_filters ...' + end + # resource path + local_var_path = '/api/v2/security_monitoring/configuration/security_filters' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SecurityFiltersResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_security_filters, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#list_security_filters\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List rules + # List rules. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page_size Size for a given page. (default to 10) + # @option opts [Integer] :page_number Specific page number to return. (default to 0) + # @return [SecurityMonitoringListRulesResponse] + def list_security_monitoring_rules(opts = {}) + data, _status_code, _headers = list_security_monitoring_rules_with_http_info(opts) + data + end + + # List rules + # List rules. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page_size Size for a given page. + # @option opts [Integer] :page_number Specific page number to return. + # @return [Array<(SecurityMonitoringListRulesResponse, Integer, Hash)>] SecurityMonitoringListRulesResponse data, response status code and response headers + def list_security_monitoring_rules_with_http_info(opts = {}) + + if @api_client.config.unstable_operations.has_key?(:list_security_monitoring_rules) + unstable_enabled = @api_client.config.unstable_operations[:list_security_monitoring_rules] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "list_security_monitoring_rules") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_security_monitoring_rules")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.list_security_monitoring_rules ...' + end + # resource path + local_var_path = '/api/v2/security_monitoring/rules' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SecurityMonitoringListRulesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_security_monitoring_rules, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#list_security_monitoring_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a quick list of security signals + # The list endpoint returns security signals that match a search query. Both this endpoint and the POST endpoint can be used interchangeably when listing security signals. + # @param [Hash] opts the optional parameters + # @option opts [String] :filter_query The search query for security signals. + # @option opts [Time] :filter_from The minimum timestamp for requested security signals. + # @option opts [Time] :filter_to The maximum timestamp for requested security signals. + # @option opts [SecurityMonitoringSignalsSort] :sort The order of the security signals in results. + # @option opts [String] :page_cursor A list of results using the cursor provided in the previous query. + # @option opts [Integer] :page_limit The maximum number of security signals in the response. (default to 10) + # @return [SecurityMonitoringSignalsListResponse] + def list_security_monitoring_signals(opts = {}) + data, _status_code, _headers = list_security_monitoring_signals_with_http_info(opts) + data + end + + # Get a quick list of security signals + # The list endpoint returns security signals that match a search query. Both this endpoint and the POST endpoint can be used interchangeably when listing security signals. + # @param [Hash] opts the optional parameters + # @option opts [String] :filter_query The search query for security signals. + # @option opts [Time] :filter_from The minimum timestamp for requested security signals. + # @option opts [Time] :filter_to The maximum timestamp for requested security signals. + # @option opts [SecurityMonitoringSignalsSort] :sort The order of the security signals in results. + # @option opts [String] :page_cursor A list of results using the cursor provided in the previous query. + # @option opts [Integer] :page_limit The maximum number of security signals in the response. + # @return [Array<(SecurityMonitoringSignalsListResponse, Integer, Hash)>] SecurityMonitoringSignalsListResponse data, response status code and response headers + def list_security_monitoring_signals_with_http_info(opts = {}) + + if @api_client.config.unstable_operations.has_key?(:list_security_monitoring_signals) + unstable_enabled = @api_client.config.unstable_operations[:list_security_monitoring_signals] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "list_security_monitoring_signals") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "list_security_monitoring_signals")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.list_security_monitoring_signals ...' + end + if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 1000 + fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling CloudSIEMAPI.list_security_monitoring_signals, must be smaller than or equal to 1000.' + end + + # resource path + local_var_path = '/api/v2/security_monitoring/signals' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[query]'] = opts[:'filter_query'] if !opts[:'filter_query'].nil? + query_params[:'filter[from]'] = opts[:'filter_from'] if !opts[:'filter_from'].nil? + query_params[:'filter[to]'] = opts[:'filter_to'] if !opts[:'filter_to'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil? + query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalsListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_security_monitoring_signals, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#list_security_monitoring_signals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a list of security signals + # Returns security signals that match a search query. Both this endpoint and the GET endpoint can be used interchangeably for listing security signals. + # @param [Hash] opts the optional parameters + # @option opts [SecurityMonitoringSignalListRequest] :body + # @return [SecurityMonitoringSignalsListResponse] + def search_security_monitoring_signals(opts = {}) + data, _status_code, _headers = search_security_monitoring_signals_with_http_info(opts) + data + end + + # Get a list of security signals + # Returns security signals that match a search query. Both this endpoint and the GET endpoint can be used interchangeably for listing security signals. + # @param [Hash] opts the optional parameters + # @option opts [SecurityMonitoringSignalListRequest] :body + # @return [Array<(SecurityMonitoringSignalsListResponse, Integer, Hash)>] SecurityMonitoringSignalsListResponse data, response status code and response headers + def search_security_monitoring_signals_with_http_info(opts = {}) + + if @api_client.config.unstable_operations.has_key?(:search_security_monitoring_signals) + unstable_enabled = @api_client.config.unstable_operations[:search_security_monitoring_signals] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "search_security_monitoring_signals") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "search_security_monitoring_signals")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.search_security_monitoring_signals ...' + end + # resource path + local_var_path = '/api/v2/security_monitoring/signals/search' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body']) + + # return_type + return_type = opts[:debug_return_type] || 'SecurityMonitoringSignalsListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :search_security_monitoring_signals, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#search_security_monitoring_signals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update a security filter + # Update a specific security filter. Returns the security filter object when the request is successful. + # @param security_filter_id [String] The ID of the security filter. + # @param body [SecurityFilterUpdateRequest] New definition of the security filter. + # @param [Hash] opts the optional parameters + # @return [SecurityFilterResponse] + def update_security_filter(security_filter_id, body, opts = {}) + data, _status_code, _headers = update_security_filter_with_http_info(security_filter_id, body, opts) + data + end + + # Update a security filter + # Update a specific security filter. Returns the security filter object when the request is successful. + # @param security_filter_id [String] The ID of the security filter. + # @param body [SecurityFilterUpdateRequest] New definition of the security filter. + # @param [Hash] opts the optional parameters + # @return [Array<(SecurityFilterResponse, Integer, Hash)>] SecurityFilterResponse data, response status code and response headers + def update_security_filter_with_http_info(security_filter_id, body, opts = {}) + + if @api_client.config.unstable_operations.has_key?(:update_security_filter) + unstable_enabled = @api_client.config.unstable_operations[:update_security_filter] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "update_security_filter") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_security_filter")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.update_security_filter ...' + end + # verify the required parameter 'security_filter_id' is set + if @api_client.config.client_side_validation && security_filter_id.nil? + fail ArgumentError, "Missing the required parameter 'security_filter_id' when calling CloudSIEMAPI.update_security_filter" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudSIEMAPI.update_security_filter" + end + # resource path + local_var_path = '/api/v2/security_monitoring/configuration/security_filters/{security_filter_id}'.sub('{' + 'security_filter_id' + '}', CGI.escape(security_filter_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'SecurityFilterResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_security_filter, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#update_security_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update an existing rule + # Update an existing rule. When updating `cases`, `queries` or `options`, the whole field must be included. For example, when modifying a query all queries must be included. Default rules can only be updated to be enabled and to change notifications. + # @param rule_id [String] The ID of the rule. + # @param body [SecurityMonitoringRuleUpdatePayload] + # @param [Hash] opts the optional parameters + # @return [SecurityMonitoringRuleResponse] + def update_security_monitoring_rule(rule_id, body, opts = {}) + data, _status_code, _headers = update_security_monitoring_rule_with_http_info(rule_id, body, opts) + data + end + + # Update an existing rule + # Update an existing rule. When updating `cases`, `queries` or `options`, the whole field must be included. For example, when modifying a query all queries must be included. Default rules can only be updated to be enabled and to change notifications. + # @param rule_id [String] The ID of the rule. + # @param body [SecurityMonitoringRuleUpdatePayload] + # @param [Hash] opts the optional parameters + # @return [Array<(SecurityMonitoringRuleResponse, Integer, Hash)>] SecurityMonitoringRuleResponse data, response status code and response headers + def update_security_monitoring_rule_with_http_info(rule_id, body, opts = {}) + + if @api_client.config.unstable_operations.has_key?(:update_security_monitoring_rule) + unstable_enabled = @api_client.config.unstable_operations[:update_security_monitoring_rule] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "update_security_monitoring_rule") + else + raise APIError.new(message: format("Unstable operation '%s' is disabled", "update_security_monitoring_rule")) + end + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CloudSIEMAPI.update_security_monitoring_rule ...' + end + # verify the required parameter 'rule_id' is set + if @api_client.config.client_side_validation && rule_id.nil? + fail ArgumentError, "Missing the required parameter 'rule_id' when calling CloudSIEMAPI.update_security_monitoring_rule" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CloudSIEMAPI.update_security_monitoring_rule" + end + # resource path + local_var_path = '/api/v2/security_monitoring/rules/{rule_id}'.sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'SecurityMonitoringRuleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:AuthZ, :apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_security_monitoring_rule, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CloudSIEMAPI#update_security_monitoring_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/configuration.rb b/lib/datadog_api_client/v2/configuration.rb index ccda942dbbfa..4707faaa5c7b 100644 --- a/lib/datadog_api_client/v2/configuration.rb +++ b/lib/datadog_api_client/v2/configuration.rb @@ -169,6 +169,8 @@ def initialize @compress = true @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) @unstable_operations = { + list_security_monitoring_signals: false, + search_security_monitoring_signals: false, create_incident_service: false, delete_incident_service: false, get_incident_service: false, @@ -189,8 +191,6 @@ def initialize list_tag_configuration_by_name: false, list_tag_configurations: false, update_tag_configuration: false, - list_security_monitoring_signals: false, - search_security_monitoring_signals: false, } @server_variables[:site] = ENV['DD_SITE'] if ENV.key? 'DD_SITE' @api_key['apiKeyAuth'] = ENV['DD_API_KEY'] if ENV.key? 'DD_API_KEY' diff --git a/lib/datadog_api_client/v2/models/security_monitoring_filter.rb b/lib/datadog_api_client/v2/models/security_monitoring_filter.rb new file mode 100644 index 000000000000..22f96f03aebe --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_filter.rb @@ -0,0 +1,242 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # The rule's suppression filter. + class SecurityMonitoringFilter + # whether the object has unparsed attributes + attr_accessor :_unparsed + + attr_accessor :action + + # Query for selecting logs to apply the filtering action. + attr_accessor :query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'action' => :'action', + :'query' => :'query' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'action' => :'SecurityMonitoringFilterAction', + :'query' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringFilter` 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::V2::SecurityMonitoringFilter`. 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?(:'action') + self.action = attributes[:'action'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + action == o.action && + query == o.query + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [action, query].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_filter_action.rb b/lib/datadog_api_client/v2/models/security_monitoring_filter_action.rb new file mode 100644 index 000000000000..5c6ae988bdd1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_filter_action.rb @@ -0,0 +1,39 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringFilterAction + REQUIRE = "require".freeze + SUPPRESS = "suppress".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringFilterAction.constants.select { |c| SecurityMonitoringFilterAction::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb new file mode 100644 index 000000000000..3c0e48d6d0fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_list_rules_response.rb @@ -0,0 +1,244 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # List of rules. + class SecurityMonitoringListRulesResponse + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # Array containing the list of rules. + attr_accessor :data + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array', + :'meta' => :'ResponseMetaAttributes' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringListRulesResponse` 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::V2::SecurityMonitoringListRulesResponse`. 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?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + meta == o.meta + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data, meta].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb new file mode 100644 index 000000000000..d5e6e5855271 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_case.rb @@ -0,0 +1,264 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Case when signal is generated. + class SecurityMonitoringRuleCase + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # A rule case contains logical operations (`>`,`>=`, `&&`, `||`) to determine if a signal should be generated based on the event counts in the previously defined queries. + attr_accessor :condition + + # Name of the case. + attr_accessor :name + + # Notification targets for each rule case. + attr_accessor :notifications + + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'condition' => :'condition', + :'name' => :'name', + :'notifications' => :'notifications', + :'status' => :'status' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'condition' => :'String', + :'name' => :'String', + :'notifications' => :'Array', + :'status' => :'SecurityMonitoringRuleSeverity' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleCase` 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::V2::SecurityMonitoringRuleCase`. 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'notifications') + if (value = attributes[:'notifications']).is_a?(Array) + self.notifications = value + end + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + condition == o.condition && + name == o.name && + notifications == o.notifications && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [condition, name, notifications, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb new file mode 100644 index 000000000000..a4179d97f1e3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_case_create.rb @@ -0,0 +1,269 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Case when signal is generated. + class SecurityMonitoringRuleCaseCreate + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # A rule case contains logical operations (`>`,`>=`, `&&`, `||`) to determine if a signal should be generated based on the event counts in the previously defined queries. + attr_accessor :condition + + # Name of the case. + attr_accessor :name + + # Notification targets for each rule case. + attr_accessor :notifications + + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'condition' => :'condition', + :'name' => :'name', + :'notifications' => :'notifications', + :'status' => :'status' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'condition' => :'String', + :'name' => :'String', + :'notifications' => :'Array', + :'status' => :'SecurityMonitoringRuleSeverity' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate` 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::V2::SecurityMonitoringRuleCaseCreate`. 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?(:'condition') + self.condition = attributes[:'condition'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'notifications') + if (value = attributes[:'notifications']).is_a?(Array) + self.notifications = value + end + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @status.nil? + invalid_properties.push('invalid value for "status", status cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @status.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + condition == o.condition && + name == o.name && + notifications == o.notifications && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [condition, name, notifications, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb new file mode 100644 index 000000000000..539e25acc3ea --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_create_payload.rb @@ -0,0 +1,359 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Create a new rule. + class SecurityMonitoringRuleCreatePayload + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # Cases for generating signals. + attr_accessor :cases + + # Additional queries to filter matched events before they are processed. + attr_accessor :filters + + # Whether the notifications include the triggering group-by values in their title. + attr_accessor :has_extended_title + + # Whether the rule is enabled. + attr_accessor :is_enabled + + # Message for generated signals. + attr_accessor :message + + # The name of the rule. + attr_accessor :name + + attr_accessor :options + + # Queries for selecting logs which are part of the rule. + attr_accessor :queries + + # Tags for generated signals. + attr_accessor :tags + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cases' => :'cases', + :'filters' => :'filters', + :'has_extended_title' => :'hasExtendedTitle', + :'is_enabled' => :'isEnabled', + :'message' => :'message', + :'name' => :'name', + :'options' => :'options', + :'queries' => :'queries', + :'tags' => :'tags', + :'type' => :'type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'cases' => :'Array', + :'filters' => :'Array', + :'has_extended_title' => :'Boolean', + :'is_enabled' => :'Boolean', + :'message' => :'String', + :'name' => :'String', + :'options' => :'SecurityMonitoringRuleOptions', + :'queries' => :'Array', + :'tags' => :'Array', + :'type' => :'SecurityMonitoringRuleTypeCreate' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload` 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::V2::SecurityMonitoringRuleCreatePayload`. 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?(:'cases') + if (value = attributes[:'cases']).is_a?(Array) + self.cases = value + end + end + + if attributes.key?(:'filters') + if (value = attributes[:'filters']).is_a?(Array) + self.filters = value + end + end + + if attributes.key?(:'has_extended_title') + self.has_extended_title = attributes[:'has_extended_title'] + end + + if attributes.key?(:'is_enabled') + self.is_enabled = attributes[:'is_enabled'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'options') + self.options = attributes[:'options'] + end + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @cases.nil? + invalid_properties.push('invalid value for "cases", cases cannot be nil.') + end + + if @is_enabled.nil? + invalid_properties.push('invalid value for "is_enabled", is_enabled cannot be nil.') + end + + if @message.nil? + invalid_properties.push('invalid value for "message", message cannot be nil.') + end + + if @name.nil? + invalid_properties.push('invalid value for "name", name cannot be nil.') + end + + if @options.nil? + invalid_properties.push('invalid value for "options", options cannot be nil.') + end + + if @queries.nil? + invalid_properties.push('invalid value for "queries", queries cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @cases.nil? + return false if @is_enabled.nil? + return false if @message.nil? + return false if @name.nil? + return false if @options.nil? + return false if @queries.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cases == o.cases && + filters == o.filters && + has_extended_title == o.has_extended_title && + is_enabled == o.is_enabled && + message == o.message && + name == o.name && + options == o.options && + queries == o.queries && + tags == o.tags && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cases, filters, has_extended_title, is_enabled, message, name, options, queries, tags, type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb new file mode 100644 index 000000000000..e8b642747838 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_detection_method.rb @@ -0,0 +1,40 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringRuleDetectionMethod + THRESHOLD = "threshold".freeze + NEW_VALUE = "new_value".freeze + ANOMALY_DETECTION = "anomaly_detection".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringRuleDetectionMethod.constants.select { |c| SecurityMonitoringRuleDetectionMethod::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb new file mode 100644 index 000000000000..f698dec4f89d --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb @@ -0,0 +1,45 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringRuleEvaluationWindow + ZERO_MINUTES = 0.freeze + ONE_MINUTE = 60.freeze + FIVE_MINUTES = 300.freeze + TEN_MINUTES = 600.freeze + FIFTEEN_MINUTES = 900.freeze + THIRTY_MINUTES = 1800.freeze + ONE_HOUR = 3600.freeze + TWO_HOURS = 7200.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringRuleEvaluationWindow.constants.select { |c| SecurityMonitoringRuleEvaluationWindow::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb new file mode 100644 index 000000000000..8439d99370e3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_keep_alive.rb @@ -0,0 +1,47 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringRuleKeepAlive + ZERO_MINUTES = 0.freeze + ONE_MINUTE = 60.freeze + FIVE_MINUTES = 300.freeze + TEN_MINUTES = 600.freeze + FIFTEEN_MINUTES = 900.freeze + THIRTY_MINUTES = 1800.freeze + ONE_HOUR = 3600.freeze + TWO_HOURS = 7200.freeze + THREE_HOURS = 10800.freeze + SIX_HOURS = 21600.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringRuleKeepAlive.constants.select { |c| SecurityMonitoringRuleKeepAlive::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_max_signal_duration.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_max_signal_duration.rb new file mode 100644 index 000000000000..22fa87ef37e4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_max_signal_duration.rb @@ -0,0 +1,49 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringRuleMaxSignalDuration + ZERO_MINUTES = 0.freeze + ONE_MINUTE = 60.freeze + FIVE_MINUTES = 300.freeze + TEN_MINUTES = 600.freeze + FIFTEEN_MINUTES = 900.freeze + THIRTY_MINUTES = 1800.freeze + ONE_HOUR = 3600.freeze + TWO_HOURS = 7200.freeze + THREE_HOURS = 10800.freeze + SIX_HOURS = 21600.freeze + TWELVE_HOURS = 43200.freeze + ONE_DAY = 86400.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringRuleMaxSignalDuration.constants.select { |c| SecurityMonitoringRuleMaxSignalDuration::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb new file mode 100644 index 000000000000..d4f3a061767d --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options.rb @@ -0,0 +1,241 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Options on new value rules. + class SecurityMonitoringRuleNewValueOptions + # whether the object has unparsed attributes + attr_accessor :_unparsed + + attr_accessor :forget_after + + attr_accessor :learning_duration + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'forget_after' => :'forgetAfter', + :'learning_duration' => :'learningDuration' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'forget_after' => :'SecurityMonitoringRuleNewValueOptionsForgetAfter', + :'learning_duration' => :'SecurityMonitoringRuleNewValueOptionsLearningDuration' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions` 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::V2::SecurityMonitoringRuleNewValueOptions`. 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?(:'forget_after') + self.forget_after = attributes[:'forget_after'] + end + + if attributes.key?(:'learning_duration') + self.learning_duration = attributes[:'learning_duration'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + forget_after == o.forget_after && + learning_duration == o.learning_duration + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [forget_after, learning_duration].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb new file mode 100644 index 000000000000..c3c3bddbb63f --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb @@ -0,0 +1,43 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringRuleNewValueOptionsForgetAfter + ONE_DAY = 1.freeze + TWO_DAYS = 2.freeze + ONE_WEEK = 7.freeze + TWO_WEEKS = 14.freeze + THREE_WEEKS = 21.freeze + FOUR_WEEKS = 28.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringRuleNewValueOptionsForgetAfter.constants.select { |c| SecurityMonitoringRuleNewValueOptionsForgetAfter::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_duration.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_duration.rb new file mode 100644 index 000000000000..7ff678531fb1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_learning_duration.rb @@ -0,0 +1,40 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringRuleNewValueOptionsLearningDuration + ZERO_DAYS = 0.freeze + ONE_DAY = 1.freeze + SEVEN_DAYS = 7.freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringRuleNewValueOptionsLearningDuration.constants.select { |c| SecurityMonitoringRuleNewValueOptionsLearningDuration::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb new file mode 100644 index 000000000000..37146adbd868 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_options.rb @@ -0,0 +1,268 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Options on rules. + class SecurityMonitoringRuleOptions + # whether the object has unparsed attributes + attr_accessor :_unparsed + + attr_accessor :detection_method + + attr_accessor :evaluation_window + + attr_accessor :keep_alive + + attr_accessor :max_signal_duration + + attr_accessor :new_value_options + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'detection_method' => :'detectionMethod', + :'evaluation_window' => :'evaluationWindow', + :'keep_alive' => :'keepAlive', + :'max_signal_duration' => :'maxSignalDuration', + :'new_value_options' => :'newValueOptions' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'detection_method' => :'SecurityMonitoringRuleDetectionMethod', + :'evaluation_window' => :'SecurityMonitoringRuleEvaluationWindow', + :'keep_alive' => :'SecurityMonitoringRuleKeepAlive', + :'max_signal_duration' => :'SecurityMonitoringRuleMaxSignalDuration', + :'new_value_options' => :'SecurityMonitoringRuleNewValueOptions' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleOptions` 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::V2::SecurityMonitoringRuleOptions`. 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?(:'detection_method') + self.detection_method = attributes[:'detection_method'] + end + + if attributes.key?(:'evaluation_window') + self.evaluation_window = attributes[:'evaluation_window'] + end + + if attributes.key?(:'keep_alive') + self.keep_alive = attributes[:'keep_alive'] + end + + if attributes.key?(:'max_signal_duration') + self.max_signal_duration = attributes[:'max_signal_duration'] + end + + if attributes.key?(:'new_value_options') + self.new_value_options = attributes[:'new_value_options'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + detection_method == o.detection_method && + evaluation_window == o.evaluation_window && + keep_alive == o.keep_alive && + max_signal_duration == o.max_signal_duration && + new_value_options == o.new_value_options + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [detection_method, evaluation_window, keep_alive, max_signal_duration, new_value_options].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb new file mode 100644 index 000000000000..e3cf4ecf367f --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_query.rb @@ -0,0 +1,286 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Query for matching rule. + class SecurityMonitoringRuleQuery + # whether the object has unparsed attributes + attr_accessor :_unparsed + + attr_accessor :aggregation + + # Field for which the cardinality is measured. Sent as an array. + attr_accessor :distinct_fields + + # Fields to group by. + attr_accessor :group_by_fields + + # The target field to aggregate over when using the sum or max aggregations. + attr_accessor :metric + + # Name of the query. + attr_accessor :name + + # Query to run on logs. + attr_accessor :query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'aggregation' => :'aggregation', + :'distinct_fields' => :'distinctFields', + :'group_by_fields' => :'groupByFields', + :'metric' => :'metric', + :'name' => :'name', + :'query' => :'query' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'aggregation' => :'SecurityMonitoringRuleQueryAggregation', + :'distinct_fields' => :'Array', + :'group_by_fields' => :'Array', + :'metric' => :'String', + :'name' => :'String', + :'query' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleQuery` 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::V2::SecurityMonitoringRuleQuery`. 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?(:'distinct_fields') + if (value = attributes[:'distinct_fields']).is_a?(Array) + self.distinct_fields = value + end + end + + if attributes.key?(:'group_by_fields') + if (value = attributes[:'group_by_fields']).is_a?(Array) + self.group_by_fields = value + end + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + aggregation == o.aggregation && + distinct_fields == o.distinct_fields && + group_by_fields == o.group_by_fields && + metric == o.metric && + name == o.name && + query == o.query + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [aggregation, distinct_fields, group_by_fields, metric, name, query].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb new file mode 100644 index 000000000000..483bdace1ebc --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_query_aggregation.rb @@ -0,0 +1,42 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringRuleQueryAggregation + COUNT = "count".freeze + CARDINALITY = "cardinality".freeze + SUM = "sum".freeze + MAX = "max".freeze + NEW_VALUE = "new_value".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringRuleQueryAggregation.constants.select { |c| SecurityMonitoringRuleQueryAggregation::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_query_create.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_query_create.rb new file mode 100644 index 000000000000..92f0f1b09ece --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_query_create.rb @@ -0,0 +1,291 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Query for matching rule. + class SecurityMonitoringRuleQueryCreate + # whether the object has unparsed attributes + attr_accessor :_unparsed + + attr_accessor :aggregation + + # Field for which the cardinality is measured. Sent as an array. + attr_accessor :distinct_fields + + # Fields to group by. + attr_accessor :group_by_fields + + # The target field to aggregate over when using the sum or max aggregations. + attr_accessor :metric + + # Name of the query. + attr_accessor :name + + # Query to run on logs. + attr_accessor :query + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'aggregation' => :'aggregation', + :'distinct_fields' => :'distinctFields', + :'group_by_fields' => :'groupByFields', + :'metric' => :'metric', + :'name' => :'name', + :'query' => :'query' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'aggregation' => :'SecurityMonitoringRuleQueryAggregation', + :'distinct_fields' => :'Array', + :'group_by_fields' => :'Array', + :'metric' => :'String', + :'name' => :'String', + :'query' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate` 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::V2::SecurityMonitoringRuleQueryCreate`. 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?(:'distinct_fields') + if (value = attributes[:'distinct_fields']).is_a?(Array) + self.distinct_fields = value + end + end + + if attributes.key?(:'group_by_fields') + if (value = attributes[:'group_by_fields']).is_a?(Array) + self.group_by_fields = value + end + end + + if attributes.key?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @query.nil? + invalid_properties.push('invalid value for "query", query cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @query.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + aggregation == o.aggregation && + distinct_fields == o.distinct_fields && + group_by_fields == o.group_by_fields && + metric == o.metric && + name == o.name && + query == o.query + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [aggregation, distinct_fields, group_by_fields, metric, name, query].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb new file mode 100644 index 000000000000..c6dc54dd9a32 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_response.rb @@ -0,0 +1,399 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Rule. + class SecurityMonitoringRuleResponse + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # Cases for generating signals. + attr_accessor :cases + + # When the rule was created, timestamp in milliseconds. + attr_accessor :created_at + + # User ID of the user who created the rule. + attr_accessor :creation_author_id + + # Additional queries to filter matched events before they are processed. + attr_accessor :filters + + # Whether the notifications include the triggering group-by values in their title. + attr_accessor :has_extended_title + + # The ID of the rule. + attr_accessor :id + + # Whether the rule is included by default. + attr_accessor :is_default + + # Whether the rule has been deleted. + attr_accessor :is_deleted + + # Whether the rule is enabled. + attr_accessor :is_enabled + + # Message for generated signals. + attr_accessor :message + + # The name of the rule. + attr_accessor :name + + attr_accessor :options + + # Queries for selecting logs which are part of the rule. + attr_accessor :queries + + # Tags for generated signals. + attr_accessor :tags + + attr_accessor :type + + # User ID of the user who updated the rule. + attr_accessor :update_author_id + + # The version of the rule. + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cases' => :'cases', + :'created_at' => :'createdAt', + :'creation_author_id' => :'creationAuthorId', + :'filters' => :'filters', + :'has_extended_title' => :'hasExtendedTitle', + :'id' => :'id', + :'is_default' => :'isDefault', + :'is_deleted' => :'isDeleted', + :'is_enabled' => :'isEnabled', + :'message' => :'message', + :'name' => :'name', + :'options' => :'options', + :'queries' => :'queries', + :'tags' => :'tags', + :'type' => :'type', + :'update_author_id' => :'updateAuthorId', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'cases' => :'Array', + :'created_at' => :'Integer', + :'creation_author_id' => :'Integer', + :'filters' => :'Array', + :'has_extended_title' => :'Boolean', + :'id' => :'String', + :'is_default' => :'Boolean', + :'is_deleted' => :'Boolean', + :'is_enabled' => :'Boolean', + :'message' => :'String', + :'name' => :'String', + :'options' => :'SecurityMonitoringRuleOptions', + :'queries' => :'Array', + :'tags' => :'Array', + :'type' => :'SecurityMonitoringRuleTypeRead', + :'update_author_id' => :'Integer', + :'version' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleResponse` 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::V2::SecurityMonitoringRuleResponse`. 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?(:'cases') + if (value = attributes[:'cases']).is_a?(Array) + self.cases = value + end + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'creation_author_id') + self.creation_author_id = attributes[:'creation_author_id'] + end + + if attributes.key?(:'filters') + if (value = attributes[:'filters']).is_a?(Array) + self.filters = value + end + end + + if attributes.key?(:'has_extended_title') + self.has_extended_title = attributes[:'has_extended_title'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'is_default') + self.is_default = attributes[:'is_default'] + end + + if attributes.key?(:'is_deleted') + self.is_deleted = attributes[:'is_deleted'] + end + + if attributes.key?(:'is_enabled') + self.is_enabled = attributes[:'is_enabled'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'options') + self.options = attributes[:'options'] + end + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'update_author_id') + self.update_author_id = attributes[:'update_author_id'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cases == o.cases && + created_at == o.created_at && + creation_author_id == o.creation_author_id && + filters == o.filters && + has_extended_title == o.has_extended_title && + id == o.id && + is_default == o.is_default && + is_deleted == o.is_deleted && + is_enabled == o.is_enabled && + message == o.message && + name == o.name && + options == o.options && + queries == o.queries && + tags == o.tags && + type == o.type && + update_author_id == o.update_author_id && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cases, created_at, creation_author_id, filters, has_extended_title, id, is_default, is_deleted, is_enabled, message, name, options, queries, tags, type, update_author_id, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_severity.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_severity.rb new file mode 100644 index 000000000000..fb759c4fa487 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_severity.rb @@ -0,0 +1,42 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringRuleSeverity + INFO = "info".freeze + LOW = "low".freeze + MEDIUM = "medium".freeze + HIGH = "high".freeze + CRITICAL = "critical".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringRuleSeverity.constants.select { |c| SecurityMonitoringRuleSeverity::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb new file mode 100644 index 000000000000..e131e277b401 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_type_create.rb @@ -0,0 +1,39 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringRuleTypeCreate + LOG_DETECTION = "log_detection".freeze + WORKLOAD_SECURITY = "workload_security".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringRuleTypeCreate.constants.select { |c| SecurityMonitoringRuleTypeCreate::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb new file mode 100644 index 000000000000..89989e3e30c0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_type_read.rb @@ -0,0 +1,41 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringRuleTypeRead + LOG_DETECTION = "log_detection".freeze + INFRASTRUCTURE_CONFIGURATION = "infrastructure_configuration".freeze + WORKLOAD_SECURITY = "workload_security".freeze + CLOUD_CONFIGURATION = "cloud_configuration".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringRuleTypeRead.constants.select { |c| SecurityMonitoringRuleTypeRead::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb b/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb new file mode 100644 index 000000000000..b1a6f64e4abc --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_rule_update_payload.rb @@ -0,0 +1,345 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Update an existing rule. + class SecurityMonitoringRuleUpdatePayload + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # Cases for generating signals. + attr_accessor :cases + + # Additional queries to filter matched events before they are processed. + attr_accessor :filters + + # Whether the notifications include the triggering group-by values in their title. + attr_accessor :has_extended_title + + # Whether the rule is enabled. + attr_accessor :is_enabled + + # Message for generated signals. + attr_accessor :message + + # Name of the rule. + attr_accessor :name + + attr_accessor :options + + # Queries for selecting logs which are part of the rule. + attr_accessor :queries + + # Tags for generated signals. + attr_accessor :tags + + # The version of the rule being updated. + attr_accessor :version + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cases' => :'cases', + :'filters' => :'filters', + :'has_extended_title' => :'hasExtendedTitle', + :'is_enabled' => :'isEnabled', + :'message' => :'message', + :'name' => :'name', + :'options' => :'options', + :'queries' => :'queries', + :'tags' => :'tags', + :'version' => :'version' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'cases' => :'Array', + :'filters' => :'Array', + :'has_extended_title' => :'Boolean', + :'is_enabled' => :'Boolean', + :'message' => :'String', + :'name' => :'String', + :'options' => :'SecurityMonitoringRuleOptions', + :'queries' => :'Array', + :'tags' => :'Array', + :'version' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload` 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::V2::SecurityMonitoringRuleUpdatePayload`. 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?(:'cases') + if (value = attributes[:'cases']).is_a?(Array) + self.cases = value + end + end + + if attributes.key?(:'filters') + if (value = attributes[:'filters']).is_a?(Array) + self.filters = value + end + end + + if attributes.key?(:'has_extended_title') + self.has_extended_title = attributes[:'has_extended_title'] + end + + if attributes.key?(:'is_enabled') + self.is_enabled = attributes[:'is_enabled'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'options') + self.options = attributes[:'options'] + end + + if attributes.key?(:'queries') + if (value = attributes[:'queries']).is_a?(Array) + self.queries = value + end + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@version.nil? && @version > 2147483647 + invalid_properties.push('invalid value for "version", must be smaller than or equal to 2147483647.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@version.nil? && @version > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param [Object] version Value to be assigned + def version=(version) + if !version.nil? && version > 2147483647 + fail ArgumentError, 'invalid value for "version", must be smaller than or equal to 2147483647.' + end + + @version = version + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cases == o.cases && + filters == o.filters && + has_extended_title == o.has_extended_title && + is_enabled == o.is_enabled && + message == o.message && + name == o.name && + options == o.options && + queries == o.queries && + tags == o.tags && + version == o.version + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cases, filters, has_extended_title, is_enabled, message, name, options, queries, tags, version].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal.rb new file mode 100644 index 000000000000..8b23b0c809af --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal.rb @@ -0,0 +1,253 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Object description of a security signal. + class SecurityMonitoringSignal + # whether the object has unparsed attributes + attr_accessor :_unparsed + + attr_accessor :attributes + + # The unique ID of the security signal. + attr_accessor :id + + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'attributes' => :'SecurityMonitoringSignalAttributes', + :'id' => :'String', + :'type' => :'SecurityMonitoringSignalType' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignal` 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::V2::SecurityMonitoringSignal`. 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?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + else + self.type = 'signal' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [attributes, id, type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb new file mode 100644 index 000000000000..b2dc5f0f80b6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_attributes.rb @@ -0,0 +1,267 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # The object containing all signal attributes and their associated values. + class SecurityMonitoringSignalAttributes + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # A JSON object of attributes in the security signal. + attr_accessor :attributes + + # The message in the security signal defined by the rule that generated the signal. + attr_accessor :message + + # An array of tags associated with the security signal. + attr_accessor :tags + + # The timestamp of the security signal. + attr_accessor :timestamp + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'attributes' => :'attributes', + :'message' => :'message', + :'tags' => :'tags', + :'timestamp' => :'timestamp' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'attributes' => :'Hash', + :'message' => :'String', + :'tags' => :'Array', + :'timestamp' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalAttributes` 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::V2::SecurityMonitoringSignalAttributes`. 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?(:'attributes') + if (value = attributes[:'attributes']).is_a?(Hash) + self.attributes = value + end + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + message == o.message && + tags == o.tags && + timestamp == o.timestamp + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [attributes, message, tags, timestamp].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb new file mode 100644 index 000000000000..ce1d651ae0f3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request.rb @@ -0,0 +1,250 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # The request for a security signal list. + class SecurityMonitoringSignalListRequest + # whether the object has unparsed attributes + attr_accessor :_unparsed + + attr_accessor :filter + + attr_accessor :page + + attr_accessor :sort + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'filter' => :'filter', + :'page' => :'page', + :'sort' => :'sort' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'filter' => :'SecurityMonitoringSignalListRequestFilter', + :'page' => :'SecurityMonitoringSignalListRequestPage', + :'sort' => :'SecurityMonitoringSignalsSort' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequest` 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::V2::SecurityMonitoringSignalListRequest`. 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?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'page') + self.page = attributes[:'page'] + end + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + filter == o.filter && + page == o.page && + sort == o.sort + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [filter, page, sort].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb new file mode 100644 index 000000000000..c0ed1bcba797 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_filter.rb @@ -0,0 +1,253 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Search filters for listing security signals. + class SecurityMonitoringSignalListRequestFilter + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # The minimum timestamp for requested security signals. + attr_accessor :from + + # Search query for listing security signals. + attr_accessor :query + + # The maximum timestamp for requested security signals. + attr_accessor :to + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'from' => :'from', + :'query' => :'query', + :'to' => :'to' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'from' => :'Time', + :'query' => :'String', + :'to' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter` 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::V2::SecurityMonitoringSignalListRequestFilter`. 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + from == o.from && + query == o.query && + to == o.to + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [from, query, to].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb new file mode 100644 index 000000000000..ca4ff46efc46 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_list_request_page.rb @@ -0,0 +1,260 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # The paging attributes for listing security signals. + class SecurityMonitoringSignalListRequestPage + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # A list of results using the cursor provided in the previous query. + attr_accessor :cursor + + # The maximum number of security signals in the response. + attr_accessor :limit + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'cursor' => :'cursor', + :'limit' => :'limit' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'cursor' => :'String', + :'limit' => :'Integer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage` 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::V2::SecurityMonitoringSignalListRequestPage`. 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?(:'cursor') + self.cursor = attributes[:'cursor'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + else + self.limit = 10 + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@limit.nil? && @limit > 1000 + invalid_properties.push('invalid value for "limit", must be smaller than or equal to 1000.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@limit.nil? && @limit > 1000 + true + end + + # Custom attribute writer method with validation + # @param [Object] limit Value to be assigned + def limit=(limit) + if !limit.nil? && limit > 1000 + fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 1000.' + end + + @limit = limit + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cursor == o.cursor && + limit == o.limit + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [cursor, limit].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signal_type.rb b/lib/datadog_api_client/v2/models/security_monitoring_signal_type.rb new file mode 100644 index 000000000000..52089d2c0a08 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signal_type.rb @@ -0,0 +1,38 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringSignalType + SIGNAL = "signal".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringSignalType.constants.select { |c| SecurityMonitoringSignalType::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb new file mode 100644 index 000000000000..be9cdeba6b17 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response.rb @@ -0,0 +1,253 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # The response object with all security signals matching the request and pagination information. + class SecurityMonitoringSignalsListResponse + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # An array of security signals matching the request. + attr_accessor :data + + attr_accessor :links + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'data' => :'data', + :'links' => :'links', + :'meta' => :'meta' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'data' => :'Array', + :'links' => :'SecurityMonitoringSignalsListResponseLinks', + :'meta' => :'SecurityMonitoringSignalsListResponseMeta' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse` 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::V2::SecurityMonitoringSignalsListResponse`. 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?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'links') + self.links = attributes[:'links'] + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + links == o.links && + meta == o.meta + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [data, links, meta].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb new file mode 100644 index 000000000000..02a0547ad427 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_links.rb @@ -0,0 +1,233 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Links attributes. + class SecurityMonitoringSignalsListResponseLinks + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # The link for the next set of results. **Note**: The request can also be made using the POST endpoint. + attr_accessor :_next + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'_next' => :'next' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'_next' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks` 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::V2::SecurityMonitoringSignalsListResponseLinks`. 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?(:'_next') + self._next = attributes[:'_next'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + _next == o._next + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [_next].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb new file mode 100644 index 000000000000..e1a8a94b9ec3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta.rb @@ -0,0 +1,232 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Meta attributes. + class SecurityMonitoringSignalsListResponseMeta + # whether the object has unparsed attributes + attr_accessor :_unparsed + + attr_accessor :page + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'page' => :'page' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'page' => :'SecurityMonitoringSignalsListResponseMetaPage' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta` 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::V2::SecurityMonitoringSignalsListResponseMeta`. 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?(:'page') + self.page = attributes[:'page'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + page == o.page + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [page].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb new file mode 100644 index 000000000000..13da72f7be32 --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signals_list_response_meta_page.rb @@ -0,0 +1,233 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + # Paging attributes. + class SecurityMonitoringSignalsListResponseMetaPage + # whether the object has unparsed attributes + attr_accessor :_unparsed + + # The cursor used to get the next results, if any. To make the next request, use the same parameters with the addition of the `page[cursor]`. + attr_accessor :after + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'after' => :'after' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'after' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage` 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::V2::SecurityMonitoringSignalsListResponseMetaPage`. 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?(:'after') + self.after = attributes[:'after'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + after == o.after + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [after].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when :Array + # generic array, return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = DatadogAPIClient::V2.const_get(type) + res = klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + if res.instance_of? DatadogAPIClient::V2::UnparsedObject + self._unparsed = true + end + res + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + 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 + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/datadog_api_client/v2/models/security_monitoring_signals_sort.rb b/lib/datadog_api_client/v2/models/security_monitoring_signals_sort.rb new file mode 100644 index 000000000000..51f229923fad --- /dev/null +++ b/lib/datadog_api_client/v2/models/security_monitoring_signals_sort.rb @@ -0,0 +1,39 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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::V2 + class SecurityMonitoringSignalsSort + TIMESTAMP_ASCENDING = "timestamp".freeze + TIMESTAMP_DESCENDING = "-timestamp".freeze + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def self.build_from_hash(value) + new.build_from_hash(value) + end + + # Builds the enum from string + # @param [String] The enum value in the form of the string + # @return [String] The enum value + def build_from_hash(value) + constantValues = SecurityMonitoringSignalsSort.constants.select { |c| SecurityMonitoringSignalsSort::const_get(c) == value } + constantValues.empty? ? DatadogAPIClient::V2::UnparsedObject.new(value) : value + end + end +end diff --git a/spec/v2/api/cloud_siem_api_spec.rb b/spec/v2/api/cloud_siem_api_spec.rb new file mode 100644 index 000000000000..574c703d46c4 --- /dev/null +++ b/spec/v2/api/cloud_siem_api_spec.rb @@ -0,0 +1,189 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' + +# Unit tests for DatadogAPIClient::V2::CloudSIEMAPI +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'CloudSIEMAPI' do + before do + # run before each test + @api_instance = DatadogAPIClient::V2::CloudSIEMAPI.new + end + + after do + # run after each test + end + + describe 'test an instance of CloudSIEMAPI' do + it 'should create an instance of CloudSIEMAPI' do + expect(@api_instance).to be_instance_of(DatadogAPIClient::V2::CloudSIEMAPI) + end + end + + # unit tests for create_security_filter + # Create a security filter + # Create a security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. + # @param body The definition of the new security filter. + # @param [Hash] opts the optional parameters + # @return [SecurityFilterResponse] + describe 'create_security_filter test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for create_security_monitoring_rule + # Create a detection rule + # Create a detection rule. + # @param body + # @param [Hash] opts the optional parameters + # @return [SecurityMonitoringRuleResponse] + describe 'create_security_monitoring_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_security_filter + # Delete a security filter + # Delete a specific security filter. + # @param security_filter_id The ID of the security filter. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_security_filter test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for delete_security_monitoring_rule + # Delete an existing rule + # Delete an existing rule. Default rules cannot be deleted. + # @param rule_id The ID of the rule. + # @param [Hash] opts the optional parameters + # @return [nil] + describe 'delete_security_monitoring_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_security_filter + # Get a security filter + # Get the details of a specific security filter. See the [security filter guide](https://docs.datadoghq.com/security_platform/guide/how-to-setup-security-filters-using-security-monitoring-api/) for more examples. + # @param security_filter_id The ID of the security filter. + # @param [Hash] opts the optional parameters + # @return [SecurityFilterResponse] + describe 'get_security_filter test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for get_security_monitoring_rule + # Get a rule's details + # Get a rule's details. + # @param rule_id The ID of the rule. + # @param [Hash] opts the optional parameters + # @return [SecurityMonitoringRuleResponse] + describe 'get_security_monitoring_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_security_filters + # Get all security filters + # Get the list of configured security filters with their definitions. + # @param [Hash] opts the optional parameters + # @return [SecurityFiltersResponse] + describe 'list_security_filters test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_security_monitoring_rules + # List rules + # List rules. + # @param [Hash] opts the optional parameters + # @option opts [Integer] :page_size Size for a given page. + # @option opts [Integer] :page_number Specific page number to return. + # @return [SecurityMonitoringListRulesResponse] + describe 'list_security_monitoring_rules test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for list_security_monitoring_signals + # Get a quick list of security signals + # The list endpoint returns security signals that match a search query. Both this endpoint and the POST endpoint can be used interchangeably when listing security signals. + # @param [Hash] opts the optional parameters + # @option opts [String] :filter_query The search query for security signals. + # @option opts [Time] :filter_from The minimum timestamp for requested security signals. + # @option opts [Time] :filter_to The maximum timestamp for requested security signals. + # @option opts [SecurityMonitoringSignalsSort] :sort The order of the security signals in results. + # @option opts [String] :page_cursor A list of results using the cursor provided in the previous query. + # @option opts [Integer] :page_limit The maximum number of security signals in the response. + # @return [SecurityMonitoringSignalsListResponse] + describe 'list_security_monitoring_signals test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for search_security_monitoring_signals + # Get a list of security signals + # Returns security signals that match a search query. Both this endpoint and the GET endpoint can be used interchangeably for listing security signals. + # @param [Hash] opts the optional parameters + # @option opts [SecurityMonitoringSignalListRequest] :body + # @return [SecurityMonitoringSignalsListResponse] + describe 'search_security_monitoring_signals test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_security_filter + # Update a security filter + # Update a specific security filter. Returns the security filter object when the request is successful. + # @param security_filter_id The ID of the security filter. + # @param body New definition of the security filter. + # @param [Hash] opts the optional parameters + # @return [SecurityFilterResponse] + describe 'update_security_filter test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + # unit tests for update_security_monitoring_rule + # Update an existing rule + # Update an existing rule. When updating `cases`, `queries` or `options`, the whole field must be included. For example, when modifying a query all queries must be included. Default rules can only be updated to be enabled and to change notifications. + # @param rule_id The ID of the rule. + # @param body + # @param [Hash] opts the optional parameters + # @return [SecurityMonitoringRuleResponse] + describe 'update_security_monitoring_rule test' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_filter_action_spec.rb b/spec/v2/models/security_monitoring_filter_action_spec.rb new file mode 100644 index 000000000000..ef4e54f38e7a --- /dev/null +++ b/spec/v2/models/security_monitoring_filter_action_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringFilterAction +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringFilterAction do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringFilterAction.new } + + describe 'test an instance of SecurityMonitoringFilterAction' do + it 'should create an instance of SecurityMonitoringFilterAction' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringFilterAction) + end + end +end diff --git a/spec/v2/models/security_monitoring_filter_spec.rb b/spec/v2/models/security_monitoring_filter_spec.rb new file mode 100644 index 000000000000..7809a44de70f --- /dev/null +++ b/spec/v2/models/security_monitoring_filter_spec.rb @@ -0,0 +1,43 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringFilter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringFilter do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringFilter.new } + + describe 'test an instance of SecurityMonitoringFilter' do + it 'should create an instance of SecurityMonitoringFilter' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringFilter) + end + end + describe 'test attribute "action"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "query"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_list_rules_response_spec.rb b/spec/v2/models/security_monitoring_list_rules_response_spec.rb new file mode 100644 index 000000000000..a647f2d4d27c --- /dev/null +++ b/spec/v2/models/security_monitoring_list_rules_response_spec.rb @@ -0,0 +1,43 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringListRulesResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringListRulesResponse do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringListRulesResponse.new } + + describe 'test an instance of SecurityMonitoringListRulesResponse' do + it 'should create an instance of SecurityMonitoringListRulesResponse' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringListRulesResponse) + end + end + describe 'test attribute "data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_rule_case_create_spec.rb b/spec/v2/models/security_monitoring_rule_case_create_spec.rb new file mode 100644 index 000000000000..f55300afe3bb --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_case_create_spec.rb @@ -0,0 +1,55 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new } + + describe 'test an instance of SecurityMonitoringRuleCaseCreate' do + it 'should create an instance of SecurityMonitoringRuleCaseCreate' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate) + end + end + describe 'test attribute "condition"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "notifications"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_rule_case_spec.rb b/spec/v2/models/security_monitoring_rule_case_spec.rb new file mode 100644 index 000000000000..aed9b3cf2350 --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_case_spec.rb @@ -0,0 +1,55 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleCase +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleCase do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleCase.new } + + describe 'test an instance of SecurityMonitoringRuleCase' do + it 'should create an instance of SecurityMonitoringRuleCase' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleCase) + end + end + describe 'test attribute "condition"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "notifications"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_rule_create_payload_spec.rb b/spec/v2/models/security_monitoring_rule_create_payload_spec.rb new file mode 100644 index 000000000000..87acdd00592a --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_create_payload_spec.rb @@ -0,0 +1,91 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload.new } + + describe 'test an instance of SecurityMonitoringRuleCreatePayload' do + it 'should create an instance of SecurityMonitoringRuleCreatePayload' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleCreatePayload) + end + end + describe 'test attribute "cases"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "has_extended_title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "is_enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "options"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "queries"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_rule_detection_method_spec.rb b/spec/v2/models/security_monitoring_rule_detection_method_spec.rb new file mode 100644 index 000000000000..30405d4aa113 --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_detection_method_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod.new } + + describe 'test an instance of SecurityMonitoringRuleDetectionMethod' do + it 'should create an instance of SecurityMonitoringRuleDetectionMethod' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod) + end + end +end diff --git a/spec/v2/models/security_monitoring_rule_evaluation_window_spec.rb b/spec/v2/models/security_monitoring_rule_evaluation_window_spec.rb new file mode 100644 index 000000000000..32eb5e10c9dc --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_evaluation_window_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow.new } + + describe 'test an instance of SecurityMonitoringRuleEvaluationWindow' do + it 'should create an instance of SecurityMonitoringRuleEvaluationWindow' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow) + end + end +end diff --git a/spec/v2/models/security_monitoring_rule_keep_alive_spec.rb b/spec/v2/models/security_monitoring_rule_keep_alive_spec.rb new file mode 100644 index 000000000000..e419d60dde85 --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_keep_alive_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive.new } + + describe 'test an instance of SecurityMonitoringRuleKeepAlive' do + it 'should create an instance of SecurityMonitoringRuleKeepAlive' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive) + end + end +end diff --git a/spec/v2/models/security_monitoring_rule_max_signal_duration_spec.rb b/spec/v2/models/security_monitoring_rule_max_signal_duration_spec.rb new file mode 100644 index 000000000000..240b2f6e402f --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_max_signal_duration_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration.new } + + describe 'test an instance of SecurityMonitoringRuleMaxSignalDuration' do + it 'should create an instance of SecurityMonitoringRuleMaxSignalDuration' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration) + end + end +end diff --git a/spec/v2/models/security_monitoring_rule_new_value_options_forget_after_spec.rb b/spec/v2/models/security_monitoring_rule_new_value_options_forget_after_spec.rb new file mode 100644 index 000000000000..ee80efba23e4 --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_new_value_options_forget_after_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsForgetAfter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsForgetAfter do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsForgetAfter.new } + + describe 'test an instance of SecurityMonitoringRuleNewValueOptionsForgetAfter' do + it 'should create an instance of SecurityMonitoringRuleNewValueOptionsForgetAfter' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsForgetAfter) + end + end +end diff --git a/spec/v2/models/security_monitoring_rule_new_value_options_learning_duration_spec.rb b/spec/v2/models/security_monitoring_rule_new_value_options_learning_duration_spec.rb new file mode 100644 index 000000000000..cfb3c6126900 --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_new_value_options_learning_duration_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningDuration +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningDuration do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningDuration.new } + + describe 'test an instance of SecurityMonitoringRuleNewValueOptionsLearningDuration' do + it 'should create an instance of SecurityMonitoringRuleNewValueOptionsLearningDuration' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsLearningDuration) + end + end +end diff --git a/spec/v2/models/security_monitoring_rule_new_value_options_spec.rb b/spec/v2/models/security_monitoring_rule_new_value_options_spec.rb new file mode 100644 index 000000000000..184f7e5f2f39 --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_new_value_options_spec.rb @@ -0,0 +1,43 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions.new } + + describe 'test an instance of SecurityMonitoringRuleNewValueOptions' do + it 'should create an instance of SecurityMonitoringRuleNewValueOptions' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptions) + end + end + describe 'test attribute "forget_after"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "learning_duration"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_rule_options_spec.rb b/spec/v2/models/security_monitoring_rule_options_spec.rb new file mode 100644 index 000000000000..9114828a4162 --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_options_spec.rb @@ -0,0 +1,61 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleOptions +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleOptions do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new } + + describe 'test an instance of SecurityMonitoringRuleOptions' do + it 'should create an instance of SecurityMonitoringRuleOptions' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleOptions) + end + end + describe 'test attribute "detection_method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "evaluation_window"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "keep_alive"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "max_signal_duration"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "new_value_options"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_rule_query_aggregation_spec.rb b/spec/v2/models/security_monitoring_rule_query_aggregation_spec.rb new file mode 100644 index 000000000000..82c5fcca01bd --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_query_aggregation_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation.new } + + describe 'test an instance of SecurityMonitoringRuleQueryAggregation' do + it 'should create an instance of SecurityMonitoringRuleQueryAggregation' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation) + end + end +end diff --git a/spec/v2/models/security_monitoring_rule_query_create_spec.rb b/spec/v2/models/security_monitoring_rule_query_create_spec.rb new file mode 100644 index 000000000000..f1144ac6addc --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_query_create_spec.rb @@ -0,0 +1,67 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate.new } + + describe 'test an instance of SecurityMonitoringRuleQueryCreate' do + it 'should create an instance of SecurityMonitoringRuleQueryCreate' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleQueryCreate) + end + end + describe 'test attribute "aggregation"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "distinct_fields"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "group_by_fields"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "metric"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "query"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_rule_query_spec.rb b/spec/v2/models/security_monitoring_rule_query_spec.rb new file mode 100644 index 000000000000..8f93df36e9ea --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_query_spec.rb @@ -0,0 +1,67 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleQuery +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleQuery do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleQuery.new } + + describe 'test an instance of SecurityMonitoringRuleQuery' do + it 'should create an instance of SecurityMonitoringRuleQuery' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleQuery) + end + end + describe 'test attribute "aggregation"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "distinct_fields"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "group_by_fields"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "metric"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "query"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_rule_response_spec.rb b/spec/v2/models/security_monitoring_rule_response_spec.rb new file mode 100644 index 000000000000..3e1df9701bfb --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_response_spec.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleResponse do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleResponse.new } + + describe 'test an instance of SecurityMonitoringRuleResponse' do + it 'should create an instance of SecurityMonitoringRuleResponse' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleResponse) + end + end + describe 'test attribute "cases"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "creation_author_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "has_extended_title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "is_default"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "is_deleted"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "is_enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "options"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "queries"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "update_author_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_rule_severity_spec.rb b/spec/v2/models/security_monitoring_rule_severity_spec.rb new file mode 100644 index 000000000000..da6efa9a5cbf --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_severity_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleSeverity +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleSeverity do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleSeverity.new } + + describe 'test an instance of SecurityMonitoringRuleSeverity' do + it 'should create an instance of SecurityMonitoringRuleSeverity' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleSeverity) + end + end +end diff --git a/spec/v2/models/security_monitoring_rule_type_create_spec.rb b/spec/v2/models/security_monitoring_rule_type_create_spec.rb new file mode 100644 index 000000000000..fcc4e27f08c9 --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_type_create_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate.new } + + describe 'test an instance of SecurityMonitoringRuleTypeCreate' do + it 'should create an instance of SecurityMonitoringRuleTypeCreate' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate) + end + end +end diff --git a/spec/v2/models/security_monitoring_rule_type_read_spec.rb b/spec/v2/models/security_monitoring_rule_type_read_spec.rb new file mode 100644 index 000000000000..f316ab2a961b --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_type_read_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleTypeRead +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleTypeRead do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleTypeRead.new } + + describe 'test an instance of SecurityMonitoringRuleTypeRead' do + it 'should create an instance of SecurityMonitoringRuleTypeRead' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleTypeRead) + end + end +end diff --git a/spec/v2/models/security_monitoring_rule_update_payload_spec.rb b/spec/v2/models/security_monitoring_rule_update_payload_spec.rb new file mode 100644 index 000000000000..27780584ce66 --- /dev/null +++ b/spec/v2/models/security_monitoring_rule_update_payload_spec.rb @@ -0,0 +1,91 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload.new } + + describe 'test an instance of SecurityMonitoringRuleUpdatePayload' do + it 'should create an instance of SecurityMonitoringRuleUpdatePayload' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringRuleUpdatePayload) + end + end + describe 'test attribute "cases"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "filters"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "has_extended_title"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "is_enabled"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "options"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "queries"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "version"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_signal_attributes_spec.rb b/spec/v2/models/security_monitoring_signal_attributes_spec.rb new file mode 100644 index 000000000000..9e2dc920fafc --- /dev/null +++ b/spec/v2/models/security_monitoring_signal_attributes_spec.rb @@ -0,0 +1,55 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalAttributes +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignalAttributes do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalAttributes.new } + + describe 'test an instance of SecurityMonitoringSignalAttributes' do + it 'should create an instance of SecurityMonitoringSignalAttributes' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalAttributes) + end + end + describe 'test attribute "attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "tags"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "timestamp"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_signal_list_request_filter_spec.rb b/spec/v2/models/security_monitoring_signal_list_request_filter_spec.rb new file mode 100644 index 000000000000..b8ba519c5b52 --- /dev/null +++ b/spec/v2/models/security_monitoring_signal_list_request_filter_spec.rb @@ -0,0 +1,49 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter.new } + + describe 'test an instance of SecurityMonitoringSignalListRequestFilter' do + it 'should create an instance of SecurityMonitoringSignalListRequestFilter' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalListRequestFilter) + end + end + describe 'test attribute "from"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "query"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "to"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_signal_list_request_page_spec.rb b/spec/v2/models/security_monitoring_signal_list_request_page_spec.rb new file mode 100644 index 000000000000..cab83bd3902c --- /dev/null +++ b/spec/v2/models/security_monitoring_signal_list_request_page_spec.rb @@ -0,0 +1,43 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage.new } + + describe 'test an instance of SecurityMonitoringSignalListRequestPage' do + it 'should create an instance of SecurityMonitoringSignalListRequestPage' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalListRequestPage) + end + end + describe 'test attribute "cursor"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "limit"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_signal_list_request_spec.rb b/spec/v2/models/security_monitoring_signal_list_request_spec.rb new file mode 100644 index 000000000000..5b6c337449c7 --- /dev/null +++ b/spec/v2/models/security_monitoring_signal_list_request_spec.rb @@ -0,0 +1,49 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalListRequest +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignalListRequest do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalListRequest.new } + + describe 'test an instance of SecurityMonitoringSignalListRequest' do + it 'should create an instance of SecurityMonitoringSignalListRequest' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalListRequest) + end + end + describe 'test attribute "filter"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "page"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sort"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_signal_spec.rb b/spec/v2/models/security_monitoring_signal_spec.rb new file mode 100644 index 000000000000..e16aff12dd9c --- /dev/null +++ b/spec/v2/models/security_monitoring_signal_spec.rb @@ -0,0 +1,49 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignal +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignal do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignal.new } + + describe 'test an instance of SecurityMonitoringSignal' do + it 'should create an instance of SecurityMonitoringSignal' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignal) + end + end + describe 'test attribute "attributes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_signal_type_spec.rb b/spec/v2/models/security_monitoring_signal_type_spec.rb new file mode 100644 index 000000000000..21a6be6b6de7 --- /dev/null +++ b/spec/v2/models/security_monitoring_signal_type_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalType +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignalType do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalType.new } + + describe 'test an instance of SecurityMonitoringSignalType' do + it 'should create an instance of SecurityMonitoringSignalType' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalType) + end + end +end diff --git a/spec/v2/models/security_monitoring_signals_list_response_links_spec.rb b/spec/v2/models/security_monitoring_signals_list_response_links_spec.rb new file mode 100644 index 000000000000..2f325f728d9b --- /dev/null +++ b/spec/v2/models/security_monitoring_signals_list_response_links_spec.rb @@ -0,0 +1,37 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks.new } + + describe 'test an instance of SecurityMonitoringSignalsListResponseLinks' do + it 'should create an instance of SecurityMonitoringSignalsListResponseLinks' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseLinks) + end + end + describe 'test attribute "_next"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_signals_list_response_meta_page_spec.rb b/spec/v2/models/security_monitoring_signals_list_response_meta_page_spec.rb new file mode 100644 index 000000000000..cb07f73322f8 --- /dev/null +++ b/spec/v2/models/security_monitoring_signals_list_response_meta_page_spec.rb @@ -0,0 +1,37 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage.new } + + describe 'test an instance of SecurityMonitoringSignalsListResponseMetaPage' do + it 'should create an instance of SecurityMonitoringSignalsListResponseMetaPage' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMetaPage) + end + end + describe 'test attribute "after"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_signals_list_response_meta_spec.rb b/spec/v2/models/security_monitoring_signals_list_response_meta_spec.rb new file mode 100644 index 000000000000..08f5f7241846 --- /dev/null +++ b/spec/v2/models/security_monitoring_signals_list_response_meta_spec.rb @@ -0,0 +1,37 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta.new } + + describe 'test an instance of SecurityMonitoringSignalsListResponseMeta' do + it 'should create an instance of SecurityMonitoringSignalsListResponseMeta' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalsListResponseMeta) + end + end + describe 'test attribute "page"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_signals_list_response_spec.rb b/spec/v2/models/security_monitoring_signals_list_response_spec.rb new file mode 100644 index 000000000000..da4f3aaed186 --- /dev/null +++ b/spec/v2/models/security_monitoring_signals_list_response_spec.rb @@ -0,0 +1,49 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse.new } + + describe 'test an instance of SecurityMonitoringSignalsListResponse' do + it 'should create an instance of SecurityMonitoringSignalsListResponse' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalsListResponse) + end + end + describe 'test attribute "data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "links"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/v2/models/security_monitoring_signals_sort_spec.rb b/spec/v2/models/security_monitoring_signals_sort_spec.rb new file mode 100644 index 000000000000..53ed756ab4dd --- /dev/null +++ b/spec/v2/models/security_monitoring_signals_sort_spec.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://openapi-generator.tech + + 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 'spec_helper' +require 'json' +require 'date' + +# Unit tests for DatadogAPIClient::V2::SecurityMonitoringSignalsSort +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe DatadogAPIClient::V2::SecurityMonitoringSignalsSort do + let(:instance) { DatadogAPIClient::V2::SecurityMonitoringSignalsSort.new } + + describe 'test an instance of SecurityMonitoringSignalsSort' do + it 'should create an instance of SecurityMonitoringSignalsSort' do + expect(instance).to be_instance_of(DatadogAPIClient::V2::SecurityMonitoringSignalsSort) + end + end +end