From 60fecfd8120ad2407c4e3ca6726d6b0853b344ff Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 19 May 2026 16:08:46 +0000 Subject: [PATCH] Regenerate client from commit 9b5ef83 of spec repo --- .generator/schemas/v2/openapi.yaml | 5054 ++++++----------- ...Lab-run-returns-No-Content-response.frozen | 1 + ...el-Lab-run-returns-No-Content-response.yml | 18 + ...-Lab-run-returns-Not-Found-response.frozen | 1 + ...del-Lab-run-returns-Not-Found-response.yml | 20 + ...rtifact-content-returns-OK-response.frozen | 1 + ...d-artifact-content-returns-OK-response.yml | 20 + ...-project-returns-Not-Found-response.frozen | 1 + ...Lab-project-returns-Not-Found-response.yml | 20 + ...del-Lab-project-returns-OK-response.frozen | 1 + ...-Model-Lab-project-returns-OK-response.yml | 20 + ...-Lab-run-returns-Not-Found-response.frozen | 1 + ...del-Lab-run-returns-Not-Found-response.yml | 20 + ...a-Model-Lab-run-returns-OK-response.frozen | 1 + ...et-a-Model-Lab-run-returns-OK-response.yml | 23 + ...oject-artifacts-returns-OK-response.frozen | 1 + ...-project-artifacts-returns-OK-response.yml | 20 + ...ject-facet-keys-returns-OK-response.frozen | 1 + ...project-facet-keys-returns-OK-response.yml | 20 + ...ct-facet-values-returns-OK-response.frozen | 1 + ...oject-facet-values-returns-OK-response.yml | 20 + ...el-Lab-projects-returns-OK-response.frozen | 1 + ...Model-Lab-projects-returns-OK-response.yml | 20 + ...b-run-artifacts-returns-OK-response.frozen | 1 + ...-Lab-run-artifacts-returns-OK-response.yml | 20 + ...-run-facet-keys-returns-OK-response.frozen | 1 + ...Lab-run-facet-keys-returns-OK-response.yml | 20 + ...un-facet-values-returns-OK-response.frozen | 1 + ...b-run-facet-values-returns-OK-response.yml | 20 + ...-Model-Lab-runs-returns-OK-response.frozen | 1 + ...ist-Model-Lab-runs-returns-OK-response.yml | 28 + ...Lab-run-returns-No-Content-response.frozen | 1 + ...el-Lab-run-returns-No-Content-response.yml | 34 + ...-Lab-run-returns-Not-Found-response.frozen | 1 + ...del-Lab-run-returns-Not-Found-response.yml | 20 + ...project-returns-No-Content-response.frozen | 1 + ...ab-project-returns-No-Content-response.yml | 34 + ...-project-returns-Not-Found-response.frozen | 1 + ...Lab-project-returns-Not-Found-response.yml | 20 + ...Lab-run-returns-No-Content-response.frozen | 1 + ...el-Lab-run-returns-No-Content-response.yml | 18 + ...project-returns-No-Content-response.frozen | 1 + ...ab-project-returns-No-Content-response.yml | 18 + .../UpdateCustomAttributeConfig.rb | 26 - .../v2/case-management-type/UpdateCaseType.rb | 19 - .../v2/case-management/AddCaseInsights.rb | 23 - examples/v2/case-management/AggregateCases.rb | 23 - .../v2/case-management/BulkUpdateCases.rb | 24 - examples/v2/case-management/CountCases.rb | 8 - .../CreateCaseAutomationRule.rb | 28 - examples/v2/case-management/CreateCaseLink.rb | 21 - examples/v2/case-management/CreateCaseView.rb | 19 - .../CreateMaintenanceWindow.rb | 20 - .../DeleteCaseAutomationRule.rb | 8 - examples/v2/case-management/DeleteCaseLink.rb | 8 - examples/v2/case-management/DeleteCaseView.rb | 8 - .../DeleteMaintenanceWindow.rb | 8 - .../DisableCaseAutomationRule.rb | 8 - .../EnableCaseAutomationRule.rb | 8 - .../v2/case-management/FavoriteCaseProject.rb | 8 - .../case-management/GetCaseAutomationRule.rb | 8 - examples/v2/case-management/GetCaseView.rb | 8 - .../ListCaseAutomationRules.rb | 8 - examples/v2/case-management/ListCaseLinks.rb | 8 - .../v2/case-management/ListCaseTimeline.rb | 8 - examples/v2/case-management/ListCaseViews.rb | 8 - .../v2/case-management/ListCaseWatchers.rb | 8 - .../case-management/ListMaintenanceWindows.rb | 8 - .../ListUserCaseProjectFavorites.rb | 8 - .../v2/case-management/RemoveCaseInsights.rb | 23 - .../case-management/UnfavoriteCaseProject.rb | 8 - examples/v2/case-management/UnwatchCase.rb | 8 - .../UpdateCaseAutomationRule.rb | 28 - .../v2/case-management/UpdateCaseComment.rb | 17 - .../v2/case-management/UpdateCaseDueDate.rb | 17 - .../UpdateCaseResolvedReason.rb | 17 - examples/v2/case-management/UpdateCaseView.rb | 15 - .../UpdateMaintenanceWindow.rb | 15 - examples/v2/case-management/WatchCase.rb | 8 - .../v2/model-lab-api/DeleteModelLabRun.rb | 8 + .../GetModelLabArtifactContent.rb | 8 + .../GetModelLabArtifactContent_2858422658.rb | 8 + .../v2/model-lab-api/GetModelLabProject.rb | 8 + examples/v2/model-lab-api/GetModelLabRun.rb | 8 + .../ListModelLabProjectArtifacts.rb | 8 + .../ListModelLabProjectFacetKeys.rb | 8 + .../ListModelLabProjectFacetValues.rb | 8 + .../v2/model-lab-api/ListModelLabProjects.rb | 8 + .../model-lab-api/ListModelLabRunArtifacts.rb | 8 + .../model-lab-api/ListModelLabRunFacetKeys.rb | 8 + .../ListModelLabRunFacetValues.rb | 8 + examples/v2/model-lab-api/ListModelLabRuns.rb | 8 + examples/v2/model-lab-api/PinModelLabRun.rb | 8 + .../v2/model-lab-api/StarModelLabProject.rb | 8 + examples/v2/model-lab-api/UnpinModelLabRun.rb | 8 + .../v2/model-lab-api/UnstarModelLabProject.rb | 8 + .../UnstarModelLabProject_931927092.rb | 8 + features/scenarios_model_mapping.rb | 197 +- features/v2/case_management.feature | 852 --- features/v2/case_management_attribute.feature | 30 - features/v2/case_management_type.feature | 27 - features/v2/model_lab_api.feature | 359 ++ features/v2/undo.json | 378 +- lib/datadog_api_client/configuration.rb | 52 +- lib/datadog_api_client/inflector.rb | 136 +- .../v2/api/case_management_api.rb | 3688 ++---------- .../v2/api/case_management_attribute_api.rb | 89 +- .../v2/api/case_management_type_api.rb | 80 +- .../v2/api/model_lab_api_api.rb | 1237 ++++ .../v2/models/automation_rule.rb | 175 - .../v2/models/automation_rule_action_data.rb | 125 - .../v2/models/automation_rule_attributes.rb | 217 - .../v2/models/automation_rule_create.rb | 144 - .../automation_rule_create_attributes.rb | 175 - .../models/automation_rule_relationships.rb | 124 - .../v2/models/automation_rule_response.rb | 123 - .../v2/models/automation_rule_trigger.rb | 133 - .../v2/models/automation_rule_trigger_data.rb | 145 - .../v2/models/automation_rule_trigger_type.rb | 31 - .../v2/models/automation_rules_response.rb | 125 - lib/datadog_api_client/v2/models/case.rb | 2 +- .../v2/models/case_aggregate_request.rb | 123 - .../case_aggregate_request_attributes.rb | 144 - .../v2/models/case_aggregate_request_data.rb | 144 - .../v2/models/case_aggregate_response.rb | 123 - .../v2/models/case_assign.rb | 2 +- .../v2/models/case_attributes.rb | 2 +- .../v2/models/case_automation_rule_state.rb | 27 - .../v2/models/case_bulk_action_type.rb | 35 - .../v2/models/case_bulk_update_request.rb | 123 - .../case_bulk_update_request_attributes.rb | 156 - .../models/case_bulk_update_request_data.rb | 144 - .../v2/models/case_comment.rb | 2 +- .../v2/models/case_count_group.rb | 146 - .../v2/models/case_count_response.rb | 123 - .../models/case_count_response_attributes.rb | 125 - .../v2/models/case_create.rb | 2 +- .../v2/models/case_empty.rb | 2 +- .../v2/models/case_insight.rb | 165 - .../v2/models/case_insight_type.rb | 41 - .../v2/models/case_insights_attributes.rb | 133 - .../v2/models/case_insights_data.rb | 144 - .../v2/models/case_link_attributes.rb | 207 - .../v2/models/case_link_create.rb | 144 - .../v2/models/case_link_response.rb | 123 - .../v2/models/case_links_response.rb | 125 - .../v2/models/case_resource_type.rb | 2 +- .../v2/models/case_type_create.rb | 6 +- .../v2/models/case_type_create_request.rb | 4 +- .../v2/models/case_type_resource.rb | 6 +- .../models/case_type_resource_attributes.rb | 10 +- .../v2/models/case_type_resource_type.rb | 2 +- .../v2/models/case_type_response.rb | 4 +- .../v2/models/case_type_update.rb | 133 - .../v2/models/case_types_response.rb | 2 +- .../v2/models/case_update_attributes.rb | 2 +- .../case_update_attributes_attributes.rb | 2 +- .../v2/models/case_update_comment.rb | 144 - .../models/case_update_comment_attributes.rb | 123 - .../v2/models/case_update_comment_request.rb | 123 - .../v2/models/case_update_custom_attribute.rb | 4 +- .../v2/models/case_update_description.rb | 2 +- .../v2/models/case_update_due_date.rb | 144 - .../models/case_update_due_date_attributes.rb | 123 - .../v2/models/case_update_due_date_request.rb | 123 - .../v2/models/case_update_priority.rb | 2 +- .../v2/models/case_update_resolved_reason.rb | 144 - .../case_update_resolved_reason_attributes.rb | 123 - .../case_update_resolved_reason_request.rb | 123 - .../v2/models/case_update_status.rb | 2 +- .../v2/models/case_update_title.rb | 2 +- lib/datadog_api_client/v2/models/case_view.rb | 175 - .../v2/models/case_view_create.rb | 144 - .../v2/models/case_view_create_attributes.rb | 175 - .../v2/models/case_view_response.rb | 123 - .../v2/models/case_view_update.rb | 133 - .../v2/models/case_view_update_attributes.rb | 125 - .../v2/models/case_watcher.rb | 165 - .../v2/models/case_watcher_relationships.rb | 123 - .../models/case_watcher_user_relationship.rb | 123 - .../v2/models/case_watchers_response.rb | 125 - .../v2/models/custom_attribute_config.rb | 6 +- ...stom_attribute_config_attributes_create.rb | 12 +- .../models/custom_attribute_config_create.rb | 6 +- .../custom_attribute_config_create_request.rb | 4 +- ...om_attribute_config_resource_attributes.rb | 14 +- .../custom_attribute_config_resource_type.rb | 2 +- .../custom_attribute_config_response.rb | 4 +- .../models/custom_attribute_config_update.rb | 133 - ...stom_attribute_config_update_attributes.rb | 145 - .../custom_attribute_config_update_request.rb | 123 - .../custom_attribute_configs_response.rb | 2 +- .../v2/models/custom_attribute_type.rb | 2 +- .../v2/models/custom_attribute_type_data.rb | 107 - .../v2/models/custom_attribute_value.rb | 6 +- .../models/custom_attribute_values_union.rb | 2 +- .../models/maintenance_window_attributes.rb | 206 - .../maintenance_window_create_request.rb | 123 - .../maintenance_window_resource_type.rb | 26 - .../v2/models/maintenance_window_response.rb | 123 - .../v2/models/maintenance_window_update.rb | 133 - .../maintenance_window_update_attributes.rb | 135 - .../maintenance_window_update_request.rb | 123 - .../v2/models/maintenance_windows_response.rb | 125 - ...tributes.rb => model_lab_artifact_info.rb} | 110 +- ...y.rb => model_lab_artifact_object_info.rb} | 84 +- .../models/model_lab_facet_keys_attributes.rb | 168 + ...e_data.rb => model_lab_facet_keys_data.rb} | 16 +- ...st.rb => model_lab_facet_keys_response.rb} | 10 +- ...e_type.rb => model_lab_facet_keys_type.rb} | 6 +- .../v2/models/model_lab_facet_type.rb | 29 + ...b => model_lab_facet_values_attributes.rb} | 125 +- ...link.rb => model_lab_facet_values_data.rb} | 16 +- ....rb => model_lab_facet_values_response.rb} | 10 +- .../v2/models/model_lab_facet_values_type.rb | 26 + ...eate.rb => model_lab_metric_stat_range.rb} | 81 +- .../v2/models/model_lab_metric_summary.rb | 228 + ...e_update.rb => model_lab_numeric_range.rb} | 59 +- ...date_request.rb => model_lab_page_meta.rb} | 34 +- ...ributes.rb => model_lab_page_meta_page.rb} | 122 +- ...ships.rb => model_lab_pagination_links.rb} | 74 +- ...model_lab_project_artifacts_attributes.rb} | 36 +- ...rb => model_lab_project_artifacts_data.rb} | 16 +- ...> model_lab_project_artifacts_response.rb} | 10 +- ...rb => model_lab_project_artifacts_type.rb} | 6 +- .../v2/models/model_lab_project_attributes.rb | 291 + ...ce_window.rb => model_lab_project_data.rb} | 16 +- ...ype.rb => model_lab_project_facet_type.rb} | 6 +- ...quest.rb => model_lab_project_response.rb} | 10 +- ...urce_type.rb => model_lab_project_type.rb} | 6 +- ...onse.rb => model_lab_projects_response.rb} | 45 +- ... => model_lab_run_artifacts_attributes.rb} | 64 +- .../v2/models/model_lab_run_artifacts_data.rb | 165 + ...rb => model_lab_run_artifacts_response.rb} | 10 +- ...ype.rb => model_lab_run_artifacts_type.rb} | 6 +- .../v2/models/model_lab_run_attributes.rb | 454 ++ .../v2/models/model_lab_run_data.rb | 165 + ..._group_value.rb => model_lab_run_param.rb} | 36 +- ...e_request.rb => model_lab_run_response.rb} | 10 +- ...action_type.rb => model_lab_run_status.rb} | 13 +- ...resource_type.rb => model_lab_run_type.rb} | 6 +- ...e_action.rb => model_lab_runs_response.rb} | 52 +- ...bute_select_option.rb => model_lab_tag.rb} | 31 +- .../v2/models/project_favorite.rb | 144 - .../models/project_favorite_resource_type.rb | 26 - .../v2/models/timeline_cell.rb | 8 +- .../v2/models/timeline_cell_author.rb | 2 +- .../v2/models/timeline_cell_author_user.rb | 6 +- .../timeline_cell_author_user_content.rb | 10 +- .../models/timeline_cell_author_user_type.rb | 2 +- .../v2/models/timeline_cell_content.rb | 2 +- .../models/timeline_cell_content_comment.rb | 4 +- .../v2/models/timeline_cell_resource.rb | 6 +- .../v2/models/timeline_cell_resource_type.rb | 2 +- .../v2/models/timeline_cell_type.rb | 2 +- .../v2/models/timeline_response.rb | 2 +- 256 files changed, 7096 insertions(+), 17416 deletions(-) create mode 100644 cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-Not-Found-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Download-artifact-content-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Download-artifact-content-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-Not-Found-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-Not-Found-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-project-artifacts-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-project-artifacts-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-keys-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-keys-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-values-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-values-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-projects-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-projects-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-run-artifacts-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-run-artifacts-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-keys-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-keys-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-values-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-values-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-runs-returns-OK-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/List-Model-Lab-runs-returns-OK-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-Not-Found-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-Not-Found-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Unpin-a-Model-Lab-run-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Unpin-a-Model-Lab-run-returns-No-Content-response.yml create mode 100644 cassettes/features/v2/model_lab_api/Unstar-a-Model-Lab-project-returns-No-Content-response.frozen create mode 100644 cassettes/features/v2/model_lab_api/Unstar-a-Model-Lab-project-returns-No-Content-response.yml delete mode 100644 examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb delete mode 100644 examples/v2/case-management-type/UpdateCaseType.rb delete mode 100644 examples/v2/case-management/AddCaseInsights.rb delete mode 100644 examples/v2/case-management/AggregateCases.rb delete mode 100644 examples/v2/case-management/BulkUpdateCases.rb delete mode 100644 examples/v2/case-management/CountCases.rb delete mode 100644 examples/v2/case-management/CreateCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/CreateCaseLink.rb delete mode 100644 examples/v2/case-management/CreateCaseView.rb delete mode 100644 examples/v2/case-management/CreateMaintenanceWindow.rb delete mode 100644 examples/v2/case-management/DeleteCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/DeleteCaseLink.rb delete mode 100644 examples/v2/case-management/DeleteCaseView.rb delete mode 100644 examples/v2/case-management/DeleteMaintenanceWindow.rb delete mode 100644 examples/v2/case-management/DisableCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/EnableCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/FavoriteCaseProject.rb delete mode 100644 examples/v2/case-management/GetCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/GetCaseView.rb delete mode 100644 examples/v2/case-management/ListCaseAutomationRules.rb delete mode 100644 examples/v2/case-management/ListCaseLinks.rb delete mode 100644 examples/v2/case-management/ListCaseTimeline.rb delete mode 100644 examples/v2/case-management/ListCaseViews.rb delete mode 100644 examples/v2/case-management/ListCaseWatchers.rb delete mode 100644 examples/v2/case-management/ListMaintenanceWindows.rb delete mode 100644 examples/v2/case-management/ListUserCaseProjectFavorites.rb delete mode 100644 examples/v2/case-management/RemoveCaseInsights.rb delete mode 100644 examples/v2/case-management/UnfavoriteCaseProject.rb delete mode 100644 examples/v2/case-management/UnwatchCase.rb delete mode 100644 examples/v2/case-management/UpdateCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/UpdateCaseComment.rb delete mode 100644 examples/v2/case-management/UpdateCaseDueDate.rb delete mode 100644 examples/v2/case-management/UpdateCaseResolvedReason.rb delete mode 100644 examples/v2/case-management/UpdateCaseView.rb delete mode 100644 examples/v2/case-management/UpdateMaintenanceWindow.rb delete mode 100644 examples/v2/case-management/WatchCase.rb create mode 100644 examples/v2/model-lab-api/DeleteModelLabRun.rb create mode 100644 examples/v2/model-lab-api/GetModelLabArtifactContent.rb create mode 100644 examples/v2/model-lab-api/GetModelLabArtifactContent_2858422658.rb create mode 100644 examples/v2/model-lab-api/GetModelLabProject.rb create mode 100644 examples/v2/model-lab-api/GetModelLabRun.rb create mode 100644 examples/v2/model-lab-api/ListModelLabProjectArtifacts.rb create mode 100644 examples/v2/model-lab-api/ListModelLabProjectFacetKeys.rb create mode 100644 examples/v2/model-lab-api/ListModelLabProjectFacetValues.rb create mode 100644 examples/v2/model-lab-api/ListModelLabProjects.rb create mode 100644 examples/v2/model-lab-api/ListModelLabRunArtifacts.rb create mode 100644 examples/v2/model-lab-api/ListModelLabRunFacetKeys.rb create mode 100644 examples/v2/model-lab-api/ListModelLabRunFacetValues.rb create mode 100644 examples/v2/model-lab-api/ListModelLabRuns.rb create mode 100644 examples/v2/model-lab-api/PinModelLabRun.rb create mode 100644 examples/v2/model-lab-api/StarModelLabProject.rb create mode 100644 examples/v2/model-lab-api/UnpinModelLabRun.rb create mode 100644 examples/v2/model-lab-api/UnstarModelLabProject.rb create mode 100644 examples/v2/model-lab-api/UnstarModelLabProject_931927092.rb create mode 100644 features/v2/model_lab_api.feature create mode 100644 lib/datadog_api_client/v2/api/model_lab_api_api.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_action_data.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_create.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_create_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_relationships.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_response.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_trigger.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_trigger_data.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_trigger_type.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rules_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_request_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_request_data.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_automation_rule_state.rb delete mode 100644 lib/datadog_api_client/v2/models/case_bulk_action_type.rb delete mode 100644 lib/datadog_api_client/v2/models/case_bulk_update_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_bulk_update_request_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_bulk_update_request_data.rb delete mode 100644 lib/datadog_api_client/v2/models/case_count_group.rb delete mode 100644 lib/datadog_api_client/v2/models/case_count_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_count_response_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_insight.rb delete mode 100644 lib/datadog_api_client/v2/models/case_insight_type.rb delete mode 100644 lib/datadog_api_client/v2/models/case_insights_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_insights_data.rb delete mode 100644 lib/datadog_api_client/v2/models/case_link_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_link_create.rb delete mode 100644 lib/datadog_api_client/v2/models/case_link_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_links_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_type_update.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_comment.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_comment_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_comment_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_due_date.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_due_date_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_due_date_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_resolved_reason.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_resolved_reason_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_resolved_reason_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_create.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_create_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_update.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_update_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_watcher.rb delete mode 100644 lib/datadog_api_client/v2/models/case_watcher_relationships.rb delete mode 100644 lib/datadog_api_client/v2/models/case_watcher_user_relationship.rb delete mode 100644 lib/datadog_api_client/v2/models/case_watchers_response.rb delete mode 100644 lib/datadog_api_client/v2/models/custom_attribute_config_update.rb delete mode 100644 lib/datadog_api_client/v2/models/custom_attribute_config_update_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/custom_attribute_config_update_request.rb delete mode 100644 lib/datadog_api_client/v2/models/custom_attribute_type_data.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_create_request.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_resource_type.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_response.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_update.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_update_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_update_request.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_windows_response.rb rename lib/datadog_api_client/v2/models/{case_view_attributes.rb => model_lab_artifact_info.rb} (63%) rename lib/datadog_api_client/v2/models/{case_aggregate_group_by.rb => model_lab_artifact_object_info.rb} (65%) create mode 100644 lib/datadog_api_client/v2/models/model_lab_facet_keys_attributes.rb rename lib/datadog_api_client/v2/models/{case_count_response_data.rb => model_lab_facet_keys_data.rb} (91%) rename lib/datadog_api_client/v2/models/{case_view_create_request.rb => model_lab_facet_keys_response.rb} (92%) rename lib/datadog_api_client/v2/models/{case_link_resource_type.rb => model_lab_facet_keys_type.rb} (83%) create mode 100644 lib/datadog_api_client/v2/models/model_lab_facet_type.rb rename lib/datadog_api_client/v2/models/{maintenance_window_create_attributes.rb => model_lab_facet_values_attributes.rb} (54%) rename lib/datadog_api_client/v2/models/{case_link.rb => model_lab_facet_values_data.rb} (90%) rename lib/datadog_api_client/v2/models/{automation_rule_create_request.rb => model_lab_facet_values_response.rb} (92%) create mode 100644 lib/datadog_api_client/v2/models/model_lab_facet_values_type.rb rename lib/datadog_api_client/v2/models/{maintenance_window_create.rb => model_lab_metric_stat_range.rb} (65%) create mode 100644 lib/datadog_api_client/v2/models/model_lab_metric_summary.rb rename lib/datadog_api_client/v2/models/{automation_rule_update.rb => model_lab_numeric_range.rb} (72%) rename lib/datadog_api_client/v2/models/{case_view_update_request.rb => model_lab_page_meta.rb} (81%) rename lib/datadog_api_client/v2/models/{case_aggregate_response_attributes.rb => model_lab_page_meta_page.rb} (53%) rename lib/datadog_api_client/v2/models/{case_view_relationships.rb => model_lab_pagination_links.rb} (66%) rename lib/datadog_api_client/v2/models/{case_views_response.rb => model_lab_project_artifacts_attributes.rb} (78%) rename lib/datadog_api_client/v2/models/{case_aggregate_response_data.rb => model_lab_project_artifacts_data.rb} (89%) rename lib/datadog_api_client/v2/models/{automation_rule_update_request.rb => model_lab_project_artifacts_response.rb} (91%) rename lib/datadog_api_client/v2/models/{case_aggregate_resource_type.rb => model_lab_project_artifacts_type.rb} (80%) create mode 100644 lib/datadog_api_client/v2/models/model_lab_project_attributes.rb rename lib/datadog_api_client/v2/models/{maintenance_window.rb => model_lab_project_data.rb} (87%) rename lib/datadog_api_client/v2/models/{case_bulk_resource_type.rb => model_lab_project_facet_type.rb} (83%) rename lib/datadog_api_client/v2/models/{case_link_create_request.rb => model_lab_project_response.rb} (92%) rename lib/datadog_api_client/v2/models/{case_watcher_resource_type.rb => model_lab_project_type.rb} (83%) rename lib/datadog_api_client/v2/models/{project_favorites_response.rb => model_lab_projects_response.rb} (73%) rename lib/datadog_api_client/v2/models/{case_aggregate_group.rb => model_lab_run_artifacts_attributes.rb} (67%) create mode 100644 lib/datadog_api_client/v2/models/model_lab_run_artifacts_data.rb rename lib/datadog_api_client/v2/models/{case_insights_request.rb => model_lab_run_artifacts_response.rb} (91%) rename lib/datadog_api_client/v2/models/{case_automation_rule_resource_type.rb => model_lab_run_artifacts_type.rb} (82%) create mode 100644 lib/datadog_api_client/v2/models/model_lab_run_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/model_lab_run_data.rb rename lib/datadog_api_client/v2/models/{case_count_group_value.rb => model_lab_run_param.rb} (82%) rename lib/datadog_api_client/v2/models/{case_type_update_request.rb => model_lab_run_response.rb} (93%) rename lib/datadog_api_client/v2/models/{automation_rule_action_type.rb => model_lab_run_status.rb} (66%) rename lib/datadog_api_client/v2/models/{case_view_resource_type.rb => model_lab_run_type.rb} (85%) rename lib/datadog_api_client/v2/models/{automation_rule_action.rb => model_lab_runs_response.rb} (75%) rename lib/datadog_api_client/v2/models/{custom_attribute_select_option.rb => model_lab_tag.rb} (82%) delete mode 100644 lib/datadog_api_client/v2/models/project_favorite.rb delete mode 100644 lib/datadog_api_client/v2/models/project_favorite_resource_type.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6def5f93679e..dc5063005bf1 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -249,7 +249,7 @@ components: schema: $ref: "#/components/schemas/CaseSortableField" CaseTypeIDPathParameter: - description: The UUID of the case type. + description: Case type's UUID example: "f98a5a5b-e0ff-45d4-b2f5-afe6e74de505" in: path name: case_type_id @@ -257,7 +257,7 @@ components: schema: type: string CellIDPathParameter: - description: The UUID of the timeline cell (comment) to update. + description: Timeline cell's UUID example: "f98a5a5b-e0ff-45d4-b2f5-afe6e74de504" in: path name: cell_id @@ -853,22 +853,6 @@ components: required: true schema: type: string - LinkIDPathParameter: - description: "The UUID of the case link." - in: path - name: link_id - required: true - schema: - example: "804cd682-55f6-4541-ab00-b608b282ea7d" - type: string - MaintenanceWindowIDPathParameter: - description: The UUID of the maintenance window. - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - in: path - name: maintenance_window_id - required: true - schema: - type: string MembershipSort: description: >- Field to sort memberships by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`. @@ -948,6 +932,24 @@ components: required: false schema: type: string + ModelLabProjectIDPathParameter: + description: The ID of the Model Lab project. + in: path + name: project_id + required: true + schema: + example: 1 + format: int64 + type: integer + ModelLabRunIDPathParameter: + description: The ID of the Model Lab run. + in: path + name: run_id + required: true + schema: + example: 42 + format: int64 + type: integer NDMPageNumber: description: Specific page number to return. Defaults to 0. in: query @@ -1439,14 +1441,6 @@ components: schema: example: "1" type: string - RuleIDPathParameter: - description: The UUID of the automation rule. - example: "e6773723-fe58-49ff-9975-dff00f14e28d" - in: path - name: rule_id - required: true - schema: - type: string RuleId: description: The ID of the rule. in: path @@ -1625,22 +1619,6 @@ components: schema: example: "00000000-0000-9999-0000-000000000000" type: string - UserUUIDPathParameter: - description: The UUID of the user to add or remove as a watcher. - example: "8146583c-0b5f-11ec-abf8-da7ad0900001" - in: path - name: user_uuid - required: true - schema: - type: string - ViewIDPathParameter: - description: The UUID of the case view. - example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - in: path - name: view_id - required: true - schema: - type: string WorkflowId: description: The ID of the workflow. in: path @@ -7648,219 +7626,6 @@ components: description: Whether to auto-transition cases when self-assigned. type: boolean type: object - AutomationRule: - description: An automation rule that executes an action (such as running a Datadog workflow or assigning an AI agent) when a specified case event occurs within a project. - properties: - attributes: - $ref: "#/components/schemas/AutomationRuleAttributes" - id: - description: Automation rule identifier. - example: "e6773723-fe58-49ff-9975-dff00f14e28d" - type: string - relationships: - $ref: "#/components/schemas/AutomationRuleRelationships" - type: - $ref: "#/components/schemas/CaseAutomationRuleResourceType" - required: - - id - - type - - attributes - type: object - AutomationRuleAction: - description: Defines what happens when the rule triggers. Combines an action type with action-specific configuration data. - properties: - data: - $ref: "#/components/schemas/AutomationRuleActionData" - type: - $ref: "#/components/schemas/AutomationRuleActionType" - required: - - type - - data - type: object - AutomationRuleActionData: - description: Configuration for the action to execute, dependent on the action type. - properties: - agent_type: - description: The type of AI agent to assign. Required when the action type is `assign_agent`. - type: string - assigned_agent_id: - description: The identifier of the AI agent to assign to the case. Required when the action type is `assign_agent`. - type: string - handle: - description: The handle of the Datadog workflow to execute. Required when the action type is `execute_workflow`. - example: "workflow-handle-123" - type: string - type: object - AutomationRuleActionType: - description: The type of automated action to perform when the rule triggers. `execute_workflow` runs a Datadog workflow; `assign_agent` assigns an AI agent to the case. - enum: - - execute_workflow - - assign_agent - example: execute_workflow - type: string - x-enum-varnames: - - EXECUTE_WORKFLOW - - ASSIGN_AGENT - AutomationRuleAttributes: - description: Core attributes of an automation rule, including its name, trigger condition, action to execute, and current state. - properties: - action: - $ref: "#/components/schemas/AutomationRuleAction" - created_at: - description: Timestamp when the automation rule was created. - example: "2024-01-01T00:00:00.000Z" - format: date-time - readOnly: true - type: string - modified_at: - description: Timestamp when the automation rule was last modified. - format: date-time - readOnly: true - type: string - name: - description: A human-readable name for the automation rule, used to identify the rule in the UI and API responses. - example: "Auto-assign workflow" - type: string - state: - $ref: "#/components/schemas/CaseAutomationRuleState" - trigger: - $ref: "#/components/schemas/AutomationRuleTrigger" - required: - - name - - trigger - - action - - state - - created_at - type: object - AutomationRuleCreate: - description: Data object for creating an automation rule. - properties: - attributes: - $ref: "#/components/schemas/AutomationRuleCreateAttributes" - type: - $ref: "#/components/schemas/CaseAutomationRuleResourceType" - required: - - type - - attributes - type: object - AutomationRuleCreateAttributes: - description: Attributes required to create an automation rule. - properties: - action: - $ref: "#/components/schemas/AutomationRuleAction" - name: - description: Name of the automation rule. - example: "Auto-assign workflow" - type: string - state: - $ref: "#/components/schemas/CaseAutomationRuleState" - trigger: - $ref: "#/components/schemas/AutomationRuleTrigger" - required: - - name - - trigger - - action - type: object - AutomationRuleCreateRequest: - description: Request payload for creating an automation rule. - properties: - data: - $ref: "#/components/schemas/AutomationRuleCreate" - required: - - data - type: object - AutomationRuleRelationships: - description: Related resources for the automation rule, including the users who created and last modified it. - properties: - created_by: - $ref: "#/components/schemas/NullableUserRelationship" - modified_by: - $ref: "#/components/schemas/NullableUserRelationship" - type: object - AutomationRuleResponse: - description: Response containing a single automation rule. - properties: - data: - $ref: "#/components/schemas/AutomationRule" - required: - - data - type: object - AutomationRuleTrigger: - description: Defines when the rule activates. Combines a trigger type (the case event to listen for) with optional trigger data (conditions that narrow when the trigger fires). - properties: - data: - $ref: "#/components/schemas/AutomationRuleTriggerData" - type: - $ref: "#/components/schemas/AutomationRuleTriggerType" - required: - - type - type: object - AutomationRuleTriggerData: - description: Additional configuration for the trigger, dependent on the trigger type. For `status_transitioned` triggers, specify `from_status_name` and `to_status_name`. For `attribute_value_changed` triggers, specify `field` and `change_type`. - properties: - approval_type: - description: The approval outcome to match. Used with `case_review_approved` triggers. - type: string - change_type: - description: "The kind of attribute change to match. Allowed values: `VALUE_ADDED`, `VALUE_DELETED`, `ANY_CHANGES`. Used with `attribute_value_changed` triggers." - type: string - field: - description: The case attribute field name to monitor for changes. Used with `attribute_value_changed` triggers. - type: string - from_status_name: - description: The originating status name. Used with `status_transitioned` triggers to match transitions from this status. - type: string - to_status_name: - description: The destination status name. Used with `status_transitioned` triggers to match transitions to this status. - type: string - type: object - AutomationRuleTriggerType: - description: The case event that activates the automation rule. - enum: - - case_created - - status_transitioned - - attribute_value_changed - - event_correlation_signal_correlated - - case_review_approved - - comment_added - example: case_created - type: string - x-enum-varnames: - - CASE_CREATED - - STATUS_TRANSITIONED - - ATTRIBUTE_VALUE_CHANGED - - EVENT_CORRELATION_SIGNAL_CORRELATED - - CASE_REVIEW_APPROVED - - COMMENT_ADDED - AutomationRuleUpdate: - description: Data object for updating an automation rule. - properties: - attributes: - $ref: "#/components/schemas/AutomationRuleCreateAttributes" - type: - $ref: "#/components/schemas/CaseAutomationRuleResourceType" - required: - - type - type: object - AutomationRuleUpdateRequest: - description: Request payload for updating an automation rule. - properties: - data: - $ref: "#/components/schemas/AutomationRuleUpdate" - required: - - data - type: object - AutomationRulesResponse: - description: Response containing a list of automation rules for a project. - properties: - data: - description: List of automation rules. - items: - $ref: "#/components/schemas/AutomationRule" - type: array - required: - - data - type: object AwsAccountId: description: The ID of the AWS account. example: "123456789012" @@ -11125,128 +10890,6 @@ components: - IN_PROGRESS - COMPLETED - FAILED - CaseAggregateGroup: - description: A single group within the aggregation results, containing the group key and its associated count values. - properties: - group: - description: "The value of the field being grouped on (for example, `OPEN` when grouping by status)." - example: "OPEN" - type: string - value: - description: The count of cases in this group. - example: - - 42.0 - items: - format: double - type: number - type: array - required: - - group - - value - type: object - CaseAggregateGroupBy: - description: Configuration for grouping aggregated results by one or more case fields. - properties: - groups: - description: Fields to group by. - example: - - "status" - items: - type: string - type: array - limit: - description: Maximum number of groups to return. - example: 14 - format: int32 - maximum: 1000 - type: integer - required: - - groups - - limit - type: object - CaseAggregateRequest: - description: Request payload for aggregating case counts with grouping. Use this to get faceted breakdowns of cases (for example, count of cases grouped by priority and status). - properties: - data: - $ref: "#/components/schemas/CaseAggregateRequestData" - required: - - data - type: object - CaseAggregateRequestAttributes: - description: Attributes for the aggregation request, including the search query and grouping configuration. - properties: - group_by: - $ref: "#/components/schemas/CaseAggregateGroupBy" - query_filter: - description: "A search query to filter which cases are included in the aggregation. Uses the same syntax as the Case Management search bar." - example: "service:case-api" - type: string - required: - - query_filter - - group_by - type: object - CaseAggregateRequestData: - description: Data object wrapping the aggregation query type and attributes. - properties: - attributes: - $ref: "#/components/schemas/CaseAggregateRequestAttributes" - type: - $ref: "#/components/schemas/CaseAggregateResourceType" - required: - - attributes - - type - type: object - CaseAggregateResourceType: - description: JSON:API resource type for case aggregation requests. - enum: - - aggregate - example: aggregate - type: string - x-enum-varnames: - - AGGREGATE - CaseAggregateResponse: - description: Response containing aggregated case counts grouped by the requested fields. - properties: - data: - $ref: "#/components/schemas/CaseAggregateResponseData" - required: - - data - type: object - CaseAggregateResponseAttributes: - description: Attributes of the aggregation result, including the total count across all groups and the per-group breakdowns. - properties: - groups: - description: Aggregated groups. - items: - $ref: "#/components/schemas/CaseAggregateGroup" - type: array - total: - description: Total count of aggregated cases. - example: 100.0 - format: double - type: number - required: - - total - - groups - type: object - CaseAggregateResponseData: - description: Data object containing the aggregation results, including total count and per-group breakdowns. - properties: - attributes: - $ref: "#/components/schemas/CaseAggregateResponseAttributes" - id: - description: Aggregate response identifier. - example: "agg-result-001" - type: string - type: - description: Aggregate resource type. - example: "aggregate" - type: string - required: - - type - - id - - attributes - type: object CaseAssign: description: Case assign properties: @@ -11339,102 +10982,6 @@ components: example: "3b010bde-09ce-4449-b745-71dd5f861963" type: string type: object - CaseAutomationRuleResourceType: - default: rule - description: JSON:API resource type for case automation rules. - enum: - - rule - example: rule - type: string - x-enum-varnames: - - RULE - CaseAutomationRuleState: - description: Whether the automation rule is active. Enabled rules trigger on matching case events; disabled rules are inactive but preserve their configuration. - enum: - - ENABLED - - DISABLED - example: ENABLED - type: string - x-enum-varnames: - - ENABLED - - DISABLED - CaseBulkActionType: - description: "The type of action to apply in a bulk update. Allowed values are `priority`, `status`, `assign`, `unassign`, `archive`, `unarchive`, `jira`, `servicenow`, `linear`, `update_project`." - enum: - - priority - - status - - assign - - unassign - - archive - - unarchive - - jira - - servicenow - - linear - - update_project - example: priority - type: string - x-enum-varnames: - - PRIORITY - - STATUS - - ASSIGN - - UNASSIGN - - ARCHIVE - - UNARCHIVE - - JIRA - - SERVICENOW - - LINEAR - - UPDATE_PROJECT - CaseBulkResourceType: - description: JSON:API resource type for bulk case operations. - enum: - - bulk - example: bulk - type: string - x-enum-varnames: - - BULK - CaseBulkUpdateRequest: - description: Request payload for applying a single action (such as changing priority, status, or assignment) to multiple cases at once. - properties: - data: - $ref: "#/components/schemas/CaseBulkUpdateRequestData" - required: - - data - type: object - CaseBulkUpdateRequestAttributes: - description: Attributes for the bulk update, specifying which cases to update and the action to apply. - properties: - case_ids: - description: An array of case identifiers to apply the bulk action to. - example: - - "case-id-1" - - "case-id-2" - items: - type: string - type: array - payload: - additionalProperties: - type: string - description: A key-value map of action-specific parameters. The required keys depend on the action type (for example, `priority` for the priority action, `assignee_id` for assign). - example: - priority: "P1" - type: object - type: - $ref: "#/components/schemas/CaseBulkActionType" - required: - - case_ids - - type - type: object - CaseBulkUpdateRequestData: - description: Data object wrapping the bulk update type and attributes. - properties: - attributes: - $ref: "#/components/schemas/CaseBulkUpdateRequestAttributes" - type: - $ref: "#/components/schemas/CaseBulkResourceType" - required: - - attributes - - type - type: object CaseComment: description: Case comment properties: @@ -11464,75 +11011,6 @@ components: required: - data type: object - CaseCountGroup: - description: A facet group containing counts broken down by the distinct values of a case field (for example, status or priority). - properties: - group: - description: "The name of the field being grouped on (for example, `status` or `priority`)." - example: "status" - type: string - group_values: - description: Values within this group. - items: - $ref: "#/components/schemas/CaseCountGroupValue" - type: array - required: - - group - - group_values - type: object - CaseCountGroupValue: - description: A single value within a count group, representing the number of cases with that specific field value. - properties: - count: - description: Count of cases for this value. - example: 42 - format: int64 - type: integer - value: - description: The group value. - example: "OPEN" - type: string - required: - - value - - count - type: object - CaseCountResponse: - description: Response containing the total number of cases matching a query, optionally grouped by specified fields. - properties: - data: - $ref: "#/components/schemas/CaseCountResponseData" - required: - - data - type: object - CaseCountResponseAttributes: - description: Attributes for the count response, including the total count and optional facet breakdowns. - properties: - groups: - description: List of facet groups, one per field specified in `group_bys`. - items: - $ref: "#/components/schemas/CaseCountGroup" - type: array - required: - - groups - type: object - CaseCountResponseData: - description: Data object containing the count results, including per-field group breakdowns. - properties: - attributes: - $ref: "#/components/schemas/CaseCountResponseAttributes" - id: - description: Count response identifier. - example: "count-result-001" - type: string - type: - description: Count resource type. - example: "count" - type: string - required: - - type - - id - - attributes - type: object CaseCreate: description: Case creation data properties: @@ -11616,86 +11094,6 @@ components: required: - data type: object - CaseInsight: - description: A reference to an external Datadog resource that provides investigative context for a case, such as a security signal, monitor alert, error tracking issue, or incident. - properties: - ref: - description: "The URL path or deep link to the insight resource within Datadog (for example, `/monitors/12345?q=total`)." - example: "/monitors/12345?q=total" - type: string - resource_id: - description: The unique identifier of the referenced Datadog resource (for example, a monitor ID, incident ID, or signal ID). - example: "12345" - type: string - type: - $ref: "#/components/schemas/CaseInsightType" - required: - - type - - ref - - resource_id - type: object - CaseInsightType: - description: The type of Datadog resource linked to the case as contextual evidence. Each type corresponds to a different Datadog product signal (for example, a security finding, a monitor alert, or an incident). - enum: - - SECURITY_SIGNAL - - MONITOR - - EVENT_CORRELATION - - ERROR_TRACKING - - CLOUD_COST_RECOMMENDATION - - INCIDENT - - SENSITIVE_DATA_SCANNER_ISSUE - - EVENT - - WATCHDOG_STORY - - WIDGET - - SECURITY_FINDING - - INSIGHT_SCORECARD_CAMPAIGN - - RESOURCE_POLICY - - APM_RECOMMENDATION - - SCM_URL - - PROFILING_DOWNSIZING_EXPERIMENT - example: SECURITY_SIGNAL - type: string - x-enum-varnames: - - SECURITY_SIGNAL - - MONITOR - - EVENT_CORRELATION - - ERROR_TRACKING - - CLOUD_COST_RECOMMENDATION - - INCIDENT - - SENSITIVE_DATA_SCANNER_ISSUE - - EVENT - - WATCHDOG_STORY - - WIDGET - - SECURITY_FINDING - - INSIGHT_SCORECARD_CAMPAIGN - - RESOURCE_POLICY - - APM_RECOMMENDATION - - SCM_URL - - PROFILING_DOWNSIZING_EXPERIMENT - CaseInsightsAttributes: - description: Attributes for adding or removing insights from a case. - properties: - insights: - description: Array of insights to add to or remove from a case. - items: - $ref: "#/components/schemas/CaseInsight" - maxItems: 100 - minItems: 1 - type: array - required: - - insights - type: object - CaseInsightsData: - description: Data object containing the insights to add or remove. - properties: - attributes: - $ref: "#/components/schemas/CaseInsightsAttributes" - type: - $ref: "#/components/schemas/CaseResourceType" - required: - - type - - attributes - type: object CaseInsightsItems: description: An insight of the case. properties: @@ -11712,106 +11110,6 @@ components: example: "SECURITY_FINDING" type: string type: object - CaseInsightsRequest: - description: Request payload for adding or removing case insights. - properties: - data: - $ref: "#/components/schemas/CaseInsightsData" - required: - - data - type: object - CaseLink: - description: "A directional link representing a relationship between two entities. At least one entity must be a case." - properties: - attributes: - $ref: "#/components/schemas/CaseLinkAttributes" - id: - description: "The case link identifier." - example: "804cd682-55f6-4541-ab00-b608b282ea7d" - type: string - type: - $ref: "#/components/schemas/CaseLinkResourceType" - required: - - id - - type - - attributes - type: object - CaseLinkAttributes: - description: "Attributes describing a directional relationship between two entities (cases, incidents, or pages)." - properties: - child_entity_id: - description: "The UUID of the child (target) entity in the relationship." - example: "4417921d-0866-4a38-822c-6f2a0f65f77d" - type: string - child_entity_type: - description: "The type of the child entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`." - example: "CASE" - type: string - parent_entity_id: - description: "The UUID of the parent (source) entity in the relationship." - example: "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f" - type: string - parent_entity_type: - description: "The type of the parent entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`." - example: "CASE" - type: string - relationship: - description: "The type of directional relationship. Allowed values: `RELATES_TO` (bidirectional association), `CAUSES` (parent causes child), `BLOCKS` (parent blocks child), `DUPLICATES` (parent duplicates child), `PARENT_OF` (hierarchical), `SUCCESSOR_OF` (sequence), `ESCALATES_TO` (priority escalation)." - example: "BLOCKS" - type: string - required: - - relationship - - parent_entity_id - - parent_entity_type - - child_entity_id - - child_entity_type - type: object - CaseLinkCreate: - description: "Data object for creating a case link." - properties: - attributes: - $ref: "#/components/schemas/CaseLinkAttributes" - type: - $ref: "#/components/schemas/CaseLinkResourceType" - required: - - type - - attributes - type: object - CaseLinkCreateRequest: - description: "Request payload for creating a link between two entities." - properties: - data: - $ref: "#/components/schemas/CaseLinkCreate" - required: - - data - type: object - CaseLinkResourceType: - description: "JSON:API resource type for case links." - enum: - - link - example: link - type: string - x-enum-varnames: - - LINK - CaseLinkResponse: - description: "Response containing a single case link." - properties: - data: - $ref: "#/components/schemas/CaseLink" - required: - - data - type: object - CaseLinksResponse: - description: "Response containing a list of case links." - properties: - data: - description: "A list of case links." - items: - $ref: "#/components/schemas/CaseLink" - type: array - required: - - data - type: object CaseManagementProject: description: Case management project. properties: @@ -12054,7 +11352,7 @@ components: description: An attribute value. type: string type: array - description: Key-value pairs of case attributes. Each key maps to an array of string values, used for flexible metadata such as labels or tags. + description: The definition of `CaseObjectAttributes` object. type: object CasePriority: default: NOT_DEFINED @@ -12089,7 +11387,7 @@ components: type: object CaseResourceType: default: case - description: JSON:API resource type for cases. + description: Case resource type enum: - case example: case @@ -12169,7 +11467,7 @@ components: x-enum-varnames: - STANDARD CaseTypeCreate: - description: Data object for creating a case type. + description: Case type properties: attributes: $ref: "#/components/schemas/CaseTypeResourceAttributes" @@ -12180,7 +11478,7 @@ components: - type type: object CaseTypeCreateRequest: - description: Request payload for creating a case type. + description: Case type create request properties: data: $ref: "#/components/schemas/CaseTypeCreate" @@ -12188,7 +11486,7 @@ components: - data type: object CaseTypeResource: - description: A case type that defines a classification category for cases. Each case type can have its own custom attributes, statuses, and automation rules. + description: The definition of `CaseType` object. properties: attributes: $ref: "#/components/schemas/CaseTypeResourceAttributes" @@ -12200,24 +11498,24 @@ components: $ref: "#/components/schemas/CaseTypeResourceType" type: object CaseTypeResourceAttributes: - description: "Attributes of a case type, which define a classification category for cases. Organizations use case types to model different workflows (for example, Security Incident, Bug Report, Change Request)." + description: Case Type resource attributes properties: deleted_at: - description: Timestamp when the case type was marked as deleted. A null value indicates the case type is active. + description: Timestamp of when the case type was deleted format: date-time nullable: true readOnly: true type: string description: - description: A detailed description explaining when this case type should be used. + description: Case type description. example: "Investigations done in case management" type: string emoji: - description: An emoji icon representing the case type in the UI. + description: Case type emoji. example: "🕵🏻‍♂️" type: string name: - description: The display name of the case type, shown in the Case Management UI when creating or viewing cases. + description: Case type name. example: "Investigation" type: string required: @@ -12225,7 +11523,7 @@ components: type: object CaseTypeResourceType: default: case_type - description: JSON:API resource type for case types. + description: Case type resource type enum: - case_type example: case_type @@ -12233,31 +11531,13 @@ components: x-enum-varnames: - CASE_TYPE CaseTypeResponse: - description: Response containing a single case type. + description: Case type response properties: data: $ref: "#/components/schemas/CaseTypeResource" type: object - CaseTypeUpdate: - description: Data object for updating a case type. - properties: - attributes: - $ref: "#/components/schemas/CaseTypeResourceAttributes" - type: - $ref: "#/components/schemas/CaseTypeResourceType" - required: - - type - type: object - CaseTypeUpdateRequest: - description: Request payload for updating a case type. - properties: - data: - $ref: "#/components/schemas/CaseTypeUpdate" - required: - - data - type: object CaseTypesResponse: - description: Response containing a list of case types. + description: Case types response. properties: data: description: List of case types @@ -12292,35 +11572,6 @@ components: required: - data type: object - CaseUpdateComment: - description: Data object for updating a case comment. - properties: - attributes: - $ref: "#/components/schemas/CaseUpdateCommentAttributes" - type: - $ref: "#/components/schemas/CaseResourceType" - required: - - type - - attributes - type: object - CaseUpdateCommentAttributes: - description: Attributes for updating a comment. - properties: - comment: - description: The updated comment message. - example: "Updated comment text" - type: string - required: - - comment - type: object - CaseUpdateCommentRequest: - description: Request payload for updating a comment on a case timeline. - properties: - data: - $ref: "#/components/schemas/CaseUpdateComment" - required: - - data - type: object CaseUpdateCustomAttribute: description: Case update custom attribute properties: @@ -12369,35 +11620,6 @@ components: required: - data type: object - CaseUpdateDueDate: - description: Data object for updating a case's due date. - properties: - attributes: - $ref: "#/components/schemas/CaseUpdateDueDateAttributes" - type: - $ref: "#/components/schemas/CaseResourceType" - required: - - attributes - - type - type: object - CaseUpdateDueDateAttributes: - description: Attributes for setting or clearing a case's due date. - properties: - due_date: - description: "The target resolution date for the case, in `YYYY-MM-DD` format. Set to `null` to clear the due date." - example: "2026-12-31" - type: string - required: - - due_date - type: object - CaseUpdateDueDateRequest: - description: Request payload for updating a case's due date. - properties: - data: - $ref: "#/components/schemas/CaseUpdateDueDate" - required: - - data - type: object CaseUpdatePriority: description: Case priority status properties: @@ -12425,35 +11647,6 @@ components: required: - data type: object - CaseUpdateResolvedReason: - description: Data object for updating a case's resolved reason. - properties: - attributes: - $ref: "#/components/schemas/CaseUpdateResolvedReasonAttributes" - type: - $ref: "#/components/schemas/CaseResourceType" - required: - - attributes - - type - type: object - CaseUpdateResolvedReasonAttributes: - description: Attributes for setting the resolution reason on a security case. - properties: - security_resolved_reason: - description: "The reason the security case was resolved (for example, `FALSE_POSITIVE`, `TRUE_POSITIVE`, `BENIGN_POSITIVE`)." - example: "FALSE_POSITIVE" - type: string - required: - - security_resolved_reason - type: object - CaseUpdateResolvedReasonRequest: - description: Request payload for updating the resolution reason on a closed security case. - properties: - data: - $ref: "#/components/schemas/CaseUpdateResolvedReason" - required: - - data - type: object CaseUpdateStatus: description: Case update status properties: @@ -12511,217 +11704,6 @@ components: required: - data type: object - CaseView: - description: A saved case view that provides a filtered, reusable list of cases matching a specific query. Views act as persistent dashboards for monitoring case subsets. - properties: - attributes: - $ref: "#/components/schemas/CaseViewAttributes" - id: - description: The view's identifier. - example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: string - relationships: - $ref: "#/components/schemas/CaseViewRelationships" - type: - $ref: "#/components/schemas/CaseViewResourceType" - required: - - id - - type - - attributes - type: object - CaseViewAttributes: - description: Attributes of a case view, including the filter query and optional notification rule. - properties: - created_at: - description: Timestamp when the view was created. - example: "2024-01-01T00:00:00.000Z" - format: date-time - readOnly: true - type: string - modified_at: - description: Timestamp when the view was last modified. - format: date-time - readOnly: true - type: string - name: - description: A human-readable name for the view, displayed in the Case Management UI. - example: Open bugs - type: string - np_rule_id: - description: The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - type: string - query: - description: "The search query that determines which cases appear in this view. Uses the same syntax as the Case Management search bar (for example, `status:open priority:P1`)." - example: "status:open type:bug" - type: string - required: - - name - - query - - created_at - type: object - CaseViewCreate: - description: Data object for creating a case view. - properties: - attributes: - $ref: "#/components/schemas/CaseViewCreateAttributes" - type: - $ref: "#/components/schemas/CaseViewResourceType" - required: - - type - - attributes - type: object - CaseViewCreateAttributes: - description: Attributes required to create a case view. - properties: - name: - description: The name of the view. - example: Open bugs - type: string - np_rule_id: - description: The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - type: string - project_id: - description: The UUID of the project this view belongs to. Views are scoped to a single project. - example: e555e290-ed65-49bd-ae18-8acbfcf18db7 - type: string - query: - description: The query used to filter cases in this view. - example: "status:open type:bug" - type: string - required: - - name - - query - - project_id - type: object - CaseViewCreateRequest: - description: Request payload for creating a case view. - properties: - data: - $ref: "#/components/schemas/CaseViewCreate" - required: - - data - type: object - CaseViewRelationships: - description: Related resources for the case view, including the creator, last modifier, and associated project. - properties: - created_by: - $ref: "#/components/schemas/NullableUserRelationship" - modified_by: - $ref: "#/components/schemas/NullableUserRelationship" - project: - $ref: "#/components/schemas/ProjectRelationship" - type: object - CaseViewResourceType: - default: view - description: "JSON:API resource type for case views." - enum: - - view - example: view - type: string - x-enum-varnames: - - VIEW - CaseViewResponse: - description: Response containing a single case view. - properties: - data: - $ref: "#/components/schemas/CaseView" - required: - - data - type: object - CaseViewUpdate: - description: Data object for updating a case view. - properties: - attributes: - $ref: "#/components/schemas/CaseViewUpdateAttributes" - type: - $ref: "#/components/schemas/CaseViewResourceType" - required: - - type - type: object - CaseViewUpdateAttributes: - description: Attributes that can be updated on a case view. All fields are optional; only provided fields are changed. - properties: - name: - description: The name of the view. - type: string - np_rule_id: - description: The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - type: string - query: - description: The query used to filter cases in this view. - type: string - type: object - CaseViewUpdateRequest: - description: Request payload for updating a case view. - properties: - data: - $ref: "#/components/schemas/CaseViewUpdate" - required: - - data - type: object - CaseViewsResponse: - description: Response containing a list of case views. - properties: - data: - description: A list of case views. - items: - $ref: "#/components/schemas/CaseView" - type: array - required: - - data - type: object - CaseWatcher: - description: Represents a user who is subscribed to notifications for a case. Watchers receive updates when the case's status, priority, assignee, or comments change. - properties: - id: - description: The primary identifier of the case watcher. - example: "8146583c-0b5f-11ec-abf8-da7ad0900001" - type: string - relationships: - $ref: "#/components/schemas/CaseWatcherRelationships" - type: - $ref: "#/components/schemas/CaseWatcherResourceType" - required: - - id - - type - - relationships - type: object - CaseWatcherRelationships: - description: Relationships for a case watcher, linking to the underlying user resource. - properties: - user: - $ref: "#/components/schemas/CaseWatcherUserRelationship" - required: - - user - type: object - CaseWatcherResourceType: - default: watcher - description: JSON:API resource type for case watchers. - enum: - - watcher - example: watcher - type: string - x-enum-varnames: - - WATCHER - CaseWatcherUserRelationship: - description: The user relationship for a case watcher. - properties: - data: - $ref: "#/components/schemas/UserRelationshipData" - required: - - data - type: object - CaseWatchersResponse: - description: Response containing the list of users watching a case. - properties: - data: - description: List of case watchers. - items: - $ref: "#/components/schemas/CaseWatcher" - type: array - required: - - data - type: object CasesResponse: description: Response with cases properties: @@ -21375,7 +20357,7 @@ components: $ref: "#/components/schemas/CsmServerlessCoverageAnalysisData" type: object CustomAttributeConfig: - description: "A custom attribute configuration that defines an organization-specific metadata field on cases. Custom attributes are scoped to a case type and can hold text, URLs, numbers, or predefined select options." + description: The definition of `CustomAttributeConfig` object. properties: attributes: $ref: "#/components/schemas/CustomAttributeConfigResourceAttributes" @@ -21387,22 +20369,22 @@ components: $ref: "#/components/schemas/CustomAttributeConfigResourceType" type: object CustomAttributeConfigAttributesCreate: - description: Attributes required to create a custom attribute configuration. + description: Custom attribute config resource attributes properties: description: - description: A description explaining the purpose and expected values for this custom attribute. + description: Custom attribute description. example: "AWS Region, must be a valid region supported by AWS" type: string display_name: - description: The human-readable label shown in the Case Management UI for this custom attribute. + description: Custom attribute name. example: "AWS Region" type: string is_multi: - description: "If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed." + description: Whether multiple values can be set example: true type: boolean key: - description: The programmatic key used to reference this custom attribute in search queries and API calls. + description: Custom attribute key. This will be the value use to search on this custom attribute example: "aws_region" type: string type: @@ -21414,7 +20396,7 @@ components: - is_multi type: object CustomAttributeConfigCreate: - description: Data object for creating a custom attribute configuration. + description: Custom attribute config properties: attributes: $ref: "#/components/schemas/CustomAttributeConfigAttributesCreate" @@ -21425,7 +20407,7 @@ components: - type type: object CustomAttributeConfigCreateRequest: - description: Request payload for creating a custom attribute configuration. + description: Custom attribute config create request properties: data: $ref: "#/components/schemas/CustomAttributeConfigCreate" @@ -21433,26 +20415,26 @@ components: - data type: object CustomAttributeConfigResourceAttributes: - description: "Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type." + description: Custom attribute resource attributes properties: case_type_id: - description: The UUID of the case type this custom attribute belongs to. + description: Custom attribute config identifier. example: "aeadc05e-98a8-11ec-ac2c-da7ad0900001" type: string description: - description: A description explaining the purpose and expected values for this custom attribute. + description: Custom attribute description. example: "AWS Region, must be a valid region supported by AWS" type: string display_name: - description: The human-readable label shown in the Case Management UI for this custom attribute. + description: Custom attribute name. example: "AWS Region" type: string is_multi: - description: "If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed." + description: Whether multiple values can be set example: true type: boolean key: - description: The programmatic key used to reference this custom attribute in search queries and API calls. + description: Custom attribute key. This will be the value use to search on this custom attribute example: "aws_region" type: string type: @@ -21466,7 +20448,7 @@ components: type: object CustomAttributeConfigResourceType: default: custom_attribute - description: JSON:API resource type for custom attribute configurations. + description: Custom attributes config JSON:API resource type enum: - custom_attribute example: custom_attribute @@ -21474,50 +20456,13 @@ components: x-enum-varnames: - CUSTOM_ATTRIBUTE CustomAttributeConfigResponse: - description: Response containing a single custom attribute configuration. + description: Custom attribute config response. properties: data: $ref: "#/components/schemas/CustomAttributeConfig" type: object - CustomAttributeConfigUpdate: - description: Data object for updating a custom attribute configuration. - properties: - attributes: - $ref: "#/components/schemas/CustomAttributeConfigUpdateAttributes" - type: - $ref: "#/components/schemas/CustomAttributeConfigResourceType" - required: - - type - type: object - CustomAttributeConfigUpdateAttributes: - description: Attributes that can be updated on a custom attribute configuration. All fields are optional; only provided fields are changed. - properties: - description: - description: A description explaining the purpose and expected values for this custom attribute. - example: "Updated description." - type: string - display_name: - description: The human-readable label shown in the Case Management UI for this custom attribute. - example: "AWS Region" - type: string - map_from: - description: An external field identifier to auto-populate this attribute from (used for integrations with external systems). - type: string - type: - $ref: "#/components/schemas/CustomAttributeType" - type_data: - $ref: "#/components/schemas/CustomAttributeTypeData" - type: object - CustomAttributeConfigUpdateRequest: - description: Request payload for updating a custom attribute configuration. - properties: - data: - $ref: "#/components/schemas/CustomAttributeConfigUpdate" - required: - - data - type: object CustomAttributeConfigsResponse: - description: Response containing a list of custom attribute configurations. + description: Custom attribute configs response. properties: data: description: List of custom attribute configs of case type @@ -21526,37 +20471,27 @@ components: type: array type: object CustomAttributeMultiNumberValue: - description: An array of numeric values for a multi-value NUMBER-type custom attribute. + description: Values of multi NUMBER custom attribute items: description: NUMBER value format: double type: number type: array CustomAttributeMultiStringValue: - description: An array of string values for a multi-value TEXT, URL, or SELECT-type custom attribute. + description: Value of multi TEXT/URL/NUMBER/SELECT custom attribute items: description: TEXT/URL/NUMBER/SELECT Value type: string type: array CustomAttributeNumberValue: - description: A numeric value for a NUMBER-type custom attribute. + description: Value of NUMBER custom attribute format: double type: number - CustomAttributeSelectOption: - description: A selectable option for a SELECT-type custom attribute. - properties: - value: - description: Option value. - example: "us-east-1" - type: string - required: - - value - type: object CustomAttributeStringValue: - description: A string value for a TEXT, URL, or SELECT-type custom attribute. + description: Value of TEXT/URL/NUMBER/SELECT custom attribute type: string CustomAttributeType: - description: "The data type of the custom attribute, which determines the allowed values and UI input control." + description: Custom attributes type enum: - URL - TEXT @@ -21569,17 +20504,8 @@ components: - TEXT - NUMBER - SELECT - CustomAttributeTypeData: - description: "Type-specific configuration for the custom attribute. For SELECT-type attributes, this contains the list of allowed options." - properties: - options: - description: Options for SELECT type custom attributes. - items: - $ref: "#/components/schemas/CustomAttributeSelectOption" - type: array - type: object CustomAttributeValue: - description: A typed value for a custom attribute on a specific case. + description: Custom attribute values properties: is_multi: description: If true, value must be an array @@ -21595,7 +20521,7 @@ components: - value type: object CustomAttributeValuesUnion: - description: The value of a custom attribute. The accepted format depends on the attribute's type and whether it accepts multiple values. + description: Union of supported value for a custom attribute example: "" oneOf: - $ref: "#/components/schemas/CustomAttributeStringValue" @@ -46366,167 +45292,6 @@ components: - type - id type: object - MaintenanceWindow: - description: A maintenance window that defines a scheduled time period during which case-related notifications and automation rules are suppressed. Each maintenance window applies to cases matching a specified query. - properties: - attributes: - $ref: "#/components/schemas/MaintenanceWindowAttributes" - id: - description: The maintenance window's identifier. - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - type: string - type: - $ref: "#/components/schemas/MaintenanceWindowResourceType" - required: - - id - - type - - attributes - type: object - MaintenanceWindowAttributes: - description: Attributes of a maintenance window, including its schedule and the query that determines which cases are affected. - properties: - created_by: - description: The UUID of the user who created this maintenance window. Read-only. - readOnly: true - type: string - end_at: - description: The ISO 8601 timestamp when the maintenance window ends and normal notification behavior resumes. - example: "2026-06-01T06:00:00Z" - format: date-time - type: string - name: - description: "A human-readable name for the maintenance window (for example, `Database migration - Dec 15`)." - example: "Weekly maintenance" - type: string - query: - description: A case search query that determines which cases are affected during the maintenance window. Uses the same syntax as the Case Management search bar. - example: "project:SEC" - type: string - start_at: - description: The ISO 8601 timestamp when the maintenance window begins and notifications start being suppressed. - example: "2026-06-01T00:00:00Z" - format: date-time - type: string - updated_by: - description: The UUID of the user who last modified this maintenance window. Read-only. - readOnly: true - type: string - required: - - name - - query - - start_at - - end_at - type: object - MaintenanceWindowCreate: - description: Data object for creating a maintenance window. - properties: - attributes: - $ref: "#/components/schemas/MaintenanceWindowCreateAttributes" - type: - $ref: "#/components/schemas/MaintenanceWindowResourceType" - required: - - type - - attributes - type: object - MaintenanceWindowCreateAttributes: - description: Attributes required to create a maintenance window. - properties: - end_at: - description: The end time of the maintenance window. - example: "2026-06-01T06:00:00Z" - format: date-time - type: string - name: - description: The name of the maintenance window. - example: "Weekly maintenance" - type: string - query: - description: The query to filter event management cases for this maintenance window. - example: "project:SEC" - type: string - start_at: - description: The start time of the maintenance window. - example: "2026-06-01T00:00:00Z" - format: date-time - type: string - required: - - name - - query - - start_at - - end_at - type: object - MaintenanceWindowCreateRequest: - description: Request payload for creating a maintenance window. - properties: - data: - $ref: "#/components/schemas/MaintenanceWindowCreate" - required: - - data - type: object - MaintenanceWindowResourceType: - default: maintenance_window - description: JSON:API resource type for maintenance windows. - enum: - - maintenance_window - example: maintenance_window - type: string - x-enum-varnames: - - MAINTENANCE_WINDOW - MaintenanceWindowResponse: - description: Response containing a single maintenance window. - properties: - data: - $ref: "#/components/schemas/MaintenanceWindow" - required: - - data - type: object - MaintenanceWindowUpdate: - description: Data object for updating a maintenance window. - properties: - attributes: - $ref: "#/components/schemas/MaintenanceWindowUpdateAttributes" - type: - $ref: "#/components/schemas/MaintenanceWindowResourceType" - required: - - type - type: object - MaintenanceWindowUpdateAttributes: - description: Attributes that can be updated on a maintenance window. All fields are optional; only provided fields are changed. - properties: - end_at: - description: The end time of the maintenance window. - format: date-time - type: string - name: - description: The name of the maintenance window. - type: string - query: - description: The query to filter event management cases for this maintenance window. - type: string - start_at: - description: The start time of the maintenance window. - format: date-time - type: string - type: object - MaintenanceWindowUpdateRequest: - description: Request payload for updating a maintenance window. - properties: - data: - $ref: "#/components/schemas/MaintenanceWindowUpdate" - required: - - data - type: object - MaintenanceWindowsResponse: - description: Response containing a list of maintenance windows. - properties: - data: - description: List of maintenance windows. - items: - $ref: "#/components/schemas/MaintenanceWindow" - type: array - required: - - data - type: object ManagedOrgsData: description: The managed organizations resource. properties: @@ -48346,6 +47111,758 @@ components: maxLength: 255 type: string type: object + ModelLabArtifactInfo: + description: Information about a project-level artifact file. + properties: + artifact_path: + description: The full artifact path relative to the project's artifact root. + example: projects/1/artifacts/model.pkl + type: string + created_at: + description: The date and time the artifact was created. + example: "2024-01-20T10:00:00Z" + format: date-time + type: string + file_size: + description: The size of the file in bytes. + format: int64 + nullable: true + type: integer + filename: + description: The filename of the artifact. + example: model.pkl + type: string + required: + - filename + - artifact_path + - created_at + type: object + ModelLabArtifactObjectInfo: + description: Information about an artifact file or directory within a run. + properties: + file_size: + description: The size of the file in bytes. + format: int64 + nullable: true + type: integer + is_dir: + description: Whether this artifact entry is a directory. + example: false + type: boolean + path: + description: The path of the artifact relative to the run's artifact root. + example: model/weights.pt + type: string + required: + - path + - is_dir + type: object + ModelLabFacetKeysAttributes: + description: Available facet key names for filtering resources. + properties: + metrics: + description: The list of available metric facet keys. + example: + - accuracy + items: + type: string + nullable: true + type: array + parameters: + description: The list of available parameter facet keys. + example: + - learning_rate + items: + type: string + type: array + tags: + description: The list of available tag facet keys. + example: + - model + items: + type: string + type: array + required: + - parameters + - tags + - metrics + type: object + ModelLabFacetKeysData: + description: A facet keys JSON:API resource object. + properties: + attributes: + $ref: "#/components/schemas/ModelLabFacetKeysAttributes" + id: + description: The unique identifier of the facet keys resource. + example: "1" + type: string + type: + $ref: "#/components/schemas/ModelLabFacetKeysType" + required: + - id + - type + - attributes + type: object + ModelLabFacetKeysResponse: + description: Response containing available facet keys. + properties: + data: + $ref: "#/components/schemas/ModelLabFacetKeysData" + required: + - data + type: object + ModelLabFacetKeysType: + description: The JSON:API type for a facet keys resource. + enum: + - facet_keys + example: facet_keys + type: string + x-enum-varnames: + - FACET_KEYS + ModelLabFacetType: + description: The type of facet for filtering Model Lab runs. + enum: + - parameter + - attribute + - tag + - metric + example: tag + type: string + x-enum-varnames: + - PARAMETER + - ATTRIBUTE + - TAG + - METRIC + ModelLabFacetValuesAttributes: + description: Available values for a specific facet key. + properties: + facet_name: + description: The name of the facet. + example: model + type: string + facet_type: + description: The type of the facet. + example: tag + type: string + metric_stat_ranges: + description: The ranges for each metric statistic. + items: + $ref: "#/components/schemas/ModelLabMetricStatRange" + type: array + numeric_range: + $ref: "#/components/schemas/ModelLabNumericRange" + values: + description: The list of available string values for this facet. + example: + - gpt4 + items: + type: string + type: array + required: + - facet_type + - facet_name + - values + type: object + ModelLabFacetValuesData: + description: A facet values JSON:API resource object. + properties: + attributes: + $ref: "#/components/schemas/ModelLabFacetValuesAttributes" + id: + description: The unique identifier of the facet values resource. + example: "1" + type: string + type: + $ref: "#/components/schemas/ModelLabFacetValuesType" + required: + - id + - type + - attributes + type: object + ModelLabFacetValuesResponse: + description: Response containing available values for a facet key. + properties: + data: + $ref: "#/components/schemas/ModelLabFacetValuesData" + required: + - data + type: object + ModelLabFacetValuesType: + description: The JSON:API type for a facet values resource. + enum: + - facet_values + example: facet_values + type: string + x-enum-varnames: + - FACET_VALUES + ModelLabMetricStatRange: + description: The range of values for a specific metric statistic. + properties: + max: + description: The maximum value of the statistic. + example: 1.0 + format: double + type: number + min: + description: The minimum value of the statistic. + example: 0.0 + format: double + type: number + stat: + description: The metric statistic name. + example: mean + type: string + required: + - stat + - min + - max + type: object + ModelLabMetricSummary: + description: Summary statistics for a metric recorded during a Model Lab run. + properties: + count: + description: The total number of recorded values. + example: 100 + format: int64 + type: integer + first_step: + description: The first step at which the metric was recorded. + format: int64 + nullable: true + type: integer + key: + description: The metric name. + example: accuracy + type: string + last_step: + description: The last step at which the metric was recorded. + format: int64 + nullable: true + type: integer + latest: + description: The most recently recorded value. + format: double + nullable: true + type: number + max: + description: The maximum recorded value. + format: double + nullable: true + type: number + mean: + description: The mean of recorded values. + format: double + nullable: true + type: number + min: + description: The minimum recorded value. + format: double + nullable: true + type: number + stddev: + description: The standard deviation of recorded values. + format: double + nullable: true + type: number + required: + - key + - count + type: object + ModelLabNumericRange: + description: The numeric range of values for a facet. + properties: + max: + description: The maximum value. + example: 1.0 + format: double + type: number + min: + description: The minimum value. + example: 0.0 + format: double + type: number + required: + - min + - max + type: object + ModelLabPageMeta: + description: Pagination metadata for a list response. + properties: + page: + $ref: "#/components/schemas/ModelLabPageMetaPage" + required: + - page + type: object + ModelLabPageMetaPage: + description: Pagination details for a list response. + properties: + first_number: + description: The first page number. + format: int64 + type: integer + last_number: + description: The last page number. + format: int64 + type: integer + next_number: + description: The next page number. + format: int64 + nullable: true + type: integer + number: + description: The current page number. + example: 1 + format: int64 + type: integer + prev_number: + description: The previous page number. + format: int64 + nullable: true + type: integer + size: + description: The number of items per page. + example: 25 + format: int64 + type: integer + total: + description: The total number of items. + example: 100 + format: int64 + type: integer + type: + description: The pagination type. + type: string + required: + - number + - size + - total + type: object + ModelLabPaginationLinks: + description: Pagination links for navigating list responses. + properties: + first: + description: Link to the first page. + type: string + last: + description: Link to the last page. + type: string + next: + description: Link to the next page. + nullable: true + type: string + prev: + description: Link to the previous page. + nullable: true + type: string + self: + description: Link to the current page. + type: string + type: object + ModelLabProjectArtifactsAttributes: + description: Artifact listing for a Model Lab project. + properties: + files: + description: The list of artifact files associated with the project. + items: + $ref: "#/components/schemas/ModelLabArtifactInfo" + type: array + required: + - files + type: object + ModelLabProjectArtifactsData: + description: A project artifacts JSON:API resource object. + properties: + attributes: + $ref: "#/components/schemas/ModelLabProjectArtifactsAttributes" + id: + description: The unique identifier of the project artifacts resource. + example: "1" + type: string + type: + $ref: "#/components/schemas/ModelLabProjectArtifactsType" + required: + - id + - type + - attributes + type: object + ModelLabProjectArtifactsResponse: + description: Response containing the artifact listing for a Model Lab project. + properties: + data: + $ref: "#/components/schemas/ModelLabProjectArtifactsData" + required: + - data + type: object + ModelLabProjectArtifactsType: + description: The JSON:API type for a project artifacts resource. + enum: + - project_files + example: project_files + type: string + x-enum-varnames: + - PROJECT_FILES + ModelLabProjectAttributes: + description: Attributes of a Model Lab project. + properties: + artifact_storage_location: + description: The storage location for project artifacts. + example: s3://bucket/active-project + type: string + created_at: + description: The date and time the project was created. + example: "2024-01-20T10:00:00Z" + format: date-time + type: string + deleted_at: + description: The date and time the project was soft-deleted. + format: date-time + nullable: true + type: string + description: + description: A description of the project. + example: A machine learning training project. + type: string + external_url: + description: An optional external URL associated with the project. + nullable: true + type: string + is_starred: + description: Whether the project is starred by the current user. + example: false + type: boolean + name: + description: The name of the project. + example: active-project + type: string + owner_id: + description: The UUID of the project owner. + nullable: true + type: string + tags: + description: The list of tags associated with the project. + items: + $ref: "#/components/schemas/ModelLabTag" + type: array + updated_at: + description: The date and time the project was last updated. + example: "2024-01-20T11:00:00Z" + format: date-time + type: string + required: + - name + - description + - artifact_storage_location + - created_at + - updated_at + - tags + - is_starred + type: object + ModelLabProjectData: + description: A Model Lab project JSON:API resource object. + properties: + attributes: + $ref: "#/components/schemas/ModelLabProjectAttributes" + id: + description: The unique identifier of the project. + example: "2" + type: string + type: + $ref: "#/components/schemas/ModelLabProjectType" + required: + - id + - type + - attributes + type: object + ModelLabProjectFacetType: + description: The type of facet for filtering Model Lab projects. + enum: + - tag + example: tag + type: string + x-enum-varnames: + - TAG + ModelLabProjectResponse: + description: Response containing a single Model Lab project. + properties: + data: + $ref: "#/components/schemas/ModelLabProjectData" + required: + - data + type: object + ModelLabProjectType: + description: The JSON:API type for a Model Lab project resource. + enum: + - projects + example: projects + type: string + x-enum-varnames: + - PROJECTS + ModelLabProjectsResponse: + description: Response containing a list of Model Lab projects with pagination metadata. + properties: + data: + description: The list of projects. + items: + $ref: "#/components/schemas/ModelLabProjectData" + type: array + links: + $ref: "#/components/schemas/ModelLabPaginationLinks" + meta: + $ref: "#/components/schemas/ModelLabPageMeta" + required: + - data + - meta + type: object + ModelLabRunArtifactsAttributes: + description: Artifact listing for a Model Lab run. + properties: + files: + description: The list of artifact files and directories. + items: + $ref: "#/components/schemas/ModelLabArtifactObjectInfo" + type: array + path_in_project: + description: The path of the run's artifacts relative to the project's artifact root. + example: runs/42 + type: string + required: + - path_in_project + - files + type: object + ModelLabRunArtifactsData: + description: A run artifacts JSON:API resource object. + properties: + attributes: + $ref: "#/components/schemas/ModelLabRunArtifactsAttributes" + id: + description: The unique identifier of the artifacts resource. + example: "42" + type: string + type: + $ref: "#/components/schemas/ModelLabRunArtifactsType" + required: + - id + - type + - attributes + type: object + ModelLabRunArtifactsResponse: + description: Response containing the artifact listing for a Model Lab run. + properties: + data: + $ref: "#/components/schemas/ModelLabRunArtifactsData" + required: + - data + type: object + ModelLabRunArtifactsType: + description: The JSON:API type for a run artifacts resource. + enum: + - artifacts + example: artifacts + type: string + x-enum-varnames: + - ARTIFACTS + ModelLabRunAttributes: + description: Attributes of a Model Lab run. + properties: + completed_at: + description: The date and time the run completed. + format: date-time + nullable: true + type: string + created_at: + description: The date and time the run was created. + example: "2024-01-20T10:00:00Z" + format: date-time + type: string + deleted_at: + description: The date and time the run was soft-deleted. + format: date-time + nullable: true + type: string + descendant_match: + description: Whether a descendant run matched the applied filters. + example: false + type: boolean + description: + description: A description of the run. + example: Fine-tuning run with custom hyperparameters. + type: string + duration: + description: The duration of the run in seconds. + format: double + nullable: true + type: number + external_url: + description: An optional external URL associated with the run. + nullable: true + type: string + has_children: + description: Whether the run has child runs. + example: false + type: boolean + is_pinned: + description: Whether the run is pinned by the current user. + example: false + type: boolean + metric_summaries: + description: Summary statistics for metrics recorded during the run. + items: + $ref: "#/components/schemas/ModelLabMetricSummary" + type: array + mlflow_artifact_location: + description: The MLflow artifact storage location for this run. + example: s3://bucket/active-run + type: string + name: + description: The name of the run. + example: training-run-1 + type: string + owner_id: + description: The UUID of the run owner. + nullable: true + type: string + params: + description: The list of parameters used for the run. + items: + $ref: "#/components/schemas/ModelLabRunParam" + nullable: true + type: array + project_id: + description: The ID of the project this run belongs to. + example: 101 + format: int64 + type: integer + started_at: + description: The date and time the run started. + example: "2024-01-20T10:00:00Z" + format: date-time + type: string + status: + $ref: "#/components/schemas/ModelLabRunStatus" + tags: + description: The list of tags associated with the run. + items: + $ref: "#/components/schemas/ModelLabTag" + type: array + updated_at: + description: The date and time the run was last updated. + example: "2024-01-20T11:00:00Z" + format: date-time + type: string + required: + - project_id + - name + - description + - status + - mlflow_artifact_location + - started_at + - created_at + - updated_at + - tags + - params + - metric_summaries + - is_pinned + - has_children + - descendant_match + type: object + ModelLabRunData: + description: A Model Lab run JSON:API resource object. + properties: + attributes: + $ref: "#/components/schemas/ModelLabRunAttributes" + id: + description: The unique identifier of the run. + example: "42" + type: string + type: + $ref: "#/components/schemas/ModelLabRunType" + required: + - id + - type + - attributes + type: object + ModelLabRunParam: + description: A key-value parameter for a Model Lab run. + properties: + key: + description: The parameter key. + example: algorithm + type: string + value: + description: The parameter value. + example: gpt4 + type: string + required: + - key + - value + type: object + ModelLabRunResponse: + description: Response containing a single Model Lab run. + properties: + data: + $ref: "#/components/schemas/ModelLabRunData" + required: + - data + type: object + ModelLabRunStatus: + description: The status of a Model Lab run. + enum: + - pending + - running + - completed + - failed + - killed + - unresponsive + - paused + example: running + type: string + x-enum-varnames: + - PENDING + - RUNNING + - COMPLETED + - FAILED + - KILLED + - UNRESPONSIVE + - PAUSED + ModelLabRunType: + description: The JSON:API type for a Model Lab run resource. + enum: + - runs + example: runs + type: string + x-enum-varnames: + - RUNS + ModelLabRunsResponse: + description: Response containing a list of Model Lab runs with pagination metadata. + properties: + data: + description: The list of runs. + items: + $ref: "#/components/schemas/ModelLabRunData" + type: array + links: + $ref: "#/components/schemas/ModelLabPaginationLinks" + meta: + $ref: "#/components/schemas/ModelLabPageMeta" + required: + - data + - meta + type: object + ModelLabTag: + description: A key-value tag attached to a resource. + properties: + key: + description: The tag key. + example: model + type: string + value: + description: The tag value. + example: opus + type: string + required: + - key + - value + type: object MonitorAlertTriggerAttributes: description: Attributes for a monitor alert trigger. properties: @@ -59900,39 +59417,6 @@ components: required: - data type: object - ProjectFavorite: - description: Represents a case project that the current user has bookmarked for quick access. Favorited projects appear prominently in the Case Management UI. - properties: - id: - description: The UUID of the favorited project. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - type: string - type: - $ref: "#/components/schemas/ProjectFavoriteResourceType" - required: - - id - - type - type: object - ProjectFavoriteResourceType: - default: project_favorite - description: "JSON:API resource type for project favorites." - enum: - - project_favorite - example: project_favorite - type: string - x-enum-varnames: - - PROJECT_FAVORITE - ProjectFavoritesResponse: - description: Response containing the list of projects the current user has favorited. - properties: - data: - description: List of project favorites. - items: - $ref: "#/components/schemas/ProjectFavorite" - type: array - required: - - data - type: object ProjectNotificationSettings: description: Project notification settings. properties: @@ -83066,7 +82550,7 @@ components: - restrictions type: object TimelineCell: - description: "Attributes of a timeline cell, representing a single event in a case's chronological activity log (for example, a comment, status change, or assignment update)." + description: timeline cell properties: author: $ref: "#/components/schemas/TimelineCellAuthor" @@ -83091,11 +82575,11 @@ components: $ref: "#/components/schemas/TimelineCellType" type: object TimelineCellAuthor: - description: The author of the timeline cell. Currently only user authors are supported. + description: author of the timeline cell oneOf: - $ref: "#/components/schemas/TimelineCellAuthorUser" TimelineCellAuthorUser: - description: A user who authored a timeline cell. + description: timeline cell user author properties: content: $ref: "#/components/schemas/TimelineCellAuthorUserContent" @@ -83103,23 +82587,23 @@ components: $ref: "#/components/schemas/TimelineCellAuthorUserType" type: object TimelineCellAuthorUserContent: - description: Profile information for the user who authored the timeline cell. + description: user author content. properties: email: - description: The email address of the user. + description: user email type: string handle: - description: The Datadog handle of the user. + description: user handle type: string id: - description: The UUID of the user. + description: user UUID type: string name: - description: The display name of the user. + description: user name type: string type: object TimelineCellAuthorUserType: - description: The type of timeline cell author. Currently only `USER` is supported. + description: user author type. enum: - USER example: USER @@ -83127,18 +82611,18 @@ components: x-enum-varnames: - USER TimelineCellContent: - description: The content payload of a timeline cell, varying by cell type. + description: timeline cell content oneOf: - $ref: "#/components/schemas/TimelineCellContentComment" TimelineCellContentComment: - description: The content of a comment timeline cell. + description: comment content properties: message: - description: The text content of the comment. Supports Markdown formatting. + description: comment message type: string type: object TimelineCellResource: - description: A timeline cell resource representing a single entry in a case's activity timeline. + description: Timeline cell JSON:API resource properties: attributes: $ref: "#/components/schemas/TimelineCell" @@ -83155,7 +82639,7 @@ components: type: object TimelineCellResourceType: default: timeline_cell - description: JSON:API resource type for timeline cells. + description: Timeline cell JSON:API resource type enum: - timeline_cell example: timeline_cell @@ -83163,7 +82647,7 @@ components: x-enum-varnames: - TIMELINE_CELL TimelineCellType: - description: The type of content in the timeline cell. Currently only `COMMENT` is supported in this endpoint. + description: Timeline cell content type enum: - COMMENT example: COMMENT @@ -83171,7 +82655,7 @@ components: x-enum-varnames: - COMMENT TimelineResponse: - description: Response containing the chronological list of timeline cells for a case. + description: Timeline response properties: data: description: The `TimelineResponse` `data`. @@ -87808,7 +87292,6 @@ components: bits_investigations_read: View Bits AI investigations. bits_investigations_write: Create and manage Bits AI investigations. cases_read: View Cases. - cases_shared_settings_write: Update shared case management settings. cases_write: Create and update cases. ci_visibility_pipelines_write: Create CI Visibility pipeline spans using the API. ci_visibility_read: View CI Visibility. @@ -87830,8 +87313,6 @@ components: embeddable_graphs_share: Generate public links to share embeddable graphs externally. error_tracking_read: Read Error Tracking data. error_tracking_write: Edit Error Tracking issues. - event_correlation_config_read: View event correlation configurations. - event_correlation_config_write: Create and update event correlation configurations. events_read: Read Events data. hosts_read: List hosts and their attributes. incident_notification_settings_read: View Incident Notification Rule Settings. @@ -94660,336 +94141,6 @@ paths: summary: Create a case tags: - Case Management - /api/v2/cases/aggregate: - post: - description: Performs an aggregation query over cases, grouping results by specified fields and returning counts per group along with a total. Useful for dashboards and analytics. - operationId: AggregateCases - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - group_by: - groups: - - "status" - limit: 14 - query_filter: "service:case-api" - type: aggregate - schema: - $ref: "#/components/schemas/CaseAggregateRequest" - description: Case aggregate request payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - groups: - - group: OPEN - value: - - 42.0 - total: 100.0 - id: agg-result-001 - type: aggregate - schema: - $ref: "#/components/schemas/CaseAggregateResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: Aggregate cases - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/bulk: - post: - description: Applies a single action (such as changing priority, status, assignment, or archiving) to multiple cases at once. The list of case IDs and the action type with its payload are specified in the request body. - operationId: BulkUpdateCases - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - case_ids: - - "case-id-1" - - "case-id-2" - payload: - priority: "P1" - type: priority - type: bulk - schema: - $ref: "#/components/schemas/CaseBulkUpdateRequest" - description: Case bulk update request payload. - required: true - responses: - "200": - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Bulk update cases - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/count: - get: - description: Returns case counts, optionally grouped by one or more fields (for example, status, priority). Supports a query filter to narrow the scope. - operationId: CountCases - parameters: - - description: Filter query for cases. - in: query - name: query_filter - required: false - schema: - type: string - - description: Comma-separated fields to group by. - example: "status,priority" - in: query - name: group_bys - required: false - schema: - type: string - - description: Maximum facet values to return. - in: query - name: limit - required: false - schema: - type: integer - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - groups: - - group: status - group_values: - - count: 42 - value: OPEN - id: count-result-001 - type: count - schema: - $ref: "#/components/schemas/CaseCountResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: Count cases - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/link: - get: - description: Returns all links associated with a case. Links define relationships (for example, BLOCKS) between cases. Requires entity_type and entity_id query parameters. - operationId: ListCaseLinks - parameters: - - description: "The entity type to look up links for. Use `CASE` to find links for a specific case." - in: query - name: entity_type - required: true - schema: - example: "CASE" - type: string - - description: "The UUID of the entity to look up links for." - in: query - name: entity_id - required: true - schema: - example: "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f" - type: string - - description: "Optional filter to only return links of a specific relationship type (for example, `BLOCKS` or `CAUSES`)." - in: query - name: relationship - required: false - schema: - example: "BLOCKS" - type: string - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - child_entity_id: 4417921d-0866-4a38-822c-6f2a0f65f77d - child_entity_type: CASE - parent_entity_id: bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f - parent_entity_type: CASE - relationship: BLOCKS - id: 804cd682-55f6-4541-ab00-b608b282ea7d - type: link - schema: - $ref: "#/components/schemas/CaseLinksResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: List case links - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Creates a directional link between two cases (for example, case A blocks case B). The parent and child cases and their relationship type must be specified. - operationId: CreateCaseLink - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - child_entity_id: 4417921d-0866-4a38-822c-6f2a0f65f77d - child_entity_type: CASE - parent_entity_id: bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f - parent_entity_type: CASE - relationship: BLOCKS - type: link - schema: - $ref: "#/components/schemas/CaseLinkCreateRequest" - description: "Case link create request." - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - child_entity_id: 4417921d-0866-4a38-822c-6f2a0f65f77d - child_entity_type: CASE - parent_entity_id: bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f - parent_entity_type: CASE - relationship: BLOCKS - id: 804cd682-55f6-4541-ab00-b608b282ea7d - type: link - schema: - $ref: "#/components/schemas/CaseLinkResponse" - description: Created - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Create a case link - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/link/{link_id}: - delete: - description: Deletes an existing link between cases by link ID. - operationId: DeleteCaseLink - parameters: - - $ref: "#/components/parameters/LinkIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Delete a case link - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/projects: get: description: >- @@ -95081,44 +94232,6 @@ paths: summary: Create a project tags: - Case Management - /api/v2/cases/projects/favorites: - get: - description: Returns the list of case projects that the current authenticated user has marked as favorites. - operationId: ListUserCaseProjectFavorites - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - id: e555e290-ed65-49bd-ae18-8acbfcf18db7 - type: project_favorite - schema: - $ref: "#/components/schemas/ProjectFavoritesResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: List project favorites - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/projects/{project_id}: delete: description: Remove a project using the project's `id`. @@ -95238,65 +94351,6 @@ paths: summary: Update a project tags: - Case Management - /api/v2/cases/projects/{project_id}/favorites: - delete: - description: Removes a case project from the current user's favorites list. - operationId: UnfavoriteCaseProject - parameters: - - $ref: "#/components/parameters/ProjectIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Unfavorite a project - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Marks a case project as a favorite for the current authenticated user. - operationId: FavoriteCaseProject - parameters: - - $ref: "#/components/parameters/ProjectIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Favorite a project - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/projects/{project_id}/notification_rules: get: description: >- @@ -95505,418 +94559,6 @@ paths: summary: Update a notification rule tags: - Case Management - /api/v2/cases/projects/{project_id}/rules: - get: - description: Returns all automation rules configured for a project. Automation rules allow automatic actions to be triggered by case events like creation, status transitions, or attribute changes. - operationId: ListCaseAutomationRules - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRulesResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: List automation rules - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Creates an automation rule for a project. The rule defines a trigger event (for example, case created, status transitioned) and an action to execute. - operationId: CreateCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleCreateRequest" - description: Automation rule payload. - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleResponse" - description: Created - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Create an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/projects/{project_id}/rules/{rule_id}: - delete: - description: Permanently deletes an automation rule from a project. - operationId: DeleteCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - - $ref: "#/components/parameters/RuleIDPathParameter" - responses: - "204": - description: No Content - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Delete an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - get: - description: Returns a single automation rule identified by its UUID, including its trigger, action, and current state (enabled/disabled). - operationId: GetCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - - $ref: "#/components/parameters/RuleIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: Get an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - put: - description: Updates the trigger, action, name, or state of an existing automation rule. - operationId: UpdateCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - - $ref: "#/components/parameters/RuleIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleUpdateRequest" - description: Automation rule payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/projects/{project_id}/rules/{rule_id}/disable: - post: - description: Disables an automation rule so it no longer triggers on case events. The rule configuration is preserved. - operationId: DisableCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - - $ref: "#/components/parameters/RuleIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: DISABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Disable an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/projects/{project_id}/rules/{rule_id}/enable: - post: - description: Enables a previously disabled automation rule so it triggers on matching case events. - operationId: EnableCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - - $ref: "#/components/parameters/RuleIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Enable an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/types: get: description: Get all case types @@ -96045,65 +94687,6 @@ paths: summary: Delete a case type tags: - Case Management Type - put: - description: Updates the name, emoji, or description of an existing case type. - operationId: UpdateCaseType - parameters: - - $ref: "#/components/parameters/CaseTypeIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - description: Investigations done in case management - emoji: "🕵🏻‍♂️" - name: Investigation - type: case_type - schema: - $ref: "#/components/schemas/CaseTypeUpdateRequest" - description: Case type payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - description: Investigations done in case management - emoji: "🕵🏻‍♂️" - name: Investigation - id: 00000000-0000-0000-0000-000000000001 - type: case_type - schema: - $ref: "#/components/schemas/CaseTypeResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_shared_settings_write - summary: Update a case type - tags: - - Case Management Type - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/types/{case_type_id}/custom_attributes: get: description: Get all custom attribute config of case type @@ -96218,305 +94801,6 @@ paths: summary: Delete custom attributes config tags: - Case Management Attribute - put: - description: Updates the display name, description, type, or options of an existing custom attribute configuration for a case type. - operationId: UpdateCustomAttributeConfig - parameters: - - $ref: "#/components/parameters/CaseTypeIDPathParameter" - - $ref: "#/components/parameters/CaseCustomAttributeIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - description: Updated description. - display_name: AWS Region - type: custom_attribute - schema: - $ref: "#/components/schemas/CustomAttributeConfigUpdateRequest" - description: Custom attribute config payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - case_type_id: 00000000-0000-0000-0000-000000000006 - description: Updated description. - display_name: AWS Region - is_multi: true - key: aws_region - type: TEXT - id: 00000000-0000-0000-0000-000000000005 - type: custom_attribute - schema: - $ref: "#/components/schemas/CustomAttributeConfigResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_shared_settings_write - summary: Update custom attribute config - tags: - - Case Management Attribute - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/views: - get: - description: Returns all saved case views for a given project. Views are saved search queries that allow quick access to filtered lists of cases. - operationId: ListCaseViews - parameters: - - description: Filter views by project identifier. - example: e555e290-ed65-49bd-ae18-8acbfcf18db7 - in: query - name: project_id - required: true - schema: - type: string - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - created_at: "2024-01-01T00:00:00.000Z" - name: Open bugs - query: "status:open type:bug" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: view - schema: - $ref: "#/components/schemas/CaseViewsResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: List case views - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Creates a new saved case view with a name, filter query, and associated project. Optionally, a notification rule can be linked to the view. - operationId: CreateCaseView - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: Open bugs - project_id: e555e290-ed65-49bd-ae18-8acbfcf18db7 - query: "status:open type:bug" - type: view - schema: - $ref: "#/components/schemas/CaseViewCreateRequest" - description: Case view payload. - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00.000Z" - name: Open bugs - query: "status:open type:bug" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: view - schema: - $ref: "#/components/schemas/CaseViewResponse" - description: Created - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Create a case view - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/views/{view_id}: - delete: - description: Permanently deletes a saved case view. - operationId: DeleteCaseView - parameters: - - $ref: "#/components/parameters/ViewIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Delete a case view - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - get: - description: Returns a single saved case view identified by its UUID, including its query, associated project, and timestamps. - operationId: GetCaseView - parameters: - - $ref: "#/components/parameters/ViewIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00.000Z" - name: Open bugs - query: "status:open type:bug" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: view - schema: - $ref: "#/components/schemas/CaseViewResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: Get a case view - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - put: - description: Updates the name, query, or notification rule of an existing case view. - operationId: UpdateCaseView - parameters: - - $ref: "#/components/parameters/ViewIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: Updated view name - type: view - schema: - $ref: "#/components/schemas/CaseViewUpdateRequest" - description: Case view payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00.000Z" - name: Updated view name - query: "status:open type:bug" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: view - schema: - $ref: "#/components/schemas/CaseViewResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update a case view - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/{case_id}: get: description: >- @@ -96835,50 +95119,6 @@ paths: summary: Delete case comment tags: - Case Management - put: - description: Updates the text content of an existing comment on a case timeline. The comment is identified by its cell ID. - operationId: UpdateCaseComment - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - - $ref: "#/components/parameters/CellIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - comment: Updated comment text - type: case - schema: - $ref: "#/components/schemas/CaseUpdateCommentRequest" - description: Case update comment payload. - required: true - responses: - "200": - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update case comment - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}: delete: description: Delete custom attribute from case @@ -96975,224 +95215,13 @@ paths: $ref: "#/components/schemas/CaseResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update case custom attribute - tags: - - Case Management - /api/v2/cases/{case_id}/description: - post: - description: Update case description - operationId: UpdateCaseDescription - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - description: Seeing some weird memory increase... We shouldn't ignore this - type: case - schema: - $ref: "#/components/schemas/CaseUpdateDescriptionRequest" - description: Case description update payload - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00+00:00" - key: CASEM-1234 - priority: NOT_DEFINED - status: OPEN - status_name: Open - title: Memory leak investigation on API - id: 00000000-0000-0000-0000-000000000001 - relationships: - project: - data: - id: 00000000-0000-0000-0000-000000000002 - type: project - type: case - schema: - $ref: "#/components/schemas/CaseResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update case description - tags: - - Case Management - /api/v2/cases/{case_id}/due_date: - post: - description: Sets or updates the due date for a case. The due date is a calendar date (without a time component) indicating when the case should be resolved. - operationId: UpdateCaseDueDate - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - due_date: "2026-12-31" - type: case - schema: - $ref: "#/components/schemas/CaseUpdateDueDateRequest" - description: Case due date update payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00+00:00" - key: CASEM-1234 - priority: NOT_DEFINED - status: OPEN - status_name: Open - title: Memory leak investigation on API - id: 00000000-0000-0000-0000-000000000001 - relationships: - project: - data: - id: 00000000-0000-0000-0000-000000000002 - type: project - type: case - schema: - $ref: "#/components/schemas/CaseResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update case due date - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/{case_id}/insights: - delete: - description: Removes one or more previously added insights from a case by specifying their type and resource identifier in the request body. - operationId: RemoveCaseInsights - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - insights: - - ref: "/monitors/12345?q=total" - resource_id: "12345" - type: SECURITY_SIGNAL - type: case - schema: - $ref: "#/components/schemas/CaseInsightsRequest" - description: Case insights request. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00+00:00" - key: CASEM-1234 - priority: NOT_DEFINED - status: OPEN - status_name: Open - title: Memory leak investigation on API - id: 00000000-0000-0000-0000-000000000001 - relationships: - project: - data: - id: 00000000-0000-0000-0000-000000000002 - type: project - type: case - schema: - $ref: "#/components/schemas/CaseResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request + $ref: "#/components/responses/BadRequestResponse" "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized + $ref: "#/components/responses/UnauthorizedResponse" "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden + $ref: "#/components/responses/ForbiddenResponse" "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: @@ -97200,16 +95229,13 @@ paths: appKeyAuth: [] - AuthZ: - cases_write - summary: Remove insights from a case + summary: Update case custom attribute tags: - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - put: - description: >- - Adds one or more insights to a case. Insights are references to related Datadog resources (such as monitors, security signals, incidents, or error tracking issues) that provide investigative context. Up to 100 insights can be added per request. Each insight requires a type (see `CaseInsightType` for allowed values), a ref (URL path to the resource), and a resource_id. - operationId: AddCaseInsights + /api/v2/cases/{case_id}/description: + post: + description: Update case description + operationId: UpdateCaseDescription parameters: - $ref: "#/components/parameters/CaseIDPathParameter" requestBody: @@ -97220,14 +95246,11 @@ paths: value: data: attributes: - insights: - - ref: "/monitors/12345?q=total" - resource_id: "12345" - type: SECURITY_SIGNAL + description: Seeing some weird memory increase... We shouldn't ignore this type: case schema: - $ref: "#/components/schemas/CaseInsightsRequest" - description: Case insights request. + $ref: "#/components/schemas/CaseUpdateDescriptionRequest" + description: Case description update payload required: true responses: "200": @@ -97255,29 +95278,13 @@ paths: $ref: "#/components/schemas/CaseResponse" description: OK "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request + $ref: "#/components/responses/BadRequestResponse" "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized + $ref: "#/components/responses/UnauthorizedResponse" "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden + $ref: "#/components/responses/ForbiddenResponse" "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: @@ -97285,12 +95292,9 @@ paths: appKeyAuth: [] - AuthZ: - cases_write - summary: Add insights to a case + summary: Update case description tags: - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/{case_id}/priority: post: description: Update case priority @@ -97794,72 +95798,6 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/{case_id}/resolved_reason: - post: - description: Sets the resolved reason for a security case (for example, FALSE_POSITIVE, TRUE_POSITIVE). Applicable to security-type cases. - operationId: UpdateCaseResolvedReason - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - security_resolved_reason: "FALSE_POSITIVE" - type: case - schema: - $ref: "#/components/schemas/CaseUpdateResolvedReasonRequest" - description: Case resolved reason update payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00+00:00" - key: CASEM-1234 - priority: NOT_DEFINED - status: OPEN - status_name: Open - title: Memory leak investigation on API - id: 00000000-0000-0000-0000-000000000001 - relationships: - project: - data: - id: 00000000-0000-0000-0000-000000000002 - type: project - type: case - schema: - $ref: "#/components/schemas/CaseResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update case resolved reason - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/{case_id}/status: post: description: Update case status @@ -97924,72 +95862,6 @@ paths: summary: Update case status tags: - Case Management - /api/v2/cases/{case_id}/timelines: - get: - description: Returns the timeline of events for a case, including comments, status changes, and other activity. Supports pagination and sort order. - operationId: ListCaseTimeline - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - - description: Number of timeline cells to return per page. - in: query - name: page[size] - required: false - schema: - default: 100 - type: integer - - description: Zero-based page number for pagination. - in: query - name: page[number] - required: false - schema: - default: 0 - type: integer - - description: "If `true`, returns timeline cells in chronological order (oldest first). Defaults to `false` (newest first)." - in: query - name: sort[ascending] - required: false - schema: - default: false - type: boolean - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - cell_content: - message: This is a comment - created_at: "2024-01-01T00:00:00+00:00" - type: COMMENT - id: 00000000-0000-0000-0000-000000000001 - type: timeline_cell - schema: - $ref: "#/components/schemas/TimelineResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: Get case timeline - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/{case_id}/title: post: description: Update case title @@ -98175,112 +96047,6 @@ paths: summary: Unassign case tags: - Case Management - /api/v2/cases/{case_id}/watchers: - get: - description: Returns the list of users who are watching a case. Watchers receive notifications about updates to the case. - operationId: ListCaseWatchers - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - id: 8146583c-0b5f-11ec-abf8-da7ad0900001 - relationships: - user: - data: - id: 8146583c-0b5f-11ec-abf8-da7ad0900001 - type: user - type: watcher - schema: - $ref: "#/components/schemas/CaseWatchersResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: List case watchers - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/{case_id}/watchers/{user_uuid}: - delete: - description: Removes a user from the watchers list of a case. The user no longer receives notifications about updates to the case. - operationId: UnwatchCase - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - - $ref: "#/components/parameters/UserUUIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Unwatch a case - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Adds a user (identified by their UUID) as a watcher of a case. The user receives notifications about subsequent updates to the case. - operationId: WatchCase - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - - $ref: "#/components/parameters/UserUUIDPathParameter" - responses: - "201": - description: Created - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Watch a case - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/catalog/entity: get: description: Get a list of entities from Software Catalog. @@ -121924,199 +119690,6 @@ paths: operator: OR permissions: - logs_read_data - /api/v2/maintenance_windows: - get: - description: Returns all configured maintenance windows for event management cases. Maintenance windows define time periods during which case notifications and automation rules are suppressed for cases matching a given query. - operationId: ListMaintenanceWindows - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - end_at: "2026-06-01T06:00:00Z" - name: Weekly maintenance - query: "project:SEC" - start_at: "2026-06-01T00:00:00Z" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: maintenance_window - schema: - $ref: "#/components/schemas/MaintenanceWindowsResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - event_correlation_config_read - summary: List maintenance windows - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Creates a maintenance window for event management cases with a name, case filter query, and time range (start and end). - operationId: CreateMaintenanceWindow - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - end_at: "2026-06-01T06:00:00Z" - name: Weekly maintenance - query: "project:SEC" - start_at: "2026-06-01T00:00:00Z" - type: maintenance_window - schema: - $ref: "#/components/schemas/MaintenanceWindowCreateRequest" - description: Maintenance window payload. - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - end_at: "2026-06-01T06:00:00Z" - name: Weekly maintenance - query: "project:SEC" - start_at: "2026-06-01T00:00:00Z" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: maintenance_window - schema: - $ref: "#/components/schemas/MaintenanceWindowResponse" - description: Created - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - event_correlation_config_write - summary: Create a maintenance window - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/maintenance_windows/{maintenance_window_id}: - delete: - description: Permanently deletes a maintenance window. - operationId: DeleteMaintenanceWindow - parameters: - - $ref: "#/components/parameters/MaintenanceWindowIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - event_correlation_config_write - summary: Delete a maintenance window - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - put: - description: Updates the name, query, start time, or end time of an existing maintenance window. - operationId: UpdateMaintenanceWindow - parameters: - - $ref: "#/components/parameters/MaintenanceWindowIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - end_at: "2026-06-01T06:00:00Z" - name: Weekly maintenance - query: "project:SEC" - start_at: "2026-06-01T00:00:00Z" - type: maintenance_window - schema: - $ref: "#/components/schemas/MaintenanceWindowUpdateRequest" - description: Maintenance window payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - end_at: "2026-06-01T06:00:00Z" - name: Weekly maintenance - query: "project:SEC" - start_at: "2026-06-01T00:00:00Z" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: maintenance_window - schema: - $ref: "#/components/schemas/MaintenanceWindowResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - event_correlation_config_write - summary: Update a maintenance window - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/metrics: get: description: |- @@ -123118,6 +120691,947 @@ paths: "x-permission": operator: OPEN permissions: [] + /api/v2/model-lab-api/artifacts/content: + get: + description: Download the raw content of a Model Lab artifact file. + operationId: GetModelLabArtifactContent + parameters: + - description: ID of the project. + in: query + name: project_id + required: true + schema: + example: "1" + type: string + - description: Path to the artifact relative to the project directory. + in: query + name: artifact_path + required: true + schema: + example: runs/42/model/weights.pt + type: string + responses: + "200": + content: + application/octet-stream: + examples: + default: + value: "" + schema: + format: binary + type: string + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Get Model Lab artifact content + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/facet-keys: + get: + description: List all available facet keys for filtering Model Lab runs. + operationId: ListModelLabRunFacetKeys + parameters: + - description: Filter by project ID. + in: query + name: filter[project_id] + required: true + schema: + example: 101 + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + metrics: + - accuracy + - loss + parameters: + - learning_rate + - algorithm + tags: + - model + - stage + id: "1" + type: facet_keys + schema: + $ref: "#/components/schemas/ModelLabFacetKeysResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List Model Lab run facet keys + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/facet-values: + get: + description: List available facet values for a specific run facet key. + operationId: ListModelLabRunFacetValues + parameters: + - description: Filter by project ID. + in: query + name: filter[project_id] + required: true + schema: + example: 101 + format: int64 + type: integer + - description: "Facet type. Valid values: parameter, attribute, tag, metric." + in: query + name: facet_type + required: true + schema: + $ref: "#/components/schemas/ModelLabFacetType" + - description: Facet name. + in: query + name: facet_name + required: true + schema: + example: algorithm + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + facet_name: algorithm + facet_type: parameter + values: + - gpt4 + - dbscan + id: "1" + type: facet_values + schema: + $ref: "#/components/schemas/ModelLabFacetValuesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List Model Lab run facet values + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/project-facet-keys: + get: + description: List all available facet keys for filtering Model Lab projects. + operationId: ListModelLabProjectFacetKeys + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + metrics: [] + parameters: [] + tags: + - model + - stage + id: "1" + type: facet_keys + schema: + $ref: "#/components/schemas/ModelLabFacetKeysResponse" + description: OK + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List Model Lab project facet keys + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/project-facet-values: + get: + description: List available facet values for a specific project facet key. + operationId: ListModelLabProjectFacetValues + parameters: + - description: "Facet type. Valid values: tag." + in: query + name: facet_type + required: true + schema: + $ref: "#/components/schemas/ModelLabProjectFacetType" + - description: Facet name. + in: query + name: facet_name + required: true + schema: + example: model + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + facet_name: model + facet_type: tag + values: + - opus + - gpt4 + id: "1" + type: facet_values + schema: + $ref: "#/components/schemas/ModelLabFacetValuesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List Model Lab project facet values + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/projects: + get: + description: List all Model Lab projects for the current organization. + operationId: ListModelLabProjects + parameters: + - description: Text search filter for project name or description. + in: query + name: filter + required: false + schema: + type: string + - description: Filter by owner UUID. + in: query + name: filter[owner_id] + required: false + schema: + format: uuid + type: string + - description: "Filter by tags. Format: key:value,key2:value2." + in: query + name: filter[tags] + required: false + schema: + type: string + - description: "Sort field. Valid values: name, created_at, updated_at. Prefix with '-' for descending order (e.g., -updated_at)." + in: query + name: sort + required: false + schema: + default: "-updated_at" + type: string + - description: Number of items per page. Maximum is 100. + in: query + name: page[size] + required: false + schema: + default: 25 + maximum: 100 + type: integer + - description: Page number (1-indexed). + in: query + name: page[number] + required: false + schema: + default: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + artifact_storage_location: s3://bucket/active-project + created_at: "2024-01-20T10:00:00Z" + description: A machine learning training project. + is_starred: false + name: active-project + tags: + - key: model + value: opus + updated_at: "2024-01-20T11:00:00Z" + id: "2" + type: projects + meta: + page: + number: 1 + size: 25 + total: 1 + schema: + $ref: "#/components/schemas/ModelLabProjectsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List Model Lab projects + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/projects/{project_id}: + get: + description: Get a single Model Lab project by its ID. + operationId: GetModelLabProject + parameters: + - $ref: "#/components/parameters/ModelLabProjectIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + artifact_storage_location: s3://bucket/active-project + created_at: "2024-01-20T10:00:00Z" + description: A machine learning training project. + is_starred: false + name: active-project + tags: + - key: model + value: opus + updated_at: "2024-01-20T11:00:00Z" + id: "2" + type: projects + schema: + $ref: "#/components/schemas/ModelLabProjectResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Get a Model Lab project + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/projects/{project_id}/artifacts: + get: + description: List all artifact files for a specific Model Lab project. + operationId: ListModelLabProjectArtifacts + parameters: + - $ref: "#/components/parameters/ModelLabProjectIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + files: + - artifact_path: projects/1/artifacts/model.pkl + created_at: "2024-01-20T10:00:00Z" + file_size: 204800 + filename: model.pkl + id: "1" + type: project_files + schema: + $ref: "#/components/schemas/ModelLabProjectArtifactsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List Model Lab project artifacts + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/projects/{project_id}/star: + delete: + description: Remove the star from a Model Lab project for the current user. + operationId: UnstarModelLabProject + parameters: + - $ref: "#/components/parameters/ModelLabProjectIDPathParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Remove star from a Model Lab project + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Star a Model Lab project for the current user. + operationId: StarModelLabProject + parameters: + - $ref: "#/components/parameters/ModelLabProjectIDPathParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Star a Model Lab project + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/runs: + get: + description: List all Model Lab runs for the current organization. + operationId: ListModelLabRuns + parameters: + - description: Filter by run ID(s). Comma-separated list for multiple IDs. + in: query + name: filter[id] + required: false + schema: + type: string + - description: Text search filter for run name or description. + in: query + name: filter + required: false + schema: + type: string + - description: Filter by owner UUID. + in: query + name: filter[owner_id] + required: false + schema: + type: string + - description: "Filter by run status. Valid values: pending, running, completed, failed, killed, unresponsive, paused." + in: query + name: filter[status] + required: false + schema: + $ref: "#/components/schemas/ModelLabRunStatus" + - description: Filter by project ID. + in: query + name: filter[project_id] + required: false + schema: + format: int64 + type: integer + - description: "Filter by tags. Format: key:value,key2:value2." + in: query + name: filter[tags] + required: false + schema: + type: string + - description: "Filter by params. Format: key:value,key2:>0.5,key3:true." + in: query + name: filter[params] + required: false + schema: + type: string + - description: Filter by parent run ID. Use 'null' to return only root runs (runs with no parent). + in: query + name: filter[parent_run_id] + required: false + schema: + type: string + - description: Sort pinned runs before non-pinned runs. Pinned runs are ordered by pin time descending. + in: query + name: pinned_first + required: false + schema: + type: boolean + - description: Include all runs pinned by the current user, regardless of other filters. + in: query + name: include_pinned + required: false + schema: + type: boolean + - description: When true, also return runs whose descendants match the active filters. The descendant_match field in each result indicates whether the run was included via a descendant match. + in: query + name: include_descendant_matches + required: false + schema: + type: boolean + - description: "Sort field. Valid values: name, created_at, updated_at, duration. Prefix with '-' for descending order (e.g., -updated_at)." + in: query + name: sort + required: false + schema: + default: "-updated_at" + type: string + - description: Number of items per page. Maximum is 100. + in: query + name: page[size] + required: false + schema: + default: 25 + maximum: 100 + type: integer + - description: Page number (1-indexed). + in: query + name: page[number] + required: false + schema: + default: 1 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-20T10:00:00Z" + descendant_match: false + description: Fine-tuning run with custom hyperparameters. + has_children: false + is_pinned: false + metric_summaries: [] + mlflow_artifact_location: s3://bucket/active-run + name: active-run + params: + - key: algorithm + value: gpt4 + project_id: 101 + started_at: "2024-01-20T10:00:00Z" + status: running + tags: + - key: model + value: opus + updated_at: "2024-01-20T11:00:00Z" + id: "2" + type: runs + meta: + page: + number: 1 + size: 25 + total: 1 + schema: + $ref: "#/components/schemas/ModelLabRunsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List Model Lab runs + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/runs/{run_id}: + delete: + description: Delete a Model Lab run by its ID. + operationId: DeleteModelLabRun + parameters: + - $ref: "#/components/parameters/ModelLabRunIDPathParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Delete a Model Lab run + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a single Model Lab run by its ID. + operationId: GetModelLabRun + parameters: + - $ref: "#/components/parameters/ModelLabRunIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-20T10:00:00Z" + descendant_match: false + description: Fine-tuning run with custom hyperparameters. + has_children: false + is_pinned: false + metric_summaries: [] + mlflow_artifact_location: s3://bucket/active-run + name: active-run + params: + - key: algorithm + value: gpt4 + project_id: 101 + started_at: "2024-01-20T10:00:00Z" + status: running + tags: + - key: model + value: opus + updated_at: "2024-01-20T11:00:00Z" + id: "2" + type: runs + schema: + $ref: "#/components/schemas/ModelLabRunResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Get a Model Lab run + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/runs/{run_id}/artifacts: + get: + description: List artifact files for a specific Model Lab run. + operationId: ListModelLabRunArtifacts + parameters: + - $ref: "#/components/parameters/ModelLabRunIDPathParameter" + - description: Optional subdirectory path within the run's artifacts. + in: query + name: path + required: false + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + files: + - file_size: 204800 + is_dir: false + path: model/weights.pt + - is_dir: true + path: model + path_in_project: runs/42 + id: "42" + type: artifacts + schema: + $ref: "#/components/schemas/ModelLabRunArtifactsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: List Model Lab run artifacts + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/model-lab-api/runs/{run_id}/pin: + delete: + description: Remove the pin from a Model Lab run for the current user. + operationId: UnpinModelLabRun + parameters: + - $ref: "#/components/parameters/ModelLabRunIDPathParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Unpin a Model Lab run + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Pin a Model Lab run for the current user. + operationId: PinModelLabRun + parameters: + - $ref: "#/components/parameters/ModelLabRunIDPathParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + summary: Pin a Model Lab run + tags: + - Model Lab API + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/monitor/notification_rule: get: description: Returns a list of all monitor notification rules. @@ -154768,6 +153282,8 @@ tags: description: For more information about the Datadog Microsoft Teams integration, see the integration page. url: https://docs.datadoghq.com/integrations/microsoft_teams/ name: Microsoft Teams Integration + - description: Manage Model Lab projects, runs, artifacts, and facets for ML experiment tracking. + name: Model Lab API - description: |- [Monitors](https://docs.datadoghq.com/monitors) allow you to watch a metric or check that you care about and notifies your team when a defined threshold has exceeded. diff --git a/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-No-Content-response.frozen b/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-No-Content-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-No-Content-response.yml b/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-No-Content-response.yml new file mode 100644 index 000000000000..35247cf7c35d --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-No-Content-response.yml @@ -0,0 +1,18 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/model-lab-api/runs/70158 + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-Not-Found-response.frozen b/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-Not-Found-response.yml b/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-Not-Found-response.yml new file mode 100644 index 000000000000..9abf93979a20 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Delete-a-Model-Lab-run-returns-Not-Found-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/model-lab-api/runs/999999 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"title":"Generic Error","detail":"run not found"}]}' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Download-artifact-content-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/Download-artifact-content-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Download-artifact-content-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Download-artifact-content-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/Download-artifact-content-returns-OK-response.yml new file mode 100644 index 000000000000..97987e7fc27c --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Download-artifact-content-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/octet-stream, application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/artifacts/content?project_id=2387&artifact_path=f635c73b70594ab6bb6e212cdf87d0d5%2Fartifacts%2Flora_model%2Fadapter_config.json + response: + body: + encoding: UTF-8 + string: data + headers: + Content-Type: + - application/octet-stream + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-Not-Found-response.frozen b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-Not-Found-response.yml b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-Not-Found-response.yml new file mode 100644 index 000000000000..5ace8b4aac1b --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-Not-Found-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/projects/999999 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"title":"Generic Error","detail":"project not found"}]}' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-OK-response.yml new file mode 100644 index 000000000000..e30a31664f86 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-project-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/projects/2387 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"2387","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76421","created_at":"2026-05-15T02:54:52.457827Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76421","is_starred":false,"name":"ft-gpt2-smoke-1778812860","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T02:54:52.468614Z"}}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-Not-Found-response.frozen b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-Not-Found-response.yml b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-Not-Found-response.yml new file mode 100644 index 000000000000..4c1c8594a687 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-Not-Found-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/runs/999999 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"title":"Generic Error","detail":"run not found"}]}' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-OK-response.yml new file mode 100644 index 000000000000..867fbbdcab07 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Get-a-Model-Lab-run-returns-OK-response.yml @@ -0,0 +1,23 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/runs/70158 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"70158","type":"runs","attributes":{"completed_at":"2026-05-15T02:57:03.079Z","created_at":"2026-05-15T02:54:52.684452Z","descendant_match":false,"description":"","duration":130.498,"external_url":"https://mlflow.us1.staging.dog/#/runs/f635c73b70594ab6bb6e212cdf87d0d5","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"eval_loss","min":3.214665412902832,"max":3.9457361698150635,"mean":3.5802007913589478,"latest":3.214665412902832,"count":4,"first_step":0,"last_step":204},{"key":"learning_rate","min":0,"max":0.0001,"mean":4.9999999999999996e-05,"latest":5.154639175257732e-07,"count":408,"first_step":1,"last_step":204},{"key":"train_steps_per_second","min":1.951,"max":1.951,"mean":1.951,"latest":1.951,"count":1,"first_step":204,"last_step":204},{"key":"entropy","min":3.1330020427703857,"max":4.252453327178955,"mean":3.6496509979752934,"latest":3.1330020427703857,"count":204,"first_step":1,"last_step":204},{"key":"eval_runtime","min":6.3487,"max":6.7308,"mean":6.53975,"latest":6.3487,"count":2,"first_step":0,"last_step":204},{"key":"grad_norm","min":0.4185899794101715,"max":1.697460651397705,"mean":0.9965703097336432,"latest":1.3113601207733154,"count":204,"first_step":1,"last_step":204},{"key":"total_flos","min":31781629558784,"max":31781629558784,"mean":31781629558784,"latest":31781629558784,"count":1,"first_step":204,"last_step":204},{"key":"training_runtime_seconds","min":106.08,"max":106.08,"mean":106.08,"latest":106.08,"count":1,"first_step":0,"last_step":0},{"key":"train_loss","min":3.10653018951416,"max":4.4325761795043945,"mean":3.6260507060032263,"latest":3.6260507060032263,"count":205,"first_step":1,"last_step":204},{"key":"train_runtime","min":104.5855,"max":104.5855,"mean":104.5855,"latest":104.5855,"count":1,"first_step":204,"last_step":204},{"key":"train_samples_per_second","min":7.802,"max":7.802,"mean":7.802,"latest":7.802,"count":1,"first_step":204,"last_step":204},{"key":"eval_mean_token_accuracy","min":0.3437899912104887,"max":0.40528977969113517,"mean":0.37453988545081196,"latest":0.40528977969113517,"count":2,"first_step":0,"last_step":204},{"key":"eval_num_tokens","min":0,"max":115650,"mean":57825,"latest":115650,"count":2,"first_step":0,"last_step":204},{"key":"eval_samples_per_second","min":30.308,"max":32.133,"mean":31.2205,"latest":32.133,"count":2,"first_step":0,"last_step":204},{"key":"eval_steps_per_second","min":7.577,"max":8.033,"mean":7.805,"latest":8.033,"count":2,"first_step":0,"last_step":204},{"key":"final_train_loss","min":3.6260507060032263,"max":3.6260507060032263,"mean":3.6260507060032263,"latest":3.6260507060032263,"count":1,"first_step":0,"last_step":0},{"key":"mean_token_accuracy","min":0.2756052017211914,"max":0.4394785761833191,"mean":0.36340271316322625,"latest":0.4110320210456848,"count":204,"first_step":1,"last_step":204},{"key":"epoch","min":0,"max":1,"mean":0.5048309178743962,"latest":1,"count":207,"first_step":0,"last_step":204},{"key":"eval_entropy","min":3.4261409394881306,"max":3.795459279827043,"mean":3.610800109657587,"latest":3.4261409394881306,"count":2,"first_step":0,"last_step":204},{"key":"loss","min":3.10653018951416,"max":4.4325761795043945,"mean":3.6260507060032263,"latest":3.171748638153076,"count":204,"first_step":1,"last_step":204},{"key":"num_tokens","min":602,"max":115650,"mean":58002.029411764706,"latest":115650,"count":204,"first_step":1,"last_step":204},{"key":"total_steps","min":204,"max":204,"mean":204,"latest":204,"count":1,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///2387/70158/artifacts","name":"ft-gpt2-smoke-1778812860-1778813692","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"_name_or_path","value":"gpt2"},{"key":"activation_function","value":"gelu_new"},{"key":"adam_beta1","value":"0.9"},{"key":"adam_beta2","value":"0.999"},{"key":"adam_epsilon","value":"1e-08"},{"key":"add_cross_attention","value":"False"},{"key":"architectures","value":"[''GPT2LMHeadModel'']"},{"key":"attn_pdrop","value":"0.1"},{"key":"auto_find_batch_size","value":"False"},{"key":"average_tokens_across_devices","value":"True"},{"key":"bf16","value":"True"},{"key":"bf16_full_eval","value":"False"},{"key":"bos_token_id","value":"50256"},{"key":"chunk_size_feed_forward","value":"0"},{"key":"dataset","value":"s3://aip-long-running-jobs/savita.manghnani/train_amplified.zip"},{"key":"disable_tqdm","value":"False"},{"key":"dtype","value":"bfloat16"},{"key":"embd_pdrop","value":"0.1"},{"key":"eos_token_id","value":"50256"},{"key":"eval_accumulation_steps","value":"None"},{"key":"eval_delay","value":"0"},{"key":"eval_do_concat_batches","value":"True"},{"key":"eval_on_start","value":"True"},{"key":"eval_steps","value":"None"},{"key":"eval_strategy","value":"epoch"},{"key":"eval_use_gather_object","value":"False"},{"key":"fp16","value":"False"},{"key":"fp16_full_eval","value":"False"},{"key":"gradient_accumulation_steps","value":"1"},{"key":"gradient_checkpointing","value":"False"},{"key":"gradient_checkpointing_kwargs","value":"None"},{"key":"id2label","value":"{0: + ''LABEL_0'', 1: ''LABEL_1''}"},{"key":"include_for_metrics","value":"[]"},{"key":"include_num_input_tokens_seen","value":"no"},{"key":"initializer_range","value":"0.02"},{"key":"is_encoder_decoder","value":"False"},{"key":"label2id","value":"{''LABEL_0'': + 0, ''LABEL_1'': 1}"},{"key":"label_smoothing_factor","value":"0.0"},{"key":"layer_norm_epsilon","value":"1e-05"},{"key":"learning_rate","value":"0.0001"},{"key":"liger_kernel_config","value":"None"},{"key":"log_level","value":"passive"},{"key":"log_level_replica","value":"warning"},{"key":"log_on_each_node","value":"True"},{"key":"logging_first_step","value":"False"},{"key":"logging_nan_inf_filter","value":"True"},{"key":"logging_steps","value":"1"},{"key":"logging_strategy","value":"steps"},{"key":"lora_alpha","value":"16"},{"key":"lora_dropout","value":"0.1"},{"key":"lora_rank","value":"8"},{"key":"lr_scheduler_kwargs","value":"None"},{"key":"lr_scheduler_type","value":"linear"},{"key":"max_grad_norm","value":"1.0"},{"key":"max_length","value":"2048"},{"key":"max_steps","value":"-1"},{"key":"method","value":"lora"},{"key":"model_name","value":"gpt2"},{"key":"model_type","value":"gpt2"},{"key":"n_ctx","value":"1024"},{"key":"n_embd","value":"768"},{"key":"n_head","value":"12"},{"key":"n_inner","value":"None"},{"key":"n_layer","value":"12"},{"key":"n_positions","value":"1024"},{"key":"neftune_noise_alpha","value":"None"},{"key":"num_epochs","value":"1"},{"key":"num_train_epochs","value":"1"},{"key":"optim","value":"adamw_torch_fused"},{"key":"optim_args","value":"None"},{"key":"optim_target_modules","value":"None"},{"key":"optimizer","value":"adamw_8bit"},{"key":"output_attentions","value":"False"},{"key":"output_dir","value":"./lora_output"},{"key":"output_hidden_states","value":"False"},{"key":"packing","value":"False"},{"key":"pad_token_id","value":"50256"},{"key":"per_device_batch_size","value":"2"},{"key":"per_device_eval_batch_size","value":"2"},{"key":"per_device_train_batch_size","value":"2"},{"key":"precision","value":"bf16"},{"key":"prediction_loss_only","value":"False"},{"key":"problem_type","value":"None"},{"key":"project","value":"huggingface"},{"key":"reorder_and_upcast_attn","value":"False"},{"key":"report_to","value":"[''mlflow'']"},{"key":"resid_pdrop","value":"0.1"},{"key":"return_dict","value":"True"},{"key":"run_name","value":"None"},{"key":"scale_attn_by_inverse_layer_idx","value":"False"},{"key":"scale_attn_weights","value":"True"},{"key":"summary_activation","value":"None"},{"key":"summary_first_dropout","value":"0.1"},{"key":"summary_proj_to_labels","value":"True"},{"key":"summary_type","value":"cls_index"},{"key":"summary_use_proj","value":"True"},{"key":"task_specific_params","value":"{''text-generation'': + {''do_sample'': True, ''max_length'': 50}}"},{"key":"tf32","value":"None"},{"key":"tie_word_embeddings","value":"True"},{"key":"torch_compile","value":"False"},{"key":"torch_compile_backend","value":"None"},{"key":"torch_compile_mode","value":"None"},{"key":"torch_empty_cache_steps","value":"None"},{"key":"trackio_bucket_id","value":"None"},{"key":"trackio_space_id","value":"None"},{"key":"trackio_static_space_id","value":"None"},{"key":"trainer","value":"trl-sft-raytrain"},{"key":"transformers_version","value":"5.8.1"},{"key":"use_cache","value":"False"},{"key":"use_liger_kernel","value":"False"},{"key":"vocab_size","value":"50257"},{"key":"warmup_steps","value":"10"},{"key":"weight_decay","value":"0.0"}],"project_id":2387,"started_at":"2026-05-15T02:54:52.581Z","status":"completed","tags":[{"key":"mlflow.runName","value":"ft-gpt2-smoke-1778812860-1778813692"},{"key":"mlflow.source.name","value":"/home/ray/.venv/lib/python3.12/site-packages/ray/_private/workers/default_worker.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"resumed","value":"false"}],"updated_at":"2026-05-15T02:57:03.257618Z"}}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-project-artifacts-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-artifacts-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-artifacts-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-project-artifacts-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-artifacts-returns-OK-response.yml new file mode 100644 index 000000000000..6450acde5de0 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-artifacts-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/projects/2387/artifacts + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"2387","type":"project_files","attributes":{"files":[{"filename":"README.md","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/README.md","created_at":"2026-05-15T02:57:00Z","file_size":1389},{"filename":"adapter_config.json","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/adapter_config.json","created_at":"2026-05-15T02:57:01Z","file_size":1015},{"filename":"adapter_model.safetensors","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/adapter_model.safetensors","created_at":"2026-05-15T02:57:01Z","file_size":4730632},{"filename":"README.md","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/README.md","created_at":"2026-05-15T02:57:02Z","file_size":5174},{"filename":"adapter_config.json","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/adapter_config.json","created_at":"2026-05-15T02:57:02Z","file_size":1015},{"filename":"adapter_model.safetensors","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/adapter_model.safetensors","created_at":"2026-05-15T02:57:03Z","file_size":4730632},{"filename":"optimizer.bin","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/optimizer.bin","created_at":"2026-05-15T02:57:02Z","file_size":9534155},{"filename":"pytorch_model_fsdp.bin","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/pytorch_model_fsdp.bin","created_at":"2026-05-15T02:57:03Z","file_size":4754405},{"filename":"rng_state_0.pth","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/rng_state_0.pth","created_at":"2026-05-15T02:57:03Z","file_size":14725},{"filename":"scheduler.pt","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/scheduler.pt","created_at":"2026-05-15T02:57:02Z","file_size":1465},{"filename":"tokenizer.json","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/tokenizer.json","created_at":"2026-05-15T02:57:03Z","file_size":3557680},{"filename":"tokenizer_config.json","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/tokenizer_config.json","created_at":"2026-05-15T02:57:02Z","file_size":326},{"filename":"trainer_state.json","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/trainer_state.json","created_at":"2026-05-15T02:57:02Z","file_size":62194},{"filename":"training_args.bin","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/checkpoint-204/training_args.bin","created_at":"2026-05-15T02:57:03Z","file_size":6097},{"filename":"run_config.json","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/run_config.json","created_at":"2026-05-15T02:57:00Z","file_size":991},{"filename":"tokenizer.json","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/tokenizer.json","created_at":"2026-05-15T02:57:01Z","file_size":3557680},{"filename":"tokenizer_config.json","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/tokenizer_config.json","created_at":"2026-05-15T02:57:01Z","file_size":326},{"filename":"training_args.bin","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/training_args.bin","created_at":"2026-05-15T02:57:02Z","file_size":6097},{"filename":"training_metrics.json","artifact_path":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/training_metrics.json","created_at":"2026-05-15T02:57:01Z","file_size":55890}]}}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-keys-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-keys-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-keys-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-keys-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-keys-returns-OK-response.yml new file mode 100644 index 000000000000..09ebb207208e --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-keys-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/project-facet-keys + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"2","type":"facet_keys","attributes":{"metrics":null,"parameters":[],"tags":["age","beatings","mlflow.experimentKind","mlflow.experiment.ownerID","morale","team","usecase","weather"]}}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-values-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-values-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-values-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-values-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-values-returns-OK-response.yml new file mode 100644 index 000000000000..ed8489514e4e --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-project-facet-values-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/project-facet-values?facet_type=tag&facet_name=model + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"tag:model","type":"facet_values","attributes":{"facet_name":"model","facet_type":"tag","values":[]}}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-projects-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/List-Model-Lab-projects-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-projects-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-projects-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/List-Model-Lab-projects-returns-OK-response.yml new file mode 100644 index 000000000000..d4ab2c1d039b --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-projects-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/projects + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"2439","type":"projects","attributes":{"artifact_storage_location":"model-lab:///2439","created_at":"2026-05-18T16:44:48.672513Z","description":"","is_starred":false,"name":"test-bdd-recording-1779122688","tags":[],"updated_at":"2026-05-18T16:44:48.684473Z"}},{"id":"2438","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76991","created_at":"2026-05-18T15:55:50.180276Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76991","is_starred":false,"name":"qwen36-27b-qlora-fsdp-1779119158","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-18T15:55:50.188677Z"}},{"id":"2437","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76989","created_at":"2026-05-18T15:46:35.705961Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76989","is_starred":false,"name":"qwen36-27b-lora-bf16-fsdp-1779118712","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-18T15:46:35.715063Z"}},{"id":"2436","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76981","created_at":"2026-05-18T14:36:11.355331Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76981","is_starred":false,"name":"llm-benchmark/gpt-oss-20b","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-18T14:36:11.363352Z"}},{"id":"2435","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76980","created_at":"2026-05-18T14:36:06.310431Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76980","is_starred":false,"name":"llm-benchmark/Qwen3.5-4B","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-18T14:36:06.318305Z"}},{"id":"2434","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76979","created_at":"2026-05-18T14:36:00.539314Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76979","is_starred":false,"name":"llm-benchmark/Qwen3-4B","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-18T14:36:00.546338Z"}},{"id":"2433","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76978","created_at":"2026-05-18T14:35:55.610359Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76978","is_starred":false,"name":"llm-benchmark/Qwen2.5-Coder-7B","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-18T14:35:55.618194Z"}},{"id":"2432","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76977","created_at":"2026-05-18T14:35:50.418713Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76977","is_starred":false,"name":"llm-benchmark/Qwen3-8B","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-18T14:35:50.428634Z"}},{"id":"2399","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76545","created_at":"2026-05-15T21:26:54.883458Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76545","is_starred":false,"name":"ft-qwen36-27b-lora-bf16-fsdp-1778879891","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T21:26:54.894726Z"}},{"id":"2398","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76541","created_at":"2026-05-15T21:00:45.799634Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76541","is_starred":false,"name":"ft-qwen36-27b-qlora-fsdp-a100-1778878296","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T21:00:45.812402Z"}},{"id":"2397","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76540","created_at":"2026-05-15T20:59:43.336624Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76540","is_starred":false,"name":"ft-qwen36-27b-qlora-a100-1778878293","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T20:59:43.346736Z"}},{"id":"2396","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76534","created_at":"2026-05-15T20:16:47.48412Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76534","is_starred":false,"name":"ft-qwen36-27b-qlora-1gpu-1778873109","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T20:16:47.494291Z"}},{"id":"2395","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76533","created_at":"2026-05-15T20:12:05.975402Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76533","is_starred":false,"name":"ft-qwen36-27b-qlora-fsdp-1778873254","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T20:12:05.984538Z"}},{"id":"2394","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76531","created_at":"2026-05-15T19:59:46.814886Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76531","is_starred":false,"name":"ft-qwen36-27b-qlora-1gpu-1778872828","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T19:59:46.824596Z"}},{"id":"2393","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76528","created_at":"2026-05-15T19:43:03.893417Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76528","is_starred":false,"name":"ft-qwen36-27b-qlora-fsdp-1778873442","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T19:43:03.901909Z"}},{"id":"2392","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76527","created_at":"2026-05-15T19:41:00.782593Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76527","is_starred":false,"name":"ft-qwen36-27b-qlora-1778872484","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T19:41:00.792616Z"}},{"id":"2391","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76522","created_at":"2026-05-15T18:58:22.785747Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76522","is_starred":false,"name":"ft-qwen35-9b-qlora-1778870929","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T18:58:22.79593Z"}},{"id":"2390","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76514","created_at":"2026-05-15T17:49:04.684478Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76514","is_starred":false,"name":"ft-qwen35-9b-qlora-1778866175","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T17:49:04.694823Z"}},{"id":"2389","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76483","created_at":"2026-05-15T12:52:28.046954Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76483","is_starred":false,"name":"ft-qwen35-9b-qlora-1778848889","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T12:52:28.057141Z"}},{"id":"2388","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76425","created_at":"2026-05-15T03:18:25.363827Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76425","is_starred":false,"name":"ft-qwen35-9b-qlora-1778814244","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T03:18:25.375252Z"}},{"id":"2387","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76421","created_at":"2026-05-15T02:54:52.457827Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76421","is_starred":false,"name":"ft-gpt2-smoke-1778812860","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-15T02:54:52.468614Z"}},{"id":"2386","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76396","created_at":"2026-05-14T23:30:56.250532Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76396","is_starred":false,"name":"gpt2-smoke-1778800651","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-14T23:30:56.261218Z"}},{"id":"2385","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76393","created_at":"2026-05-14T23:10:18.350308Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76393","is_starred":false,"name":"gpt2-smoke-1778799710","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-14T23:10:18.361036Z"}},{"id":"2352","type":"projects","attributes":{"artifact_storage_location":"model-lab:///76357","created_at":"2026-05-14T17:21:01.714616Z","description":"","external_url":"https://mlflow.us1.staging.dog/#/experiments/76357","is_starred":false,"name":"qwen3-4b-thinking-false-1778778667","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","tags":[],"updated_at":"2026-05-14T17:21:01.724501Z"}},{"id":"2351","type":"projects","attributes":{"artifact_storage_location":"model-lab:///2351","created_at":"2026-05-14T13:24:26.439419Z","description":"","is_starred":false,"name":"40-model-lab-online-rlaif","owner_id":"11e6980a-089e-49ea-be5c-c821408af46d","tags":[],"updated_at":"2026-05-14T13:24:26.452049Z"}}],"meta":{"page":{"type":"number_size","number":0,"size":25,"total":403,"first_number":0,"prev_number":null,"next_number":1,"last_number":16}},"links":{"self":"https://api.datad0g.com/api/v2/model-lab-api/projects","first":"https://api.datad0g.com/api/v2/model-lab-api/projects?page[number]=0&page[size]=25","last":"https://api.datad0g.com/api/v2/model-lab-api/projects?page[number]=16&page[size]=25","next":"https://api.datad0g.com/api/v2/model-lab-api/projects?page[number]=1&page[size]=25"}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-run-artifacts-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-artifacts-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-artifacts-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-run-artifacts-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-artifacts-returns-OK-response.yml new file mode 100644 index 000000000000..50c1fba59ca5 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-artifacts-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/runs/70158/artifacts + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"70158","type":"artifacts","attributes":{"files":[{"path":"lora_model/","is_dir":true}],"path_in_project":"f635c73b70594ab6bb6e212cdf87d0d5/artifacts"}}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-keys-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-keys-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-keys-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-keys-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-keys-returns-OK-response.yml new file mode 100644 index 000000000000..323da6bcff25 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-keys-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/facet-keys?filter%5Bproject_id%5D=2387 + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"2387","type":"facet_keys","attributes":{"metrics":["entropy","epoch","eval_entropy","eval_loss","eval_mean_token_accuracy","eval_num_tokens","eval_runtime","eval_samples_per_second","eval_steps_per_second","final_train_loss","grad_norm","learning_rate","loss","mean_token_accuracy","num_tokens","total_flos","total_steps","training_runtime_seconds","train_loss","train_runtime","train_samples_per_second","train_steps_per_second"],"parameters":["activation_function","adam_beta1","adam_beta2","adam_epsilon","add_cross_attention","architectures","attn_pdrop","auto_find_batch_size","average_tokens_across_devices","bf16","bf16_full_eval","bos_token_id","chunk_size_feed_forward","dataset","disable_tqdm","dtype","embd_pdrop","eos_token_id","eval_accumulation_steps","eval_delay","eval_do_concat_batches","eval_on_start","eval_steps","eval_strategy","eval_use_gather_object","fp16","fp16_full_eval","gradient_accumulation_steps","gradient_checkpointing","gradient_checkpointing_kwargs","id2label","include_for_metrics","include_num_input_tokens_seen","initializer_range","is_encoder_decoder","label2id","label_smoothing_factor","layer_norm_epsilon","learning_rate","liger_kernel_config","logging_first_step","logging_nan_inf_filter","logging_steps","logging_strategy","log_level","log_level_replica","log_on_each_node","lora_alpha","lora_dropout","lora_rank","lr_scheduler_kwargs","lr_scheduler_type","max_grad_norm","max_length","max_steps","method","model_name","model_type","_name_or_path","n_ctx","neftune_noise_alpha","n_embd","n_head","n_inner","n_layer","n_positions","num_epochs","num_train_epochs","optim","optim_args","optimizer","optim_target_modules","output_attentions","output_dir","output_hidden_states","packing","pad_token_id","per_device_batch_size","per_device_eval_batch_size","per_device_train_batch_size","precision","prediction_loss_only","problem_type","project","reorder_and_upcast_attn","report_to","resid_pdrop","return_dict","run_name","scale_attn_by_inverse_layer_idx","scale_attn_weights","summary_activation","summary_first_dropout","summary_proj_to_labels","summary_type","summary_use_proj","task_specific_params","tf32","tie_word_embeddings","torch_compile","torch_compile_backend","torch_compile_mode","torch_empty_cache_steps","trackio_bucket_id","trackio_space_id","trackio_static_space_id","trainer","transformers_version","use_cache","use_liger_kernel","vocab_size","warmup_steps","weight_decay"],"tags":["mlflow.runName","mlflow.source.name","mlflow.source.type","mlflow.user","resumed"]}}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-values-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-values-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-values-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-values-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-values-returns-OK-response.yml new file mode 100644 index 000000000000..47fb5cc789da --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-run-facet-values-returns-OK-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/facet-values?filter%5Bproject_id%5D=2387&facet_type=tag&facet_name=model + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"tag:model:2387","type":"facet_values","attributes":{"facet_name":"model","facet_type":"tag","values":[]}}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-runs-returns-OK-response.frozen b/cassettes/features/v2/model_lab_api/List-Model-Lab-runs-returns-OK-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-runs-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/List-Model-Lab-runs-returns-OK-response.yml b/cassettes/features/v2/model_lab_api/List-Model-Lab-runs-returns-OK-response.yml new file mode 100644 index 000000000000..f585788cffec --- /dev/null +++ b/cassettes/features/v2/model_lab_api/List-Model-Lab-runs-returns-OK-response.yml @@ -0,0 +1,28 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - application/json + method: GET + uri: https://api.datadoghq.com/api/v2/model-lab-api/runs + response: + body: + encoding: UTF-8 + string: '{"data":[{"id":"71355","type":"runs","attributes":{"created_at":"2026-05-18T15:55:50.38705Z","descendant_match":false,"description":"","external_url":"https://mlflow.us1.staging.dog/#/runs/967b528b3e994b34a67348b790f5faba","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///2438/71355/artifacts","name":"qwen36-27b-qlora-fsdp-1779119158-1779119750","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"config_max_length","value":"512"},{"key":"dataset","value":"s3://aip-long-running-jobs/savita.manghnani/qwen3_without_thinking.zip"},{"key":"gradient_accumulation_steps","value":"1"},{"key":"learning_rate","value":"0.0001"},{"key":"lora_alpha","value":"16"},{"key":"lora_dropout","value":"0.1"},{"key":"lora_rank","value":"8"},{"key":"method","value":"qlora-4bit"},{"key":"model_name","value":"Qwen/Qwen3.6-27B"},{"key":"num_epochs","value":"1"},{"key":"optimizer","value":"adamw_8bit"},{"key":"packing","value":"False"},{"key":"per_device_batch_size","value":"2"},{"key":"precision","value":"bf16"},{"key":"trainer","value":"trl-sft-raytrain"}],"project_id":2438,"started_at":"2026-05-18T15:55:50.275Z","status":"running","tags":[{"key":"mlflow.runName","value":"qwen36-27b-qlora-fsdp-1779119158-1779119750"},{"key":"mlflow.source.name","value":"/home/ray/.venv/lib/python3.12/site-packages/ray/_private/workers/default_worker.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"resumed","value":"false"}],"updated_at":"2026-05-18T15:55:50.399903Z"}},{"id":"71354","type":"runs","attributes":{"created_at":"2026-05-18T15:46:35.963967Z","descendant_match":false,"description":"","external_url":"https://mlflow.us1.staging.dog/#/runs/018cbd19633e47f7b57d140b63f2f99e","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///2437/71354/artifacts","name":"qwen36-27b-lora-bf16-fsdp-1779118712-1779119195","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"config_max_length","value":"512"},{"key":"dataset","value":"s3://aip-long-running-jobs/savita.manghnani/qwen3_without_thinking.zip"},{"key":"gradient_accumulation_steps","value":"1"},{"key":"learning_rate","value":"0.0001"},{"key":"lora_alpha","value":"16"},{"key":"lora_dropout","value":"0.1"},{"key":"lora_rank","value":"8"},{"key":"method","value":"lora"},{"key":"model_name","value":"Qwen/Qwen3.6-27B"},{"key":"num_epochs","value":"1"},{"key":"optimizer","value":"adamw_8bit"},{"key":"packing","value":"False"},{"key":"per_device_batch_size","value":"2"},{"key":"precision","value":"bf16"},{"key":"trainer","value":"trl-sft-raytrain"}],"project_id":2437,"started_at":"2026-05-18T15:46:35.799Z","status":"running","tags":[{"key":"mlflow.runName","value":"qwen36-27b-lora-bf16-fsdp-1779118712-1779119195"},{"key":"mlflow.source.name","value":"/home/ray/.venv/lib/python3.12/site-packages/ray/_private/workers/default_worker.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"resumed","value":"false"}],"updated_at":"2026-05-18T15:46:35.980176Z"}},{"id":"71353","type":"runs","attributes":{"created_at":"2026-05-18T14:36:11.550137Z","descendant_match":false,"description":"","external_url":"https://mlflow.us1.staging.dog/#/runs/7ea36d29bbaf4e74abd124f08abe514e","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"system/total_input_tokens","min":10240,"max":10240,"mean":10240,"latest":10240,"count":1,"first_step":0,"last_step":0},{"key":"system/total_token_throughput","min":1627.7501525189548,"max":1627.7501525189548,"mean":1627.7501525189548,"latest":1627.7501525189548,"count":1,"first_step":0,"last_step":0},{"key":"system/median_itl_ms","min":35.59626202331856,"max":35.59626202331856,"mean":35.59626202331856,"latest":35.59626202331856,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_usd_decode","min":0.048628,"max":0.048628,"mean":0.048628,"latest":0.048628,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_e2el_ms","min":6844.651613000315,"max":6844.651613000315,"mean":6844.651613000315,"latest":6844.651613000315,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_itl_ms","min":42.46556939943183,"max":42.46556939943183,"mean":42.46556939943183,"latest":42.46556939943183,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_itl_ms","min":224.5777664042544,"max":224.5777664042544,"mean":224.5777664042544,"latest":224.5777664042544,"count":1,"first_step":0,"last_step":0},{"key":"system/completion_rate","min":1,"max":1,"mean":1,"latest":0,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_ttft_ms","min":1720.476923091337,"max":1720.476923091337,"mean":1720.476923091337,"latest":1720.476923091337,"count":1,"first_step":0,"last_step":0},{"key":"system/median_tpot_ms","min":41.04991006301936,"max":41.04991006301936,"mean":41.04991006301936,"latest":41.04991006301936,"count":1,"first_step":0,"last_step":0},{"key":"system/num_prompts","min":10,"max":10,"mean":10,"latest":10,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_e2el_ms","min":7012.529445069376,"max":7012.529445069376,"mean":7012.529445069376,"latest":7012.529445069376,"count":1,"first_step":0,"last_step":0},{"key":"system/request_throughput","min":1.4227341600550256,"max":1.4227341600550256,"mean":1.4227341600550256,"latest":1.4227341600550256,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_per_hour","min":0.5,"max":0.5,"mean":0.5,"latest":0.5,"count":1,"first_step":0,"last_step":0},{"key":"cost/input_cost_per_mtok","min":0.037,"max":0.037,"mean":0.037,"latest":0.037,"count":1,"first_step":0,"last_step":0},{"key":"cost/output_cost_per_mtok","min":0.6449,"max":0.6449,"mean":0.6449,"latest":0.6449,"count":1,"first_step":0,"last_step":0},{"key":"system/duration","min":7.028719968046062,"max":7.028719968046062,"mean":7.028719968046062,"latest":7.028719968046062,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_tpot_ms","min":46.36904549927383,"max":46.36904549927383,"mean":46.36904549927383,"latest":46.36904549927383,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_tpot_ms","min":92.36138276634182,"max":92.36138276634182,"mean":92.36138276634182,"latest":92.36138276634182,"count":1,"first_step":0,"last_step":0},{"key":"system/total_output_tokens","min":1201,"max":1201,"mean":1201,"latest":1201,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_usd_prefill","min":0.117495,"max":0.117495,"mean":0.117495,"latest":0.117495,"count":1,"first_step":0,"last_step":0},{"key":"system/completed","min":10,"max":10,"mean":10,"latest":10,"count":1,"first_step":0,"last_step":0},{"key":"system/median_e2el_ms","min":6965.079715999309,"max":6965.079715999309,"mean":6965.079715999309,"latest":6965.079715999309,"count":1,"first_step":0,"last_step":0},{"key":"system/median_ttft_ms","min":1751.7411379958503,"max":1751.7411379958503,"mean":1751.7411379958503,"latest":1751.7411379958503,"count":1,"first_step":0,"last_step":0},{"key":"system/output_throughput","min":170.87037262260858,"max":170.87037262260858,"mean":170.87037262260858,"latest":170.87037262260858,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_ttft_ms","min":2365.1834659359884,"max":2365.1834659359884,"mean":2365.1834659359884,"latest":2365.1834659359884,"count":1,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///2436/71353/artifacts","name":"L4-gpt-oss-20b","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"enable_chunked_prefill","value":"True"},{"key":"enable_prefix_caching","value":"False"},{"key":"gpu_memory_utilization","value":"0.95"},{"key":"gpu_type","value":"L4"},{"key":"model","value":"openai/gpt-oss-20b"},{"key":"model.basename","value":"gpt-oss-20b"},{"key":"service_name","value":"gpt-oss-20b-bench-bgtu"},{"key":"tensor_parallel_size","value":"1"},{"key":"vllm.image","value":"727006795293.dkr.ecr.us-east-1.amazonaws.com/dd-source/domains/data_science/llm/apps/ray-llm-service:vllm-bleeding-edge-nydus"}],"project_id":2436,"started_at":"2026-05-18T14:36:11.37Z","status":"completed","tags":[{"key":"leaderboard","value":"true"}],"updated_at":"2026-05-18T14:36:16.155066Z"}},{"id":"71352","type":"runs","attributes":{"created_at":"2026-05-18T14:36:06.518157Z","descendant_match":false,"description":"","external_url":"https://mlflow.us1.staging.dog/#/runs/b7cc8492b38748a68e591dc0a39b7a22","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"system/mean_tpot_ms","min":43.4315888917873,"max":43.4315888917873,"mean":43.4315888917873,"latest":43.4315888917873,"count":1,"first_step":0,"last_step":0},{"key":"system/median_tpot_ms","min":43.51078476765978,"max":43.51078476765978,"mean":43.51078476765978,"latest":43.51078476765978,"count":1,"first_step":0,"last_step":0},{"key":"system/output_throughput","min":149.83232267595528,"max":149.83232267595528,"mean":149.83232267595528,"latest":149.83232267595528,"count":1,"first_step":0,"last_step":0},{"key":"system/request_throughput","min":1.1705650209059006,"max":1.1705650209059006,"mean":1.1705650209059006,"latest":1.1705650209059006,"count":1,"first_step":0,"last_step":0},{"key":"system/median_itl_ms","min":40.42643454158679,"max":40.42643454158679,"mean":40.42643454158679,"latest":40.42643454158679,"count":1,"first_step":0,"last_step":0},{"key":"cost/output_cost_per_mtok","min":0.4206,"max":0.4206,"mean":0.4206,"latest":0.4206,"count":1,"first_step":0,"last_step":0},{"key":"system/duration","min":6.834306388045661,"max":6.834306388045661,"mean":6.834306388045661,"latest":6.834306388045661,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_itl_ms","min":43.060154871227496,"max":43.060154871227496,"mean":43.060154871227496,"latest":43.060154871227496,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_ttft_ms","min":1236.150400378392,"max":1236.150400378392,"mean":1236.150400378392,"latest":1236.150400378392,"count":1,"first_step":0,"last_step":0},{"key":"system/median_ttft_ms","min":1221.9488615519367,"max":1221.9488615519367,"mean":1221.9488615519367,"latest":1221.9488615519367,"count":1,"first_step":0,"last_step":0},{"key":"system/num_prompts","min":10,"max":10,"mean":10,"latest":10,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_tpot_ms","min":48.08998211418044,"max":48.08998211418044,"mean":48.08998211418044,"latest":48.08998211418044,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_usd_decode","min":0.064611,"max":0.064611,"mean":0.064611,"latest":0.064611,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_usd_prefill","min":0.083986,"max":0.083986,"mean":0.083986,"latest":0.083986,"count":1,"first_step":0,"last_step":0},{"key":"system/completed","min":8,"max":8,"mean":8,"latest":8,"count":1,"first_step":0,"last_step":0},{"key":"system/median_e2el_ms","min":6749.058461980894,"max":6749.058461980894,"mean":6749.058461980894,"latest":6749.058461980894,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_itl_ms","min":123.0954357003793,"max":123.0954357003793,"mean":123.0954357003793,"latest":123.0954357003793,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_ttft_ms","min":1679.515644611092,"max":1679.515644611092,"mean":1679.515644611092,"latest":1679.515644611092,"count":1,"first_step":0,"last_step":0},{"key":"system/total_input_tokens","min":8192,"max":8192,"mean":8192,"latest":8192,"count":1,"first_step":0,"last_step":0},{"key":"system/total_output_tokens","min":1024,"max":1024,"mean":1024,"latest":1024,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_per_hour","min":0.5,"max":0.5,"mean":0.5,"latest":0.5,"count":1,"first_step":0,"last_step":0},{"key":"cost/input_cost_per_mtok","min":0.0263,"max":0.0263,"mean":0.0263,"latest":0.0263,"count":1,"first_step":0,"last_step":0},{"key":"system/completion_rate","min":0.8,"max":0.8,"mean":0.8,"latest":0.8,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_e2el_ms","min":6751.962189635378,"max":6751.962189635378,"mean":6751.962189635378,"latest":6751.962189635378,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_e2el_ms","min":6818.673504971666,"max":6818.673504971666,"mean":6818.673504971666,"latest":6818.673504971666,"count":1,"first_step":0,"last_step":0},{"key":"system/total_token_throughput","min":1348.4909040835976,"max":1348.4909040835976,"mean":1348.4909040835976,"latest":1348.4909040835976,"count":1,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///2435/71352/artifacts","name":"L4-Qwen3.5-4B","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"enable_chunked_prefill","value":"True"},{"key":"enable_prefix_caching","value":"False"},{"key":"gpu_memory_utilization","value":"0.95"},{"key":"gpu_type","value":"L4"},{"key":"model","value":"Qwen/Qwen3.5-4B"},{"key":"model.basename","value":"Qwen3.5-4B"},{"key":"service_name","value":"qwen3-5-4b-bench-3t8u"},{"key":"tensor_parallel_size","value":"1"},{"key":"vllm.image","value":"727006795293.dkr.ecr.us-east-1.amazonaws.com/dd-source/domains/data_science/llm/apps/ray-llm-service:vllm-bleeding-edge-nydus"}],"project_id":2435,"started_at":"2026-05-18T14:36:06.322Z","status":"completed","tags":[{"key":"leaderboard","value":"true"}],"updated_at":"2026-05-18T14:36:11.155341Z"}},{"id":"71351","type":"runs","attributes":{"created_at":"2026-05-18T14:36:01.262504Z","descendant_match":false,"description":"","external_url":"https://mlflow.us1.staging.dog/#/runs/1a7acda0ecc04ca280b77c2f5bef8dc2","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"system/mean_itl_ms","min":10.056404993260262,"max":10.056404993260262,"mean":10.056404993260262,"latest":10.056404993260262,"count":1,"first_step":0,"last_step":0},{"key":"system/median_tpot_ms","min":10.248206653008898,"max":10.248206653008898,"mean":10.248206653008898,"latest":10.248206653008898,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_itl_ms","min":59.449308563488955,"max":59.449308563488955,"mean":59.449308563488955,"latest":59.449308563488955,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_tpot_ms","min":10.799848160644128,"max":10.799848160644128,"mean":10.799848160644128,"latest":10.799848160644128,"count":1,"first_step":0,"last_step":0},{"key":"system/total_output_tokens","min":896,"max":896,"mean":896,"latest":896,"count":1,"first_step":0,"last_step":0},{"key":"system/total_token_throughput","min":4736.073511532153,"max":4736.073511532153,"mean":4736.073511532153,"latest":4736.073511532153,"count":1,"first_step":0,"last_step":0},{"key":"cost/input_cost_per_mtok","min":0.0238,"max":0.0238,"mean":0.0238,"latest":0.0238,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_e2el_ms","min":1663.88821718283,"max":1663.88821718283,"mean":1663.88821718283,"latest":1663.88821718283,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_tpot_ms","min":10.16328207094587,"max":10.16328207094587,"mean":10.16328207094587,"latest":10.16328207094587,"count":1,"first_step":0,"last_step":0},{"key":"system/output_throughput","min":526.2303901702393,"max":526.2303901702393,"mean":526.2303901702393,"latest":526.2303901702393,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_e2el_ms","min":1673.3655747771263,"max":1673.3655747771263,"mean":1673.3655747771263,"latest":1673.3655747771263,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_per_hour","min":1.35,"max":1.35,"mean":1.35,"latest":1.35,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_usd_decode","min":0.035789,"max":0.035789,"mean":0.035789,"latest":0.035789,"count":1,"first_step":0,"last_step":0},{"key":"cost/output_cost_per_mtok","min":0.2962,"max":0.2962,"mean":0.2962,"latest":0.2962,"count":1,"first_step":0,"last_step":0},{"key":"system/completion_rate","min":0.7,"max":0.7,"mean":0.7,"latest":0.7,"count":1,"first_step":0,"last_step":0},{"key":"system/median_itl_ms","min":9.22439800342545,"max":9.22439800342545,"mean":9.22439800342545,"latest":9.22439800342545,"count":1,"first_step":0,"last_step":0},{"key":"system/median_ttft_ms","min":370.5793390981853,"max":370.5793390981853,"mean":370.5793390981853,"latest":370.5793390981853,"count":1,"first_step":0,"last_step":0},{"key":"system/num_prompts","min":10,"max":10,"mean":10,"latest":10,"count":1,"first_step":0,"last_step":0},{"key":"system/total_input_tokens","min":7168,"max":7168,"mean":7168,"latest":7168,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_usd_prefill","min":0.076802,"max":0.076802,"mean":0.076802,"latest":0.076802,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_ttft_ms","min":373.15139417270467,"max":373.15139417270467,"mean":373.15139417270467,"latest":373.15139417270467,"count":1,"first_step":0,"last_step":0},{"key":"system/median_e2el_ms","min":1666.9419680256397,"max":1666.9419680256397,"mean":1666.9419680256397,"latest":1666.9419680256397,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_ttft_ms","min":442.06858904799446,"max":442.06858904799446,"mean":442.06858904799446,"latest":442.06858904799446,"count":1,"first_step":0,"last_step":0},{"key":"system/request_throughput","min":4.111174923204994,"max":4.111174923204994,"mean":4.111174923204994,"latest":4.111174923204994,"count":1,"first_step":0,"last_step":0},{"key":"system/completed","min":7,"max":7,"mean":7,"latest":7,"count":1,"first_step":0,"last_step":0},{"key":"system/duration","min":1.7026762739988044,"max":1.7026762739988044,"mean":1.7026762739988044,"latest":1.7026762739988044,"count":1,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///2434/71351/artifacts","name":"A100-Qwen3-4B","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"enable_chunked_prefill","value":"True"},{"key":"enable_prefix_caching","value":"False"},{"key":"gpu_memory_utilization","value":"0.95"},{"key":"gpu_type","value":"A100"},{"key":"model","value":"Qwen/Qwen3-4B"},{"key":"model.basename","value":"Qwen3-4B"},{"key":"service_name","value":"qwen3-4b-bench-95qm"},{"key":"tensor_parallel_size","value":"1"},{"key":"vllm.image","value":"727006795293.dkr.ecr.us-east-1.amazonaws.com/dd-source/domains/data_science/llm/apps/ray-llm-service:vllm-bleeding-edge-nydus"}],"project_id":2434,"started_at":"2026-05-18T14:36:00.552Z","status":"completed","tags":[{"key":"leaderboard","value":"true"}],"updated_at":"2026-05-18T14:36:06.038833Z"}},{"id":"71350","type":"runs","attributes":{"created_at":"2026-05-18T14:35:55.810039Z","descendant_match":false,"description":"","external_url":"https://mlflow.us1.staging.dog/#/runs/bcf3d94123df44e1b94c4d3b441f8660","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"cost/gpu_cost_usd_decode","min":0.051152,"max":0.051152,"mean":0.051152,"latest":0.051152,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_e2el_ms","min":1780.398302944377,"max":1780.398302944377,"mean":1780.398302944377,"latest":1780.398302944377,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_tpot_ms","min":12.372558590439038,"max":12.372558590439038,"mean":12.372558590439038,"latest":12.372558590439038,"count":1,"first_step":0,"last_step":0},{"key":"system/median_ttft_ms","min":209.0833619586192,"max":209.0833619586192,"mean":209.0833619586192,"latest":209.0833619586192,"count":1,"first_step":0,"last_step":0},{"key":"system/num_prompts","min":10,"max":10,"mean":10,"latest":10,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_per_hour","min":1.35,"max":1.35,"mean":1.35,"latest":1.35,"count":1,"first_step":0,"last_step":0},{"key":"cost/input_cost_per_mtok","min":0.0294,"max":0.0294,"mean":0.0294,"latest":0.0294,"count":1,"first_step":0,"last_step":0},{"key":"system/completion_rate","min":0.2,"max":0.2,"mean":0.2,"latest":0.2,"count":1,"first_step":0,"last_step":0},{"key":"system/duration","min":1.8296654969453812,"max":1.8296654969453812,"mean":1.8296654969453812,"latest":1.8296654969453812,"count":1,"first_step":0,"last_step":0},{"key":"system/median_e2el_ms","min":1780.398302944377,"max":1780.398302944377,"mean":1780.398302944377,"latest":1780.398302944377,"count":1,"first_step":0,"last_step":0},{"key":"system/median_itl_ms","min":11.988877027761191,"max":11.988877027761191,"mean":11.988877027761191,"latest":11.988877027761191,"count":1,"first_step":0,"last_step":0},{"key":"system/output_throughput","min":139.91628547807832,"max":139.91628547807832,"mean":139.91628547807832,"latest":139.91628547807832,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_e2el_ms","min":1805.3105722554028,"max":1805.3105722554028,"mean":1805.3105722554028,"latest":1805.3105722554028,"count":1,"first_step":0,"last_step":0},{"key":"system/completed","min":2,"max":2,"mean":2,"latest":2,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_ttft_ms","min":209.0833619586192,"max":209.0833619586192,"mean":209.0833619586192,"latest":209.0833619586192,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_itl_ms","min":25.041629734914697,"max":25.041629734914697,"mean":25.041629734914697,"latest":25.041629734914697,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_ttft_ms","min":257.9028429754544,"max":257.9028429754544,"mean":257.9028429754544,"latest":257.9028429754544,"count":1,"first_step":0,"last_step":0},{"key":"system/request_throughput","min":1.093095980297487,"max":1.093095980297487,"mean":1.093095980297487,"latest":1.093095980297487,"count":1,"first_step":0,"last_step":0},{"key":"system/total_output_tokens","min":256,"max":256,"mean":256,"latest":256,"count":1,"first_step":0,"last_step":0},{"key":"system/total_token_throughput","min":1259.246569302705,"max":1259.246569302705,"mean":1259.246569302705,"latest":1259.246569302705,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_usd_prefill","min":0.095492,"max":0.095492,"mean":0.095492,"latest":0.095492,"count":1,"first_step":0,"last_step":0},{"key":"cost/output_cost_per_mtok","min":0.333,"max":0.333,"mean":0.333,"latest":0.333,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_itl_ms","min":12.273241152342962,"max":12.273241152342962,"mean":12.273241152342962,"latest":12.273241152342962,"count":1,"first_step":0,"last_step":0},{"key":"system/median_tpot_ms","min":12.372558590439038,"max":12.372558590439038,"mean":12.372558590439038,"latest":12.372558590439038,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_tpot_ms","min":12.560804351902105,"max":12.560804351902105,"mean":12.560804351902105,"latest":12.560804351902105,"count":1,"first_step":0,"last_step":0},{"key":"system/total_input_tokens","min":2048,"max":2048,"mean":2048,"latest":2048,"count":1,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///2433/71350/artifacts","name":"A100-Qwen2.5-Coder-7B","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"enable_chunked_prefill","value":"True"},{"key":"enable_prefix_caching","value":"False"},{"key":"gpu_memory_utilization","value":"0.95"},{"key":"gpu_type","value":"A100"},{"key":"model","value":"Qwen/Qwen2.5-Coder-7B"},{"key":"model.basename","value":"Qwen2.5-Coder-7B"},{"key":"service_name","value":"qwen2-5-coder-7b-bench-py78"},{"key":"tensor_parallel_size","value":"1"},{"key":"vllm.image","value":"727006795293.dkr.ecr.us-east-1.amazonaws.com/dd-source/domains/data_science/llm/apps/ray-llm-service:vllm-bleeding-edge-nydus"}],"project_id":2433,"started_at":"2026-05-18T14:35:55.625Z","status":"completed","tags":[{"key":"leaderboard","value":"true"}],"updated_at":"2026-05-18T14:36:00.339161Z"}},{"id":"71349","type":"runs","attributes":{"created_at":"2026-05-18T14:35:50.654902Z","descendant_match":false,"description":"","external_url":"https://mlflow.us1.staging.dog/#/runs/56ad4005ff9e40d1a0e106d5b60130c6","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"system/duration","min":2.3674380170414224,"max":2.3674380170414224,"mean":2.3674380170414224,"latest":2.3674380170414224,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_itl_ms","min":14.932849314997535,"max":14.932849314997535,"mean":14.932849314997535,"latest":14.932849314997535,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_tpot_ms","min":15.084737073538427,"max":15.084737073538427,"mean":15.084737073538427,"latest":15.084737073538427,"count":1,"first_step":0,"last_step":0},{"key":"system/median_e2el_ms","min":2337.1160394744948,"max":2337.1160394744948,"mean":2337.1160394744948,"latest":2337.1160394744948,"count":1,"first_step":0,"last_step":0},{"key":"system/median_tpot_ms","min":14.985868310845479,"max":14.985868310845479,"mean":14.985868310845479,"latest":14.985868310845479,"count":1,"first_step":0,"last_step":0},{"key":"system/output_throughput","min":324.40131250395586,"max":324.40131250395586,"mean":324.40131250395586,"latest":324.40131250395586,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_itl_ms","min":44.13257779670086,"max":44.13257779670086,"mean":44.13257779670086,"latest":44.13257779670086,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_usd_decode","min":0.08031,"max":0.08031,"mean":0.08031,"latest":0.08031,"count":1,"first_step":0,"last_step":0},{"key":"system/completion_rate","min":0.6,"max":0.6,"mean":0.6,"latest":0.6,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_ttft_ms","min":418.6328283588712,"max":418.6328283588712,"mean":418.6328283588712,"latest":418.6328283588712,"count":1,"first_step":0,"last_step":0},{"key":"system/request_throughput","min":2.534385253937155,"max":2.534385253937155,"mean":2.534385253937155,"latest":2.534385253937155,"count":1,"first_step":0,"last_step":0},{"key":"system/total_output_tokens","min":768,"max":768,"mean":768,"latest":768,"count":1,"first_step":0,"last_step":0},{"key":"system/total_token_throughput","min":2919.6118125356024,"max":2919.6118125356024,"mean":2919.6118125356024,"latest":2919.6118125356024,"count":1,"first_step":0,"last_step":0},{"key":"cost/output_cost_per_mtok","min":0.3921,"max":0.3921,"mean":0.3921,"latest":0.3921,"count":1,"first_step":0,"last_step":0},{"key":"system/completed","min":6,"max":6,"mean":6,"latest":6,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_e2el_ms","min":2351.7342927632853,"max":2351.7342927632853,"mean":2351.7342927632853,"latest":2351.7342927632853,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_tpot_ms","min":15.822381030412492,"max":15.822381030412492,"mean":15.822381030412492,"latest":15.822381030412492,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_usd_prefill","min":0.112268,"max":0.112268,"mean":0.112268,"latest":0.112268,"count":1,"first_step":0,"last_step":0},{"key":"cost/input_cost_per_mtok","min":0.0343,"max":0.0343,"mean":0.0343,"latest":0.0343,"count":1,"first_step":0,"last_step":0},{"key":"system/mean_e2el_ms","min":2334.394436698252,"max":2334.394436698252,"mean":2334.394436698252,"latest":2334.394436698252,"count":1,"first_step":0,"last_step":0},{"key":"system/median_itl_ms","min":14.451904979068786,"max":14.451904979068786,"mean":14.451904979068786,"latest":14.451904979068786,"count":1,"first_step":0,"last_step":0},{"key":"system/median_ttft_ms","min":433.9107639971189,"max":433.9107639971189,"mean":433.9107639971189,"latest":433.9107639971189,"count":1,"first_step":0,"last_step":0},{"key":"system/num_prompts","min":10,"max":10,"mean":10,"latest":10,"count":1,"first_step":0,"last_step":0},{"key":"system/p99_ttft_ms","min":513.0678390269168,"max":513.0678390269168,"mean":513.0678390269168,"latest":513.0678390269168,"count":1,"first_step":0,"last_step":0},{"key":"system/total_input_tokens","min":6144,"max":6144,"mean":6144,"latest":6144,"count":1,"first_step":0,"last_step":0},{"key":"cost/gpu_cost_per_hour","min":1.35,"max":1.35,"mean":1.35,"latest":1.35,"count":1,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///2432/71349/artifacts","name":"A100-Qwen3-8B","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"enable_chunked_prefill","value":"True"},{"key":"enable_prefix_caching","value":"False"},{"key":"gpu_memory_utilization","value":"0.95"},{"key":"gpu_type","value":"A100"},{"key":"model","value":"Qwen/Qwen3-8B"},{"key":"model.basename","value":"Qwen3-8B"},{"key":"service_name","value":"qwen3-8b-bench-n3rw"},{"key":"tensor_parallel_size","value":"1"},{"key":"vllm.image","value":"727006795293.dkr.ecr.us-east-1.amazonaws.com/dd-source/domains/data_science/llm/apps/ray-llm-service:vllm-bleeding-edge-nydus"}],"project_id":2432,"started_at":"2026-05-18T14:35:50.433Z","status":"completed","tags":[{"key":"leaderboard","value":"true"}],"updated_at":"2026-05-18T14:35:55.408334Z"}},{"id":"71348","type":"runs","attributes":{"completed_at":"2026-05-18T11:11:41.612Z","created_at":"2026-05-18T11:11:40.928813Z","descendant_match":false,"description":"","duration":0.794,"external_url":"https://mlflow.us1.staging.dog/#/runs/202b5372db464aa28c3ddcca74cb7432","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///1017/71348/artifacts","name":"user_service_ranker_2026-05-17","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"early_stopping_rounds","value":"20"},{"key":"features","value":"[''similarity_score'', + ''nb_page_views'', ''nb_days_with_page_view'', ''nb_views_since_last_page_view'', + ''nb_explorer_searches'', ''nb_days_with_explorer_search'', ''nb_searches_since_last_explorer_search'', + ''nb_cmdk_searches'', ''nb_days_with_cmdk_search'', ''nb_searches_since_last_cmdk_search'', + ''is_faves'', ''similarity_score_rank'', ''nb_page_views_rank'', ''nb_days_with_page_view_rank'', + ''nb_views_since_last_page_view_rank'', ''nb_explorer_searches_rank'', ''nb_days_with_explorer_search_rank'', + ''nb_searches_since_last_explorer_search_rank'', ''nb_cmdk_searches_rank'', + ''nb_days_with_cmdk_search_rank'', ''nb_searches_since_last_cmdk_search_rank'']"},{"key":"learning_rate","value":"0.2"},{"key":"max_depth","value":"3"},{"key":"metric","value":"ndcg"},{"key":"min_child_samples","value":"20"},{"key":"n_estimators","value":"500"},{"key":"n_groups_train","value":"242"},{"key":"n_groups_val","value":"27"},{"key":"num_leaves","value":"8"},{"key":"num_samples","value":"23883"},{"key":"objective","value":"lambdarank"},{"key":"random_state","value":"42"},{"key":"reg_alpha","value":"0.0"},{"key":"reg_lambda","value":"0.0"}],"project_id":1017,"started_at":"2026-05-18T11:11:40.818Z","status":"completed","tags":[{"key":"mlflow.runName","value":"user_service_ranker_2026-05-17"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"}],"updated_at":"2026-05-18T11:11:41.758491Z"}},{"id":"71347","type":"runs","attributes":{"created_at":"2026-05-18T09:53:57.946125Z","descendant_match":false,"description":"","external_url":"https://mlflow.us1.staging.dog/#/runs/a35df0b9b9b84b35a2e88ac087379036","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///1742/71347/artifacts","name":"QWEN3.5-9B","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"benchmark_type","value":"system"},{"key":"gpu_type","value":"A100"},{"key":"model","value":"QWEN/QWEN3.5-9B"}],"project_id":1742,"started_at":"2026-05-18T09:53:57.706Z","status":"running","tags":[{"key":"experiment_name","value":"qwen3-5-9b-exp"}],"updated_at":"2026-05-18T09:53:57.959737Z"}},{"id":"71346","type":"runs","attributes":{"created_at":"2026-05-18T09:53:42.9892Z","descendant_match":false,"description":"","external_url":"https://mlflow.us1.staging.dog/#/runs/80746aeb3147419f90ded5fc615a80aa","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///1742/71346/artifacts","name":"nonexistent-model-xyz","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"benchmark_type","value":"system"},{"key":"gpu_type","value":"L4"},{"key":"model","value":"FakeOrg/nonexistent-model-xyz"}],"project_id":1742,"started_at":"2026-05-18T09:53:42.738Z","status":"running","tags":[],"updated_at":"2026-05-18T09:53:43.000724Z"}},{"id":"71345","type":"runs","attributes":{"completed_at":"2026-05-18T08:45:15.968Z","created_at":"2026-05-18T08:45:07.586505Z","descendant_match":false,"description":"","duration":8.752,"external_url":"https://mlflow.us1.staging.dog/#/runs/203405f363da49529372474f59453dcd","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"gold_accuracy","min":0.8941176470588236,"max":0.8941176470588236,"mean":0.8941176470588236,"latest":0.8941176470588236,"count":1,"first_step":0,"last_step":0},{"key":"gold_recall","min":0.5,"max":0.5,"mean":0.5,"latest":0.5,"count":1,"first_step":0,"last_step":0},{"key":"gold_tn","min":74,"max":74,"mean":74,"latest":74,"count":1,"first_step":0,"last_step":0},{"key":"snorkel_fn","min":238,"max":238,"mean":238,"latest":238,"count":1,"first_step":0,"last_step":0},{"key":"snorkel_fp","min":5,"max":5,"mean":5,"latest":5,"count":1,"first_step":0,"last_step":0},{"key":"sweep_gold_fp","min":0,"max":81,"mean":16.235294117647058,"latest":18,"count":17,"first_step":0,"last_step":86},{"key":"sweep_snorkel_tp","min":115,"max":828,"mean":549.4,"latest":828,"count":15,"first_step":0,"last_step":99},{"key":"gold_f1_score","min":0.3076923076923077,"max":0.3076923076923077,"mean":0.3076923076923077,"latest":0.3076923076923077,"count":1,"first_step":0,"last_step":0},{"key":"gold_roc_auc","min":0.95679012345679,"max":0.95679012345679,"mean":0.95679012345679,"latest":0.95679012345679,"count":1,"first_step":0,"last_step":0},{"key":"snorkel_accuracy","min":0.942376096751245,"max":0.942376096751245,"mean":0.942376096751245,"latest":0.942376096751245,"count":1,"first_step":0,"last_step":0},{"key":"snorkel_tp","min":590,"max":590,"mean":590,"latest":590,"count":1,"first_step":0,"last_step":0},{"key":"sweep_snorkel_fn","min":0,"max":713,"mean":278.6,"latest":30,"count":15,"first_step":0,"last_step":99},{"key":"gold_precision","min":0.2222222222222222,"max":0.2222222222222222,"mean":0.2222222222222222,"latest":0.2222222222222222,"count":1,"first_step":0,"last_step":0},{"key":"gold_tp","min":2,"max":2,"mean":2,"latest":2,"count":1,"first_step":0,"last_step":0},{"key":"sweep_gold_f1_score","min":0.0898876404494382,"max":0.6666666666666666,"mean":0.35542231104842736,"latest":0.30769230769230765,"count":17,"first_step":0,"last_step":86},{"key":"sweep_snorkel_precision","min":0.1963481147735357,"max":1,"mean":0.8833905951822458,"latest":0.9978401727861771,"count":15,"first_step":0,"last_step":99},{"key":"sweep_snorkel_fp","min":0,"max":3389,"mean":290.8,"latest":6,"count":15,"first_step":0,"last_step":99},{"key":"snorkel_precision","min":0.9915966386554622,"max":0.9915966386554622,"mean":0.9915966386554622,"latest":0.9915966386554622,"count":1,"first_step":0,"last_step":0},{"key":"snorkel_roc_auc","min":0.9928354095304073,"max":0.9928354095304073,"mean":0.9928354095304073,"latest":0.9928354095304073,"count":1,"first_step":0,"last_step":0},{"key":"sweep_snorkel_recall","min":0.1388888888888889,"max":1,"mean":0.6635265700483092,"latest":0.2572463768115942,"count":15,"first_step":0,"last_step":99},{"key":"gold_fp","min":7,"max":7,"mean":7,"latest":7,"count":1,"first_step":0,"last_step":0},{"key":"sweep_gold_recall","min":0.25,"max":1,"mean":0.8088235294117647,"latest":0.5,"count":17,"first_step":0,"last_step":86},{"key":"sweep_gold_tn","min":0,"max":81,"mean":64.76470588235294,"latest":63,"count":17,"first_step":0,"last_step":86},{"key":"sweep_snorkel_f1_score","min":0.24390243902439027,"max":0.9226044226044227,"mean":0.6706883729826749,"latest":0.9226044226044227,"count":15,"first_step":0,"last_step":99},{"key":"snorkel_tn","min":3384,"max":3384,"mean":3384,"latest":3384,"count":1,"first_step":0,"last_step":0},{"key":"sweep_gold_fn","min":0,"max":3,"mean":0.7647058823529411,"latest":0,"count":17,"first_step":0,"last_step":86},{"key":"sweep_gold_precision","min":0.047058823529411764,"max":1,"mean":0.3126587632153479,"latest":0.21052631578947367,"count":17,"first_step":0,"last_step":86},{"key":"sweep_gold_tp","min":1,"max":4,"mean":3.235294117647059,"latest":2,"count":17,"first_step":0,"last_step":86},{"key":"sweep_snorkel_tn","min":0,"max":3389,"mean":3098.2,"latest":3389,"count":15,"first_step":0,"last_step":99},{"key":"gold_fn","min":2,"max":2,"mean":2,"latest":2,"count":1,"first_step":0,"last_step":0},{"key":"snorkel_f1_score","min":0.8292340126493324,"max":0.8292340126493324,"mean":0.8292340126493324,"latest":0.8292340126493324,"count":1,"first_step":0,"last_step":0},{"key":"snorkel_recall","min":0.7125603864734299,"max":0.7125603864734299,"mean":0.7125603864734299,"latest":0.7125603864734299,"count":1,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///488/71345/artifacts","name":"","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"is_unbalance","value":"True"},{"key":"learning_rate","value":"0.02"},{"key":"min_data_in_leaf","value":"100"},{"key":"n_estimators","value":"600"},{"key":"n_gold_samples","value":"85"},{"key":"n_jobs","value":"1"},{"key":"n_orgs","value":"1"},{"key":"n_snorkel_samples","value":"4217"},{"key":"n_training_samples","value":"229660"},{"key":"num_leaves","value":"31"},{"key":"org_ids","value":"[2]"},{"key":"random_state","value":"42"},{"key":"run_date","value":"2026-05-17"},{"key":"testing_window_days","value":"7"},{"key":"tfidf_lowercase","value":"False"},{"key":"tfidf_max_df","value":"0.95"},{"key":"tfidf_max_features","value":"30000"},{"key":"tfidf_min_df","value":"5"},{"key":"tfidf_ngram_range","value":"(1, + 2)"},{"key":"train_optimal_f1_threshold","value":"0.4115"},{"key":"training_window_days","value":"91"},{"key":"verbosity","value":"-1"},{"key":"version","value":"1"}],"project_id":488,"started_at":"2026-05-18T08:45:07.216Z","status":"completed","tags":[{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"n_orgs","value":"1"},{"key":"version","value":"1"}],"updated_at":"2026-05-18T08:45:16.3591Z"}},{"id":"71344","type":"runs","attributes":{"completed_at":"2026-05-18T05:03:26.966Z","created_at":"2026-05-18T05:01:59.834451Z","descendant_match":false,"description":"","duration":87.237,"external_url":"https://mlflow.us1.staging.dog/#/runs/2b10271e3e1546359da360a651c17bfa","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"accuracy","min":1,"max":1,"mean":1,"latest":0,"count":2,"first_step":0,"last_step":0},{"key":"precision","min":1,"max":1,"mean":1,"latest":0,"count":2,"first_step":0,"last_step":0},{"key":"recall","min":1,"max":1,"mean":1,"latest":0,"count":2,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///487/71344/artifacts","name":"mortar_train_test_alias_loading_partitioned_model","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"max_depth","value":"30"},{"key":"min_samples_leaf","value":"5"},{"key":"min_samples_split","value":"10"},{"key":"n_estimators","value":"100"}],"project_id":487,"started_at":"2026-05-18T05:01:59.729Z","status":"completed","tags":[{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"mortar_train_test_alias_loading_partitioned_model"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"train_end","value":"2026-05-18"},{"key":"train_start","value":"2026-05-17"}],"updated_at":"2026-05-18T05:03:27.148977Z"}},{"id":"71343","type":"runs","attributes":{"created_at":"2026-05-18T04:04:13.985851Z","descendant_match":false,"description":"","external_url":"https://mlflow.us1.staging.dog/#/runs/d1a9b44a39c54a34a35b956ce3469328","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"accuracy","min":0.9,"max":0.9,"mean":0.9,"latest":0.9,"count":2,"first_step":0,"last_step":0},{"key":"precision","min":0.9074074074074074,"max":0.9074074074074074,"mean":0.9074074074074074,"latest":0.9074074074074074,"count":2,"first_step":0,"last_step":0},{"key":"recall","min":0.903030303030303,"max":0.903030303030303,"mean":0.903030303030303,"latest":0.903030303030303,"count":2,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///486/71343/artifacts","name":"mortar_train_test_alias_loading_global_model","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"max_depth","value":"30"},{"key":"min_samples_leaf","value":"5"},{"key":"min_samples_split","value":"10"},{"key":"n_estimators","value":"100"}],"project_id":486,"started_at":"2026-05-18T04:04:13.883Z","status":"running","tags":[{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"mortar_train_test_alias_loading_global_model"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"train_end","value":"2026-05-18"},{"key":"train_start","value":"2026-05-17"}],"updated_at":"2026-05-18T04:04:14.000273Z"}},{"id":"71342","type":"runs","attributes":{"completed_at":"2026-05-18T03:01:58.035Z","created_at":"2026-05-18T03:01:30.842651Z","descendant_match":false,"description":"","duration":27.296,"external_url":"https://mlflow.us1.staging.dog/#/runs/6b22a5d0a54842ba9387d88316893fc9","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"accuracy","min":0.9,"max":0.9666666666666667,"mean":0.9438095238095238,"latest":0.9666666666666667,"count":35,"first_step":0,"last_step":0},{"key":"precision","min":0.8783068783068783,"max":0.9777777777777779,"mean":0.9454438947296091,"latest":0.9666666666666667,"count":35,"first_step":0,"last_step":0},{"key":"recall","min":0.875,"max":0.9743589743589745,"mean":0.941554873697731,"latest":0.9722222222222222,"count":35,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///484/71342/artifacts","name":"mortar_train_smoke_testing_partitioned_model","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"max_depth","value":"30"},{"key":"min_samples_leaf","value":"5"},{"key":"min_samples_split","value":"10"}],"project_id":484,"started_at":"2026-05-18T03:01:30.739Z","status":"completed","tags":[{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"mortar_train_smoke_testing_partitioned_model"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"train_end","value":"2026-05-18"},{"key":"train_start","value":"2026-05-17"}],"updated_at":"2026-05-18T03:01:58.176408Z"}},{"id":"71341","type":"runs","attributes":{"completed_at":"2026-05-18T02:12:00.018Z","created_at":"2026-05-18T02:11:33.56821Z","descendant_match":false,"description":"","duration":26.55,"external_url":"https://mlflow.us1.staging.dog/#/runs/f6921c2bc1014234b624d3f0c6e2f83e","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///482/71341/artifacts","name":"vanilla","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":null,"project_id":482,"started_at":"2026-05-18T02:11:33.468Z","status":"completed","tags":[{"key":"code_source","value":"dd-analytics"},{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"vanilla"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"model_type","value":"bayesian_model_with_baseline"},{"key":"third_party_provider_service_region","value":"amazonaws-es-us-east-1"}],"updated_at":"2026-05-18T02:12:00.166487Z"}},{"id":"71340","type":"runs","attributes":{"completed_at":"2026-05-18T02:11:52.421Z","created_at":"2026-05-18T02:11:29.581542Z","descendant_match":false,"description":"","duration":22.934,"external_url":"https://mlflow.us1.staging.dog/#/runs/74f4aad59e4f4e66a726afc5db0436e1","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///482/71340/artifacts","name":"vanilla","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":null,"project_id":482,"started_at":"2026-05-18T02:11:29.487Z","status":"completed","tags":[{"key":"code_source","value":"dd-analytics"},{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"vanilla"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"model_type","value":"bayesian_model_with_baseline"},{"key":"third_party_provider_service_region","value":"amazonaws-dynamodb-mx-central-1"}],"updated_at":"2026-05-18T02:11:52.554536Z"}},{"id":"71339","type":"runs","attributes":{"completed_at":"2026-05-18T02:11:38.852Z","created_at":"2026-05-18T02:11:17.924126Z","descendant_match":false,"description":"","duration":21.044,"external_url":"https://mlflow.us1.staging.dog/#/runs/fa21144e452d4c6eb1c2ff6bff2dbb57","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///482/71339/artifacts","name":"vanilla","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":null,"project_id":482,"started_at":"2026-05-18T02:11:17.808Z","status":"completed","tags":[{"key":"code_source","value":"dd-analytics"},{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"vanilla"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"model_type","value":"bayesian_model_with_baseline"},{"key":"third_party_provider_service_region","value":"pagerduty"}],"updated_at":"2026-05-18T02:11:39.012518Z"}},{"id":"71338","type":"runs","attributes":{"completed_at":"2026-05-18T02:01:48.717Z","created_at":"2026-05-18T02:01:44.062453Z","descendant_match":false,"description":"","duration":4.748,"external_url":"https://mlflow.us1.staging.dog/#/runs/fcf4e0cad9f948dfb6d53eb34e3660be","has_children":false,"is_pinned":false,"metric_summaries":[{"key":"accuracy","min":1,"max":1,"mean":1,"latest":0,"count":2,"first_step":0,"last_step":0},{"key":"precision","min":1,"max":1,"mean":1,"latest":0,"count":2,"first_step":0,"last_step":0},{"key":"recall","min":1,"max":1,"mean":1,"latest":0,"count":2,"first_step":0,"last_step":0}],"mlflow_artifact_location":"mlflow-artifacts:///484/71338/artifacts","name":"mortar_train_smoke_testing_global_model","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":[{"key":"max_depth","value":"30"},{"key":"min_samples_leaf","value":"5"},{"key":"min_samples_split","value":"10"},{"key":"n_estimators","value":"100"}],"project_id":484,"started_at":"2026-05-18T02:01:43.969Z","status":"completed","tags":[{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"mortar_train_smoke_testing_global_model"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"train_end","value":"2026-05-18"},{"key":"train_start","value":"2026-05-17"}],"updated_at":"2026-05-18T02:01:48.856663Z"}},{"id":"71331","type":"runs","attributes":{"completed_at":"2026-05-18T01:56:03.441Z","created_at":"2026-05-18T01:52:30.49774Z","descendant_match":false,"description":"","duration":213.718,"external_url":"https://mlflow.us1.staging.dog/#/runs/48c65b0e43c049bea60fe45dfa2dca30","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///482/71331/artifacts","name":"vanilla","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":null,"project_id":482,"started_at":"2026-05-18T01:52:29.723Z","status":"completed","tags":[{"key":"code_source","value":"dd-analytics"},{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"vanilla"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"model_type","value":"bayesian_model_with_baseline"},{"key":"third_party_provider_service_region","value":"amazonaws-monitoring-ca-west-1"}],"updated_at":"2026-05-18T01:56:03.578642Z"}},{"id":"71317","type":"runs","attributes":{"completed_at":"2026-05-18T01:55:56.61Z","created_at":"2026-05-18T01:50:27.663599Z","descendant_match":false,"description":"","duration":329.076,"external_url":"https://mlflow.us1.staging.dog/#/runs/3cf809f7034f49f8a45b678ae5b3c55f","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///482/71317/artifacts","name":"vanilla","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":null,"project_id":482,"started_at":"2026-05-18T01:50:27.534Z","status":"completed","tags":[{"key":"code_source","value":"dd-analytics"},{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"vanilla"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"model_type","value":"bayesian_model_with_baseline"},{"key":"third_party_provider_service_region","value":"amazonaws-monitoring-mx-central-1"}],"updated_at":"2026-05-18T01:55:56.756604Z"}},{"id":"71336","type":"runs","attributes":{"completed_at":"2026-05-18T01:54:59.996Z","created_at":"2026-05-18T01:52:55.451932Z","descendant_match":false,"description":"","duration":124.633,"external_url":"https://mlflow.us1.staging.dog/#/runs/bc30dc20a00d4147832435bb46dbb533","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///482/71336/artifacts","name":"vanilla","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":null,"project_id":482,"started_at":"2026-05-18T01:52:55.363Z","status":"completed","tags":[{"key":"code_source","value":"dd-analytics"},{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"vanilla"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"model_type","value":"bayesian_model_with_baseline"},{"key":"third_party_provider_service_region","value":"amazonaws-firehose-me-central-1"}],"updated_at":"2026-05-18T01:55:00.139099Z"}},{"id":"71337","type":"runs","attributes":{"completed_at":"2026-05-18T01:54:52.337Z","created_at":"2026-05-18T01:53:28.702892Z","descendant_match":false,"description":"","duration":83.73,"external_url":"https://mlflow.us1.staging.dog/#/runs/f38436eab3554414a3125a8299273caf","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///482/71337/artifacts","name":"vanilla","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":null,"project_id":482,"started_at":"2026-05-18T01:53:28.607Z","status":"completed","tags":[{"key":"code_source","value":"dd-analytics"},{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"vanilla"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"model_type","value":"bayesian_model_with_baseline"},{"key":"third_party_provider_service_region","value":"amazonaws-firehose-eu-west-3"}],"updated_at":"2026-05-18T01:54:52.600823Z"}},{"id":"71326","type":"runs","attributes":{"completed_at":"2026-05-18T01:54:45.204Z","created_at":"2026-05-18T01:51:44.604428Z","descendant_match":false,"description":"","duration":180.692,"external_url":"https://mlflow.us1.staging.dog/#/runs/eb0fe4f0cbe047308dbe33b61f4b9847","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///482/71326/artifacts","name":"vanilla","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":null,"project_id":482,"started_at":"2026-05-18T01:51:44.512Z","status":"completed","tags":[{"key":"code_source","value":"dd-analytics"},{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"vanilla"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"model_type","value":"bayesian_model_with_baseline"},{"key":"third_party_provider_service_region","value":"amazonaws-monitoring-ap-south-1"}],"updated_at":"2026-05-18T01:54:45.379615Z"}},{"id":"71332","type":"runs","attributes":{"completed_at":"2026-05-18T01:54:38.347Z","created_at":"2026-05-18T01:52:32.3427Z","descendant_match":false,"description":"","duration":126.115,"external_url":"https://mlflow.us1.staging.dog/#/runs/cafb02ded7914103aa4fd260626f3fff","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///482/71332/artifacts","name":"vanilla","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":null,"project_id":482,"started_at":"2026-05-18T01:52:32.232Z","status":"completed","tags":[{"key":"code_source","value":"dd-analytics"},{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"vanilla"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"model_type","value":"bayesian_model_with_baseline"},{"key":"third_party_provider_service_region","value":"amazonaws-kinesis-ap-southeast-3"}],"updated_at":"2026-05-18T01:54:38.494039Z"}},{"id":"71335","type":"runs","attributes":{"completed_at":"2026-05-18T01:54:31.613Z","created_at":"2026-05-18T01:52:49.441594Z","descendant_match":false,"description":"","duration":102.264,"external_url":"https://mlflow.us1.staging.dog/#/runs/eaefc5caf34c45f7bc93448eb0ee2d33","has_children":false,"is_pinned":false,"metric_summaries":[],"mlflow_artifact_location":"mlflow-artifacts:///482/71335/artifacts","name":"vanilla","owner_id":"1d45ac49-1e4e-11f1-8c3a-42221ed6388d","params":null,"project_id":482,"started_at":"2026-05-18T01:52:49.349Z","status":"completed","tags":[{"key":"code_source","value":"dd-analytics"},{"key":"datacenter","value":"us1.staging.dog"},{"key":"mlflow.runName","value":"vanilla"},{"key":"mlflow.source.name","value":"bootstrap_job.py"},{"key":"mlflow.source.type","value":"LOCAL"},{"key":"mlflow.user","value":"dog"},{"key":"model_type","value":"bayesian_model_with_baseline"},{"key":"third_party_provider_service_region","value":"amazonaws-monitoring-us-gov-east-1"}],"updated_at":"2026-05-18T01:54:31.752756Z"}}],"meta":{"page":{"type":"number_size","number":0,"size":25,"total":65614,"first_number":0,"prev_number":null,"next_number":1,"last_number":2624}},"links":{"self":"https://api.datad0g.com/api/v2/model-lab-api/runs","first":"https://api.datad0g.com/api/v2/model-lab-api/runs?page[number]=0&page[size]=25","last":"https://api.datad0g.com/api/v2/model-lab-api/runs?page[number]=2624&page[size]=25","next":"https://api.datad0g.com/api/v2/model-lab-api/runs?page[number]=1&page[size]=25"}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-No-Content-response.frozen b/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-No-Content-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-No-Content-response.yml b/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-No-Content-response.yml new file mode 100644 index 000000000000..943e7f8a18c7 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-No-Content-response.yml @@ -0,0 +1,34 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: POST + uri: https://api.datadoghq.com/api/v2/model-lab-api/runs/70158/pin + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/model-lab-api/runs/70158/pin + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-Not-Found-response.frozen b/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-Not-Found-response.yml b/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-Not-Found-response.yml new file mode 100644 index 000000000000..fae45bab1aca --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Pin-a-Model-Lab-run-returns-Not-Found-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: POST + uri: https://api.datadoghq.com/api/v2/model-lab-api/runs/999999/pin + response: + body: + encoding: UTF-8 + string: '{"errors":[{"title":"Generic Error","detail":"run not found"}]}' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-No-Content-response.frozen b/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-No-Content-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-No-Content-response.yml b/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-No-Content-response.yml new file mode 100644 index 000000000000..2d17a8385674 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-No-Content-response.yml @@ -0,0 +1,34 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: POST + uri: https://api.datadoghq.com/api/v2/model-lab-api/projects/2387/star + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/model-lab-api/projects/2387/star + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-Not-Found-response.frozen b/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-Not-Found-response.yml b/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-Not-Found-response.yml new file mode 100644 index 000000000000..80b7c7bae2ab --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Star-a-Model-Lab-project-returns-Not-Found-response.yml @@ -0,0 +1,20 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: POST + uri: https://api.datadoghq.com/api/v2/model-lab-api/projects/999999/star + response: + body: + encoding: UTF-8 + string: '{"errors":[{"title":"Generic Error","detail":"project not found"}]}' + headers: + Content-Type: + - application/json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Unpin-a-Model-Lab-run-returns-No-Content-response.frozen b/cassettes/features/v2/model_lab_api/Unpin-a-Model-Lab-run-returns-No-Content-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Unpin-a-Model-Lab-run-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Unpin-a-Model-Lab-run-returns-No-Content-response.yml b/cassettes/features/v2/model_lab_api/Unpin-a-Model-Lab-run-returns-No-Content-response.yml new file mode 100644 index 000000000000..eaf93cd35e7b --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Unpin-a-Model-Lab-run-returns-No-Content-response.yml @@ -0,0 +1,18 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/model-lab-api/runs/70158/pin + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/model_lab_api/Unstar-a-Model-Lab-project-returns-No-Content-response.frozen b/cassettes/features/v2/model_lab_api/Unstar-a-Model-Lab-project-returns-No-Content-response.frozen new file mode 100644 index 000000000000..144cd0a44282 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Unstar-a-Model-Lab-project-returns-No-Content-response.frozen @@ -0,0 +1 @@ +2026-05-18T16:45:00.000Z \ No newline at end of file diff --git a/cassettes/features/v2/model_lab_api/Unstar-a-Model-Lab-project-returns-No-Content-response.yml b/cassettes/features/v2/model_lab_api/Unstar-a-Model-Lab-project-returns-No-Content-response.yml new file mode 100644 index 000000000000..a7080e1ce8f3 --- /dev/null +++ b/cassettes/features/v2/model_lab_api/Unstar-a-Model-Lab-project-returns-No-Content-response.yml @@ -0,0 +1,18 @@ +http_interactions: +- recorded_at: Mon, 18 May 2026 16:45:00 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v2/model-lab-api/projects/2387/star + response: + body: + encoding: UTF-8 + string: '' + headers: {} + status: + code: 204 + message: No Content +recorded_with: VCR 6.0.0 diff --git a/examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb b/examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb deleted file mode 100644 index 641b70d9362c..000000000000 --- a/examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb +++ /dev/null @@ -1,26 +0,0 @@ -# Update custom attribute config returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_custom_attribute_config".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAttributeAPI.new - -body = DatadogAPIClient::V2::CustomAttributeConfigUpdateRequest.new({ - data: DatadogAPIClient::V2::CustomAttributeConfigUpdate.new({ - attributes: DatadogAPIClient::V2::CustomAttributeConfigUpdateAttributes.new({ - description: "Updated description.", - display_name: "AWS Region", - type: DatadogAPIClient::V2::CustomAttributeType::NUMBER, - type_data: DatadogAPIClient::V2::CustomAttributeTypeData.new({ - options: [ - DatadogAPIClient::V2::CustomAttributeSelectOption.new({ - value: "us-east-1", - }), - ], - }), - }), - type: DatadogAPIClient::V2::CustomAttributeConfigResourceType::CUSTOM_ATTRIBUTE, - }), -}) -p api_instance.update_custom_attribute_config("case_type_id", "custom_attribute_id", body) diff --git a/examples/v2/case-management-type/UpdateCaseType.rb b/examples/v2/case-management-type/UpdateCaseType.rb deleted file mode 100644 index 0a63cc3bc2da..000000000000 --- a/examples/v2/case-management-type/UpdateCaseType.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Update a case type returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_type".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementTypeAPI.new - -body = DatadogAPIClient::V2::CaseTypeUpdateRequest.new({ - data: DatadogAPIClient::V2::CaseTypeUpdate.new({ - attributes: DatadogAPIClient::V2::CaseTypeResourceAttributes.new({ - description: "Investigations done in case management", - emoji: '🕵🏻\u200d♂️', - name: "Investigation", - }), - type: DatadogAPIClient::V2::CaseTypeResourceType::CASE_TYPE, - }), -}) -p api_instance.update_case_type("case_type_id", body) diff --git a/examples/v2/case-management/AddCaseInsights.rb b/examples/v2/case-management/AddCaseInsights.rb deleted file mode 100644 index eaaec5bf0760..000000000000 --- a/examples/v2/case-management/AddCaseInsights.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Add insights to a case returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.add_case_insights".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseInsightsRequest.new({ - data: DatadogAPIClient::V2::CaseInsightsData.new({ - attributes: DatadogAPIClient::V2::CaseInsightsAttributes.new({ - insights: [ - DatadogAPIClient::V2::CaseInsight.new({ - ref: "/monitors/12345?q=total", - resource_id: "12345", - type: DatadogAPIClient::V2::CaseInsightType::SECURITY_SIGNAL, - }), - ], - }), - type: DatadogAPIClient::V2::CaseResourceType::CASE, - }), -}) -p api_instance.add_case_insights("case_id", body) diff --git a/examples/v2/case-management/AggregateCases.rb b/examples/v2/case-management/AggregateCases.rb deleted file mode 100644 index 937cb68545e0..000000000000 --- a/examples/v2/case-management/AggregateCases.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Aggregate cases returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.aggregate_cases".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseAggregateRequest.new({ - data: DatadogAPIClient::V2::CaseAggregateRequestData.new({ - attributes: DatadogAPIClient::V2::CaseAggregateRequestAttributes.new({ - group_by: DatadogAPIClient::V2::CaseAggregateGroupBy.new({ - groups: [ - "status", - ], - limit: 14, - }), - query_filter: "service:case-api", - }), - type: DatadogAPIClient::V2::CaseAggregateResourceType::AGGREGATE, - }), -}) -p api_instance.aggregate_cases(body) diff --git a/examples/v2/case-management/BulkUpdateCases.rb b/examples/v2/case-management/BulkUpdateCases.rb deleted file mode 100644 index 47775076dbab..000000000000 --- a/examples/v2/case-management/BulkUpdateCases.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Bulk update cases returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.bulk_update_cases".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseBulkUpdateRequest.new({ - data: DatadogAPIClient::V2::CaseBulkUpdateRequestData.new({ - attributes: DatadogAPIClient::V2::CaseBulkUpdateRequestAttributes.new({ - case_ids: [ - "case-id-1", - "case-id-2", - ], - payload: { - priority: "P1", - }, - type: DatadogAPIClient::V2::CaseBulkActionType::PRIORITY, - }), - type: DatadogAPIClient::V2::CaseBulkResourceType::BULK, - }), -}) -p api_instance.bulk_update_cases(body) diff --git a/examples/v2/case-management/CountCases.rb b/examples/v2/case-management/CountCases.rb deleted file mode 100644 index 2a93c7f202ea..000000000000 --- a/examples/v2/case-management/CountCases.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Count cases returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.count_cases".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.count_cases() diff --git a/examples/v2/case-management/CreateCaseAutomationRule.rb b/examples/v2/case-management/CreateCaseAutomationRule.rb deleted file mode 100644 index 4df20a9a6199..000000000000 --- a/examples/v2/case-management/CreateCaseAutomationRule.rb +++ /dev/null @@ -1,28 +0,0 @@ -# Create an automation rule returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::AutomationRuleCreateRequest.new({ - data: DatadogAPIClient::V2::AutomationRuleCreate.new({ - attributes: DatadogAPIClient::V2::AutomationRuleCreateAttributes.new({ - action: DatadogAPIClient::V2::AutomationRuleAction.new({ - data: DatadogAPIClient::V2::AutomationRuleActionData.new({ - handle: "workflow-handle-123", - }), - type: DatadogAPIClient::V2::AutomationRuleActionType::EXECUTE_WORKFLOW, - }), - name: "Auto-assign workflow", - state: DatadogAPIClient::V2::CaseAutomationRuleState::ENABLED, - trigger: DatadogAPIClient::V2::AutomationRuleTrigger.new({ - data: DatadogAPIClient::V2::AutomationRuleTriggerData.new({}), - type: DatadogAPIClient::V2::AutomationRuleTriggerType::CASE_CREATED, - }), - }), - type: DatadogAPIClient::V2::CaseAutomationRuleResourceType::RULE, - }), -}) -p api_instance.create_case_automation_rule("project_id", body) diff --git a/examples/v2/case-management/CreateCaseLink.rb b/examples/v2/case-management/CreateCaseLink.rb deleted file mode 100644 index 63dad423c442..000000000000 --- a/examples/v2/case-management/CreateCaseLink.rb +++ /dev/null @@ -1,21 +0,0 @@ -# Create a case link returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_case_link".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseLinkCreateRequest.new({ - data: DatadogAPIClient::V2::CaseLinkCreate.new({ - attributes: DatadogAPIClient::V2::CaseLinkAttributes.new({ - child_entity_id: "4417921d-0866-4a38-822c-6f2a0f65f77d", - child_entity_type: "CASE", - parent_entity_id: "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f", - parent_entity_type: "CASE", - relationship: "BLOCKS", - }), - type: DatadogAPIClient::V2::CaseLinkResourceType::LINK, - }), -}) -p api_instance.create_case_link(body) diff --git a/examples/v2/case-management/CreateCaseView.rb b/examples/v2/case-management/CreateCaseView.rb deleted file mode 100644 index d1c90d2e529b..000000000000 --- a/examples/v2/case-management/CreateCaseView.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Create a case view returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_case_view".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseViewCreateRequest.new({ - data: DatadogAPIClient::V2::CaseViewCreate.new({ - attributes: DatadogAPIClient::V2::CaseViewCreateAttributes.new({ - name: "Open bugs", - project_id: "e555e290-ed65-49bd-ae18-8acbfcf18db7", - query: "status:open type:bug", - }), - type: DatadogAPIClient::V2::CaseViewResourceType::VIEW, - }), -}) -p api_instance.create_case_view(body) diff --git a/examples/v2/case-management/CreateMaintenanceWindow.rb b/examples/v2/case-management/CreateMaintenanceWindow.rb deleted file mode 100644 index 95846eda3df9..000000000000 --- a/examples/v2/case-management/CreateMaintenanceWindow.rb +++ /dev/null @@ -1,20 +0,0 @@ -# Create a maintenance window returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_maintenance_window".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::MaintenanceWindowCreateRequest.new({ - data: DatadogAPIClient::V2::MaintenanceWindowCreate.new({ - attributes: DatadogAPIClient::V2::MaintenanceWindowCreateAttributes.new({ - end_at: "2026-06-01T06:00:00Z", - name: "Weekly maintenance", - query: "project:SEC", - start_at: "2026-06-01T00:00:00Z", - }), - type: DatadogAPIClient::V2::MaintenanceWindowResourceType::MAINTENANCE_WINDOW, - }), -}) -p api_instance.create_maintenance_window(body) diff --git a/examples/v2/case-management/DeleteCaseAutomationRule.rb b/examples/v2/case-management/DeleteCaseAutomationRule.rb deleted file mode 100644 index 363031e58ca3..000000000000 --- a/examples/v2/case-management/DeleteCaseAutomationRule.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete an automation rule returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.delete_case_automation_rule("project_id", "rule_id") diff --git a/examples/v2/case-management/DeleteCaseLink.rb b/examples/v2/case-management/DeleteCaseLink.rb deleted file mode 100644 index f140dd39a298..000000000000 --- a/examples/v2/case-management/DeleteCaseLink.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a case link returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_case_link".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.delete_case_link("804cd682-55f6-4541-ab00-b608b282ea7d") diff --git a/examples/v2/case-management/DeleteCaseView.rb b/examples/v2/case-management/DeleteCaseView.rb deleted file mode 100644 index 4bf89a91cc67..000000000000 --- a/examples/v2/case-management/DeleteCaseView.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a case view returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_case_view".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.delete_case_view("view_id") diff --git a/examples/v2/case-management/DeleteMaintenanceWindow.rb b/examples/v2/case-management/DeleteMaintenanceWindow.rb deleted file mode 100644 index 85cb4fbbaa11..000000000000 --- a/examples/v2/case-management/DeleteMaintenanceWindow.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a maintenance window returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_maintenance_window".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.delete_maintenance_window("maintenance_window_id") diff --git a/examples/v2/case-management/DisableCaseAutomationRule.rb b/examples/v2/case-management/DisableCaseAutomationRule.rb deleted file mode 100644 index 160008e29c46..000000000000 --- a/examples/v2/case-management/DisableCaseAutomationRule.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Disable an automation rule returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.disable_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.disable_case_automation_rule("project_id", "rule_id") diff --git a/examples/v2/case-management/EnableCaseAutomationRule.rb b/examples/v2/case-management/EnableCaseAutomationRule.rb deleted file mode 100644 index 342ea386d886..000000000000 --- a/examples/v2/case-management/EnableCaseAutomationRule.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Enable an automation rule returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.enable_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.enable_case_automation_rule("project_id", "rule_id") diff --git a/examples/v2/case-management/FavoriteCaseProject.rb b/examples/v2/case-management/FavoriteCaseProject.rb deleted file mode 100644 index f534273accf0..000000000000 --- a/examples/v2/case-management/FavoriteCaseProject.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Favorite a project returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.favorite_case_project".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.favorite_case_project("project_id") diff --git a/examples/v2/case-management/GetCaseAutomationRule.rb b/examples/v2/case-management/GetCaseAutomationRule.rb deleted file mode 100644 index e66cf32e78d1..000000000000 --- a/examples/v2/case-management/GetCaseAutomationRule.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get an automation rule returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.get_case_automation_rule("project_id", "rule_id") diff --git a/examples/v2/case-management/GetCaseView.rb b/examples/v2/case-management/GetCaseView.rb deleted file mode 100644 index 632c21fd9511..000000000000 --- a/examples/v2/case-management/GetCaseView.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get a case view returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_case_view".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.get_case_view("view_id") diff --git a/examples/v2/case-management/ListCaseAutomationRules.rb b/examples/v2/case-management/ListCaseAutomationRules.rb deleted file mode 100644 index 648da95f8f4c..000000000000 --- a/examples/v2/case-management/ListCaseAutomationRules.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List automation rules returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_case_automation_rules".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_case_automation_rules("project_id") diff --git a/examples/v2/case-management/ListCaseLinks.rb b/examples/v2/case-management/ListCaseLinks.rb deleted file mode 100644 index 0d74c08e6ed0..000000000000 --- a/examples/v2/case-management/ListCaseLinks.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List case links returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_case_links".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_case_links("CASE", "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f") diff --git a/examples/v2/case-management/ListCaseTimeline.rb b/examples/v2/case-management/ListCaseTimeline.rb deleted file mode 100644 index 00881e28694c..000000000000 --- a/examples/v2/case-management/ListCaseTimeline.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get case timeline returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_case_timeline".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_case_timeline("case_id") diff --git a/examples/v2/case-management/ListCaseViews.rb b/examples/v2/case-management/ListCaseViews.rb deleted file mode 100644 index 83c0d0c6acc3..000000000000 --- a/examples/v2/case-management/ListCaseViews.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List case views returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_case_views".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_case_views("project_id") diff --git a/examples/v2/case-management/ListCaseWatchers.rb b/examples/v2/case-management/ListCaseWatchers.rb deleted file mode 100644 index 31f0f27ec425..000000000000 --- a/examples/v2/case-management/ListCaseWatchers.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List case watchers returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_case_watchers".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_case_watchers("case_id") diff --git a/examples/v2/case-management/ListMaintenanceWindows.rb b/examples/v2/case-management/ListMaintenanceWindows.rb deleted file mode 100644 index 6aa842e0d150..000000000000 --- a/examples/v2/case-management/ListMaintenanceWindows.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List maintenance windows returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_maintenance_windows".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_maintenance_windows() diff --git a/examples/v2/case-management/ListUserCaseProjectFavorites.rb b/examples/v2/case-management/ListUserCaseProjectFavorites.rb deleted file mode 100644 index 0c3b8372a7d5..000000000000 --- a/examples/v2/case-management/ListUserCaseProjectFavorites.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List project favorites returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_user_case_project_favorites".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_user_case_project_favorites() diff --git a/examples/v2/case-management/RemoveCaseInsights.rb b/examples/v2/case-management/RemoveCaseInsights.rb deleted file mode 100644 index 2707ebb93d53..000000000000 --- a/examples/v2/case-management/RemoveCaseInsights.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Remove insights from a case returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.remove_case_insights".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseInsightsRequest.new({ - data: DatadogAPIClient::V2::CaseInsightsData.new({ - attributes: DatadogAPIClient::V2::CaseInsightsAttributes.new({ - insights: [ - DatadogAPIClient::V2::CaseInsight.new({ - ref: "/monitors/12345?q=total", - resource_id: "12345", - type: DatadogAPIClient::V2::CaseInsightType::SECURITY_SIGNAL, - }), - ], - }), - type: DatadogAPIClient::V2::CaseResourceType::CASE, - }), -}) -p api_instance.remove_case_insights("case_id", body) diff --git a/examples/v2/case-management/UnfavoriteCaseProject.rb b/examples/v2/case-management/UnfavoriteCaseProject.rb deleted file mode 100644 index 3403a0b5ddaf..000000000000 --- a/examples/v2/case-management/UnfavoriteCaseProject.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Unfavorite a project returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.unfavorite_case_project".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.unfavorite_case_project("project_id") diff --git a/examples/v2/case-management/UnwatchCase.rb b/examples/v2/case-management/UnwatchCase.rb deleted file mode 100644 index 905b370ac5f8..000000000000 --- a/examples/v2/case-management/UnwatchCase.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Unwatch a case returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.unwatch_case".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.unwatch_case("case_id", "user_uuid") diff --git a/examples/v2/case-management/UpdateCaseAutomationRule.rb b/examples/v2/case-management/UpdateCaseAutomationRule.rb deleted file mode 100644 index b02f5b182e33..000000000000 --- a/examples/v2/case-management/UpdateCaseAutomationRule.rb +++ /dev/null @@ -1,28 +0,0 @@ -# Update an automation rule returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::AutomationRuleUpdateRequest.new({ - data: DatadogAPIClient::V2::AutomationRuleUpdate.new({ - attributes: DatadogAPIClient::V2::AutomationRuleCreateAttributes.new({ - action: DatadogAPIClient::V2::AutomationRuleAction.new({ - data: DatadogAPIClient::V2::AutomationRuleActionData.new({ - handle: "workflow-handle-123", - }), - type: DatadogAPIClient::V2::AutomationRuleActionType::EXECUTE_WORKFLOW, - }), - name: "Auto-assign workflow", - state: DatadogAPIClient::V2::CaseAutomationRuleState::ENABLED, - trigger: DatadogAPIClient::V2::AutomationRuleTrigger.new({ - data: DatadogAPIClient::V2::AutomationRuleTriggerData.new({}), - type: DatadogAPIClient::V2::AutomationRuleTriggerType::CASE_CREATED, - }), - }), - type: DatadogAPIClient::V2::CaseAutomationRuleResourceType::RULE, - }), -}) -p api_instance.update_case_automation_rule("project_id", "rule_id", body) diff --git a/examples/v2/case-management/UpdateCaseComment.rb b/examples/v2/case-management/UpdateCaseComment.rb deleted file mode 100644 index b3509c72d093..000000000000 --- a/examples/v2/case-management/UpdateCaseComment.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Update case comment returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_comment".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseUpdateCommentRequest.new({ - data: DatadogAPIClient::V2::CaseUpdateComment.new({ - attributes: DatadogAPIClient::V2::CaseUpdateCommentAttributes.new({ - comment: "Updated comment text", - }), - type: DatadogAPIClient::V2::CaseResourceType::CASE, - }), -}) -p api_instance.update_case_comment("case_id", "cell_id", body) diff --git a/examples/v2/case-management/UpdateCaseDueDate.rb b/examples/v2/case-management/UpdateCaseDueDate.rb deleted file mode 100644 index c1dce3c5fc21..000000000000 --- a/examples/v2/case-management/UpdateCaseDueDate.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Update case due date returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_due_date".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseUpdateDueDateRequest.new({ - data: DatadogAPIClient::V2::CaseUpdateDueDate.new({ - attributes: DatadogAPIClient::V2::CaseUpdateDueDateAttributes.new({ - due_date: "2026-12-31", - }), - type: DatadogAPIClient::V2::CaseResourceType::CASE, - }), -}) -p api_instance.update_case_due_date("case_id", body) diff --git a/examples/v2/case-management/UpdateCaseResolvedReason.rb b/examples/v2/case-management/UpdateCaseResolvedReason.rb deleted file mode 100644 index ef98037a2d57..000000000000 --- a/examples/v2/case-management/UpdateCaseResolvedReason.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Update case resolved reason returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_resolved_reason".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseUpdateResolvedReasonRequest.new({ - data: DatadogAPIClient::V2::CaseUpdateResolvedReason.new({ - attributes: DatadogAPIClient::V2::CaseUpdateResolvedReasonAttributes.new({ - security_resolved_reason: "FALSE_POSITIVE", - }), - type: DatadogAPIClient::V2::CaseResourceType::CASE, - }), -}) -p api_instance.update_case_resolved_reason("case_id", body) diff --git a/examples/v2/case-management/UpdateCaseView.rb b/examples/v2/case-management/UpdateCaseView.rb deleted file mode 100644 index 2395b959f12a..000000000000 --- a/examples/v2/case-management/UpdateCaseView.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Update a case view returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_view".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseViewUpdateRequest.new({ - data: DatadogAPIClient::V2::CaseViewUpdate.new({ - attributes: DatadogAPIClient::V2::CaseViewUpdateAttributes.new({}), - type: DatadogAPIClient::V2::CaseViewResourceType::VIEW, - }), -}) -p api_instance.update_case_view("view_id", body) diff --git a/examples/v2/case-management/UpdateMaintenanceWindow.rb b/examples/v2/case-management/UpdateMaintenanceWindow.rb deleted file mode 100644 index e0b6049d5051..000000000000 --- a/examples/v2/case-management/UpdateMaintenanceWindow.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Update a maintenance window returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_maintenance_window".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::MaintenanceWindowUpdateRequest.new({ - data: DatadogAPIClient::V2::MaintenanceWindowUpdate.new({ - attributes: DatadogAPIClient::V2::MaintenanceWindowUpdateAttributes.new({}), - type: DatadogAPIClient::V2::MaintenanceWindowResourceType::MAINTENANCE_WINDOW, - }), -}) -p api_instance.update_maintenance_window("maintenance_window_id", body) diff --git a/examples/v2/case-management/WatchCase.rb b/examples/v2/case-management/WatchCase.rb deleted file mode 100644 index 39f8e2f33793..000000000000 --- a/examples/v2/case-management/WatchCase.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Watch a case returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.watch_case".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.watch_case("case_id", "user_uuid") diff --git a/examples/v2/model-lab-api/DeleteModelLabRun.rb b/examples/v2/model-lab-api/DeleteModelLabRun.rb new file mode 100644 index 000000000000..b46dce34aae8 --- /dev/null +++ b/examples/v2/model-lab-api/DeleteModelLabRun.rb @@ -0,0 +1,8 @@ +# Delete a Model Lab run returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_model_lab_run".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +api_instance.delete_model_lab_run(70158) diff --git a/examples/v2/model-lab-api/GetModelLabArtifactContent.rb b/examples/v2/model-lab-api/GetModelLabArtifactContent.rb new file mode 100644 index 000000000000..a6109d38004f --- /dev/null +++ b/examples/v2/model-lab-api/GetModelLabArtifactContent.rb @@ -0,0 +1,8 @@ +# Get Model Lab artifact content returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_model_lab_artifact_content".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.get_model_lab_artifact_content("1", "runs/42/model/weights.pt") diff --git a/examples/v2/model-lab-api/GetModelLabArtifactContent_2858422658.rb b/examples/v2/model-lab-api/GetModelLabArtifactContent_2858422658.rb new file mode 100644 index 000000000000..bc38a95f362c --- /dev/null +++ b/examples/v2/model-lab-api/GetModelLabArtifactContent_2858422658.rb @@ -0,0 +1,8 @@ +# Download artifact content returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_model_lab_artifact_content".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.get_model_lab_artifact_content("2387", "f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/adapter_config.json") diff --git a/examples/v2/model-lab-api/GetModelLabProject.rb b/examples/v2/model-lab-api/GetModelLabProject.rb new file mode 100644 index 000000000000..2d9f90ac7ddb --- /dev/null +++ b/examples/v2/model-lab-api/GetModelLabProject.rb @@ -0,0 +1,8 @@ +# Get a Model Lab project returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_model_lab_project".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.get_model_lab_project(2387) diff --git a/examples/v2/model-lab-api/GetModelLabRun.rb b/examples/v2/model-lab-api/GetModelLabRun.rb new file mode 100644 index 000000000000..0ece59cba39d --- /dev/null +++ b/examples/v2/model-lab-api/GetModelLabRun.rb @@ -0,0 +1,8 @@ +# Get a Model Lab run returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_model_lab_run".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.get_model_lab_run(70158) diff --git a/examples/v2/model-lab-api/ListModelLabProjectArtifacts.rb b/examples/v2/model-lab-api/ListModelLabProjectArtifacts.rb new file mode 100644 index 000000000000..0d916011c4a2 --- /dev/null +++ b/examples/v2/model-lab-api/ListModelLabProjectArtifacts.rb @@ -0,0 +1,8 @@ +# List Model Lab project artifacts returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_model_lab_project_artifacts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.list_model_lab_project_artifacts(2387) diff --git a/examples/v2/model-lab-api/ListModelLabProjectFacetKeys.rb b/examples/v2/model-lab-api/ListModelLabProjectFacetKeys.rb new file mode 100644 index 000000000000..a38058d30a16 --- /dev/null +++ b/examples/v2/model-lab-api/ListModelLabProjectFacetKeys.rb @@ -0,0 +1,8 @@ +# List Model Lab project facet keys returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_model_lab_project_facet_keys".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.list_model_lab_project_facet_keys() diff --git a/examples/v2/model-lab-api/ListModelLabProjectFacetValues.rb b/examples/v2/model-lab-api/ListModelLabProjectFacetValues.rb new file mode 100644 index 000000000000..6de19fcf011e --- /dev/null +++ b/examples/v2/model-lab-api/ListModelLabProjectFacetValues.rb @@ -0,0 +1,8 @@ +# List Model Lab project facet values returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_model_lab_project_facet_values".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.list_model_lab_project_facet_values(ModelLabProjectFacetType::TAG, "model") diff --git a/examples/v2/model-lab-api/ListModelLabProjects.rb b/examples/v2/model-lab-api/ListModelLabProjects.rb new file mode 100644 index 000000000000..f3e4b6d1f7a3 --- /dev/null +++ b/examples/v2/model-lab-api/ListModelLabProjects.rb @@ -0,0 +1,8 @@ +# List Model Lab projects returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_model_lab_projects".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.list_model_lab_projects() diff --git a/examples/v2/model-lab-api/ListModelLabRunArtifacts.rb b/examples/v2/model-lab-api/ListModelLabRunArtifacts.rb new file mode 100644 index 000000000000..904867b30c08 --- /dev/null +++ b/examples/v2/model-lab-api/ListModelLabRunArtifacts.rb @@ -0,0 +1,8 @@ +# List Model Lab run artifacts returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_model_lab_run_artifacts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.list_model_lab_run_artifacts(70158) diff --git a/examples/v2/model-lab-api/ListModelLabRunFacetKeys.rb b/examples/v2/model-lab-api/ListModelLabRunFacetKeys.rb new file mode 100644 index 000000000000..61e3bfba5c92 --- /dev/null +++ b/examples/v2/model-lab-api/ListModelLabRunFacetKeys.rb @@ -0,0 +1,8 @@ +# List Model Lab run facet keys returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_model_lab_run_facet_keys".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.list_model_lab_run_facet_keys(2387) diff --git a/examples/v2/model-lab-api/ListModelLabRunFacetValues.rb b/examples/v2/model-lab-api/ListModelLabRunFacetValues.rb new file mode 100644 index 000000000000..cdac6953c120 --- /dev/null +++ b/examples/v2/model-lab-api/ListModelLabRunFacetValues.rb @@ -0,0 +1,8 @@ +# List Model Lab run facet values returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_model_lab_run_facet_values".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.list_model_lab_run_facet_values(2387, ModelLabFacetType::TAG, "model") diff --git a/examples/v2/model-lab-api/ListModelLabRuns.rb b/examples/v2/model-lab-api/ListModelLabRuns.rb new file mode 100644 index 000000000000..e56640e16b5a --- /dev/null +++ b/examples/v2/model-lab-api/ListModelLabRuns.rb @@ -0,0 +1,8 @@ +# List Model Lab runs returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_model_lab_runs".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +p api_instance.list_model_lab_runs() diff --git a/examples/v2/model-lab-api/PinModelLabRun.rb b/examples/v2/model-lab-api/PinModelLabRun.rb new file mode 100644 index 000000000000..14e179faea90 --- /dev/null +++ b/examples/v2/model-lab-api/PinModelLabRun.rb @@ -0,0 +1,8 @@ +# Pin a Model Lab run returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.pin_model_lab_run".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +api_instance.pin_model_lab_run(70158) diff --git a/examples/v2/model-lab-api/StarModelLabProject.rb b/examples/v2/model-lab-api/StarModelLabProject.rb new file mode 100644 index 000000000000..d244910b97b2 --- /dev/null +++ b/examples/v2/model-lab-api/StarModelLabProject.rb @@ -0,0 +1,8 @@ +# Star a Model Lab project returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.star_model_lab_project".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +api_instance.star_model_lab_project(2387) diff --git a/examples/v2/model-lab-api/UnpinModelLabRun.rb b/examples/v2/model-lab-api/UnpinModelLabRun.rb new file mode 100644 index 000000000000..a7c840746525 --- /dev/null +++ b/examples/v2/model-lab-api/UnpinModelLabRun.rb @@ -0,0 +1,8 @@ +# Unpin a Model Lab run returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.unpin_model_lab_run".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +api_instance.unpin_model_lab_run(70158) diff --git a/examples/v2/model-lab-api/UnstarModelLabProject.rb b/examples/v2/model-lab-api/UnstarModelLabProject.rb new file mode 100644 index 000000000000..f1d71e017162 --- /dev/null +++ b/examples/v2/model-lab-api/UnstarModelLabProject.rb @@ -0,0 +1,8 @@ +# Remove star from a Model Lab project returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.unstar_model_lab_project".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +api_instance.unstar_model_lab_project(1) diff --git a/examples/v2/model-lab-api/UnstarModelLabProject_931927092.rb b/examples/v2/model-lab-api/UnstarModelLabProject_931927092.rb new file mode 100644 index 000000000000..e6067e264b59 --- /dev/null +++ b/examples/v2/model-lab-api/UnstarModelLabProject_931927092.rb @@ -0,0 +1,8 @@ +# Unstar a Model Lab project returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.unstar_model_lab_project".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ModelLabAPIAPI.new +api_instance.unstar_model_lab_project(2387) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 1204149d4aab..f063f2e37b24 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1441,28 +1441,6 @@ "v2.CreateCase" => { "body" => "CaseCreateRequest", }, - "v2.AggregateCases" => { - "body" => "CaseAggregateRequest", - }, - "v2.BulkUpdateCases" => { - "body" => "CaseBulkUpdateRequest", - }, - "v2.CountCases" => { - "query_filter" => "String", - "group_bys" => "String", - "limit" => "Integer", - }, - "v2.ListCaseLinks" => { - "entity_type" => "String", - "entity_id" => "String", - "relationship" => "String", - }, - "v2.CreateCaseLink" => { - "body" => "CaseLinkCreateRequest", - }, - "v2.DeleteCaseLink" => { - "link_id" => "String", - }, "v2.CreateProject" => { "body" => "ProjectCreateRequest", }, @@ -1476,12 +1454,6 @@ "project_id" => "String", "body" => "ProjectUpdateRequest", }, - "v2.UnfavoriteCaseProject" => { - "project_id" => "String", - }, - "v2.FavoriteCaseProject" => { - "project_id" => "String", - }, "v2.GetProjectNotificationRules" => { "project_id" => "String", }, @@ -1498,50 +1470,6 @@ "notification_rule_id" => "String", "body" => "CaseNotificationRuleUpdateRequest", }, - "v2.ListCaseAutomationRules" => { - "project_id" => "String", - }, - "v2.CreateCaseAutomationRule" => { - "project_id" => "String", - "body" => "AutomationRuleCreateRequest", - }, - "v2.DeleteCaseAutomationRule" => { - "project_id" => "String", - "rule_id" => "String", - }, - "v2.GetCaseAutomationRule" => { - "project_id" => "String", - "rule_id" => "String", - }, - "v2.UpdateCaseAutomationRule" => { - "project_id" => "String", - "rule_id" => "String", - "body" => "AutomationRuleUpdateRequest", - }, - "v2.DisableCaseAutomationRule" => { - "project_id" => "String", - "rule_id" => "String", - }, - "v2.EnableCaseAutomationRule" => { - "project_id" => "String", - "rule_id" => "String", - }, - "v2.ListCaseViews" => { - "project_id" => "String", - }, - "v2.CreateCaseView" => { - "body" => "CaseViewCreateRequest", - }, - "v2.DeleteCaseView" => { - "view_id" => "String", - }, - "v2.GetCaseView" => { - "view_id" => "String", - }, - "v2.UpdateCaseView" => { - "view_id" => "String", - "body" => "CaseViewUpdateRequest", - }, "v2.GetCase" => { "case_id" => "String", }, @@ -1565,11 +1493,6 @@ "case_id" => "String", "cell_id" => "String", }, - "v2.UpdateCaseComment" => { - "case_id" => "String", - "cell_id" => "String", - "body" => "CaseUpdateCommentRequest", - }, "v2.DeleteCaseCustomAttribute" => { "case_id" => "String", "custom_attribute_key" => "String", @@ -1583,18 +1506,6 @@ "case_id" => "String", "body" => "CaseUpdateDescriptionRequest", }, - "v2.UpdateCaseDueDate" => { - "case_id" => "String", - "body" => "CaseUpdateDueDateRequest", - }, - "v2.RemoveCaseInsights" => { - "case_id" => "String", - "body" => "CaseInsightsRequest", - }, - "v2.AddCaseInsights" => { - "case_id" => "String", - "body" => "CaseInsightsRequest", - }, "v2.UpdatePriority" => { "case_id" => "String", "body" => "CaseUpdatePriorityRequest", @@ -1626,20 +1537,10 @@ "case_id" => "String", "body" => "ServiceNowTicketCreateRequest", }, - "v2.UpdateCaseResolvedReason" => { - "case_id" => "String", - "body" => "CaseUpdateResolvedReasonRequest", - }, "v2.UpdateStatus" => { "case_id" => "String", "body" => "CaseUpdateStatusRequest", }, - "v2.ListCaseTimeline" => { - "case_id" => "String", - "page_size" => "Integer", - "page_number" => "Integer", - "sort_ascending" => "Boolean", - }, "v2.UpdateCaseTitle" => { "case_id" => "String", "body" => "CaseUpdateTitleRequest", @@ -1652,37 +1553,12 @@ "case_id" => "String", "body" => "CaseEmptyRequest", }, - "v2.ListCaseWatchers" => { - "case_id" => "String", - }, - "v2.UnwatchCase" => { - "case_id" => "String", - "user_uuid" => "String", - }, - "v2.WatchCase" => { - "case_id" => "String", - "user_uuid" => "String", - }, - "v2.CreateMaintenanceWindow" => { - "body" => "MaintenanceWindowCreateRequest", - }, - "v2.DeleteMaintenanceWindow" => { - "maintenance_window_id" => "String", - }, - "v2.UpdateMaintenanceWindow" => { - "maintenance_window_id" => "String", - "body" => "MaintenanceWindowUpdateRequest", - }, "v2.CreateCaseType" => { "body" => "CaseTypeCreateRequest", }, "v2.DeleteCaseType" => { "case_type_id" => "String", }, - "v2.UpdateCaseType" => { - "case_type_id" => "String", - "body" => "CaseTypeUpdateRequest", - }, "v2.GetAllCustomAttributeConfigsByCaseType" => { "case_type_id" => "String", }, @@ -1694,11 +1570,6 @@ "case_type_id" => "String", "custom_attribute_id" => "String", }, - "v2.UpdateCustomAttributeConfig" => { - "case_type_id" => "String", - "custom_attribute_id" => "String", - "body" => "CustomAttributeConfigUpdateRequest", - }, "v2.ListCatalogEntity" => { "page_offset" => "Integer", "page_limit" => "Integer", @@ -3517,6 +3388,74 @@ "content_encoding" => "MetricContentEncoding", "body" => "MetricPayload", }, + "v2.GetModelLabArtifactContent" => { + "project_id" => "String", + "artifact_path" => "String", + }, + "v2.ListModelLabRunFacetKeys" => { + "filter_project_id" => "Integer", + }, + "v2.ListModelLabRunFacetValues" => { + "filter_project_id" => "Integer", + "facet_type" => "ModelLabFacetType", + "facet_name" => "String", + }, + "v2.ListModelLabProjectFacetValues" => { + "facet_type" => "ModelLabProjectFacetType", + "facet_name" => "String", + }, + "v2.ListModelLabProjects" => { + "filter" => "String", + "filter_owner_id" => "UUID", + "filter_tags" => "String", + "sort" => "String", + "page_size" => "Integer", + "page_number" => "Integer", + }, + "v2.GetModelLabProject" => { + "project_id" => "Integer", + }, + "v2.ListModelLabProjectArtifacts" => { + "project_id" => "Integer", + }, + "v2.UnstarModelLabProject" => { + "project_id" => "Integer", + }, + "v2.StarModelLabProject" => { + "project_id" => "Integer", + }, + "v2.ListModelLabRuns" => { + "filter_id" => "String", + "filter" => "String", + "filter_owner_id" => "String", + "filter_status" => "ModelLabRunStatus", + "filter_project_id" => "Integer", + "filter_tags" => "String", + "filter_params" => "String", + "filter_parent_run_id" => "String", + "pinned_first" => "Boolean", + "include_pinned" => "Boolean", + "include_descendant_matches" => "Boolean", + "sort" => "String", + "page_size" => "Integer", + "page_number" => "Integer", + }, + "v2.DeleteModelLabRun" => { + "run_id" => "Integer", + }, + "v2.GetModelLabRun" => { + "run_id" => "Integer", + }, + "v2.ListModelLabRunArtifacts" => { + "run_id" => "Integer", + "path" => "String", + }, + "v2.UnpinModelLabRun" => { + "run_id" => "Integer", + }, + "v2.PinModelLabRun" => { + "run_id" => "Integer", + }, "v2.GetMonitorNotificationRules" => { "page" => "Integer", "per_page" => "Integer", diff --git a/features/v2/case_management.feature b/features/v2/case_management.feature index 04f9d8e0698d..bd67a8ddf2cc 100644 --- a/features/v2/case_management.feature +++ b/features/v2/case_management.feature @@ -10,57 +10,6 @@ Feature: Case Management And a valid "appKeyAuth" key in the system And an instance of "CaseManagement" API - @generated @skip @team:DataDog/case-management - Scenario: Add insights to a case returns "Bad Request" response - Given operation "AddCaseInsights" enabled - And new "AddCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Add insights to a case returns "Not Found" response - Given operation "AddCaseInsights" enabled - And new "AddCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Add insights to a case returns "OK" response - Given operation "AddCaseInsights" enabled - And new "AddCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Aggregate cases returns "Bad Request" response - Given operation "AggregateCases" enabled - And new "AggregateCases" request - And body with value {"data": {"attributes": {"group_by": {"groups": ["status"], "limit": 14}, "query_filter": "service:case-api"}, "type": "aggregate"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Aggregate cases returns "Not Found" response - Given operation "AggregateCases" enabled - And new "AggregateCases" request - And body with value {"data": {"attributes": {"group_by": {"groups": ["status"], "limit": 14}, "query_filter": "service:case-api"}, "type": "aggregate"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Aggregate cases returns "OK" response - Given operation "AggregateCases" enabled - And new "AggregateCases" request - And body with value {"data": {"attributes": {"group_by": {"groups": ["status"], "limit": 14}, "query_filter": "service:case-api"}, "type": "aggregate"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/case-management Scenario: Archive case returns "Bad Request" response Given new "ArchiveCase" request @@ -115,30 +64,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Bulk update cases returns "Bad Request" response - Given operation "BulkUpdateCases" enabled - And new "BulkUpdateCases" request - And body with value {"data": {"attributes": {"case_ids": ["case-id-1", "case-id-2"], "payload": {"priority": "P1"}, "type": "priority"}, "type": "bulk"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Bulk update cases returns "Not Found" response - Given operation "BulkUpdateCases" enabled - And new "BulkUpdateCases" request - And body with value {"data": {"attributes": {"case_ids": ["case-id-1", "case-id-2"], "payload": {"priority": "P1"}, "type": "priority"}, "type": "bulk"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Bulk update cases returns "OK" response - Given operation "BulkUpdateCases" enabled - And new "BulkUpdateCases" request - And body with value {"data": {"attributes": {"case_ids": ["case-id-1", "case-id-2"], "payload": {"priority": "P1"}, "type": "priority"}, "type": "bulk"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/case-management Scenario: Comment case returns "Bad Request" response Given new "CommentCase" request @@ -165,27 +90,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Count cases returns "Bad Request" response - Given operation "CountCases" enabled - And new "CountCases" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Count cases returns "Not Found" response - Given operation "CountCases" enabled - And new "CountCases" request - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Count cases returns "OK" response - Given operation "CountCases" enabled - And new "CountCases" request - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Create Jira issue for case returns "Accepted" response Given operation "CreateCaseJiraIssue" enabled @@ -240,30 +144,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: Create a case link returns "Bad Request" response - Given operation "CreateCaseLink" enabled - And new "CreateCaseLink" request - And body with value {"data": {"attributes": {"child_entity_id": "4417921d-0866-4a38-822c-6f2a0f65f77d", "child_entity_type": "CASE", "parent_entity_id": "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f", "parent_entity_type": "CASE", "relationship": "BLOCKS"}, "type": "link"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create a case link returns "Created" response - Given operation "CreateCaseLink" enabled - And new "CreateCaseLink" request - And body with value {"data": {"attributes": {"child_entity_id": "4417921d-0866-4a38-822c-6f2a0f65f77d", "child_entity_type": "CASE", "parent_entity_id": "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f", "parent_entity_type": "CASE", "relationship": "BLOCKS"}, "type": "link"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Create a case link returns "Not Found" response - Given operation "CreateCaseLink" enabled - And new "CreateCaseLink" request - And body with value {"data": {"attributes": {"child_entity_id": "4417921d-0866-4a38-822c-6f2a0f65f77d", "child_entity_type": "CASE", "parent_entity_id": "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f", "parent_entity_type": "CASE", "relationship": "BLOCKS"}, "type": "link"}} - When the request is sent - Then the response status is 404 Not Found - @team:DataDog/case-management Scenario: Create a case returns "Bad Request" response Given new "CreateCase" request @@ -290,54 +170,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: Create a case view returns "Bad Request" response - Given operation "CreateCaseView" enabled - And new "CreateCaseView" request - And body with value {"data": {"attributes": {"name": "Open bugs", "project_id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "query": "status:open type:bug"}, "type": "view"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create a case view returns "Created" response - Given operation "CreateCaseView" enabled - And new "CreateCaseView" request - And body with value {"data": {"attributes": {"name": "Open bugs", "project_id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "query": "status:open type:bug"}, "type": "view"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Create a case view returns "Not Found" response - Given operation "CreateCaseView" enabled - And new "CreateCaseView" request - And body with value {"data": {"attributes": {"name": "Open bugs", "project_id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "query": "status:open type:bug"}, "type": "view"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Create a maintenance window returns "Bad Request" response - Given operation "CreateMaintenanceWindow" enabled - And new "CreateMaintenanceWindow" request - And body with value {"data": {"attributes": {"end_at": "2026-06-01T06:00:00Z", "name": "Weekly maintenance", "query": "project:SEC", "start_at": "2026-06-01T00:00:00Z"}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create a maintenance window returns "Created" response - Given operation "CreateMaintenanceWindow" enabled - And new "CreateMaintenanceWindow" request - And body with value {"data": {"attributes": {"end_at": "2026-06-01T06:00:00Z", "name": "Weekly maintenance", "query": "project:SEC", "start_at": "2026-06-01T00:00:00Z"}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Create a maintenance window returns "Not Found" response - Given operation "CreateMaintenanceWindow" enabled - And new "CreateMaintenanceWindow" request - And body with value {"data": {"attributes": {"end_at": "2026-06-01T06:00:00Z", "name": "Weekly maintenance", "query": "project:SEC", "start_at": "2026-06-01T00:00:00Z"}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management Scenario: Create a notification rule returns "Bad Request" response Given new "CreateProjectNotificationRule" request @@ -383,33 +215,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: Create an automation rule returns "Bad Request" response - Given operation "CreateCaseAutomationRule" enabled - And new "CreateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create an automation rule returns "Created" response - Given operation "CreateCaseAutomationRule" enabled - And new "CreateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Create an automation rule returns "Not Found" response - Given operation "CreateCaseAutomationRule" enabled - And new "CreateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management Scenario: Create investigation notebook for case returns "Bad Request" response Given operation "CreateCaseNotebook" enabled @@ -437,78 +242,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: Delete a case link returns "Bad Request" response - Given operation "DeleteCaseLink" enabled - And new "DeleteCaseLink" request - And request contains "link_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Delete a case link returns "No Content" response - Given operation "DeleteCaseLink" enabled - And new "DeleteCaseLink" request - And request contains "link_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Delete a case link returns "Not Found" response - Given operation "DeleteCaseLink" enabled - And new "DeleteCaseLink" request - And request contains "link_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Delete a case view returns "Bad Request" response - Given operation "DeleteCaseView" enabled - And new "DeleteCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Delete a case view returns "No Content" response - Given operation "DeleteCaseView" enabled - And new "DeleteCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Delete a case view returns "Not Found" response - Given operation "DeleteCaseView" enabled - And new "DeleteCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Delete a maintenance window returns "Bad Request" response - Given operation "DeleteMaintenanceWindow" enabled - And new "DeleteMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Delete a maintenance window returns "No Content" response - Given operation "DeleteMaintenanceWindow" enabled - And new "DeleteMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Delete a maintenance window returns "Not Found" response - Given operation "DeleteMaintenanceWindow" enabled - And new "DeleteMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management Scenario: Delete a notification rule returns "API error response" response Given new "DeleteProjectNotificationRule" request @@ -525,24 +258,6 @@ Feature: Case Management When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/case-management - Scenario: Delete an automation rule returns "No Content" response - Given operation "DeleteCaseAutomationRule" enabled - And new "DeleteCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Delete an automation rule returns "Not Found" response - Given operation "DeleteCaseAutomationRule" enabled - And new "DeleteCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - @skip @team:DataDog/case-management Scenario: Delete case comment returns "Bad Request" response Given new "DeleteCaseComment" request @@ -591,108 +306,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Disable an automation rule returns "Bad Request" response - Given operation "DisableCaseAutomationRule" enabled - And new "DisableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Disable an automation rule returns "Not Found" response - Given operation "DisableCaseAutomationRule" enabled - And new "DisableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - 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/case-management - Scenario: Disable an automation rule returns "OK" response - Given operation "DisableCaseAutomationRule" enabled - And new "DisableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - 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/case-management - Scenario: Enable an automation rule returns "Bad Request" response - Given operation "EnableCaseAutomationRule" enabled - And new "EnableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Enable an automation rule returns "Not Found" response - Given operation "EnableCaseAutomationRule" enabled - And new "EnableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - 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/case-management - Scenario: Enable an automation rule returns "OK" response - Given operation "EnableCaseAutomationRule" enabled - And new "EnableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - 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/case-management - Scenario: Favorite a project returns "Bad Request" response - Given operation "FavoriteCaseProject" enabled - And new "FavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Favorite a project returns "No Content" response - Given operation "FavoriteCaseProject" enabled - And new "FavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Favorite a project returns "Not Found" response - Given operation "FavoriteCaseProject" enabled - And new "FavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Get a case view returns "Bad Request" response - Given operation "GetCaseView" enabled - And new "GetCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Get a case view returns "Not Found" response - Given operation "GetCaseView" enabled - And new "GetCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Get a case view returns "OK" response - Given operation "GetCaseView" enabled - And new "GetCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Get all projects returns "Bad Request" response Given new "GetProjects" request @@ -711,57 +324,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Get an automation rule returns "Bad Request" response - Given operation "GetCaseAutomationRule" enabled - And new "GetCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Get an automation rule returns "Not Found" response - Given operation "GetCaseAutomationRule" enabled - And new "GetCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - 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/case-management - Scenario: Get an automation rule returns "OK" response - Given operation "GetCaseAutomationRule" enabled - And new "GetCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - 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/case-management - Scenario: Get case timeline returns "Bad Request" response - Given operation "ListCaseTimeline" enabled - And new "ListCaseTimeline" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Get case timeline returns "Not Found" response - Given operation "ListCaseTimeline" enabled - And new "ListCaseTimeline" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Get case timeline returns "OK" response - Given operation "ListCaseTimeline" enabled - And new "ListCaseTimeline" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Get notification rules returns "Bad Request" response Given new "GetProjectNotificationRules" request @@ -890,147 +452,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: List automation rules returns "Bad Request" response - Given operation "ListCaseAutomationRules" enabled - And new "ListCaseAutomationRules" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List automation rules returns "Not Found" response - Given operation "ListCaseAutomationRules" enabled - And new "ListCaseAutomationRules" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List automation rules returns "OK" response - Given operation "ListCaseAutomationRules" enabled - And new "ListCaseAutomationRules" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: List case links returns "Bad Request" response - Given operation "ListCaseLinks" enabled - And new "ListCaseLinks" request - And request contains "entity_type" parameter from "REPLACE.ME" - And request contains "entity_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List case links returns "Not Found" response - Given operation "ListCaseLinks" enabled - And new "ListCaseLinks" request - And request contains "entity_type" parameter from "REPLACE.ME" - And request contains "entity_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List case links returns "OK" response - Given operation "ListCaseLinks" enabled - And new "ListCaseLinks" request - And request contains "entity_type" parameter from "REPLACE.ME" - And request contains "entity_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: List case views returns "Bad Request" response - Given operation "ListCaseViews" enabled - And new "ListCaseViews" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List case views returns "Not Found" response - Given operation "ListCaseViews" enabled - And new "ListCaseViews" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List case views returns "OK" response - Given operation "ListCaseViews" enabled - And new "ListCaseViews" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: List case watchers returns "Bad Request" response - Given operation "ListCaseWatchers" enabled - And new "ListCaseWatchers" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List case watchers returns "Not Found" response - Given operation "ListCaseWatchers" enabled - And new "ListCaseWatchers" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List case watchers returns "OK" response - Given operation "ListCaseWatchers" enabled - And new "ListCaseWatchers" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: List maintenance windows returns "Bad Request" response - Given operation "ListMaintenanceWindows" enabled - And new "ListMaintenanceWindows" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List maintenance windows returns "Not Found" response - Given operation "ListMaintenanceWindows" enabled - And new "ListMaintenanceWindows" request - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List maintenance windows returns "OK" response - Given operation "ListMaintenanceWindows" enabled - And new "ListMaintenanceWindows" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: List project favorites returns "Bad Request" response - Given operation "ListUserCaseProjectFavorites" enabled - And new "ListUserCaseProjectFavorites" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List project favorites returns "Not Found" response - Given operation "ListUserCaseProjectFavorites" enabled - And new "ListUserCaseProjectFavorites" request - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List project favorites returns "OK" response - Given operation "ListUserCaseProjectFavorites" enabled - And new "ListUserCaseProjectFavorites" request - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Remove Jira issue link from case returns "Bad Request" response Given operation "UnlinkJiraIssue" enabled @@ -1069,33 +490,6 @@ Feature: Case Management When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/case-management - Scenario: Remove insights from a case returns "Bad Request" response - Given operation "RemoveCaseInsights" enabled - And new "RemoveCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Remove insights from a case returns "Not Found" response - Given operation "RemoveCaseInsights" enabled - And new "RemoveCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Remove insights from a case returns "OK" response - Given operation "RemoveCaseInsights" enabled - And new "RemoveCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Search cases returns "Bad Request" response Given new "SearchCases" request @@ -1175,111 +569,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Unfavorite a project returns "Bad Request" response - Given operation "UnfavoriteCaseProject" enabled - And new "UnfavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Unfavorite a project returns "No Content" response - Given operation "UnfavoriteCaseProject" enabled - And new "UnfavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Unfavorite a project returns "Not Found" response - Given operation "UnfavoriteCaseProject" enabled - And new "UnfavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Unwatch a case returns "Bad Request" response - Given operation "UnwatchCase" enabled - And new "UnwatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Unwatch a case returns "No Content" response - Given operation "UnwatchCase" enabled - And new "UnwatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Unwatch a case returns "Not Found" response - Given operation "UnwatchCase" enabled - And new "UnwatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update a case view returns "Bad Request" response - Given operation "UpdateCaseView" enabled - And new "UpdateCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "view"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update a case view returns "Not Found" response - Given operation "UpdateCaseView" enabled - And new "UpdateCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "view"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update a case view returns "OK" response - Given operation "UpdateCaseView" enabled - And new "UpdateCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "view"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Update a maintenance window returns "Bad Request" response - Given operation "UpdateMaintenanceWindow" enabled - And new "UpdateMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update a maintenance window returns "Not Found" response - Given operation "UpdateMaintenanceWindow" enabled - And new "UpdateMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update a maintenance window returns "OK" response - Given operation "UpdateMaintenanceWindow" enabled - And new "UpdateMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Update a notification rule returns "Bad Request" response Given new "UpdateProjectNotificationRule" request @@ -1333,36 +622,6 @@ Feature: Case Management And the response "data" has field "id" And the response "data.attributes.name" is equal to "Updated Project Name {{ unique }}" - @generated @skip @team:DataDog/case-management - Scenario: Update an automation rule returns "Bad Request" response - Given operation "UpdateCaseAutomationRule" enabled - And new "UpdateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update an automation rule returns "Not Found" response - Given operation "UpdateCaseAutomationRule" enabled - And new "UpdateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update an automation rule returns "OK" response - Given operation "UpdateCaseAutomationRule" enabled - And new "UpdateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 200 OK - @skip @team:DataDog/case-management Scenario: Update case attributes returns "Bad Request" response Given new "UpdateAttributes" request @@ -1389,36 +648,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Update case comment returns "Bad Request" response - Given operation "UpdateCaseComment" enabled - And new "UpdateCaseComment" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "cell_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"comment": "Updated comment text"}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update case comment returns "Not Found" response - Given operation "UpdateCaseComment" enabled - And new "UpdateCaseComment" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "cell_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"comment": "Updated comment text"}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update case comment returns "OK" response - Given operation "UpdateCaseComment" enabled - And new "UpdateCaseComment" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "cell_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"comment": "Updated comment text"}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - @skip @team:DataDog/case-management Scenario: Update case custom attribute returns "Bad Request" response Given new "UpdateCaseCustomAttribute" request @@ -1479,33 +708,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Update case due date returns "Bad Request" response - Given operation "UpdateCaseDueDate" enabled - And new "UpdateCaseDueDate" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"due_date": "2026-12-31"}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update case due date returns "Not Found" response - Given operation "UpdateCaseDueDate" enabled - And new "UpdateCaseDueDate" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"due_date": "2026-12-31"}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update case due date returns "OK" response - Given operation "UpdateCaseDueDate" enabled - And new "UpdateCaseDueDate" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"due_date": "2026-12-31"}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/case-management Scenario: Update case priority returns "Bad Request" response Given new "UpdatePriority" request @@ -1560,33 +762,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Update case resolved reason returns "Bad Request" response - Given operation "UpdateCaseResolvedReason" enabled - And new "UpdateCaseResolvedReason" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"security_resolved_reason": "FALSE_POSITIVE"}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update case resolved reason returns "Not Found" response - Given operation "UpdateCaseResolvedReason" enabled - And new "UpdateCaseResolvedReason" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"security_resolved_reason": "FALSE_POSITIVE"}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update case resolved reason returns "OK" response - Given operation "UpdateCaseResolvedReason" enabled - And new "UpdateCaseResolvedReason" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"security_resolved_reason": "FALSE_POSITIVE"}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/case-management Scenario: Update case status returns "Bad Request" response Given new "UpdateStatus" request @@ -1639,30 +814,3 @@ Feature: Case Management And body with value {"data": {"attributes": {"title": "[UPDATED] Memory leak investigation on API"}, "type": "case"}} When the request is sent Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Watch a case returns "Bad Request" response - Given operation "WatchCase" enabled - And new "WatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Watch a case returns "Created" response - Given operation "WatchCase" enabled - And new "WatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Watch a case returns "Not Found" response - Given operation "WatchCase" enabled - And new "WatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found diff --git a/features/v2/case_management_attribute.feature b/features/v2/case_management_attribute.feature index 47806e809c06..3ac06e724b79 100644 --- a/features/v2/case_management_attribute.feature +++ b/features/v2/case_management_attribute.feature @@ -75,33 +75,3 @@ Feature: Case Management Attribute Given new "GetAllCustomAttributes" request When the request is sent Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Update custom attribute config returns "Bad Request" response - Given operation "UpdateCustomAttributeConfig" enabled - And new "UpdateCustomAttributeConfig" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And request contains "custom_attribute_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Updated description.", "display_name": "AWS Region", "type": "NUMBER", "type_data": {"options": [{"value": "us-east-1"}]}}, "type": "custom_attribute"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update custom attribute config returns "Not Found" response - Given operation "UpdateCustomAttributeConfig" enabled - And new "UpdateCustomAttributeConfig" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And request contains "custom_attribute_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Updated description.", "display_name": "AWS Region", "type": "NUMBER", "type_data": {"options": [{"value": "us-east-1"}]}}, "type": "custom_attribute"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update custom attribute config returns "OK" response - Given operation "UpdateCustomAttributeConfig" enabled - And new "UpdateCustomAttributeConfig" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And request contains "custom_attribute_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Updated description.", "display_name": "AWS Region", "type": "NUMBER", "type_data": {"options": [{"value": "us-east-1"}]}}, "type": "custom_attribute"}} - When the request is sent - Then the response status is 200 OK diff --git a/features/v2/case_management_type.feature b/features/v2/case_management_type.feature index 260ac3d3c42b..0773d7d241b5 100644 --- a/features/v2/case_management_type.feature +++ b/features/v2/case_management_type.feature @@ -44,30 +44,3 @@ Feature: Case Management Type Given new "GetAllCaseTypes" request When the request is sent Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Update a case type returns "Bad Request" response - Given operation "UpdateCaseType" enabled - And new "UpdateCaseType" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Investigations done in case management", "emoji": "\ud83d\udd75\ud83c\udffb\u200d\u2642\ufe0f", "name": "Investigation"}, "type": "case_type"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update a case type returns "Not Found" response - Given operation "UpdateCaseType" enabled - And new "UpdateCaseType" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Investigations done in case management", "emoji": "\ud83d\udd75\ud83c\udffb\u200d\u2642\ufe0f", "name": "Investigation"}, "type": "case_type"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update a case type returns "OK" response - Given operation "UpdateCaseType" enabled - And new "UpdateCaseType" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Investigations done in case management", "emoji": "\ud83d\udd75\ud83c\udffb\u200d\u2642\ufe0f", "name": "Investigation"}, "type": "case_type"}} - When the request is sent - Then the response status is 200 OK diff --git a/features/v2/model_lab_api.feature b/features/v2/model_lab_api.feature new file mode 100644 index 000000000000..997a9c389f63 --- /dev/null +++ b/features/v2/model_lab_api.feature @@ -0,0 +1,359 @@ +@endpoint(model-lab-api) @endpoint(model-lab-api-v2) +Feature: Model Lab API + Manage Model Lab projects, runs, artifacts, and facets for ML experiment + tracking. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ModelLabAPI" API + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete a Model Lab run returns "Bad Request" response + Given operation "DeleteModelLabRun" enabled + And new "DeleteModelLabRun" request + And request contains "run_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/ml-observability + Scenario: Delete a Model Lab run returns "No Content" response + Given operation "DeleteModelLabRun" enabled + And new "DeleteModelLabRun" request + And request contains "run_id" parameter with value 70158 + When the request is sent + Then the response status is 204 No Content + + @replay-only @team:DataDog/ml-observability + Scenario: Delete a Model Lab run returns "Not Found" response + Given operation "DeleteModelLabRun" enabled + And new "DeleteModelLabRun" request + And request contains "run_id" parameter with value 999999 + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:DataDog/ml-observability + Scenario: Download artifact content returns "OK" response + Given operation "GetModelLabArtifactContent" enabled + And new "GetModelLabArtifactContent" request + And request contains "project_id" parameter with value "2387" + And request contains "artifact_path" parameter with value "f635c73b70594ab6bb6e212cdf87d0d5/artifacts/lora_model/adapter_config.json" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: Get Model Lab artifact content returns "Bad Request" response + Given operation "GetModelLabArtifactContent" enabled + And new "GetModelLabArtifactContent" request + And request contains "project_id" parameter from "REPLACE.ME" + And request contains "artifact_path" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Get Model Lab artifact content returns "OK" response + Given operation "GetModelLabArtifactContent" enabled + And new "GetModelLabArtifactContent" request + And request contains "project_id" parameter from "REPLACE.ME" + And request contains "artifact_path" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: Get a Model Lab project returns "Bad Request" response + Given operation "GetModelLabProject" enabled + And new "GetModelLabProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/ml-observability + Scenario: Get a Model Lab project returns "Not Found" response + Given operation "GetModelLabProject" enabled + And new "GetModelLabProject" request + And request contains "project_id" parameter with value 999999 + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:DataDog/ml-observability + Scenario: Get a Model Lab project returns "OK" response + Given operation "GetModelLabProject" enabled + And new "GetModelLabProject" request + And request contains "project_id" parameter with value 2387 + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: Get a Model Lab run returns "Bad Request" response + Given operation "GetModelLabRun" enabled + And new "GetModelLabRun" request + And request contains "run_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/ml-observability + Scenario: Get a Model Lab run returns "Not Found" response + Given operation "GetModelLabRun" enabled + And new "GetModelLabRun" request + And request contains "run_id" parameter with value 999999 + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:DataDog/ml-observability + Scenario: Get a Model Lab run returns "OK" response + Given operation "GetModelLabRun" enabled + And new "GetModelLabRun" request + And request contains "run_id" parameter with value 70158 + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List Model Lab project artifacts returns "Bad Request" response + Given operation "ListModelLabProjectArtifacts" enabled + And new "ListModelLabProjectArtifacts" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/ml-observability + Scenario: List Model Lab project artifacts returns "OK" response + Given operation "ListModelLabProjectArtifacts" enabled + And new "ListModelLabProjectArtifacts" request + And request contains "project_id" parameter with value 2387 + When the request is sent + Then the response status is 200 OK + + @replay-only @team:DataDog/ml-observability + Scenario: List Model Lab project facet keys returns "OK" response + Given operation "ListModelLabProjectFacetKeys" enabled + And new "ListModelLabProjectFacetKeys" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List Model Lab project facet values returns "Bad Request" response + Given operation "ListModelLabProjectFacetValues" enabled + And new "ListModelLabProjectFacetValues" request + And request contains "facet_type" parameter from "REPLACE.ME" + And request contains "facet_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/ml-observability + Scenario: List Model Lab project facet values returns "OK" response + Given operation "ListModelLabProjectFacetValues" enabled + And new "ListModelLabProjectFacetValues" request + And request contains "facet_type" parameter with value "tag" + And request contains "facet_name" parameter with value "model" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List Model Lab projects returns "Bad Request" response + Given operation "ListModelLabProjects" enabled + And new "ListModelLabProjects" request + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/ml-observability + Scenario: List Model Lab projects returns "OK" response + Given operation "ListModelLabProjects" enabled + And new "ListModelLabProjects" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List Model Lab run artifacts returns "Bad Request" response + Given operation "ListModelLabRunArtifacts" enabled + And new "ListModelLabRunArtifacts" request + And request contains "run_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List Model Lab run artifacts returns "Not Found" response + Given operation "ListModelLabRunArtifacts" enabled + And new "ListModelLabRunArtifacts" request + And request contains "run_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:DataDog/ml-observability + Scenario: List Model Lab run artifacts returns "OK" response + Given operation "ListModelLabRunArtifacts" enabled + And new "ListModelLabRunArtifacts" request + And request contains "run_id" parameter with value 70158 + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List Model Lab run facet keys returns "Bad Request" response + Given operation "ListModelLabRunFacetKeys" enabled + And new "ListModelLabRunFacetKeys" request + And request contains "filter[project_id]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List Model Lab run facet keys returns "Not Found" response + Given operation "ListModelLabRunFacetKeys" enabled + And new "ListModelLabRunFacetKeys" request + And request contains "filter[project_id]" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:DataDog/ml-observability + Scenario: List Model Lab run facet keys returns "OK" response + Given operation "ListModelLabRunFacetKeys" enabled + And new "ListModelLabRunFacetKeys" request + And request contains "filter[project_id]" parameter with value 2387 + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List Model Lab run facet values returns "Bad Request" response + Given operation "ListModelLabRunFacetValues" enabled + And new "ListModelLabRunFacetValues" request + And request contains "filter[project_id]" parameter from "REPLACE.ME" + And request contains "facet_type" parameter from "REPLACE.ME" + And request contains "facet_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List Model Lab run facet values returns "Not Found" response + Given operation "ListModelLabRunFacetValues" enabled + And new "ListModelLabRunFacetValues" request + And request contains "filter[project_id]" parameter from "REPLACE.ME" + And request contains "facet_type" parameter from "REPLACE.ME" + And request contains "facet_name" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:DataDog/ml-observability + Scenario: List Model Lab run facet values returns "OK" response + Given operation "ListModelLabRunFacetValues" enabled + And new "ListModelLabRunFacetValues" request + And request contains "filter[project_id]" parameter with value 2387 + And request contains "facet_type" parameter with value "tag" + And request contains "facet_name" parameter with value "model" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List Model Lab runs returns "Bad Request" response + Given operation "ListModelLabRuns" enabled + And new "ListModelLabRuns" request + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/ml-observability + Scenario: List Model Lab runs returns "OK" response + Given operation "ListModelLabRuns" enabled + And new "ListModelLabRuns" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: Pin a Model Lab run returns "Bad Request" response + Given operation "PinModelLabRun" enabled + And new "PinModelLabRun" request + And request contains "run_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/ml-observability + Scenario: Pin a Model Lab run returns "No Content" response + Given operation "PinModelLabRun" enabled + And new "PinModelLabRun" request + And request contains "run_id" parameter with value 70158 + When the request is sent + Then the response status is 204 No Content + + @replay-only @team:DataDog/ml-observability + Scenario: Pin a Model Lab run returns "Not Found" response + Given operation "PinModelLabRun" enabled + And new "PinModelLabRun" request + And request contains "run_id" parameter with value 999999 + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Remove star from a Model Lab project returns "Bad Request" response + Given operation "UnstarModelLabProject" enabled + And new "UnstarModelLabProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Remove star from a Model Lab project returns "No Content" response + Given operation "UnstarModelLabProject" enabled + And new "UnstarModelLabProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/ml-observability + Scenario: Remove star from a Model Lab project returns "Not Found" response + Given operation "UnstarModelLabProject" enabled + And new "UnstarModelLabProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Star a Model Lab project returns "Bad Request" response + Given operation "StarModelLabProject" enabled + And new "StarModelLabProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/ml-observability + Scenario: Star a Model Lab project returns "No Content" response + Given operation "StarModelLabProject" enabled + And new "StarModelLabProject" request + And request contains "project_id" parameter with value 2387 + When the request is sent + Then the response status is 204 No Content + + @replay-only @team:DataDog/ml-observability + Scenario: Star a Model Lab project returns "Not Found" response + Given operation "StarModelLabProject" enabled + And new "StarModelLabProject" request + And request contains "project_id" parameter with value 999999 + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Unpin a Model Lab run returns "Bad Request" response + Given operation "UnpinModelLabRun" enabled + And new "UnpinModelLabRun" request + And request contains "run_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @replay-only @team:DataDog/ml-observability + Scenario: Unpin a Model Lab run returns "No Content" response + Given operation "UnpinModelLabRun" enabled + And new "UnpinModelLabRun" request + And request contains "run_id" parameter with value 70158 + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/ml-observability + Scenario: Unpin a Model Lab run returns "Not Found" response + Given operation "UnpinModelLabRun" enabled + And new "UnpinModelLabRun" request + And request contains "run_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:DataDog/ml-observability + Scenario: Unstar a Model Lab project returns "No Content" response + Given operation "UnstarModelLabProject" enabled + And new "UnstarModelLabProject" request + And request contains "project_id" parameter with value 2387 + When the request is sent + Then the response status is 204 No Content diff --git a/features/v2/undo.json b/features/v2/undo.json index 2abb97ee5cc9..9d902f855e4f 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -790,49 +790,6 @@ "type": "safe" } }, - "AggregateCases": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "BulkUpdateCases": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "CountCases": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "ListCaseLinks": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "CreateCaseLink": { - "tag": "Case Management", - "undo": { - "operationId": "DeleteCaseLink", - "parameters": [ - { - "name": "link_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteCaseLink": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "GetProjects": { "tag": "Case Management", "undo": { @@ -852,12 +809,6 @@ "type": "unsafe" } }, - "ListUserCaseProjectFavorites": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, "DeleteProject": { "tag": "Case Management", "undo": { @@ -876,25 +827,6 @@ "type": "idempotent" } }, - "UnfavoriteCaseProject": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "FavoriteCaseProject": { - "tag": "Case Management", - "undo": { - "operationId": "UnfavoriteCaseProject", - "parameters": [ - { - "name": "project_id", - "source": "path.project_id" - } - ], - "type": "unsafe" - } - }, "GetProjectNotificationRules": { "tag": "Case Management", "undo": { @@ -930,59 +862,6 @@ "type": "idempotent" } }, - "ListCaseAutomationRules": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "CreateCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "operationId": "DeleteCaseAutomationRule", - "parameters": [ - { - "name": "project_id", - "source": "path.project_id" - }, - { - "name": "rule_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "GetCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "UpdateCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "DisableCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "EnableCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "GetAllCaseTypes": { "tag": "Case Management Type", "undo": { @@ -1007,12 +886,6 @@ "type": "idempotent" } }, - "UpdateCaseType": { - "tag": "Case Management Type", - "undo": { - "type": "idempotent" - } - }, "GetAllCustomAttributeConfigsByCaseType": { "tag": "Case Management Attribute", "undo": { @@ -1031,49 +904,6 @@ "type": "idempotent" } }, - "UpdateCustomAttributeConfig": { - "tag": "Case Management Attribute", - "undo": { - "type": "idempotent" - } - }, - "ListCaseViews": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "CreateCaseView": { - "tag": "Case Management", - "undo": { - "operationId": "DeleteCaseView", - "parameters": [ - { - "name": "view_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteCaseView": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "GetCaseView": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "UpdateCaseView": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "GetCase": { "tag": "Case Management", "undo": { @@ -1110,12 +940,6 @@ "type": "idempotent" } }, - "UpdateCaseComment": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "DeleteCaseCustomAttribute": { "tag": "Case Management", "undo": { @@ -1134,24 +958,6 @@ "type": "idempotent" } }, - "UpdateCaseDueDate": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "RemoveCaseInsights": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "AddCaseInsights": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, "UpdatePriority": { "tag": "Case Management", "undo": { @@ -1208,24 +1014,12 @@ "type": "unsafe" } }, - "UpdateCaseResolvedReason": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "UpdateStatus": { "tag": "Case Management", "undo": { "type": "idempotent" } }, - "ListCaseTimeline": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, "UpdateCaseTitle": { "tag": "Case Management", "undo": { @@ -1244,35 +1038,6 @@ "type": "idempotent" } }, - "ListCaseWatchers": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "UnwatchCase": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "WatchCase": { - "tag": "Case Management", - "undo": { - "operationId": "UnwatchCase", - "parameters": [ - { - "name": "case_id", - "source": "path.case_id" - }, - { - "name": "user_uuid", - "source": "path.user_uuid" - } - ], - "type": "unsafe" - } - }, "ListCatalogEntity": { "tag": "Software Catalog", "undo": { @@ -4099,37 +3864,6 @@ "type": "safe" } }, - "ListMaintenanceWindows": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "CreateMaintenanceWindow": { - "tag": "Case Management", - "undo": { - "operationId": "DeleteMaintenanceWindow", - "parameters": [ - { - "name": "maintenance_window_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteMaintenanceWindow": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "UpdateMaintenanceWindow": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "ListTagConfigurations": { "tag": "Metrics", "undo": { @@ -4222,6 +3956,118 @@ "type": "safe" } }, + "GetModelLabArtifactContent": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "ListModelLabRunFacetKeys": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "ListModelLabRunFacetValues": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "ListModelLabProjectFacetKeys": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "ListModelLabProjectFacetValues": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "ListModelLabProjects": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "GetModelLabProject": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "ListModelLabProjectArtifacts": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "UnstarModelLabProject": { + "tag": "Model Lab API", + "undo": { + "type": "idempotent" + } + }, + "StarModelLabProject": { + "tag": "Model Lab API", + "undo": { + "operationId": "UnstarModelLabProject", + "parameters": [ + { + "name": "project_id", + "origin": "path", + "source": "project_id" + } + ], + "type": "unsafe" + } + }, + "ListModelLabRuns": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "DeleteModelLabRun": { + "tag": "Model Lab API", + "undo": { + "type": "idempotent" + } + }, + "GetModelLabRun": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "ListModelLabRunArtifacts": { + "tag": "Model Lab API", + "undo": { + "type": "safe" + } + }, + "UnpinModelLabRun": { + "tag": "Model Lab API", + "undo": { + "type": "idempotent" + } + }, + "PinModelLabRun": { + "tag": "Model Lab API", + "undo": { + "operationId": "UnpinModelLabRun", + "parameters": [ + { + "name": "run_id", + "origin": "path", + "source": "run_id" + } + ], + "type": "unsafe" + } + }, "GetMonitorNotificationRules": { "tag": "Monitors", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 6e22aee19a43..b7c1bce17894 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -246,49 +246,13 @@ def initialize "v2.get_investigation": false, "v2.list_investigations": false, "v2.trigger_investigation": false, - "v2.add_case_insights": false, - "v2.aggregate_cases": false, - "v2.bulk_update_cases": false, - "v2.count_cases": false, - "v2.create_case_automation_rule": false, "v2.create_case_jira_issue": false, - "v2.create_case_link": false, "v2.create_case_notebook": false, "v2.create_case_service_now_ticket": false, - "v2.create_case_view": false, - "v2.create_maintenance_window": false, - "v2.delete_case_automation_rule": false, - "v2.delete_case_link": false, - "v2.delete_case_view": false, - "v2.delete_maintenance_window": false, - "v2.disable_case_automation_rule": false, - "v2.enable_case_automation_rule": false, - "v2.favorite_case_project": false, - "v2.get_case_automation_rule": false, - "v2.get_case_view": false, "v2.link_incident": false, "v2.link_jira_issue_to_case": false, - "v2.list_case_automation_rules": false, - "v2.list_case_links": false, - "v2.list_case_timeline": false, - "v2.list_case_views": false, - "v2.list_case_watchers": false, - "v2.list_maintenance_windows": false, - "v2.list_user_case_project_favorites": false, "v2.move_case_to_project": false, - "v2.remove_case_insights": false, - "v2.unfavorite_case_project": false, "v2.unlink_jira_issue": false, - "v2.unwatch_case": false, - "v2.update_case_automation_rule": false, - "v2.update_case_comment": false, - "v2.update_case_due_date": false, - "v2.update_case_resolved_reason": false, - "v2.update_case_view": false, - "v2.update_maintenance_window": false, - "v2.watch_case": false, - "v2.update_case_type": false, - "v2.update_custom_attribute_config": false, "v2.create_change_request": false, "v2.create_change_request_branch": false, "v2.delete_change_request_decision": false, @@ -450,6 +414,22 @@ def initialize "v2.remove_role_from_restriction_query": false, "v2.replace_restriction_query": false, "v2.update_restriction_query": false, + "v2.delete_model_lab_run": false, + "v2.get_model_lab_artifact_content": false, + "v2.get_model_lab_project": false, + "v2.get_model_lab_run": false, + "v2.list_model_lab_project_artifacts": false, + "v2.list_model_lab_project_facet_keys": false, + "v2.list_model_lab_project_facet_values": false, + "v2.list_model_lab_projects": false, + "v2.list_model_lab_run_artifacts": false, + "v2.list_model_lab_run_facet_keys": false, + "v2.list_model_lab_run_facet_values": false, + "v2.list_model_lab_runs": false, + "v2.pin_model_lab_run": false, + "v2.star_model_lab_project": false, + "v2.unpin_model_lab_run": false, + "v2.unstar_model_lab_project": false, "v2.create_monitor_user_template": false, "v2.delete_monitor_user_template": false, "v2.get_monitor_user_template": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index eab499090a8d..3acedb22e700 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1388,22 +1388,6 @@ def overrides "v2.authn_mapping_update_relationships" => "AuthNMappingUpdateRelationships", "v2.authn_mapping_update_request" => "AuthNMappingUpdateRequest", "v2.auto_close_inactive_cases" => "AutoCloseInactiveCases", - "v2.automation_rule" => "AutomationRule", - "v2.automation_rule_action" => "AutomationRuleAction", - "v2.automation_rule_action_data" => "AutomationRuleActionData", - "v2.automation_rule_action_type" => "AutomationRuleActionType", - "v2.automation_rule_attributes" => "AutomationRuleAttributes", - "v2.automation_rule_create" => "AutomationRuleCreate", - "v2.automation_rule_create_attributes" => "AutomationRuleCreateAttributes", - "v2.automation_rule_create_request" => "AutomationRuleCreateRequest", - "v2.automation_rule_relationships" => "AutomationRuleRelationships", - "v2.automation_rule_response" => "AutomationRuleResponse", - "v2.automation_rules_response" => "AutomationRulesResponse", - "v2.automation_rule_trigger" => "AutomationRuleTrigger", - "v2.automation_rule_trigger_data" => "AutomationRuleTriggerData", - "v2.automation_rule_trigger_type" => "AutomationRuleTriggerType", - "v2.automation_rule_update" => "AutomationRuleUpdate", - "v2.automation_rule_update_request" => "AutomationRuleUpdateRequest", "v2.auto_transition_assigned_cases" => "AutoTransitionAssignedCases", "v2.aws_account_create_request" => "AWSAccountCreateRequest", "v2.aws_account_create_request_attributes" => "AWSAccountCreateRequestAttributes", @@ -1625,34 +1609,13 @@ def overrides "v2.cancel_data_deletion_response_body" => "CancelDataDeletionResponseBody", "v2.case" => "Case", "v2.case3rd_party_ticket_status" => "Case3rdPartyTicketStatus", - "v2.case_aggregate_group" => "CaseAggregateGroup", - "v2.case_aggregate_group_by" => "CaseAggregateGroupBy", - "v2.case_aggregate_request" => "CaseAggregateRequest", - "v2.case_aggregate_request_attributes" => "CaseAggregateRequestAttributes", - "v2.case_aggregate_request_data" => "CaseAggregateRequestData", - "v2.case_aggregate_resource_type" => "CaseAggregateResourceType", - "v2.case_aggregate_response" => "CaseAggregateResponse", - "v2.case_aggregate_response_attributes" => "CaseAggregateResponseAttributes", - "v2.case_aggregate_response_data" => "CaseAggregateResponseData", "v2.case_assign" => "CaseAssign", "v2.case_assign_attributes" => "CaseAssignAttributes", "v2.case_assign_request" => "CaseAssignRequest", "v2.case_attributes" => "CaseAttributes", - "v2.case_automation_rule_resource_type" => "CaseAutomationRuleResourceType", - "v2.case_automation_rule_state" => "CaseAutomationRuleState", - "v2.case_bulk_action_type" => "CaseBulkActionType", - "v2.case_bulk_resource_type" => "CaseBulkResourceType", - "v2.case_bulk_update_request" => "CaseBulkUpdateRequest", - "v2.case_bulk_update_request_attributes" => "CaseBulkUpdateRequestAttributes", - "v2.case_bulk_update_request_data" => "CaseBulkUpdateRequestData", "v2.case_comment" => "CaseComment", "v2.case_comment_attributes" => "CaseCommentAttributes", "v2.case_comment_request" => "CaseCommentRequest", - "v2.case_count_group" => "CaseCountGroup", - "v2.case_count_group_value" => "CaseCountGroupValue", - "v2.case_count_response" => "CaseCountResponse", - "v2.case_count_response_attributes" => "CaseCountResponseAttributes", - "v2.case_count_response_data" => "CaseCountResponseData", "v2.case_create" => "CaseCreate", "v2.case_create_attributes" => "CaseCreateAttributes", "v2.case_create_relationships" => "CaseCreateRelationships", @@ -1660,19 +1623,7 @@ def overrides "v2.case_data_type" => "CaseDataType", "v2.case_empty" => "CaseEmpty", "v2.case_empty_request" => "CaseEmptyRequest", - "v2.case_insight" => "CaseInsight", - "v2.case_insights_attributes" => "CaseInsightsAttributes", - "v2.case_insights_data" => "CaseInsightsData", "v2.case_insights_items" => "CaseInsightsItems", - "v2.case_insights_request" => "CaseInsightsRequest", - "v2.case_insight_type" => "CaseInsightType", - "v2.case_link" => "CaseLink", - "v2.case_link_attributes" => "CaseLinkAttributes", - "v2.case_link_create" => "CaseLinkCreate", - "v2.case_link_create_request" => "CaseLinkCreateRequest", - "v2.case_link_resource_type" => "CaseLinkResourceType", - "v2.case_link_response" => "CaseLinkResponse", - "v2.case_links_response" => "CaseLinksResponse", "v2.case_management_project" => "CaseManagementProject", "v2.case_management_project_data" => "CaseManagementProjectData", "v2.case_management_project_data_type" => "CaseManagementProjectDataType", @@ -1710,51 +1661,23 @@ def overrides "v2.case_type_resource_type" => "CaseTypeResourceType", "v2.case_type_response" => "CaseTypeResponse", "v2.case_types_response" => "CaseTypesResponse", - "v2.case_type_update" => "CaseTypeUpdate", - "v2.case_type_update_request" => "CaseTypeUpdateRequest", "v2.case_update_attributes" => "CaseUpdateAttributes", "v2.case_update_attributes_attributes" => "CaseUpdateAttributesAttributes", "v2.case_update_attributes_request" => "CaseUpdateAttributesRequest", - "v2.case_update_comment" => "CaseUpdateComment", - "v2.case_update_comment_attributes" => "CaseUpdateCommentAttributes", - "v2.case_update_comment_request" => "CaseUpdateCommentRequest", "v2.case_update_custom_attribute" => "CaseUpdateCustomAttribute", "v2.case_update_custom_attribute_request" => "CaseUpdateCustomAttributeRequest", "v2.case_update_description" => "CaseUpdateDescription", "v2.case_update_description_attributes" => "CaseUpdateDescriptionAttributes", "v2.case_update_description_request" => "CaseUpdateDescriptionRequest", - "v2.case_update_due_date" => "CaseUpdateDueDate", - "v2.case_update_due_date_attributes" => "CaseUpdateDueDateAttributes", - "v2.case_update_due_date_request" => "CaseUpdateDueDateRequest", "v2.case_update_priority" => "CaseUpdatePriority", "v2.case_update_priority_attributes" => "CaseUpdatePriorityAttributes", "v2.case_update_priority_request" => "CaseUpdatePriorityRequest", - "v2.case_update_resolved_reason" => "CaseUpdateResolvedReason", - "v2.case_update_resolved_reason_attributes" => "CaseUpdateResolvedReasonAttributes", - "v2.case_update_resolved_reason_request" => "CaseUpdateResolvedReasonRequest", "v2.case_update_status" => "CaseUpdateStatus", "v2.case_update_status_attributes" => "CaseUpdateStatusAttributes", "v2.case_update_status_request" => "CaseUpdateStatusRequest", "v2.case_update_title" => "CaseUpdateTitle", "v2.case_update_title_attributes" => "CaseUpdateTitleAttributes", "v2.case_update_title_request" => "CaseUpdateTitleRequest", - "v2.case_view" => "CaseView", - "v2.case_view_attributes" => "CaseViewAttributes", - "v2.case_view_create" => "CaseViewCreate", - "v2.case_view_create_attributes" => "CaseViewCreateAttributes", - "v2.case_view_create_request" => "CaseViewCreateRequest", - "v2.case_view_relationships" => "CaseViewRelationships", - "v2.case_view_resource_type" => "CaseViewResourceType", - "v2.case_view_response" => "CaseViewResponse", - "v2.case_views_response" => "CaseViewsResponse", - "v2.case_view_update" => "CaseViewUpdate", - "v2.case_view_update_attributes" => "CaseViewUpdateAttributes", - "v2.case_view_update_request" => "CaseViewUpdateRequest", - "v2.case_watcher" => "CaseWatcher", - "v2.case_watcher_relationships" => "CaseWatcherRelationships", - "v2.case_watcher_resource_type" => "CaseWatcherResourceType", - "v2.case_watchers_response" => "CaseWatchersResponse", - "v2.case_watcher_user_relationship" => "CaseWatcherUserRelationship", "v2.change_event_attributes" => "ChangeEventAttributes", "v2.change_event_attributes_author" => "ChangeEventAttributesAuthor", "v2.change_event_attributes_author_type" => "ChangeEventAttributesAuthorType", @@ -2340,12 +2263,7 @@ def overrides "v2.custom_attribute_config_resource_type" => "CustomAttributeConfigResourceType", "v2.custom_attribute_config_response" => "CustomAttributeConfigResponse", "v2.custom_attribute_configs_response" => "CustomAttributeConfigsResponse", - "v2.custom_attribute_config_update" => "CustomAttributeConfigUpdate", - "v2.custom_attribute_config_update_attributes" => "CustomAttributeConfigUpdateAttributes", - "v2.custom_attribute_config_update_request" => "CustomAttributeConfigUpdateRequest", - "v2.custom_attribute_select_option" => "CustomAttributeSelectOption", "v2.custom_attribute_type" => "CustomAttributeType", - "v2.custom_attribute_type_data" => "CustomAttributeTypeData", "v2.custom_attribute_value" => "CustomAttributeValue", "v2.custom_attribute_values_union" => "CustomAttributeValuesUnion", "v2.custom_connection" => "CustomConnection", @@ -3918,17 +3836,6 @@ def overrides "v2.maintenance_data_relationships_last_modified_by_user_data" => "MaintenanceDataRelationshipsLastModifiedByUserData", "v2.maintenance_data_relationships_status_page" => "MaintenanceDataRelationshipsStatusPage", "v2.maintenance_data_relationships_status_page_data" => "MaintenanceDataRelationshipsStatusPageData", - "v2.maintenance_window" => "MaintenanceWindow", - "v2.maintenance_window_attributes" => "MaintenanceWindowAttributes", - "v2.maintenance_window_create" => "MaintenanceWindowCreate", - "v2.maintenance_window_create_attributes" => "MaintenanceWindowCreateAttributes", - "v2.maintenance_window_create_request" => "MaintenanceWindowCreateRequest", - "v2.maintenance_window_resource_type" => "MaintenanceWindowResourceType", - "v2.maintenance_window_response" => "MaintenanceWindowResponse", - "v2.maintenance_windows_response" => "MaintenanceWindowsResponse", - "v2.maintenance_window_update" => "MaintenanceWindowUpdate", - "v2.maintenance_window_update_attributes" => "MaintenanceWindowUpdateAttributes", - "v2.maintenance_window_update_request" => "MaintenanceWindowUpdateRequest", "v2.managed_orgs_data" => "ManagedOrgsData", "v2.managed_orgs_relationships" => "ManagedOrgsRelationships", "v2.managed_orgs_relationship_to_org" => "ManagedOrgsRelationshipToOrg", @@ -4061,6 +3968,45 @@ def overrides "v2.microsoft_teams_workflows_webhook_handles_response" => "MicrosoftTeamsWorkflowsWebhookHandlesResponse", "v2.microsoft_teams_workflows_webhook_handle_type" => "MicrosoftTeamsWorkflowsWebhookHandleType", "v2.microsoft_teams_workflows_webhook_response_attributes" => "MicrosoftTeamsWorkflowsWebhookResponseAttributes", + "v2.model_lab_artifact_info" => "ModelLabArtifactInfo", + "v2.model_lab_artifact_object_info" => "ModelLabArtifactObjectInfo", + "v2.model_lab_facet_keys_attributes" => "ModelLabFacetKeysAttributes", + "v2.model_lab_facet_keys_data" => "ModelLabFacetKeysData", + "v2.model_lab_facet_keys_response" => "ModelLabFacetKeysResponse", + "v2.model_lab_facet_keys_type" => "ModelLabFacetKeysType", + "v2.model_lab_facet_type" => "ModelLabFacetType", + "v2.model_lab_facet_values_attributes" => "ModelLabFacetValuesAttributes", + "v2.model_lab_facet_values_data" => "ModelLabFacetValuesData", + "v2.model_lab_facet_values_response" => "ModelLabFacetValuesResponse", + "v2.model_lab_facet_values_type" => "ModelLabFacetValuesType", + "v2.model_lab_metric_stat_range" => "ModelLabMetricStatRange", + "v2.model_lab_metric_summary" => "ModelLabMetricSummary", + "v2.model_lab_numeric_range" => "ModelLabNumericRange", + "v2.model_lab_page_meta" => "ModelLabPageMeta", + "v2.model_lab_page_meta_page" => "ModelLabPageMetaPage", + "v2.model_lab_pagination_links" => "ModelLabPaginationLinks", + "v2.model_lab_project_artifacts_attributes" => "ModelLabProjectArtifactsAttributes", + "v2.model_lab_project_artifacts_data" => "ModelLabProjectArtifactsData", + "v2.model_lab_project_artifacts_response" => "ModelLabProjectArtifactsResponse", + "v2.model_lab_project_artifacts_type" => "ModelLabProjectArtifactsType", + "v2.model_lab_project_attributes" => "ModelLabProjectAttributes", + "v2.model_lab_project_data" => "ModelLabProjectData", + "v2.model_lab_project_facet_type" => "ModelLabProjectFacetType", + "v2.model_lab_project_response" => "ModelLabProjectResponse", + "v2.model_lab_projects_response" => "ModelLabProjectsResponse", + "v2.model_lab_project_type" => "ModelLabProjectType", + "v2.model_lab_run_artifacts_attributes" => "ModelLabRunArtifactsAttributes", + "v2.model_lab_run_artifacts_data" => "ModelLabRunArtifactsData", + "v2.model_lab_run_artifacts_response" => "ModelLabRunArtifactsResponse", + "v2.model_lab_run_artifacts_type" => "ModelLabRunArtifactsType", + "v2.model_lab_run_attributes" => "ModelLabRunAttributes", + "v2.model_lab_run_data" => "ModelLabRunData", + "v2.model_lab_run_param" => "ModelLabRunParam", + "v2.model_lab_run_response" => "ModelLabRunResponse", + "v2.model_lab_runs_response" => "ModelLabRunsResponse", + "v2.model_lab_run_status" => "ModelLabRunStatus", + "v2.model_lab_run_type" => "ModelLabRunType", + "v2.model_lab_tag" => "ModelLabTag", "v2.monitor_alert_trigger_attributes" => "MonitorAlertTriggerAttributes", "v2.monitor_config_policy_attribute_create_request" => "MonitorConfigPolicyAttributeCreateRequest", "v2.monitor_config_policy_attribute_edit_request" => "MonitorConfigPolicyAttributeEditRequest", @@ -4830,9 +4776,6 @@ def overrides "v2.projected_cost_attributes" => "ProjectedCostAttributes", "v2.projected_cost_response" => "ProjectedCostResponse", "v2.projected_cost_type" => "ProjectedCostType", - "v2.project_favorite" => "ProjectFavorite", - "v2.project_favorite_resource_type" => "ProjectFavoriteResourceType", - "v2.project_favorites_response" => "ProjectFavoritesResponse", "v2.project_notification_settings" => "ProjectNotificationSettings", "v2.project_relationship" => "ProjectRelationship", "v2.project_relationship_data" => "ProjectRelationshipData", @@ -6700,6 +6643,7 @@ def overrides "v2.logs_restriction_queries_api" => "LogsRestrictionQueriesAPI", "v2.metrics_api" => "MetricsAPI", "v2.microsoft_teams_integration_api" => "MicrosoftTeamsIntegrationAPI", + "v2.model_lab_api_api" => "ModelLabAPIAPI", "v2.monitors_api" => "MonitorsAPI", "v2.network_device_monitoring_api" => "NetworkDeviceMonitoringAPI", "v2.observability_pipelines_api" => "ObservabilityPipelinesAPI", diff --git a/lib/datadog_api_client/v2/api/case_management_api.rb b/lib/datadog_api_client/v2/api/case_management_api.rb index a6f79e505c2c..cf7cda64a2e0 100644 --- a/lib/datadog_api_client/v2/api/case_management_api.rb +++ b/lib/datadog_api_client/v2/api/case_management_api.rb @@ -23,43 +23,37 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end - # Add insights to a case. + # Archive case. # - # @see #add_case_insights_with_http_info - def add_case_insights(case_id, body, opts = {}) - data, _status_code, _headers = add_case_insights_with_http_info(case_id, body, opts) + # @see #archive_case_with_http_info + def archive_case(case_id, body, opts = {}) + data, _status_code, _headers = archive_case_with_http_info(case_id, body, opts) data end - # Add insights to a case. + # Archive case. # - # Adds one or more insights to a case. Insights are references to related Datadog resources (such as monitors, security signals, incidents, or error tracking issues) that provide investigative context. Up to 100 insights can be added per request. Each insight requires a type (see `CaseInsightType` for allowed values), a ref (URL path to the resource), and a resource_id. + # Archive case # # @param case_id [String] Case's UUID or key - # @param body [CaseInsightsRequest] Case insights request. + # @param body [CaseEmptyRequest] Archive case payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def add_case_insights_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.add_case_insights".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.add_case_insights") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.add_case_insights")) - end + def archive_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.add_case_insights ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.archive_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.add_case_insights" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.archive_case" 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 CaseManagementAPI.add_case_insights" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.archive_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/insights'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/archive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -84,7 +78,7 @@ def add_case_insights_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :add_case_insights, + :operation => :archive_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -94,45 +88,44 @@ def add_case_insights_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#add_case_insights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#archive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Aggregate cases. + # Assign case. # - # @see #aggregate_cases_with_http_info - def aggregate_cases(body, opts = {}) - data, _status_code, _headers = aggregate_cases_with_http_info(body, opts) + # @see #assign_case_with_http_info + def assign_case(case_id, body, opts = {}) + data, _status_code, _headers = assign_case_with_http_info(case_id, body, opts) data end - # Aggregate cases. + # Assign case. # - # Performs an aggregation query over cases, grouping results by specified fields and returning counts per group along with a total. Useful for dashboards and analytics. + # Assign case to a user # - # @param body [CaseAggregateRequest] Case aggregate request payload. + # @param case_id [String] Case's UUID or key + # @param body [CaseAssignRequest] Assign case payload # @param opts [Hash] the optional parameters - # @return [Array<(CaseAggregateResponse, Integer, Hash)>] CaseAggregateResponse data, response status code and response headers - def aggregate_cases_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.aggregate_cases".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.aggregate_cases") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.aggregate_cases")) - end + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def assign_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.aggregate_cases ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.assign_case ...' + end + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.assign_case" 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 CaseManagementAPI.aggregate_cases" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.assign_case" end # resource path - local_var_path = '/api/v2/cases/aggregate' + local_var_path = '/api/v2/cases/{case_id}/assign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -151,13 +144,13 @@ def aggregate_cases_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseAggregateResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :aggregate_cases, + :operation => :assign_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -169,42 +162,42 @@ def aggregate_cases_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#aggregate_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#assign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Archive case. + # Comment case. # - # @see #archive_case_with_http_info - def archive_case(case_id, body, opts = {}) - data, _status_code, _headers = archive_case_with_http_info(case_id, body, opts) + # @see #comment_case_with_http_info + def comment_case(case_id, body, opts = {}) + data, _status_code, _headers = comment_case_with_http_info(case_id, body, opts) data end - # Archive case. + # Comment case. # - # Archive case + # Comment case # # @param case_id [String] Case's UUID or key - # @param body [CaseEmptyRequest] Archive case payload + # @param body [CaseCommentRequest] Case comment payload # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def archive_case_with_http_info(case_id, body, opts = {}) + # @return [Array<(TimelineResponse, Integer, Hash)>] TimelineResponse data, response status code and response headers + def comment_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.archive_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.comment_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.archive_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.comment_case" 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 CaseManagementAPI.archive_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.comment_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/archive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/comment'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -223,13 +216,13 @@ def archive_case_with_http_info(case_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' + return_type = opts[:debug_return_type] || 'TimelineResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :archive_case, + :operation => :comment_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -241,42 +234,37 @@ def archive_case_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#archive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#comment_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Assign case. + # Create a case. # - # @see #assign_case_with_http_info - def assign_case(case_id, body, opts = {}) - data, _status_code, _headers = assign_case_with_http_info(case_id, body, opts) + # @see #create_case_with_http_info + def create_case(body, opts = {}) + data, _status_code, _headers = create_case_with_http_info(body, opts) data end - # Assign case. + # Create a case. # - # Assign case to a user + # Create a Case # - # @param case_id [String] Case's UUID or key - # @param body [CaseAssignRequest] Assign case payload + # @param body [CaseCreateRequest] Case payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def assign_case_with_http_info(case_id, body, opts = {}) + def create_case_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.assign_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.assign_case" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case ...' 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 CaseManagementAPI.assign_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/assign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases' # query parameters query_params = opts[:query_params] || {} @@ -301,7 +289,7 @@ def assign_case_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :assign_case, + :operation => :create_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -313,43 +301,48 @@ def assign_case_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#assign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Bulk update cases. + # Create Jira issue for case. # - # @see #bulk_update_cases_with_http_info - def bulk_update_cases(body, opts = {}) - bulk_update_cases_with_http_info(body, opts) + # @see #create_case_jira_issue_with_http_info + def create_case_jira_issue(case_id, body, opts = {}) + create_case_jira_issue_with_http_info(case_id, body, opts) nil end - # Bulk update cases. + # Create Jira issue for case. # - # Applies a single action (such as changing priority, status, assignment, or archiving) to multiple cases at once. The list of case IDs and the action type with its payload are specified in the request body. + # Create a new Jira issue and link it to a case # - # @param body [CaseBulkUpdateRequest] Case bulk update request payload. + # @param case_id [String] Case's UUID or key + # @param body [JiraIssueCreateRequest] Jira issue creation request # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def bulk_update_cases_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.bulk_update_cases".to_sym] + def create_case_jira_issue_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_case_jira_issue".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.bulk_update_cases") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_jira_issue") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.bulk_update_cases")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_jira_issue")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.bulk_update_cases ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_jira_issue ...' + end + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_jira_issue" 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 CaseManagementAPI.bulk_update_cases" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_jira_issue" end # resource path - local_var_path = '/api/v2/cases/bulk' + local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -374,7 +367,7 @@ def bulk_update_cases_with_http_info(body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :bulk_update_cases, + :operation => :create_case_jira_issue, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -386,42 +379,48 @@ def bulk_update_cases_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#bulk_update_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Comment case. + # Create investigation notebook for case. # - # @see #comment_case_with_http_info - def comment_case(case_id, body, opts = {}) - data, _status_code, _headers = comment_case_with_http_info(case_id, body, opts) - data + # @see #create_case_notebook_with_http_info + def create_case_notebook(case_id, body, opts = {}) + create_case_notebook_with_http_info(case_id, body, opts) + nil end - # Comment case. + # Create investigation notebook for case. # - # Comment case + # Create a new investigation notebook and link it to a case # # @param case_id [String] Case's UUID or key - # @param body [CaseCommentRequest] Case comment payload + # @param body [NotebookCreateRequest] Notebook creation request # @param opts [Hash] the optional parameters - # @return [Array<(TimelineResponse, Integer, Hash)>] TimelineResponse data, response status code and response headers - def comment_case_with_http_info(case_id, body, opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def create_case_notebook_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_case_notebook".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_notebook") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_notebook")) + end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.comment_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_notebook ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.comment_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_notebook" 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 CaseManagementAPI.comment_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_notebook" end # resource path - local_var_path = '/api/v2/cases/{case_id}/comment'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/relationships/notebook'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -429,7 +428,7 @@ def comment_case_with_http_info(case_id, body, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -440,13 +439,13 @@ def comment_case_with_http_info(case_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'TimelineResponse' + return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :comment_case, + :operation => :create_case_notebook, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -458,67 +457,73 @@ def comment_case_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#comment_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_notebook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Count cases. + # Create ServiceNow ticket for case. # - # @see #count_cases_with_http_info - def count_cases(opts = {}) - data, _status_code, _headers = count_cases_with_http_info(opts) - data + # @see #create_case_service_now_ticket_with_http_info + def create_case_service_now_ticket(case_id, body, opts = {}) + create_case_service_now_ticket_with_http_info(case_id, body, opts) + nil end - # Count cases. + # Create ServiceNow ticket for case. # - # Returns case counts, optionally grouped by one or more fields (for example, status, priority). Supports a query filter to narrow the scope. + # Create a new ServiceNow incident ticket and link it to a case # + # @param case_id [String] Case's UUID or key + # @param body [ServiceNowTicketCreateRequest] ServiceNow ticket creation request # @param opts [Hash] the optional parameters - # @option opts [String] :query_filter Filter query for cases. - # @option opts [String] :group_bys Comma-separated fields to group by. - # @option opts [Integer] :limit Maximum facet values to return. - # @return [Array<(CaseCountResponse, Integer, Hash)>] CaseCountResponse data, response status code and response headers - def count_cases_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.count_cases".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def create_case_service_now_ticket_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_case_service_now_ticket".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.count_cases") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_service_now_ticket") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.count_cases")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_service_now_ticket")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.count_cases ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_service_now_ticket ...' + end + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_service_now_ticket" + 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 CaseManagementAPI.create_case_service_now_ticket" end # resource path - local_var_path = '/api/v2/cases/count' + local_var_path = '/api/v2/cases/{case_id}/relationships/servicenow_tickets'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'query_filter'] = opts[:'query_filter'] if !opts[:'query_filter'].nil? - query_params[:'group_bys'] = opts[:'group_bys'] if !opts[:'group_bys'].nil? - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + # 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] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseCountResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :count_cases, + :operation => :create_case_service_now_ticket, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -528,39 +533,39 @@ def count_cases_with_http_info(opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#count_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_service_now_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a case. + # Create a project. # - # @see #create_case_with_http_info - def create_case(body, opts = {}) - data, _status_code, _headers = create_case_with_http_info(body, opts) + # @see #create_project_with_http_info + def create_project(body, opts = {}) + data, _status_code, _headers = create_project_with_http_info(body, opts) data end - # Create a case. + # Create a project. # - # Create a Case + # Create a project. # - # @param body [CaseCreateRequest] Case payload + # @param body [ProjectCreateRequest] Project payload. # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def create_case_with_http_info(body, opts = {}) + # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers + def create_project_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project ...' 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 CaseManagementAPI.create_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_project" end # resource path - local_var_path = '/api/v2/cases' + local_var_path = '/api/v2/cases/projects' # query parameters query_params = opts[:query_params] || {} @@ -579,13 +584,13 @@ def create_case_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' + return_type = opts[:debug_return_type] || 'ProjectResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case, + :operation => :create_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -597,48 +602,42 @@ def create_case_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create an automation rule. + # Create a notification rule. # - # @see #create_case_automation_rule_with_http_info - def create_case_automation_rule(project_id, body, opts = {}) - data, _status_code, _headers = create_case_automation_rule_with_http_info(project_id, body, opts) + # @see #create_project_notification_rule_with_http_info + def create_project_notification_rule(project_id, body, opts = {}) + data, _status_code, _headers = create_project_notification_rule_with_http_info(project_id, body, opts) data end - # Create an automation rule. + # Create a notification rule. # - # Creates an automation rule for a project. The rule defines a trigger event (for example, case created, status transitioned) and an action to execute. + # Create a notification rule for a project. # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param body [AutomationRuleCreateRequest] Automation rule payload. + # @param project_id [String] Project UUID + # @param body [CaseNotificationRuleCreateRequest] Notification rule payload # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRuleResponse, Integer, Hash)>] AutomationRuleResponse data, response status code and response headers - def create_case_automation_rule_with_http_info(project_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_automation_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_automation_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_automation_rule")) - end + # @return [Array<(CaseNotificationRuleResponse, Integer, Hash)>] CaseNotificationRuleResponse data, response status code and response headers + def create_project_notification_rule_with_http_info(project_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_automation_rule ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project_notification_rule ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.create_case_automation_rule" + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.create_project_notification_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 CaseManagementAPI.create_case_automation_rule" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_project_notification_rule" end # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -657,13 +656,13 @@ def create_case_automation_rule_with_http_info(project_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'AutomationRuleResponse' + return_type = opts[:debug_return_type] || 'CaseNotificationRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_automation_rule, + :operation => :create_project_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -675,48 +674,42 @@ def create_case_automation_rule_with_http_info(project_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create Jira issue for case. + # Delete case comment. # - # @see #create_case_jira_issue_with_http_info - def create_case_jira_issue(case_id, body, opts = {}) - create_case_jira_issue_with_http_info(case_id, body, opts) + # @see #delete_case_comment_with_http_info + def delete_case_comment(case_id, cell_id, opts = {}) + delete_case_comment_with_http_info(case_id, cell_id, opts) nil end - # Create Jira issue for case. + # Delete case comment. # - # Create a new Jira issue and link it to a case + # Delete case comment # # @param case_id [String] Case's UUID or key - # @param body [JiraIssueCreateRequest] Jira issue creation request + # @param cell_id [String] Timeline cell's UUID # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def create_case_jira_issue_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_jira_issue".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_jira_issue") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_jira_issue")) - end + def delete_case_comment_with_http_info(case_id, cell_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_jira_issue ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_comment ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_jira_issue" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.delete_case_comment" 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 CaseManagementAPI.create_case_jira_issue" + # verify the required parameter 'cell_id' is set + if @api_client.config.client_side_validation && cell_id.nil? + fail ArgumentError, "Missing the required parameter 'cell_id' when calling CaseManagementAPI.delete_case_comment" end # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/comment/{cell_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{cell_id}', CGI.escape(cell_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -725,23 +718,21 @@ def create_case_jira_issue_with_http_info(case_id, body, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # 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) + post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :create_case_jira_issue, + :operation => :delete_case_comment, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -751,45 +742,44 @@ def create_case_jira_issue_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a case link. + # Delete custom attribute from case. # - # @see #create_case_link_with_http_info - def create_case_link(body, opts = {}) - data, _status_code, _headers = create_case_link_with_http_info(body, opts) + # @see #delete_case_custom_attribute_with_http_info + def delete_case_custom_attribute(case_id, custom_attribute_key, opts = {}) + data, _status_code, _headers = delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts) data end - # Create a case link. + # Delete custom attribute from case. # - # Creates a directional link between two cases (for example, case A blocks case B). The parent and child cases and their relationship type must be specified. + # Delete custom attribute from case # - # @param body [CaseLinkCreateRequest] Case link create request. + # @param case_id [String] Case's UUID or key + # @param custom_attribute_key [String] Case Custom attribute's key # @param opts [Hash] the optional parameters - # @return [Array<(CaseLinkResponse, Integer, Hash)>] CaseLinkResponse data, response status code and response headers - def create_case_link_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_link".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_link") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_link")) - end + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_link ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_custom_attribute ...' 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 CaseManagementAPI.create_case_link" + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.delete_case_custom_attribute" + end + # verify the required parameter 'custom_attribute_key' is set + if @api_client.config.client_side_validation && custom_attribute_key.nil? + fail ArgumentError, "Missing the required parameter 'custom_attribute_key' when calling CaseManagementAPI.delete_case_custom_attribute" end # resource path - local_var_path = '/api/v2/cases/link' + local_var_path = '/api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_key}', CGI.escape(custom_attribute_key.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -798,23 +788,21 @@ def create_case_link_with_http_info(body, opts = {}) 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) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CaseLinkResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_link, + :operation => :delete_case_custom_attribute, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -824,50 +812,39 @@ def create_case_link_with_http_info(body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_custom_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create investigation notebook for case. + # Remove a project. # - # @see #create_case_notebook_with_http_info - def create_case_notebook(case_id, body, opts = {}) - create_case_notebook_with_http_info(case_id, body, opts) + # @see #delete_project_with_http_info + def delete_project(project_id, opts = {}) + delete_project_with_http_info(project_id, opts) nil end - # Create investigation notebook for case. + # Remove a project. # - # Create a new investigation notebook and link it to a case + # Remove a project using the project's `id`. # - # @param case_id [String] Case's UUID or key - # @param body [NotebookCreateRequest] Notebook creation request + # @param project_id [String] Project UUID. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def create_case_notebook_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_notebook".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_notebook") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_notebook")) - end + def delete_project_with_http_info(project_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_notebook ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_notebook" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project ...' 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 CaseManagementAPI.create_case_notebook" + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project" end # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/notebook'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -876,14 +853,12 @@ def create_case_notebook_with_http_info(case_id, body, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # 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) + post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] @@ -892,7 +867,7 @@ def create_case_notebook_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_notebook, + :operation => :delete_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -902,50 +877,44 @@ def create_case_notebook_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_notebook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create ServiceNow ticket for case. + # Delete a notification rule. # - # @see #create_case_service_now_ticket_with_http_info - def create_case_service_now_ticket(case_id, body, opts = {}) - create_case_service_now_ticket_with_http_info(case_id, body, opts) + # @see #delete_project_notification_rule_with_http_info + def delete_project_notification_rule(project_id, notification_rule_id, opts = {}) + delete_project_notification_rule_with_http_info(project_id, notification_rule_id, opts) nil end - # Create ServiceNow ticket for case. + # Delete a notification rule. # - # Create a new ServiceNow incident ticket and link it to a case + # Delete a notification rule using the notification rule's `id`. # - # @param case_id [String] Case's UUID or key - # @param body [ServiceNowTicketCreateRequest] ServiceNow ticket creation request + # @param project_id [String] Project UUID + # @param notification_rule_id [String] Notification Rule UUID # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def create_case_service_now_ticket_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_service_now_ticket".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_service_now_ticket") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_service_now_ticket")) - end + def delete_project_notification_rule_with_http_info(project_id, notification_rule_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_service_now_ticket ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project_notification_rule ...' end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_service_now_ticket" + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project_notification_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 CaseManagementAPI.create_case_service_now_ticket" + # verify the required parameter 'notification_rule_id' is set + if @api_client.config.client_side_validation && notification_rule_id.nil? + fail ArgumentError, "Missing the required parameter 'notification_rule_id' when calling CaseManagementAPI.delete_project_notification_rule" end # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/servicenow_tickets'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules/{notification_rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{notification_rule_id}', CGI.escape(notification_rule_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -954,14 +923,12 @@ def create_case_service_now_ticket_with_http_info(case_id, body, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # 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) + post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] @@ -970,7 +937,7 @@ def create_case_service_now_ticket_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_service_now_ticket, + :operation => :delete_project_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -980,45 +947,39 @@ def create_case_service_now_ticket_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_service_now_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a case view. + # Get the details of a case. # - # @see #create_case_view_with_http_info - def create_case_view(body, opts = {}) - data, _status_code, _headers = create_case_view_with_http_info(body, opts) + # @see #get_case_with_http_info + def get_case(case_id, opts = {}) + data, _status_code, _headers = get_case_with_http_info(case_id, opts) data end - # Create a case view. + # Get the details of a case. # - # Creates a new saved case view with a name, filter query, and associated project. Optionally, a notification rule can be linked to the view. + # Get the details of case by `case_id` # - # @param body [CaseViewCreateRequest] Case view payload. + # @param case_id [String] Case's UUID or key # @param opts [Hash] the optional parameters - # @return [Array<(CaseViewResponse, Integer, Hash)>] CaseViewResponse data, response status code and response headers - def create_case_view_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_view".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_view") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_view")) - end + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def get_case_with_http_info(case_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_view ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case ...' 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 CaseManagementAPI.create_case_view" + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.get_case" end # resource path - local_var_path = '/api/v2/cases/views' + local_var_path = '/api/v2/cases/{case_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1027,23 +988,21 @@ def create_case_view_with_http_info(body, opts = {}) 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) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CaseViewResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_view, + :operation => :get_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1053,2428 +1012,39 @@ def create_case_view_with_http_info(body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#get_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a maintenance window. + # Get the details of a project. # - # @see #create_maintenance_window_with_http_info - def create_maintenance_window(body, opts = {}) - data, _status_code, _headers = create_maintenance_window_with_http_info(body, opts) + # @see #get_project_with_http_info + def get_project(project_id, opts = {}) + data, _status_code, _headers = get_project_with_http_info(project_id, opts) data end - # Create a maintenance window. + # Get the details of a project. # - # Creates a maintenance window for event management cases with a name, case filter query, and time range (start and end). + # Get the details of a project by `project_id`. # - # @param body [MaintenanceWindowCreateRequest] Maintenance window payload. + # @param project_id [String] Project UUID. # @param opts [Hash] the optional parameters - # @return [Array<(MaintenanceWindowResponse, Integer, Hash)>] MaintenanceWindowResponse data, response status code and response headers - def create_maintenance_window_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_maintenance_window".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_maintenance_window") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_maintenance_window")) - end + # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers + def get_project_with_http_info(project_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_maintenance_window ...' - 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 CaseManagementAPI.create_maintenance_window" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project ...' end - # resource path - local_var_path = '/api/v2/maintenance_windows' - - # 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] || 'MaintenanceWindowResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_maintenance_window, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_maintenance_window\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Create a project. - # - # @see #create_project_with_http_info - def create_project(body, opts = {}) - data, _status_code, _headers = create_project_with_http_info(body, opts) - data - end - - # Create a project. - # - # Create a project. - # - # @param body [ProjectCreateRequest] Project payload. - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers - def create_project_with_http_info(body, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project ...' - 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 CaseManagementAPI.create_project" - end - # resource path - local_var_path = '/api/v2/cases/projects' - - # 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] || 'ProjectResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Create a notification rule. - # - # @see #create_project_notification_rule_with_http_info - def create_project_notification_rule(project_id, body, opts = {}) - data, _status_code, _headers = create_project_notification_rule_with_http_info(project_id, body, opts) - data - end - - # Create a notification rule. - # - # Create a notification rule for a project. - # - # @param project_id [String] Project UUID - # @param body [CaseNotificationRuleCreateRequest] Notification rule payload - # @param opts [Hash] the optional parameters - # @return [Array<(CaseNotificationRuleResponse, Integer, Hash)>] CaseNotificationRuleResponse data, response status code and response headers - def create_project_notification_rule_with_http_info(project_id, body, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project_notification_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.create_project_notification_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 CaseManagementAPI.create_project_notification_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # 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] || 'CaseNotificationRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_project_notification_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete an automation rule. - # - # @see #delete_case_automation_rule_with_http_info - def delete_case_automation_rule(project_id, rule_id, opts = {}) - delete_case_automation_rule_with_http_info(project_id, rule_id, opts) - nil - end - - # Delete an automation rule. - # - # Permanently deletes an automation rule from a project. - # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param rule_id [String] The UUID of the automation rule. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_case_automation_rule_with_http_info(project_id, rule_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_case_automation_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_case_automation_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_case_automation_rule")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_automation_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_case_automation_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 CaseManagementAPI.delete_case_automation_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules/{rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - - # 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] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_case_automation_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete case comment. - # - # @see #delete_case_comment_with_http_info - def delete_case_comment(case_id, cell_id, opts = {}) - delete_case_comment_with_http_info(case_id, cell_id, opts) - nil - end - - # Delete case comment. - # - # Delete case comment - # - # @param case_id [String] Case's UUID or key - # @param cell_id [String] The UUID of the timeline cell (comment) to update. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_case_comment_with_http_info(case_id, cell_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_comment ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.delete_case_comment" - end - # verify the required parameter 'cell_id' is set - if @api_client.config.client_side_validation && cell_id.nil? - fail ArgumentError, "Missing the required parameter 'cell_id' when calling CaseManagementAPI.delete_case_comment" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/comment/{cell_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{cell_id}', CGI.escape(cell_id.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - - # 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] || [:apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :delete_case_comment, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete custom attribute from case. - # - # @see #delete_case_custom_attribute_with_http_info - def delete_case_custom_attribute(case_id, custom_attribute_key, opts = {}) - data, _status_code, _headers = delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts) - data - end - - # Delete custom attribute from case. - # - # Delete custom attribute from case - # - # @param case_id [String] Case's UUID or key - # @param custom_attribute_key [String] Case Custom attribute's key - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_custom_attribute ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.delete_case_custom_attribute" - end - # verify the required parameter 'custom_attribute_key' is set - if @api_client.config.client_side_validation && custom_attribute_key.nil? - fail ArgumentError, "Missing the required parameter 'custom_attribute_key' when calling CaseManagementAPI.delete_case_custom_attribute" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_key}', CGI.escape(custom_attribute_key.to_s).gsub('%2F', '/')) - - # 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] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_case_custom_attribute, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_custom_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a case link. - # - # @see #delete_case_link_with_http_info - def delete_case_link(link_id, opts = {}) - delete_case_link_with_http_info(link_id, opts) - nil - end - - # Delete a case link. - # - # Deletes an existing link between cases by link ID. - # - # @param link_id [String] The UUID of the case link. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_case_link_with_http_info(link_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_case_link".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_case_link") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_case_link")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_link ...' - end - # verify the required parameter 'link_id' is set - if @api_client.config.client_side_validation && link_id.nil? - fail ArgumentError, "Missing the required parameter 'link_id' when calling CaseManagementAPI.delete_case_link" - end - # resource path - local_var_path = '/api/v2/cases/link/{link_id}'.sub('{link_id}', CGI.escape(link_id.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - - # 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] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_case_link, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a case view. - # - # @see #delete_case_view_with_http_info - def delete_case_view(view_id, opts = {}) - delete_case_view_with_http_info(view_id, opts) - nil - end - - # Delete a case view. - # - # Permanently deletes a saved case view. - # - # @param view_id [String] The UUID of the case view. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_case_view_with_http_info(view_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_case_view".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_case_view") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_case_view")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_view ...' - end - # verify the required parameter 'view_id' is set - if @api_client.config.client_side_validation && view_id.nil? - fail ArgumentError, "Missing the required parameter 'view_id' when calling CaseManagementAPI.delete_case_view" - end - # resource path - local_var_path = '/api/v2/cases/views/{view_id}'.sub('{view_id}', CGI.escape(view_id.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - - # 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] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_case_view, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a maintenance window. - # - # @see #delete_maintenance_window_with_http_info - def delete_maintenance_window(maintenance_window_id, opts = {}) - delete_maintenance_window_with_http_info(maintenance_window_id, opts) - nil - end - - # Delete a maintenance window. - # - # Permanently deletes a maintenance window. - # - # @param maintenance_window_id [String] The UUID of the maintenance window. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_maintenance_window_with_http_info(maintenance_window_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_maintenance_window".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_maintenance_window") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_maintenance_window")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_maintenance_window ...' - end - # verify the required parameter 'maintenance_window_id' is set - if @api_client.config.client_side_validation && maintenance_window_id.nil? - fail ArgumentError, "Missing the required parameter 'maintenance_window_id' when calling CaseManagementAPI.delete_maintenance_window" - end - # resource path - local_var_path = '/api/v2/maintenance_windows/{maintenance_window_id}'.sub('{maintenance_window_id}', CGI.escape(maintenance_window_id.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - - # 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] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_maintenance_window, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_maintenance_window\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Remove a project. - # - # @see #delete_project_with_http_info - def delete_project(project_id, opts = {}) - delete_project_with_http_info(project_id, opts) - nil - end - - # Remove a project. - # - # Remove a project using the project's `id`. - # - # @param project_id [String] Project UUID. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_project_with_http_info(project_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - - # 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] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a notification rule. - # - # @see #delete_project_notification_rule_with_http_info - def delete_project_notification_rule(project_id, notification_rule_id, opts = {}) - delete_project_notification_rule_with_http_info(project_id, notification_rule_id, opts) - nil - end - - # Delete a notification rule. - # - # Delete a notification rule using the notification rule's `id`. - # - # @param project_id [String] Project UUID - # @param notification_rule_id [String] Notification Rule UUID - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_project_notification_rule_with_http_info(project_id, notification_rule_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project_notification_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project_notification_rule" - end - # verify the required parameter 'notification_rule_id' is set - if @api_client.config.client_side_validation && notification_rule_id.nil? - fail ArgumentError, "Missing the required parameter 'notification_rule_id' when calling CaseManagementAPI.delete_project_notification_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules/{notification_rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{notification_rule_id}', CGI.escape(notification_rule_id.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - - # 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] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_project_notification_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Disable an automation rule. - # - # @see #disable_case_automation_rule_with_http_info - def disable_case_automation_rule(project_id, rule_id, opts = {}) - data, _status_code, _headers = disable_case_automation_rule_with_http_info(project_id, rule_id, opts) - data - end - - # Disable an automation rule. - # - # Disables an automation rule so it no longer triggers on case events. The rule configuration is preserved. - # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param rule_id [String] The UUID of the automation rule. - # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRuleResponse, Integer, Hash)>] AutomationRuleResponse data, response status code and response headers - def disable_case_automation_rule_with_http_info(project_id, rule_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.disable_case_automation_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.disable_case_automation_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.disable_case_automation_rule")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.disable_case_automation_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.disable_case_automation_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 CaseManagementAPI.disable_case_automation_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules/{rule_id}/disable'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) - - # 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] || 'AutomationRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :disable_case_automation_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#disable_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Enable an automation rule. - # - # @see #enable_case_automation_rule_with_http_info - def enable_case_automation_rule(project_id, rule_id, opts = {}) - data, _status_code, _headers = enable_case_automation_rule_with_http_info(project_id, rule_id, opts) - data - end - - # Enable an automation rule. - # - # Enables a previously disabled automation rule so it triggers on matching case events. - # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param rule_id [String] The UUID of the automation rule. - # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRuleResponse, Integer, Hash)>] AutomationRuleResponse data, response status code and response headers - def enable_case_automation_rule_with_http_info(project_id, rule_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.enable_case_automation_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.enable_case_automation_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.enable_case_automation_rule")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.enable_case_automation_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.enable_case_automation_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 CaseManagementAPI.enable_case_automation_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules/{rule_id}/enable'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) - - # 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] || 'AutomationRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :enable_case_automation_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#enable_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Favorite a project. - # - # @see #favorite_case_project_with_http_info - def favorite_case_project(project_id, opts = {}) - favorite_case_project_with_http_info(project_id, opts) - nil - end - - # Favorite a project. - # - # Marks a case project as a favorite for the current authenticated user. - # - # @param project_id [String] Project UUID. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def favorite_case_project_with_http_info(project_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.favorite_case_project".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.favorite_case_project") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.favorite_case_project")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.favorite_case_project ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.favorite_case_project" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/favorites'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - - # 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] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :favorite_case_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#favorite_case_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get the details of a case. - # - # @see #get_case_with_http_info - def get_case(case_id, opts = {}) - data, _status_code, _headers = get_case_with_http_info(case_id, opts) - data - end - - # Get the details of a case. - # - # Get the details of case by `case_id` - # - # @param case_id [String] Case's UUID or key - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def get_case_with_http_info(case_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.get_case" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # 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] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_case, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get an automation rule. - # - # @see #get_case_automation_rule_with_http_info - def get_case_automation_rule(project_id, rule_id, opts = {}) - data, _status_code, _headers = get_case_automation_rule_with_http_info(project_id, rule_id, opts) - data - end - - # Get an automation rule. - # - # Returns a single automation rule identified by its UUID, including its trigger, action, and current state (enabled/disabled). - # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param rule_id [String] The UUID of the automation rule. - # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRuleResponse, Integer, Hash)>] AutomationRuleResponse data, response status code and response headers - def get_case_automation_rule_with_http_info(project_id, rule_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_case_automation_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_case_automation_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_case_automation_rule")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case_automation_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_case_automation_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 CaseManagementAPI.get_case_automation_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules/{rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) - - # 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] || 'AutomationRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_case_automation_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a case view. - # - # @see #get_case_view_with_http_info - def get_case_view(view_id, opts = {}) - data, _status_code, _headers = get_case_view_with_http_info(view_id, opts) - data - end - - # Get a case view. - # - # Returns a single saved case view identified by its UUID, including its query, associated project, and timestamps. - # - # @param view_id [String] The UUID of the case view. - # @param opts [Hash] the optional parameters - # @return [Array<(CaseViewResponse, Integer, Hash)>] CaseViewResponse data, response status code and response headers - def get_case_view_with_http_info(view_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_case_view".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_case_view") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_case_view")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case_view ...' - end - # verify the required parameter 'view_id' is set - if @api_client.config.client_side_validation && view_id.nil? - fail ArgumentError, "Missing the required parameter 'view_id' when calling CaseManagementAPI.get_case_view" - end - # resource path - local_var_path = '/api/v2/cases/views/{view_id}'.sub('{view_id}', CGI.escape(view_id.to_s).gsub('%2F', '/')) - - # 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] || 'CaseViewResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_case_view, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_case_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get the details of a project. - # - # @see #get_project_with_http_info - def get_project(project_id, opts = {}) - data, _status_code, _headers = get_project_with_http_info(project_id, opts) - data - end - - # Get the details of a project. - # - # Get the details of a project by `project_id`. - # - # @param project_id [String] Project UUID. - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers - def get_project_with_http_info(project_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # 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] || 'ProjectResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get notification rules. - # - # @see #get_project_notification_rules_with_http_info - def get_project_notification_rules(project_id, opts = {}) - data, _status_code, _headers = get_project_notification_rules_with_http_info(project_id, opts) - data - end - - # Get notification rules. - # - # Get all notification rules for a project. - # - # @param project_id [String] Project UUID - # @param opts [Hash] the optional parameters - # @return [Array<(CaseNotificationRulesResponse, Integer, Hash)>] CaseNotificationRulesResponse data, response status code and response headers - def get_project_notification_rules_with_http_info(project_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project_notification_rules ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project_notification_rules" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # 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] || 'CaseNotificationRulesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_project_notification_rules, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_project_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get all projects. - # - # @see #get_projects_with_http_info - def get_projects(opts = {}) - data, _status_code, _headers = get_projects_with_http_info(opts) - data - end - - # Get all projects. - # - # Get all projects. - # - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectsResponse, Integer, Hash)>] ProjectsResponse data, response status code and response headers - def get_projects_with_http_info(opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_projects ...' - end - # resource path - local_var_path = '/api/v2/cases/projects' - - # 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] || 'ProjectsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_projects, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Link incident to case. - # - # @see #link_incident_with_http_info - def link_incident(case_id, body, opts = {}) - data, _status_code, _headers = link_incident_with_http_info(case_id, body, opts) - data - end - - # Link incident to case. - # - # Link an incident to a case - # - # @param case_id [String] Case's UUID or key - # @param body [RelationshipToIncidentRequest] Incident link request - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def link_incident_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.link_incident".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.link_incident") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.link_incident")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.link_incident ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.link_incident" - 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 CaseManagementAPI.link_incident" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/incidents'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # 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] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :link_incident, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#link_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Link existing Jira issue to case. - # - # @see #link_jira_issue_to_case_with_http_info - def link_jira_issue_to_case(case_id, body, opts = {}) - link_jira_issue_to_case_with_http_info(case_id, body, opts) - nil - end - - # Link existing Jira issue to case. - # - # Link an existing Jira issue to a case - # - # @param case_id [String] Case's UUID or key - # @param body [JiraIssueLinkRequest] Jira issue link request - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def link_jira_issue_to_case_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.link_jira_issue_to_case".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.link_jira_issue_to_case") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.link_jira_issue_to_case")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.link_jira_issue_to_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.link_jira_issue_to_case" - 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 CaseManagementAPI.link_jira_issue_to_case" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - # 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] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :link_jira_issue_to_case, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#link_jira_issue_to_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List automation rules. - # - # @see #list_case_automation_rules_with_http_info - def list_case_automation_rules(project_id, opts = {}) - data, _status_code, _headers = list_case_automation_rules_with_http_info(project_id, opts) - data - end - - # List automation rules. - # - # Returns all automation rules configured for a project. Automation rules allow automatic actions to be triggered by case events like creation, status transitions, or attribute changes. - # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRulesResponse, Integer, Hash)>] AutomationRulesResponse data, response status code and response headers - def list_case_automation_rules_with_http_info(project_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_case_automation_rules".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_case_automation_rules") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_case_automation_rules")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_case_automation_rules ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.list_case_automation_rules" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # 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] || 'AutomationRulesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_case_automation_rules, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_case_automation_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List case links. - # - # @see #list_case_links_with_http_info - def list_case_links(entity_type, entity_id, opts = {}) - data, _status_code, _headers = list_case_links_with_http_info(entity_type, entity_id, opts) - data - end - - # List case links. - # - # Returns all links associated with a case. Links define relationships (for example, BLOCKS) between cases. Requires entity_type and entity_id query parameters. - # - # @param entity_type [String] The entity type to look up links for. Use `CASE` to find links for a specific case. - # @param entity_id [String] The UUID of the entity to look up links for. - # @param opts [Hash] the optional parameters - # @option opts [String] :relationship Optional filter to only return links of a specific relationship type (for example, `BLOCKS` or `CAUSES`). - # @return [Array<(CaseLinksResponse, Integer, Hash)>] CaseLinksResponse data, response status code and response headers - def list_case_links_with_http_info(entity_type, entity_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_case_links".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_case_links") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_case_links")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_case_links ...' - end - # verify the required parameter 'entity_type' is set - if @api_client.config.client_side_validation && entity_type.nil? - fail ArgumentError, "Missing the required parameter 'entity_type' when calling CaseManagementAPI.list_case_links" - end - # verify the required parameter 'entity_id' is set - if @api_client.config.client_side_validation && entity_id.nil? - fail ArgumentError, "Missing the required parameter 'entity_id' when calling CaseManagementAPI.list_case_links" - end - # resource path - local_var_path = '/api/v2/cases/link' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'entity_type'] = entity_type - query_params[:'entity_id'] = entity_id - query_params[:'relationship'] = opts[:'relationship'] if !opts[:'relationship'].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] || 'CaseLinksResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_case_links, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_case_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get case timeline. - # - # @see #list_case_timeline_with_http_info - def list_case_timeline(case_id, opts = {}) - data, _status_code, _headers = list_case_timeline_with_http_info(case_id, opts) - data - end - - # Get case timeline. - # - # Returns the timeline of events for a case, including comments, status changes, and other activity. Supports pagination and sort order. - # - # @param case_id [String] Case's UUID or key - # @param opts [Hash] the optional parameters - # @option opts [Integer] :page_size Number of timeline cells to return per page. - # @option opts [Integer] :page_number Zero-based page number for pagination. - # @option opts [Boolean] :sort_ascending If `true`, returns timeline cells in chronological order (oldest first). Defaults to `false` (newest first). - # @return [Array<(TimelineResponse, Integer, Hash)>] TimelineResponse data, response status code and response headers - def list_case_timeline_with_http_info(case_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_case_timeline".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_case_timeline") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_case_timeline")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_case_timeline ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.list_case_timeline" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/timelines'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # 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? - query_params[:'sort[ascending]'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].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] || 'TimelineResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_case_timeline, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_case_timeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List case views. - # - # @see #list_case_views_with_http_info - def list_case_views(project_id, opts = {}) - data, _status_code, _headers = list_case_views_with_http_info(project_id, opts) - data - end - - # List case views. - # - # Returns all saved case views for a given project. Views are saved search queries that allow quick access to filtered lists of cases. - # - # @param project_id [String] Filter views by project identifier. - # @param opts [Hash] the optional parameters - # @return [Array<(CaseViewsResponse, Integer, Hash)>] CaseViewsResponse data, response status code and response headers - def list_case_views_with_http_info(project_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_case_views".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_case_views") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_case_views")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_case_views ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.list_case_views" - end - # resource path - local_var_path = '/api/v2/cases/views' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'project_id'] = project_id - - # 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] || 'CaseViewsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_case_views, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_case_views\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List case watchers. - # - # @see #list_case_watchers_with_http_info - def list_case_watchers(case_id, opts = {}) - data, _status_code, _headers = list_case_watchers_with_http_info(case_id, opts) - data - end - - # List case watchers. - # - # Returns the list of users who are watching a case. Watchers receive notifications about updates to the case. - # - # @param case_id [String] Case's UUID or key - # @param opts [Hash] the optional parameters - # @return [Array<(CaseWatchersResponse, Integer, Hash)>] CaseWatchersResponse data, response status code and response headers - def list_case_watchers_with_http_info(case_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_case_watchers".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_case_watchers") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_case_watchers")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_case_watchers ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.list_case_watchers" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/watchers'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # 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] || 'CaseWatchersResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_case_watchers, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_case_watchers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List maintenance windows. - # - # @see #list_maintenance_windows_with_http_info - def list_maintenance_windows(opts = {}) - data, _status_code, _headers = list_maintenance_windows_with_http_info(opts) - data - end - - # List maintenance windows. - # - # Returns all configured maintenance windows for event management cases. Maintenance windows define time periods during which case notifications and automation rules are suppressed for cases matching a given query. - # - # @param opts [Hash] the optional parameters - # @return [Array<(MaintenanceWindowsResponse, Integer, Hash)>] MaintenanceWindowsResponse data, response status code and response headers - def list_maintenance_windows_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_maintenance_windows".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_maintenance_windows") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_maintenance_windows")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_maintenance_windows ...' - end - # resource path - local_var_path = '/api/v2/maintenance_windows' - - # 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] || 'MaintenanceWindowsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_maintenance_windows, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_maintenance_windows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List project favorites. - # - # @see #list_user_case_project_favorites_with_http_info - def list_user_case_project_favorites(opts = {}) - data, _status_code, _headers = list_user_case_project_favorites_with_http_info(opts) - data - end - - # List project favorites. - # - # Returns the list of case projects that the current authenticated user has marked as favorites. - # - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectFavoritesResponse, Integer, Hash)>] ProjectFavoritesResponse data, response status code and response headers - def list_user_case_project_favorites_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_user_case_project_favorites".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_user_case_project_favorites") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_user_case_project_favorites")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_user_case_project_favorites ...' - end - # resource path - local_var_path = '/api/v2/cases/projects/favorites' - - # 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] || 'ProjectFavoritesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_user_case_project_favorites, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_user_case_project_favorites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update case project. - # - # @see #move_case_to_project_with_http_info - def move_case_to_project(case_id, body, opts = {}) - data, _status_code, _headers = move_case_to_project_with_http_info(case_id, body, opts) - data - end - - # Update case project. - # - # Update the project associated with a case - # - # @param case_id [String] Case's UUID or key - # @param body [ProjectRelationship] Project update request - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def move_case_to_project_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.move_case_to_project".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.move_case_to_project") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.move_case_to_project")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.move_case_to_project ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.move_case_to_project" - 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 CaseManagementAPI.move_case_to_project" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/project'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # 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] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :move_case_to_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#move_case_to_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Remove insights from a case. - # - # @see #remove_case_insights_with_http_info - def remove_case_insights(case_id, body, opts = {}) - data, _status_code, _headers = remove_case_insights_with_http_info(case_id, body, opts) - data - end - - # Remove insights from a case. - # - # Removes one or more previously added insights from a case by specifying their type and resource identifier in the request body. - # - # @param case_id [String] Case's UUID or key - # @param body [CaseInsightsRequest] Case insights request. - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def remove_case_insights_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.remove_case_insights".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.remove_case_insights") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.remove_case_insights")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.remove_case_insights ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.remove_case_insights" - 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 CaseManagementAPI.remove_case_insights" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/insights'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # 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] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :remove_case_insights, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#remove_case_insights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Search cases. - # - # @see #search_cases_with_http_info - def search_cases(opts = {}) - data, _status_code, _headers = search_cases_with_http_info(opts) - data - end - - # Search cases. - # - # Search cases. - # - # @param opts [Hash] the optional parameters - # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. - # @option opts [Integer] :page_number Specific page number to return. - # @option opts [CaseSortableField] :sort_field Specify which field to sort - # @option opts [String] :filter Search query - # @option opts [Boolean] :sort_asc Specify if order is ascending or not - # @return [Array<(CasesResponse, Integer, Hash)>] CasesResponse data, response status code and response headers - def search_cases_with_http_info(opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.search_cases ...' - end - allowable_values = ['created_at', 'priority', 'status'] - if @api_client.config.client_side_validation && opts[:'sort_field'] && !allowable_values.include?(opts[:'sort_field']) - fail ArgumentError, "invalid value for \"sort_field\", must be one of #{allowable_values}" - end - # resource path - local_var_path = '/api/v2/cases' - - # 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? - query_params[:'sort[field]'] = opts[:'sort_field'] if !opts[:'sort_field'].nil? - query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? - query_params[:'sort[asc]'] = opts[:'sort_asc'] if !opts[:'sort_asc'].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] || 'CasesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :search_cases, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#search_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Search cases. - # - # Provide a paginated version of {#search_cases}, returning all items. - # - # To use it you need to use a block: search_cases_with_pagination { |item| p item } - # - # @yield [Case] Paginated items - def search_cases_with_pagination(opts = {}) - api_version = "V2" - page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) - @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) - @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 1) - while true do - response = search_cases(opts) - @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } - if @api_client.get_attribute_from_path(response, "data").length < page_size - break - end - @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 1) + 1) - end - end - - # Unarchive case. - # - # @see #unarchive_case_with_http_info - def unarchive_case(case_id, body, opts = {}) - data, _status_code, _headers = unarchive_case_with_http_info(case_id, body, opts) - data - end - - # Unarchive case. - # - # Unarchive case - # - # @param case_id [String] Case's UUID or key - # @param body [CaseEmptyRequest] Unarchive case payload - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def unarchive_case_with_http_info(case_id, body, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unarchive_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unarchive_case" - 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 CaseManagementAPI.unarchive_case" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/unarchive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # 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] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :unarchive_case, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#unarchive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Unassign case. - # - # @see #unassign_case_with_http_info - def unassign_case(case_id, body, opts = {}) - data, _status_code, _headers = unassign_case_with_http_info(case_id, body, opts) - data - end - - # Unassign case. - # - # Unassign case - # - # @param case_id [String] Case's UUID or key - # @param body [CaseEmptyRequest] Unassign case payload - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def unassign_case_with_http_info(case_id, body, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unassign_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unassign_case" - 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 CaseManagementAPI.unassign_case" + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project" end # resource path - local_var_path = '/api/v2/cases/{case_id}/unassign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3483,23 +1053,21 @@ def unassign_case_with_http_info(case_id, body, opts = {}) 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) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' + return_type = opts[:debug_return_type] || 'ProjectResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :unassign_case, + :operation => :get_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3509,45 +1077,39 @@ def unassign_case_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#unassign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Unfavorite a project. + # Get notification rules. # - # @see #unfavorite_case_project_with_http_info - def unfavorite_case_project(project_id, opts = {}) - unfavorite_case_project_with_http_info(project_id, opts) - nil + # @see #get_project_notification_rules_with_http_info + def get_project_notification_rules(project_id, opts = {}) + data, _status_code, _headers = get_project_notification_rules_with_http_info(project_id, opts) + data end - # Unfavorite a project. + # Get notification rules. # - # Removes a case project from the current user's favorites list. + # Get all notification rules for a project. # - # @param project_id [String] Project UUID. + # @param project_id [String] Project UUID # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def unfavorite_case_project_with_http_info(project_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.unfavorite_case_project".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unfavorite_case_project") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unfavorite_case_project")) - end + # @return [Array<(CaseNotificationRulesResponse, Integer, Hash)>] CaseNotificationRulesResponse data, response status code and response headers + def get_project_notification_rules_with_http_info(project_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unfavorite_case_project ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project_notification_rules ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.unfavorite_case_project" + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project_notification_rules" end # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/favorites'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3555,7 +1117,7 @@ def unfavorite_case_project_with_http_info(project_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} @@ -3564,13 +1126,13 @@ def unfavorite_case_project_with_http_info(project_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'CaseNotificationRulesResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :unfavorite_case_project, + :operation => :get_project_notification_rules, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3580,45 +1142,34 @@ def unfavorite_case_project_with_http_info(project_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#unfavorite_case_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#get_project_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Remove Jira issue link from case. + # Get all projects. # - # @see #unlink_jira_issue_with_http_info - def unlink_jira_issue(case_id, opts = {}) - unlink_jira_issue_with_http_info(case_id, opts) - nil + # @see #get_projects_with_http_info + def get_projects(opts = {}) + data, _status_code, _headers = get_projects_with_http_info(opts) + data end - # Remove Jira issue link from case. + # Get all projects. # - # Remove the link between a Jira issue and a case + # Get all projects. # - # @param case_id [String] Case's UUID or key # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def unlink_jira_issue_with_http_info(case_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.unlink_jira_issue".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unlink_jira_issue") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unlink_jira_issue")) - end + # @return [Array<(ProjectsResponse, Integer, Hash)>] ProjectsResponse data, response status code and response headers + def get_projects_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unlink_jira_issue ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unlink_jira_issue" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_projects ...' end # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects' # query parameters query_params = opts[:query_params] || {} @@ -3626,7 +1177,7 @@ def unlink_jira_issue_with_http_info(case_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} @@ -3635,13 +1186,13 @@ def unlink_jira_issue_with_http_info(case_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'ProjectsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :unlink_jira_issue, + :operation => :get_projects, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3651,50 +1202,50 @@ def unlink_jira_issue_with_http_info(case_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#unlink_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Unwatch a case. + # Link incident to case. # - # @see #unwatch_case_with_http_info - def unwatch_case(case_id, user_uuid, opts = {}) - unwatch_case_with_http_info(case_id, user_uuid, opts) - nil + # @see #link_incident_with_http_info + def link_incident(case_id, body, opts = {}) + data, _status_code, _headers = link_incident_with_http_info(case_id, body, opts) + data end - # Unwatch a case. + # Link incident to case. # - # Removes a user from the watchers list of a case. The user no longer receives notifications about updates to the case. + # Link an incident to a case # # @param case_id [String] Case's UUID or key - # @param user_uuid [String] The UUID of the user to add or remove as a watcher. + # @param body [RelationshipToIncidentRequest] Incident link request # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def unwatch_case_with_http_info(case_id, user_uuid, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.unwatch_case".to_sym] + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def link_incident_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.link_incident".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unwatch_case") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.link_incident") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unwatch_case")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.link_incident")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unwatch_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.link_incident ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unwatch_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.link_incident" end - # verify the required parameter 'user_uuid' is set - if @api_client.config.client_side_validation && user_uuid.nil? - fail ArgumentError, "Missing the required parameter 'user_uuid' when calling CaseManagementAPI.unwatch_case" + # 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 CaseManagementAPI.link_incident" end # resource path - local_var_path = '/api/v2/cases/{case_id}/watchers/{user_uuid}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{user_uuid}', CGI.escape(user_uuid.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/relationships/incidents'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3702,22 +1253,24 @@ def unwatch_case_with_http_info(case_id, user_uuid, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + 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] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :unwatch_case, + :operation => :link_incident, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3727,44 +1280,50 @@ def unwatch_case_with_http_info(case_id, user_uuid, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#unwatch_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#link_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case attributes. + # Link existing Jira issue to case. # - # @see #update_attributes_with_http_info - def update_attributes(case_id, body, opts = {}) - data, _status_code, _headers = update_attributes_with_http_info(case_id, body, opts) - data + # @see #link_jira_issue_to_case_with_http_info + def link_jira_issue_to_case(case_id, body, opts = {}) + link_jira_issue_to_case_with_http_info(case_id, body, opts) + nil end - # Update case attributes. + # Link existing Jira issue to case. # - # Update case attributes + # Link an existing Jira issue to a case # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateAttributesRequest] Case attributes update payload + # @param body [JiraIssueLinkRequest] Jira issue link request # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_attributes_with_http_info(case_id, body, opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def link_jira_issue_to_case_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.link_jira_issue_to_case".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.link_jira_issue_to_case") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.link_jira_issue_to_case")) + end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_attributes ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.link_jira_issue_to_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_attributes" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.link_jira_issue_to_case" 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 CaseManagementAPI.update_attributes" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.link_jira_issue_to_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/attributes'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3772,7 +1331,7 @@ def update_attributes_with_http_info(case_id, body, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -3783,13 +1342,13 @@ def update_attributes_with_http_info(case_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_attributes, + :operation => :link_jira_issue_to_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3799,55 +1358,50 @@ def update_attributes_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#link_jira_issue_to_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update an automation rule. + # Update case project. # - # @see #update_case_automation_rule_with_http_info - def update_case_automation_rule(project_id, rule_id, body, opts = {}) - data, _status_code, _headers = update_case_automation_rule_with_http_info(project_id, rule_id, body, opts) + # @see #move_case_to_project_with_http_info + def move_case_to_project(case_id, body, opts = {}) + data, _status_code, _headers = move_case_to_project_with_http_info(case_id, body, opts) data end - # Update an automation rule. + # Update case project. # - # Updates the trigger, action, name, or state of an existing automation rule. + # Update the project associated with a case # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param rule_id [String] The UUID of the automation rule. - # @param body [AutomationRuleUpdateRequest] Automation rule payload. + # @param case_id [String] Case's UUID or key + # @param body [ProjectRelationship] Project update request # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRuleResponse, Integer, Hash)>] AutomationRuleResponse data, response status code and response headers - def update_case_automation_rule_with_http_info(project_id, rule_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_automation_rule".to_sym] + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def move_case_to_project_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.move_case_to_project".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_automation_rule") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.move_case_to_project") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_automation_rule")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.move_case_to_project")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_automation_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.update_case_automation_rule" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.move_case_to_project ...' 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 CaseManagementAPI.update_case_automation_rule" + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.move_case_to_project" 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 CaseManagementAPI.update_case_automation_rule" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.move_case_to_project" end # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules/{rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/relationships/project'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3866,13 +1420,13 @@ def update_case_automation_rule_with_http_info(project_id, rule_id, body, opts = post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'AutomationRuleResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_automation_rule, + :operation => :move_case_to_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3882,80 +1436,71 @@ def update_case_automation_rule_with_http_info(project_id, rule_id, body, opts = :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#move_case_to_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case comment. + # Search cases. # - # @see #update_case_comment_with_http_info - def update_case_comment(case_id, cell_id, body, opts = {}) - update_case_comment_with_http_info(case_id, cell_id, body, opts) - nil + # @see #search_cases_with_http_info + def search_cases(opts = {}) + data, _status_code, _headers = search_cases_with_http_info(opts) + data end - # Update case comment. + # Search cases. # - # Updates the text content of an existing comment on a case timeline. The comment is identified by its cell ID. + # Search cases. # - # @param case_id [String] Case's UUID or key - # @param cell_id [String] The UUID of the timeline cell (comment) to update. - # @param body [CaseUpdateCommentRequest] Case update comment payload. # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def update_case_comment_with_http_info(case_id, cell_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_comment".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_comment") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_comment")) - end + # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. + # @option opts [Integer] :page_number Specific page number to return. + # @option opts [CaseSortableField] :sort_field Specify which field to sort + # @option opts [String] :filter Search query + # @option opts [Boolean] :sort_asc Specify if order is ascending or not + # @return [Array<(CasesResponse, Integer, Hash)>] CasesResponse data, response status code and response headers + def search_cases_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_comment ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_comment" - end - # verify the required parameter 'cell_id' is set - if @api_client.config.client_side_validation && cell_id.nil? - fail ArgumentError, "Missing the required parameter 'cell_id' when calling CaseManagementAPI.update_case_comment" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.search_cases ...' 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 CaseManagementAPI.update_case_comment" + allowable_values = ['created_at', 'priority', 'status'] + if @api_client.config.client_side_validation && opts[:'sort_field'] && !allowable_values.include?(opts[:'sort_field']) + fail ArgumentError, "invalid value for \"sort_field\", must be one of #{allowable_values}" end # resource path - local_var_path = '/api/v2/cases/{case_id}/comment/{cell_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{cell_id}', CGI.escape(cell_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases' # 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? + query_params[:'sort[field]'] = opts[:'sort_field'] if !opts[:'sort_field'].nil? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort[asc]'] = opts[:'sort_asc'] if !opts[:'sort_asc'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + 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] || @api_client.object_to_http_body(body) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'CasesResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_comment, + :operation => :search_cases, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3965,49 +1510,66 @@ def update_case_comment_with_http_info(case_id, cell_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#search_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case custom attribute. + # Search cases. + # + # Provide a paginated version of {#search_cases}, returning all items. + # + # To use it you need to use a block: search_cases_with_pagination { |item| p item } + # + # @yield [Case] Paginated items + def search_cases_with_pagination(opts = {}) + api_version = "V2" + page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) + @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) + @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 1) + while true do + response = search_cases(opts) + @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } + if @api_client.get_attribute_from_path(response, "data").length < page_size + break + end + @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 1) + 1) + end + end + + # Unarchive case. # - # @see #update_case_custom_attribute_with_http_info - def update_case_custom_attribute(case_id, custom_attribute_key, body, opts = {}) - data, _status_code, _headers = update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts) + # @see #unarchive_case_with_http_info + def unarchive_case(case_id, body, opts = {}) + data, _status_code, _headers = unarchive_case_with_http_info(case_id, body, opts) data end - # Update case custom attribute. + # Unarchive case. # - # Update case custom attribute + # Unarchive case # # @param case_id [String] Case's UUID or key - # @param custom_attribute_key [String] Case Custom attribute's key - # @param body [CaseUpdateCustomAttributeRequest] Update case custom attribute payload + # @param body [CaseEmptyRequest] Unarchive case payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts = {}) + def unarchive_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_custom_attribute ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unarchive_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_custom_attribute" - end - # verify the required parameter 'custom_attribute_key' is set - if @api_client.config.client_side_validation && custom_attribute_key.nil? - fail ArgumentError, "Missing the required parameter 'custom_attribute_key' when calling CaseManagementAPI.update_case_custom_attribute" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unarchive_case" 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 CaseManagementAPI.update_case_custom_attribute" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unarchive_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_key}', CGI.escape(custom_attribute_key.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/unarchive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4032,7 +1594,7 @@ def update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, b auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_custom_attribute, + :operation => :unarchive_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4044,42 +1606,42 @@ def update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, b data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_custom_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#unarchive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case description. + # Unassign case. # - # @see #update_case_description_with_http_info - def update_case_description(case_id, body, opts = {}) - data, _status_code, _headers = update_case_description_with_http_info(case_id, body, opts) + # @see #unassign_case_with_http_info + def unassign_case(case_id, body, opts = {}) + data, _status_code, _headers = unassign_case_with_http_info(case_id, body, opts) data end - # Update case description. + # Unassign case. # - # Update case description + # Unassign case # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateDescriptionRequest] Case description update payload + # @param body [CaseEmptyRequest] Unassign case payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_case_description_with_http_info(case_id, body, opts = {}) + def unassign_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_description ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unassign_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_description" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unassign_case" 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 CaseManagementAPI.update_case_description" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unassign_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/description'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/unassign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4104,7 +1666,7 @@ def update_case_description_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_description, + :operation => :unassign_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4116,48 +1678,43 @@ def update_case_description_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_description\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#unassign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case due date. + # Remove Jira issue link from case. # - # @see #update_case_due_date_with_http_info - def update_case_due_date(case_id, body, opts = {}) - data, _status_code, _headers = update_case_due_date_with_http_info(case_id, body, opts) - data + # @see #unlink_jira_issue_with_http_info + def unlink_jira_issue(case_id, opts = {}) + unlink_jira_issue_with_http_info(case_id, opts) + nil end - # Update case due date. + # Remove Jira issue link from case. # - # Sets or updates the due date for a case. The due date is a calendar date (without a time component) indicating when the case should be resolved. + # Remove the link between a Jira issue and a case # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateDueDateRequest] Case due date update payload. # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_case_due_date_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_due_date".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def unlink_jira_issue_with_http_info(case_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.unlink_jira_issue".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_due_date") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unlink_jira_issue") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_due_date")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unlink_jira_issue")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_due_date ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unlink_jira_issue ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_due_date" - 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 CaseManagementAPI.update_case_due_date" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unlink_jira_issue" end # resource path - local_var_path = '/api/v2/cases/{case_id}/due_date'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4165,24 +1722,22 @@ def update_case_due_date_with_http_info(case_id, body, opts = {}) # 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']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_due_date, + :operation => :unlink_jira_issue, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4192,50 +1747,44 @@ def update_case_due_date_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_due_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#unlink_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case resolved reason. + # Update case attributes. # - # @see #update_case_resolved_reason_with_http_info - def update_case_resolved_reason(case_id, body, opts = {}) - data, _status_code, _headers = update_case_resolved_reason_with_http_info(case_id, body, opts) + # @see #update_attributes_with_http_info + def update_attributes(case_id, body, opts = {}) + data, _status_code, _headers = update_attributes_with_http_info(case_id, body, opts) data end - # Update case resolved reason. + # Update case attributes. # - # Sets the resolved reason for a security case (for example, FALSE_POSITIVE, TRUE_POSITIVE). Applicable to security-type cases. + # Update case attributes # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateResolvedReasonRequest] Case resolved reason update payload. + # @param body [CaseUpdateAttributesRequest] Case attributes update payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_case_resolved_reason_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_resolved_reason".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_resolved_reason") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_resolved_reason")) - end + def update_attributes_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_resolved_reason ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_attributes ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_resolved_reason" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_attributes" 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 CaseManagementAPI.update_case_resolved_reason" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_attributes" end # resource path - local_var_path = '/api/v2/cases/{case_id}/resolved_reason'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/attributes'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4260,7 +1809,7 @@ def update_case_resolved_reason_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_resolved_reason, + :operation => :update_attributes, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4272,42 +1821,47 @@ def update_case_resolved_reason_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_resolved_reason\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case title. + # Update case custom attribute. # - # @see #update_case_title_with_http_info - def update_case_title(case_id, body, opts = {}) - data, _status_code, _headers = update_case_title_with_http_info(case_id, body, opts) + # @see #update_case_custom_attribute_with_http_info + def update_case_custom_attribute(case_id, custom_attribute_key, body, opts = {}) + data, _status_code, _headers = update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts) data end - # Update case title. + # Update case custom attribute. # - # Update case title + # Update case custom attribute # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateTitleRequest] Case title update payload + # @param custom_attribute_key [String] Case Custom attribute's key + # @param body [CaseUpdateCustomAttributeRequest] Update case custom attribute payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_case_title_with_http_info(case_id, body, opts = {}) + def update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_title ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_custom_attribute ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_title" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_custom_attribute" + end + # verify the required parameter 'custom_attribute_key' is set + if @api_client.config.client_side_validation && custom_attribute_key.nil? + fail ArgumentError, "Missing the required parameter 'custom_attribute_key' when calling CaseManagementAPI.update_case_custom_attribute" 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 CaseManagementAPI.update_case_title" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_custom_attribute" end # resource path - local_var_path = '/api/v2/cases/{case_id}/title'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_key}', CGI.escape(custom_attribute_key.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4332,7 +1886,7 @@ def update_case_title_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_title, + :operation => :update_case_custom_attribute, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4344,48 +1898,42 @@ def update_case_title_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_title\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_custom_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a case view. + # Update case description. # - # @see #update_case_view_with_http_info - def update_case_view(view_id, body, opts = {}) - data, _status_code, _headers = update_case_view_with_http_info(view_id, body, opts) + # @see #update_case_description_with_http_info + def update_case_description(case_id, body, opts = {}) + data, _status_code, _headers = update_case_description_with_http_info(case_id, body, opts) data end - # Update a case view. + # Update case description. # - # Updates the name, query, or notification rule of an existing case view. + # Update case description # - # @param view_id [String] The UUID of the case view. - # @param body [CaseViewUpdateRequest] Case view payload. + # @param case_id [String] Case's UUID or key + # @param body [CaseUpdateDescriptionRequest] Case description update payload # @param opts [Hash] the optional parameters - # @return [Array<(CaseViewResponse, Integer, Hash)>] CaseViewResponse data, response status code and response headers - def update_case_view_with_http_info(view_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_view".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_view") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_view")) - end + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def update_case_description_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_view ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_description ...' end - # verify the required parameter 'view_id' is set - if @api_client.config.client_side_validation && view_id.nil? - fail ArgumentError, "Missing the required parameter 'view_id' when calling CaseManagementAPI.update_case_view" + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_description" 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 CaseManagementAPI.update_case_view" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_description" end # resource path - local_var_path = '/api/v2/cases/views/{view_id}'.sub('{view_id}', CGI.escape(view_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/description'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4404,13 +1952,13 @@ def update_case_view_with_http_info(view_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseViewResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_view, + :operation => :update_case_description, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4420,50 +1968,44 @@ def update_case_view_with_http_info(view_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_description\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a maintenance window. + # Update case title. # - # @see #update_maintenance_window_with_http_info - def update_maintenance_window(maintenance_window_id, body, opts = {}) - data, _status_code, _headers = update_maintenance_window_with_http_info(maintenance_window_id, body, opts) + # @see #update_case_title_with_http_info + def update_case_title(case_id, body, opts = {}) + data, _status_code, _headers = update_case_title_with_http_info(case_id, body, opts) data end - # Update a maintenance window. + # Update case title. # - # Updates the name, query, start time, or end time of an existing maintenance window. + # Update case title # - # @param maintenance_window_id [String] The UUID of the maintenance window. - # @param body [MaintenanceWindowUpdateRequest] Maintenance window payload. + # @param case_id [String] Case's UUID or key + # @param body [CaseUpdateTitleRequest] Case title update payload # @param opts [Hash] the optional parameters - # @return [Array<(MaintenanceWindowResponse, Integer, Hash)>] MaintenanceWindowResponse data, response status code and response headers - def update_maintenance_window_with_http_info(maintenance_window_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_maintenance_window".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_maintenance_window") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_maintenance_window")) - end + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def update_case_title_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_maintenance_window ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_title ...' end - # verify the required parameter 'maintenance_window_id' is set - if @api_client.config.client_side_validation && maintenance_window_id.nil? - fail ArgumentError, "Missing the required parameter 'maintenance_window_id' when calling CaseManagementAPI.update_maintenance_window" + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_title" 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 CaseManagementAPI.update_maintenance_window" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_title" end # resource path - local_var_path = '/api/v2/maintenance_windows/{maintenance_window_id}'.sub('{maintenance_window_id}', CGI.escape(maintenance_window_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/title'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4482,13 +2024,13 @@ def update_maintenance_window_with_http_info(maintenance_window_id, body, opts = post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'MaintenanceWindowResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_maintenance_window, + :operation => :update_case_title, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4498,9 +2040,9 @@ def update_maintenance_window_with_http_info(maintenance_window_id, body, opts = :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_maintenance_window\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_title\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -4797,81 +2339,5 @@ def update_status_with_http_info(case_id, body, opts = {}) end return data, status_code, headers end - - # Watch a case. - # - # @see #watch_case_with_http_info - def watch_case(case_id, user_uuid, opts = {}) - watch_case_with_http_info(case_id, user_uuid, opts) - nil - end - - # Watch a case. - # - # Adds a user (identified by their UUID) as a watcher of a case. The user receives notifications about subsequent updates to the case. - # - # @param case_id [String] Case's UUID or key - # @param user_uuid [String] The UUID of the user to add or remove as a watcher. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def watch_case_with_http_info(case_id, user_uuid, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.watch_case".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.watch_case") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.watch_case")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.watch_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.watch_case" - end - # verify the required parameter 'user_uuid' is set - if @api_client.config.client_side_validation && user_uuid.nil? - fail ArgumentError, "Missing the required parameter 'user_uuid' when calling CaseManagementAPI.watch_case" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/watchers/{user_uuid}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{user_uuid}', CGI.escape(user_uuid.to_s).gsub('%2F', '/')) - - # 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(['*/*']) - - # 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] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :watch_case, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#watch_case\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/api/case_management_attribute_api.rb b/lib/datadog_api_client/v2/api/case_management_attribute_api.rb index db843133689b..52a7d87662a5 100644 --- a/lib/datadog_api_client/v2/api/case_management_attribute_api.rb +++ b/lib/datadog_api_client/v2/api/case_management_attribute_api.rb @@ -35,7 +35,7 @@ def create_custom_attribute_config(case_type_id, body, opts = {}) # # Create custom attribute config for a case type # - # @param case_type_id [String] The UUID of the case type. + # @param case_type_id [String] Case type's UUID # @param body [CustomAttributeConfigCreateRequest] Custom attribute config payload # @param opts [Hash] the optional parameters # @return [Array<(CustomAttributeConfigResponse, Integer, Hash)>] CustomAttributeConfigResponse data, response status code and response headers @@ -107,7 +107,7 @@ def delete_custom_attribute_config(case_type_id, custom_attribute_id, opts = {}) # # Delete custom attribute config # - # @param case_type_id [String] The UUID of the case type. + # @param case_type_id [String] Case type's UUID # @param custom_attribute_id [String] Case Custom attribute's UUID # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers @@ -177,7 +177,7 @@ def get_all_custom_attribute_configs_by_case_type(case_type_id, opts = {}) # # Get all custom attribute config of case type # - # @param case_type_id [String] The UUID of the case type. + # @param case_type_id [String] Case type's UUID # @param opts [Hash] the optional parameters # @return [Array<(CustomAttributeConfigsResponse, Integer, Hash)>] CustomAttributeConfigsResponse data, response status code and response headers def get_all_custom_attribute_configs_by_case_type_with_http_info(case_type_id, opts = {}) @@ -289,88 +289,5 @@ def get_all_custom_attributes_with_http_info(opts = {}) end return data, status_code, headers end - - # Update custom attribute config. - # - # @see #update_custom_attribute_config_with_http_info - def update_custom_attribute_config(case_type_id, custom_attribute_id, body, opts = {}) - data, _status_code, _headers = update_custom_attribute_config_with_http_info(case_type_id, custom_attribute_id, body, opts) - data - end - - # Update custom attribute config. - # - # Updates the display name, description, type, or options of an existing custom attribute configuration for a case type. - # - # @param case_type_id [String] The UUID of the case type. - # @param custom_attribute_id [String] Case Custom attribute's UUID - # @param body [CustomAttributeConfigUpdateRequest] Custom attribute config payload. - # @param opts [Hash] the optional parameters - # @return [Array<(CustomAttributeConfigResponse, Integer, Hash)>] CustomAttributeConfigResponse data, response status code and response headers - def update_custom_attribute_config_with_http_info(case_type_id, custom_attribute_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_custom_attribute_config".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_custom_attribute_config") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_custom_attribute_config")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAttributeAPI.update_custom_attribute_config ...' - end - # verify the required parameter 'case_type_id' is set - if @api_client.config.client_side_validation && case_type_id.nil? - fail ArgumentError, "Missing the required parameter 'case_type_id' when calling CaseManagementAttributeAPI.update_custom_attribute_config" - end - # verify the required parameter 'custom_attribute_id' is set - if @api_client.config.client_side_validation && custom_attribute_id.nil? - fail ArgumentError, "Missing the required parameter 'custom_attribute_id' when calling CaseManagementAttributeAPI.update_custom_attribute_config" - 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 CaseManagementAttributeAPI.update_custom_attribute_config" - end - # resource path - local_var_path = '/api/v2/cases/types/{case_type_id}/custom_attributes/{custom_attribute_id}'.sub('{case_type_id}', CGI.escape(case_type_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_id}', CGI.escape(custom_attribute_id.to_s).gsub('%2F', '/')) - - # 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] || 'CustomAttributeConfigResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :update_custom_attribute_config, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAttributeAPI#update_custom_attribute_config\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/api/case_management_type_api.rb b/lib/datadog_api_client/v2/api/case_management_type_api.rb index 1aa1ac78a8fb..51bec892cf2f 100644 --- a/lib/datadog_api_client/v2/api/case_management_type_api.rb +++ b/lib/datadog_api_client/v2/api/case_management_type_api.rb @@ -102,7 +102,7 @@ def delete_case_type(case_type_id, opts = {}) # # Delete a case type # - # @param case_type_id [String] The UUID of the case type. + # @param case_type_id [String] Case type's UUID # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def delete_case_type_with_http_info(case_type_id, opts = {}) @@ -214,83 +214,5 @@ def get_all_case_types_with_http_info(opts = {}) end return data, status_code, headers end - - # Update a case type. - # - # @see #update_case_type_with_http_info - def update_case_type(case_type_id, body, opts = {}) - data, _status_code, _headers = update_case_type_with_http_info(case_type_id, body, opts) - data - end - - # Update a case type. - # - # Updates the name, emoji, or description of an existing case type. - # - # @param case_type_id [String] The UUID of the case type. - # @param body [CaseTypeUpdateRequest] Case type payload. - # @param opts [Hash] the optional parameters - # @return [Array<(CaseTypeResponse, Integer, Hash)>] CaseTypeResponse data, response status code and response headers - def update_case_type_with_http_info(case_type_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_type".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_type") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_type")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementTypeAPI.update_case_type ...' - end - # verify the required parameter 'case_type_id' is set - if @api_client.config.client_side_validation && case_type_id.nil? - fail ArgumentError, "Missing the required parameter 'case_type_id' when calling CaseManagementTypeAPI.update_case_type" - 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 CaseManagementTypeAPI.update_case_type" - end - # resource path - local_var_path = '/api/v2/cases/types/{case_type_id}'.sub('{case_type_id}', CGI.escape(case_type_id.to_s).gsub('%2F', '/')) - - # 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] || 'CaseTypeResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :update_case_type, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementTypeAPI#update_case_type\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/api/model_lab_api_api.rb b/lib/datadog_api_client/v2/api/model_lab_api_api.rb new file mode 100644 index 000000000000..e20533a305ed --- /dev/null +++ b/lib/datadog_api_client/v2/api/model_lab_api_api.rb @@ -0,0 +1,1237 @@ +=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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class ModelLabAPIAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Delete a Model Lab run. + # + # @see #delete_model_lab_run_with_http_info + def delete_model_lab_run(run_id, opts = {}) + delete_model_lab_run_with_http_info(run_id, opts) + nil + end + + # Delete a Model Lab run. + # + # Delete a Model Lab run by its ID. + # + # @param run_id [Integer] The ID of the Model Lab run. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_model_lab_run_with_http_info(run_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_model_lab_run".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_model_lab_run") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_model_lab_run")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.delete_model_lab_run ...' + end + # verify the required parameter 'run_id' is set + if @api_client.config.client_side_validation && run_id.nil? + fail ArgumentError, "Missing the required parameter 'run_id' when calling ModelLabAPIAPI.delete_model_lab_run" + end + # resource path + local_var_path = '/api/v2/model-lab-api/runs/{run_id}'.sub('{run_id}', CGI.escape(run_id.to_s).gsub('%2F', '/')) + + # 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(['*/*']) + + # 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] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_model_lab_run, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#delete_model_lab_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get Model Lab artifact content. + # + # @see #get_model_lab_artifact_content_with_http_info + def get_model_lab_artifact_content(project_id, artifact_path, opts = {}) + data, _status_code, _headers = get_model_lab_artifact_content_with_http_info(project_id, artifact_path, opts) + data + end + + # Get Model Lab artifact content. + # + # Download the raw content of a Model Lab artifact file. + # + # @param project_id [String] ID of the project. + # @param artifact_path [String] Path to the artifact relative to the project directory. + # @param opts [Hash] the optional parameters + # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers + def get_model_lab_artifact_content_with_http_info(project_id, artifact_path, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_model_lab_artifact_content".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_model_lab_artifact_content") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_model_lab_artifact_content")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.get_model_lab_artifact_content ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.get_model_lab_artifact_content" + end + # verify the required parameter 'artifact_path' is set + if @api_client.config.client_side_validation && artifact_path.nil? + fail ArgumentError, "Missing the required parameter 'artifact_path' when calling ModelLabAPIAPI.get_model_lab_artifact_content" + end + # resource path + local_var_path = '/api/v2/model-lab-api/artifacts/content' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'project_id'] = project_id + query_params[:'artifact_path'] = artifact_path + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', '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] || 'File' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_model_lab_artifact_content, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#get_model_lab_artifact_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a Model Lab project. + # + # @see #get_model_lab_project_with_http_info + def get_model_lab_project(project_id, opts = {}) + data, _status_code, _headers = get_model_lab_project_with_http_info(project_id, opts) + data + end + + # Get a Model Lab project. + # + # Get a single Model Lab project by its ID. + # + # @param project_id [Integer] The ID of the Model Lab project. + # @param opts [Hash] the optional parameters + # @return [Array<(ModelLabProjectResponse, Integer, Hash)>] ModelLabProjectResponse data, response status code and response headers + def get_model_lab_project_with_http_info(project_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_model_lab_project".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_model_lab_project") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_model_lab_project")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.get_model_lab_project ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.get_model_lab_project" + end + # resource path + local_var_path = '/api/v2/model-lab-api/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + + # 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] || 'ModelLabProjectResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_model_lab_project, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#get_model_lab_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a Model Lab run. + # + # @see #get_model_lab_run_with_http_info + def get_model_lab_run(run_id, opts = {}) + data, _status_code, _headers = get_model_lab_run_with_http_info(run_id, opts) + data + end + + # Get a Model Lab run. + # + # Get a single Model Lab run by its ID. + # + # @param run_id [Integer] The ID of the Model Lab run. + # @param opts [Hash] the optional parameters + # @return [Array<(ModelLabRunResponse, Integer, Hash)>] ModelLabRunResponse data, response status code and response headers + def get_model_lab_run_with_http_info(run_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_model_lab_run".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_model_lab_run") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_model_lab_run")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.get_model_lab_run ...' + end + # verify the required parameter 'run_id' is set + if @api_client.config.client_side_validation && run_id.nil? + fail ArgumentError, "Missing the required parameter 'run_id' when calling ModelLabAPIAPI.get_model_lab_run" + end + # resource path + local_var_path = '/api/v2/model-lab-api/runs/{run_id}'.sub('{run_id}', CGI.escape(run_id.to_s).gsub('%2F', '/')) + + # 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] || 'ModelLabRunResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_model_lab_run, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#get_model_lab_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Model Lab project artifacts. + # + # @see #list_model_lab_project_artifacts_with_http_info + def list_model_lab_project_artifacts(project_id, opts = {}) + data, _status_code, _headers = list_model_lab_project_artifacts_with_http_info(project_id, opts) + data + end + + # List Model Lab project artifacts. + # + # List all artifact files for a specific Model Lab project. + # + # @param project_id [Integer] The ID of the Model Lab project. + # @param opts [Hash] the optional parameters + # @return [Array<(ModelLabProjectArtifactsResponse, Integer, Hash)>] ModelLabProjectArtifactsResponse data, response status code and response headers + def list_model_lab_project_artifacts_with_http_info(project_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_project_artifacts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_project_artifacts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_project_artifacts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_project_artifacts ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.list_model_lab_project_artifacts" + end + # resource path + local_var_path = '/api/v2/model-lab-api/projects/{project_id}/artifacts'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + + # 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] || 'ModelLabProjectArtifactsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_model_lab_project_artifacts, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#list_model_lab_project_artifacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Model Lab project facet keys. + # + # @see #list_model_lab_project_facet_keys_with_http_info + def list_model_lab_project_facet_keys(opts = {}) + data, _status_code, _headers = list_model_lab_project_facet_keys_with_http_info(opts) + data + end + + # List Model Lab project facet keys. + # + # List all available facet keys for filtering Model Lab projects. + # + # @param opts [Hash] the optional parameters + # @return [Array<(ModelLabFacetKeysResponse, Integer, Hash)>] ModelLabFacetKeysResponse data, response status code and response headers + def list_model_lab_project_facet_keys_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_project_facet_keys".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_project_facet_keys") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_project_facet_keys")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_project_facet_keys ...' + end + # resource path + local_var_path = '/api/v2/model-lab-api/project-facet-keys' + + # 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] || 'ModelLabFacetKeysResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_model_lab_project_facet_keys, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#list_model_lab_project_facet_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Model Lab project facet values. + # + # @see #list_model_lab_project_facet_values_with_http_info + def list_model_lab_project_facet_values(facet_type, facet_name, opts = {}) + data, _status_code, _headers = list_model_lab_project_facet_values_with_http_info(facet_type, facet_name, opts) + data + end + + # List Model Lab project facet values. + # + # List available facet values for a specific project facet key. + # + # @param facet_type [ModelLabProjectFacetType] Facet type. Valid values: tag. + # @param facet_name [String] Facet name. + # @param opts [Hash] the optional parameters + # @return [Array<(ModelLabFacetValuesResponse, Integer, Hash)>] ModelLabFacetValuesResponse data, response status code and response headers + def list_model_lab_project_facet_values_with_http_info(facet_type, facet_name, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_project_facet_values".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_project_facet_values") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_project_facet_values")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_project_facet_values ...' + end + # verify the required parameter 'facet_type' is set + if @api_client.config.client_side_validation && facet_type.nil? + fail ArgumentError, "Missing the required parameter 'facet_type' when calling ModelLabAPIAPI.list_model_lab_project_facet_values" + end + # verify enum value + allowable_values = ['tag'] + if @api_client.config.client_side_validation && !allowable_values.include?(facet_type) + fail ArgumentError, "invalid value for \"facet_type\", must be one of #{allowable_values}" + end + # verify the required parameter 'facet_name' is set + if @api_client.config.client_side_validation && facet_name.nil? + fail ArgumentError, "Missing the required parameter 'facet_name' when calling ModelLabAPIAPI.list_model_lab_project_facet_values" + end + # resource path + local_var_path = '/api/v2/model-lab-api/project-facet-values' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'facet_type'] = facet_type + query_params[:'facet_name'] = facet_name + + # 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] || 'ModelLabFacetValuesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_model_lab_project_facet_values, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#list_model_lab_project_facet_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Model Lab projects. + # + # @see #list_model_lab_projects_with_http_info + def list_model_lab_projects(opts = {}) + data, _status_code, _headers = list_model_lab_projects_with_http_info(opts) + data + end + + # List Model Lab projects. + # + # List all Model Lab projects for the current organization. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :filter Text search filter for project name or description. + # @option opts [UUID] :filter_owner_id Filter by owner UUID. + # @option opts [String] :filter_tags Filter by tags. Format: key:value,key2:value2. + # @option opts [String] :sort Sort field. Valid values: name, created_at, updated_at. Prefix with '-' for descending order (e.g., -updated_at). + # @option opts [Integer] :page_size Number of items per page. Maximum is 100. + # @option opts [Integer] :page_number Page number (1-indexed). + # @return [Array<(ModelLabProjectsResponse, Integer, Hash)>] ModelLabProjectsResponse data, response status code and response headers + def list_model_lab_projects_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_projects".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_projects") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_projects")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_projects ...' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ModelLabAPIAPI.list_model_lab_projects, must be smaller than or equal to 100.' + end + # resource path + local_var_path = '/api/v2/model-lab-api/projects' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'filter[owner_id]'] = opts[:'filter_owner_id'] if !opts[:'filter_owner_id'].nil? + query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + 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] || 'ModelLabProjectsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_model_lab_projects, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#list_model_lab_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Model Lab run artifacts. + # + # @see #list_model_lab_run_artifacts_with_http_info + def list_model_lab_run_artifacts(run_id, opts = {}) + data, _status_code, _headers = list_model_lab_run_artifacts_with_http_info(run_id, opts) + data + end + + # List Model Lab run artifacts. + # + # List artifact files for a specific Model Lab run. + # + # @param run_id [Integer] The ID of the Model Lab run. + # @param opts [Hash] the optional parameters + # @option opts [String] :path Optional subdirectory path within the run's artifacts. + # @return [Array<(ModelLabRunArtifactsResponse, Integer, Hash)>] ModelLabRunArtifactsResponse data, response status code and response headers + def list_model_lab_run_artifacts_with_http_info(run_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_run_artifacts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_run_artifacts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_run_artifacts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_run_artifacts ...' + end + # verify the required parameter 'run_id' is set + if @api_client.config.client_side_validation && run_id.nil? + fail ArgumentError, "Missing the required parameter 'run_id' when calling ModelLabAPIAPI.list_model_lab_run_artifacts" + end + # resource path + local_var_path = '/api/v2/model-lab-api/runs/{run_id}/artifacts'.sub('{run_id}', CGI.escape(run_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'path'] = opts[:'path'] if !opts[:'path'].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] || 'ModelLabRunArtifactsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_model_lab_run_artifacts, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#list_model_lab_run_artifacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Model Lab run facet keys. + # + # @see #list_model_lab_run_facet_keys_with_http_info + def list_model_lab_run_facet_keys(filter_project_id, opts = {}) + data, _status_code, _headers = list_model_lab_run_facet_keys_with_http_info(filter_project_id, opts) + data + end + + # List Model Lab run facet keys. + # + # List all available facet keys for filtering Model Lab runs. + # + # @param filter_project_id [Integer] Filter by project ID. + # @param opts [Hash] the optional parameters + # @return [Array<(ModelLabFacetKeysResponse, Integer, Hash)>] ModelLabFacetKeysResponse data, response status code and response headers + def list_model_lab_run_facet_keys_with_http_info(filter_project_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_run_facet_keys".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_run_facet_keys") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_run_facet_keys")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_run_facet_keys ...' + end + # verify the required parameter 'filter_project_id' is set + if @api_client.config.client_side_validation && filter_project_id.nil? + fail ArgumentError, "Missing the required parameter 'filter_project_id' when calling ModelLabAPIAPI.list_model_lab_run_facet_keys" + end + # resource path + local_var_path = '/api/v2/model-lab-api/facet-keys' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[project_id]'] = filter_project_id + + # 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] || 'ModelLabFacetKeysResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_model_lab_run_facet_keys, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#list_model_lab_run_facet_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Model Lab run facet values. + # + # @see #list_model_lab_run_facet_values_with_http_info + def list_model_lab_run_facet_values(filter_project_id, facet_type, facet_name, opts = {}) + data, _status_code, _headers = list_model_lab_run_facet_values_with_http_info(filter_project_id, facet_type, facet_name, opts) + data + end + + # List Model Lab run facet values. + # + # List available facet values for a specific run facet key. + # + # @param filter_project_id [Integer] Filter by project ID. + # @param facet_type [ModelLabFacetType] Facet type. Valid values: parameter, attribute, tag, metric. + # @param facet_name [String] Facet name. + # @param opts [Hash] the optional parameters + # @return [Array<(ModelLabFacetValuesResponse, Integer, Hash)>] ModelLabFacetValuesResponse data, response status code and response headers + def list_model_lab_run_facet_values_with_http_info(filter_project_id, facet_type, facet_name, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_run_facet_values".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_run_facet_values") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_run_facet_values")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_run_facet_values ...' + end + # verify the required parameter 'filter_project_id' is set + if @api_client.config.client_side_validation && filter_project_id.nil? + fail ArgumentError, "Missing the required parameter 'filter_project_id' when calling ModelLabAPIAPI.list_model_lab_run_facet_values" + end + # verify the required parameter 'facet_type' is set + if @api_client.config.client_side_validation && facet_type.nil? + fail ArgumentError, "Missing the required parameter 'facet_type' when calling ModelLabAPIAPI.list_model_lab_run_facet_values" + end + # verify enum value + allowable_values = ['parameter', 'attribute', 'tag', 'metric'] + if @api_client.config.client_side_validation && !allowable_values.include?(facet_type) + fail ArgumentError, "invalid value for \"facet_type\", must be one of #{allowable_values}" + end + # verify the required parameter 'facet_name' is set + if @api_client.config.client_side_validation && facet_name.nil? + fail ArgumentError, "Missing the required parameter 'facet_name' when calling ModelLabAPIAPI.list_model_lab_run_facet_values" + end + # resource path + local_var_path = '/api/v2/model-lab-api/facet-values' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[project_id]'] = filter_project_id + query_params[:'facet_type'] = facet_type + query_params[:'facet_name'] = facet_name + + # 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] || 'ModelLabFacetValuesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_model_lab_run_facet_values, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#list_model_lab_run_facet_values\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Model Lab runs. + # + # @see #list_model_lab_runs_with_http_info + def list_model_lab_runs(opts = {}) + data, _status_code, _headers = list_model_lab_runs_with_http_info(opts) + data + end + + # List Model Lab runs. + # + # List all Model Lab runs for the current organization. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :filter_id Filter by run ID(s). Comma-separated list for multiple IDs. + # @option opts [String] :filter Text search filter for run name or description. + # @option opts [String] :filter_owner_id Filter by owner UUID. + # @option opts [ModelLabRunStatus] :filter_status Filter by run status. Valid values: pending, running, completed, failed, killed, unresponsive, paused. + # @option opts [Integer] :filter_project_id Filter by project ID. + # @option opts [String] :filter_tags Filter by tags. Format: key:value,key2:value2. + # @option opts [String] :filter_params Filter by params. Format: key:value,key2:>0.5,key3:true. + # @option opts [String] :filter_parent_run_id Filter by parent run ID. Use 'null' to return only root runs (runs with no parent). + # @option opts [Boolean] :pinned_first Sort pinned runs before non-pinned runs. Pinned runs are ordered by pin time descending. + # @option opts [Boolean] :include_pinned Include all runs pinned by the current user, regardless of other filters. + # @option opts [Boolean] :include_descendant_matches When true, also return runs whose descendants match the active filters. The descendant_match field in each result indicates whether the run was included via a descendant match. + # @option opts [String] :sort Sort field. Valid values: name, created_at, updated_at, duration. Prefix with '-' for descending order (e.g., -updated_at). + # @option opts [Integer] :page_size Number of items per page. Maximum is 100. + # @option opts [Integer] :page_number Page number (1-indexed). + # @return [Array<(ModelLabRunsResponse, Integer, Hash)>] ModelLabRunsResponse data, response status code and response headers + def list_model_lab_runs_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_model_lab_runs".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_model_lab_runs") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_model_lab_runs")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.list_model_lab_runs ...' + end + allowable_values = ['pending', 'running', 'completed', 'failed', 'killed', 'unresponsive', 'paused'] + if @api_client.config.client_side_validation && opts[:'filter_status'] && !allowable_values.include?(opts[:'filter_status']) + fail ArgumentError, "invalid value for \"filter_status\", must be one of #{allowable_values}" + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling ModelLabAPIAPI.list_model_lab_runs, must be smaller than or equal to 100.' + end + # resource path + local_var_path = '/api/v2/model-lab-api/runs' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[id]'] = opts[:'filter_id'] if !opts[:'filter_id'].nil? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'filter[owner_id]'] = opts[:'filter_owner_id'] if !opts[:'filter_owner_id'].nil? + query_params[:'filter[status]'] = opts[:'filter_status'] if !opts[:'filter_status'].nil? + query_params[:'filter[project_id]'] = opts[:'filter_project_id'] if !opts[:'filter_project_id'].nil? + query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil? + query_params[:'filter[params]'] = opts[:'filter_params'] if !opts[:'filter_params'].nil? + query_params[:'filter[parent_run_id]'] = opts[:'filter_parent_run_id'] if !opts[:'filter_parent_run_id'].nil? + query_params[:'pinned_first'] = opts[:'pinned_first'] if !opts[:'pinned_first'].nil? + query_params[:'include_pinned'] = opts[:'include_pinned'] if !opts[:'include_pinned'].nil? + query_params[:'include_descendant_matches'] = opts[:'include_descendant_matches'] if !opts[:'include_descendant_matches'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + 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] || 'ModelLabRunsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_model_lab_runs, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#list_model_lab_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Pin a Model Lab run. + # + # @see #pin_model_lab_run_with_http_info + def pin_model_lab_run(run_id, opts = {}) + pin_model_lab_run_with_http_info(run_id, opts) + nil + end + + # Pin a Model Lab run. + # + # Pin a Model Lab run for the current user. + # + # @param run_id [Integer] The ID of the Model Lab run. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def pin_model_lab_run_with_http_info(run_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.pin_model_lab_run".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.pin_model_lab_run") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.pin_model_lab_run")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.pin_model_lab_run ...' + end + # verify the required parameter 'run_id' is set + if @api_client.config.client_side_validation && run_id.nil? + fail ArgumentError, "Missing the required parameter 'run_id' when calling ModelLabAPIAPI.pin_model_lab_run" + end + # resource path + local_var_path = '/api/v2/model-lab-api/runs/{run_id}/pin'.sub('{run_id}', CGI.escape(run_id.to_s).gsub('%2F', '/')) + + # 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(['*/*']) + + # 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] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :pin_model_lab_run, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#pin_model_lab_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Star a Model Lab project. + # + # @see #star_model_lab_project_with_http_info + def star_model_lab_project(project_id, opts = {}) + star_model_lab_project_with_http_info(project_id, opts) + nil + end + + # Star a Model Lab project. + # + # Star a Model Lab project for the current user. + # + # @param project_id [Integer] The ID of the Model Lab project. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def star_model_lab_project_with_http_info(project_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.star_model_lab_project".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.star_model_lab_project") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.star_model_lab_project")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.star_model_lab_project ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.star_model_lab_project" + end + # resource path + local_var_path = '/api/v2/model-lab-api/projects/{project_id}/star'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + + # 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(['*/*']) + + # 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] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :star_model_lab_project, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#star_model_lab_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Unpin a Model Lab run. + # + # @see #unpin_model_lab_run_with_http_info + def unpin_model_lab_run(run_id, opts = {}) + unpin_model_lab_run_with_http_info(run_id, opts) + nil + end + + # Unpin a Model Lab run. + # + # Remove the pin from a Model Lab run for the current user. + # + # @param run_id [Integer] The ID of the Model Lab run. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def unpin_model_lab_run_with_http_info(run_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.unpin_model_lab_run".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unpin_model_lab_run") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unpin_model_lab_run")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.unpin_model_lab_run ...' + end + # verify the required parameter 'run_id' is set + if @api_client.config.client_side_validation && run_id.nil? + fail ArgumentError, "Missing the required parameter 'run_id' when calling ModelLabAPIAPI.unpin_model_lab_run" + end + # resource path + local_var_path = '/api/v2/model-lab-api/runs/{run_id}/pin'.sub('{run_id}', CGI.escape(run_id.to_s).gsub('%2F', '/')) + + # 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(['*/*']) + + # 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] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :unpin_model_lab_run, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#unpin_model_lab_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Remove star from a Model Lab project. + # + # @see #unstar_model_lab_project_with_http_info + def unstar_model_lab_project(project_id, opts = {}) + unstar_model_lab_project_with_http_info(project_id, opts) + nil + end + + # Remove star from a Model Lab project. + # + # Remove the star from a Model Lab project for the current user. + # + # @param project_id [Integer] The ID of the Model Lab project. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def unstar_model_lab_project_with_http_info(project_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.unstar_model_lab_project".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unstar_model_lab_project") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unstar_model_lab_project")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ModelLabAPIAPI.unstar_model_lab_project ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling ModelLabAPIAPI.unstar_model_lab_project" + end + # resource path + local_var_path = '/api/v2/model-lab-api/projects/{project_id}/star'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + + # 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(['*/*']) + + # 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] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :unstar_model_lab_project, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ModelLabAPIAPI#unstar_model_lab_project\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/automation_rule.rb b/lib/datadog_api_client/v2/models/automation_rule.rb deleted file mode 100644 index 598533bd12f0..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule.rb +++ /dev/null @@ -1,175 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # An automation rule that executes an action (such as running a Datadog workflow or assigning an AI agent) when a specified case event occurs within a project. - class AutomationRule - include BaseGenericModel - - # Core attributes of an automation rule, including its name, trigger condition, action to execute, and current state. - attr_reader :attributes - - # Automation rule identifier. - attr_reader :id - - # Related resources for the automation rule, including the users who created and last modified it. - attr_accessor :relationships - - # JSON:API resource type for case automation rules. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'relationships' => :'relationships', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'AutomationRuleAttributes', - :'id' => :'String', - :'relationships' => :'AutomationRuleRelationships', - :'type' => :'CaseAutomationRuleResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRule` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - relationships == o.relationships && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, relationships, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_action_data.rb b/lib/datadog_api_client/v2/models/automation_rule_action_data.rb deleted file mode 100644 index bba353dd8c2a..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_action_data.rb +++ /dev/null @@ -1,125 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Configuration for the action to execute, dependent on the action type. - class AutomationRuleActionData - include BaseGenericModel - - # The type of AI agent to assign. Required when the action type is `assign_agent`. - attr_accessor :agent_type - - # The identifier of the AI agent to assign to the case. Required when the action type is `assign_agent`. - attr_accessor :assigned_agent_id - - # The handle of the Datadog workflow to execute. Required when the action type is `execute_workflow`. - attr_accessor :handle - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'agent_type' => :'agent_type', - :'assigned_agent_id' => :'assigned_agent_id', - :'handle' => :'handle' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'agent_type' => :'String', - :'assigned_agent_id' => :'String', - :'handle' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleActionData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'agent_type') - self.agent_type = attributes[:'agent_type'] - end - - if attributes.key?(:'assigned_agent_id') - self.assigned_agent_id = attributes[:'assigned_agent_id'] - end - - if attributes.key?(:'handle') - self.handle = attributes[:'handle'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - agent_type == o.agent_type && - assigned_agent_id == o.assigned_agent_id && - handle == o.handle && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [agent_type, assigned_agent_id, handle, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_attributes.rb b/lib/datadog_api_client/v2/models/automation_rule_attributes.rb deleted file mode 100644 index 2eb653874d8f..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_attributes.rb +++ /dev/null @@ -1,217 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Core attributes of an automation rule, including its name, trigger condition, action to execute, and current state. - class AutomationRuleAttributes - include BaseGenericModel - - # Defines what happens when the rule triggers. Combines an action type with action-specific configuration data. - attr_reader :action - - # Timestamp when the automation rule was created. - attr_reader :created_at - - # Timestamp when the automation rule was last modified. - attr_accessor :modified_at - - # A human-readable name for the automation rule, used to identify the rule in the UI and API responses. - attr_reader :name - - # Whether the automation rule is active. Enabled rules trigger on matching case events; disabled rules are inactive but preserve their configuration. - attr_reader :state - - # Defines when the rule activates. Combines a trigger type (the case event to listen for) with optional trigger data (conditions that narrow when the trigger fires). - attr_reader :trigger - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'action' => :'action', - :'created_at' => :'created_at', - :'modified_at' => :'modified_at', - :'name' => :'name', - :'state' => :'state', - :'trigger' => :'trigger' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'action' => :'AutomationRuleAction', - :'created_at' => :'Time', - :'modified_at' => :'Time', - :'name' => :'String', - :'state' => :'CaseAutomationRuleState', - :'trigger' => :'AutomationRuleTrigger' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'action') - self.action = attributes[:'action'] - end - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'modified_at') - self.modified_at = attributes[:'modified_at'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'state') - self.state = attributes[:'state'] - end - - if attributes.key?(:'trigger') - self.trigger = attributes[:'trigger'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @action.nil? - return false if @created_at.nil? - return false if @name.nil? - return false if @state.nil? - return false if @trigger.nil? - true - end - - # Custom attribute writer method with validation - # @param action [Object] Object to be assigned - # @!visibility private - def action=(action) - if action.nil? - fail ArgumentError, 'invalid value for "action", action cannot be nil.' - end - @action = action - end - - # Custom attribute writer method with validation - # @param created_at [Object] Object to be assigned - # @!visibility private - def created_at=(created_at) - if created_at.nil? - fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' - end - @created_at = created_at - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Custom attribute writer method with validation - # @param state [Object] Object to be assigned - # @!visibility private - def state=(state) - if state.nil? - fail ArgumentError, 'invalid value for "state", state cannot be nil.' - end - @state = state - end - - # Custom attribute writer method with validation - # @param trigger [Object] Object to be assigned - # @!visibility private - def trigger=(trigger) - if trigger.nil? - fail ArgumentError, 'invalid value for "trigger", trigger cannot be nil.' - end - @trigger = trigger - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action == o.action && - created_at == o.created_at && - modified_at == o.modified_at && - name == o.name && - state == o.state && - trigger == o.trigger && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [action, created_at, modified_at, name, state, trigger, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_create.rb b/lib/datadog_api_client/v2/models/automation_rule_create.rb deleted file mode 100644 index 19a3e65f2c50..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_create.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for creating an automation rule. - class AutomationRuleCreate - include BaseGenericModel - - # Attributes required to create an automation rule. - attr_reader :attributes - - # JSON:API resource type for case automation rules. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'AutomationRuleCreateAttributes', - :'type' => :'CaseAutomationRuleResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleCreate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_create_attributes.rb b/lib/datadog_api_client/v2/models/automation_rule_create_attributes.rb deleted file mode 100644 index 08d982d50e8e..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_create_attributes.rb +++ /dev/null @@ -1,175 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes required to create an automation rule. - class AutomationRuleCreateAttributes - include BaseGenericModel - - # Defines what happens when the rule triggers. Combines an action type with action-specific configuration data. - attr_reader :action - - # Name of the automation rule. - attr_reader :name - - # Whether the automation rule is active. Enabled rules trigger on matching case events; disabled rules are inactive but preserve their configuration. - attr_accessor :state - - # Defines when the rule activates. Combines a trigger type (the case event to listen for) with optional trigger data (conditions that narrow when the trigger fires). - attr_reader :trigger - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'action' => :'action', - :'name' => :'name', - :'state' => :'state', - :'trigger' => :'trigger' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'action' => :'AutomationRuleAction', - :'name' => :'String', - :'state' => :'CaseAutomationRuleState', - :'trigger' => :'AutomationRuleTrigger' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleCreateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'action') - self.action = attributes[:'action'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'state') - self.state = attributes[:'state'] - end - - if attributes.key?(:'trigger') - self.trigger = attributes[:'trigger'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @action.nil? - return false if @name.nil? - return false if @trigger.nil? - true - end - - # Custom attribute writer method with validation - # @param action [Object] Object to be assigned - # @!visibility private - def action=(action) - if action.nil? - fail ArgumentError, 'invalid value for "action", action cannot be nil.' - end - @action = action - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Custom attribute writer method with validation - # @param trigger [Object] Object to be assigned - # @!visibility private - def trigger=(trigger) - if trigger.nil? - fail ArgumentError, 'invalid value for "trigger", trigger cannot be nil.' - end - @trigger = trigger - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action == o.action && - name == o.name && - state == o.state && - trigger == o.trigger && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [action, name, state, trigger, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_relationships.rb b/lib/datadog_api_client/v2/models/automation_rule_relationships.rb deleted file mode 100644 index 848806825b72..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_relationships.rb +++ /dev/null @@ -1,124 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Related resources for the automation rule, including the users who created and last modified it. - class AutomationRuleRelationships - include BaseGenericModel - - # Relationship to user. - attr_accessor :created_by - - # Relationship to user. - attr_accessor :modified_by - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_by' => :'created_by', - :'modified_by' => :'modified_by' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_by' => :'NullableUserRelationship', - :'modified_by' => :'NullableUserRelationship' - } - end - - # List of attributes with nullable: true - # @!visibility private - def self.openapi_nullable - Set.new([ - :'created_by', - :'modified_by', - ]) - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleRelationships` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created_by') - self.created_by = attributes[:'created_by'] - end - - if attributes.key?(:'modified_by') - self.modified_by = attributes[:'modified_by'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_by == o.created_by && - modified_by == o.modified_by && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_by, modified_by, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_response.rb b/lib/datadog_api_client/v2/models/automation_rule_response.rb deleted file mode 100644 index c7e8d1fa3104..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_response.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a single automation rule. - class AutomationRuleResponse - include BaseGenericModel - - # An automation rule that executes an action (such as running a Datadog workflow or assigning an AI agent) when a specified case event occurs within a project. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'AutomationRule' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_trigger.rb b/lib/datadog_api_client/v2/models/automation_rule_trigger.rb deleted file mode 100644 index bf66472cf8e4..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_trigger.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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Defines when the rule activates. Combines a trigger type (the case event to listen for) with optional trigger data (conditions that narrow when the trigger fires). - class AutomationRuleTrigger - include BaseGenericModel - - # Additional configuration for the trigger, dependent on the trigger type. For `status_transitioned` triggers, specify `from_status_name` and `to_status_name`. For `attribute_value_changed` triggers, specify `field` and `change_type`. - attr_accessor :data - - # The case event that activates the automation rule. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'AutomationRuleTriggerData', - :'type' => :'AutomationRuleTriggerType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleTrigger` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_trigger_data.rb b/lib/datadog_api_client/v2/models/automation_rule_trigger_data.rb deleted file mode 100644 index 275963aa19c5..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_trigger_data.rb +++ /dev/null @@ -1,145 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Additional configuration for the trigger, dependent on the trigger type. For `status_transitioned` triggers, specify `from_status_name` and `to_status_name`. For `attribute_value_changed` triggers, specify `field` and `change_type`. - class AutomationRuleTriggerData - include BaseGenericModel - - # The approval outcome to match. Used with `case_review_approved` triggers. - attr_accessor :approval_type - - # The kind of attribute change to match. Allowed values: `VALUE_ADDED`, `VALUE_DELETED`, `ANY_CHANGES`. Used with `attribute_value_changed` triggers. - attr_accessor :change_type - - # The case attribute field name to monitor for changes. Used with `attribute_value_changed` triggers. - attr_accessor :field - - # The originating status name. Used with `status_transitioned` triggers to match transitions from this status. - attr_accessor :from_status_name - - # The destination status name. Used with `status_transitioned` triggers to match transitions to this status. - attr_accessor :to_status_name - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'approval_type' => :'approval_type', - :'change_type' => :'change_type', - :'field' => :'field', - :'from_status_name' => :'from_status_name', - :'to_status_name' => :'to_status_name' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'approval_type' => :'String', - :'change_type' => :'String', - :'field' => :'String', - :'from_status_name' => :'String', - :'to_status_name' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleTriggerData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'approval_type') - self.approval_type = attributes[:'approval_type'] - end - - if attributes.key?(:'change_type') - self.change_type = attributes[:'change_type'] - end - - if attributes.key?(:'field') - self.field = attributes[:'field'] - end - - if attributes.key?(:'from_status_name') - self.from_status_name = attributes[:'from_status_name'] - end - - if attributes.key?(:'to_status_name') - self.to_status_name = attributes[:'to_status_name'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - approval_type == o.approval_type && - change_type == o.change_type && - field == o.field && - from_status_name == o.from_status_name && - to_status_name == o.to_status_name && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [approval_type, change_type, field, from_status_name, to_status_name, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_trigger_type.rb b/lib/datadog_api_client/v2/models/automation_rule_trigger_type.rb deleted file mode 100644 index f3809f5b34a8..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_trigger_type.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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The case event that activates the automation rule. - class AutomationRuleTriggerType - include BaseEnumModel - - CASE_CREATED = "case_created".freeze - STATUS_TRANSITIONED = "status_transitioned".freeze - ATTRIBUTE_VALUE_CHANGED = "attribute_value_changed".freeze - EVENT_CORRELATION_SIGNAL_CORRELATED = "event_correlation_signal_correlated".freeze - CASE_REVIEW_APPROVED = "case_review_approved".freeze - COMMENT_ADDED = "comment_added".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rules_response.rb b/lib/datadog_api_client/v2/models/automation_rules_response.rb deleted file mode 100644 index c6f55df6c626..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rules_response.rb +++ /dev/null @@ -1,125 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a list of automation rules for a project. - class AutomationRulesResponse - include BaseGenericModel - - # List of automation rules. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRulesResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case.rb b/lib/datadog_api_client/v2/models/case.rb index 957a0bcbced8..46a5e50ea48e 100644 --- a/lib/datadog_api_client/v2/models/case.rb +++ b/lib/datadog_api_client/v2/models/case.rb @@ -30,7 +30,7 @@ class Case # Resources related to a case attr_accessor :relationships - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_aggregate_request.rb b/lib/datadog_api_client/v2/models/case_aggregate_request.rb deleted file mode 100644 index 50e5d431ff6a..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_request.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for aggregating case counts with grouping. Use this to get faceted breakdowns of cases (for example, count of cases grouped by priority and status). - class CaseAggregateRequest - include BaseGenericModel - - # Data object wrapping the aggregation query type and attributes. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseAggregateRequestData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_request_attributes.rb b/lib/datadog_api_client/v2/models/case_aggregate_request_attributes.rb deleted file mode 100644 index 350f1c7f4d27..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_request_attributes.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for the aggregation request, including the search query and grouping configuration. - class CaseAggregateRequestAttributes - include BaseGenericModel - - # Configuration for grouping aggregated results by one or more case fields. - attr_reader :group_by - - # A search query to filter which cases are included in the aggregation. Uses the same syntax as the Case Management search bar. - attr_reader :query_filter - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'group_by' => :'group_by', - :'query_filter' => :'query_filter' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'group_by' => :'CaseAggregateGroupBy', - :'query_filter' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateRequestAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'group_by') - self.group_by = attributes[:'group_by'] - end - - if attributes.key?(:'query_filter') - self.query_filter = attributes[:'query_filter'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @group_by.nil? - return false if @query_filter.nil? - true - end - - # Custom attribute writer method with validation - # @param group_by [Object] Object to be assigned - # @!visibility private - def group_by=(group_by) - if group_by.nil? - fail ArgumentError, 'invalid value for "group_by", group_by cannot be nil.' - end - @group_by = group_by - end - - # Custom attribute writer method with validation - # @param query_filter [Object] Object to be assigned - # @!visibility private - def query_filter=(query_filter) - if query_filter.nil? - fail ArgumentError, 'invalid value for "query_filter", query_filter cannot be nil.' - end - @query_filter = query_filter - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - group_by == o.group_by && - query_filter == o.query_filter && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [group_by, query_filter, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_request_data.rb b/lib/datadog_api_client/v2/models/case_aggregate_request_data.rb deleted file mode 100644 index 5b2ae7549332..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_request_data.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object wrapping the aggregation query type and attributes. - class CaseAggregateRequestData - include BaseGenericModel - - # Attributes for the aggregation request, including the search query and grouping configuration. - attr_reader :attributes - - # JSON:API resource type for case aggregation requests. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseAggregateRequestAttributes', - :'type' => :'CaseAggregateResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateRequestData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_response.rb b/lib/datadog_api_client/v2/models/case_aggregate_response.rb deleted file mode 100644 index 95c3d07b9aab..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_response.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing aggregated case counts grouped by the requested fields. - class CaseAggregateResponse - include BaseGenericModel - - # Data object containing the aggregation results, including total count and per-group breakdowns. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseAggregateResponseData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_assign.rb b/lib/datadog_api_client/v2/models/case_assign.rb index 42c77cf5125f..a7964289f036 100644 --- a/lib/datadog_api_client/v2/models/case_assign.rb +++ b/lib/datadog_api_client/v2/models/case_assign.rb @@ -24,7 +24,7 @@ class CaseAssign # Case assign attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_attributes.rb b/lib/datadog_api_client/v2/models/case_attributes.rb index 8c4f95e1ac8d..09da57a0014b 100644 --- a/lib/datadog_api_client/v2/models/case_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_attributes.rb @@ -24,7 +24,7 @@ class CaseAttributes # Timestamp of when the case was archived attr_accessor :archived_at - # Key-value pairs of case attributes. Each key maps to an array of string values, used for flexible metadata such as labels or tags. + # The definition of `CaseObjectAttributes` object. attr_accessor :attributes # Timestamp of when the case was closed diff --git a/lib/datadog_api_client/v2/models/case_automation_rule_state.rb b/lib/datadog_api_client/v2/models/case_automation_rule_state.rb deleted file mode 100644 index b0b9bedaf7a6..000000000000 --- a/lib/datadog_api_client/v2/models/case_automation_rule_state.rb +++ /dev/null @@ -1,27 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Whether the automation rule is active. Enabled rules trigger on matching case events; disabled rules are inactive but preserve their configuration. - class CaseAutomationRuleState - include BaseEnumModel - - ENABLED = "ENABLED".freeze - DISABLED = "DISABLED".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/case_bulk_action_type.rb b/lib/datadog_api_client/v2/models/case_bulk_action_type.rb deleted file mode 100644 index 3aa0b530a259..000000000000 --- a/lib/datadog_api_client/v2/models/case_bulk_action_type.rb +++ /dev/null @@ -1,35 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The type of action to apply in a bulk update. Allowed values are `priority`, `status`, `assign`, `unassign`, `archive`, `unarchive`, `jira`, `servicenow`, `linear`, `update_project`. - class CaseBulkActionType - include BaseEnumModel - - PRIORITY = "priority".freeze - STATUS = "status".freeze - ASSIGN = "assign".freeze - UNASSIGN = "unassign".freeze - ARCHIVE = "archive".freeze - UNARCHIVE = "unarchive".freeze - JIRA = "jira".freeze - SERVICENOW = "servicenow".freeze - LINEAR = "linear".freeze - UPDATE_PROJECT = "update_project".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/case_bulk_update_request.rb b/lib/datadog_api_client/v2/models/case_bulk_update_request.rb deleted file mode 100644 index 13da4f255c2f..000000000000 --- a/lib/datadog_api_client/v2/models/case_bulk_update_request.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for applying a single action (such as changing priority, status, or assignment) to multiple cases at once. - class CaseBulkUpdateRequest - include BaseGenericModel - - # Data object wrapping the bulk update type and attributes. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseBulkUpdateRequestData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseBulkUpdateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_bulk_update_request_attributes.rb b/lib/datadog_api_client/v2/models/case_bulk_update_request_attributes.rb deleted file mode 100644 index ddd108b85622..000000000000 --- a/lib/datadog_api_client/v2/models/case_bulk_update_request_attributes.rb +++ /dev/null @@ -1,156 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for the bulk update, specifying which cases to update and the action to apply. - class CaseBulkUpdateRequestAttributes - include BaseGenericModel - - # An array of case identifiers to apply the bulk action to. - attr_reader :case_ids - - # A key-value map of action-specific parameters. The required keys depend on the action type (for example, `priority` for the priority action, `assignee_id` for assign). - attr_accessor :payload - - # The type of action to apply in a bulk update. Allowed values are `priority`, `status`, `assign`, `unassign`, `archive`, `unarchive`, `jira`, `servicenow`, `linear`, `update_project`. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'case_ids' => :'case_ids', - :'payload' => :'payload', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'case_ids' => :'Array', - :'payload' => :'Hash', - :'type' => :'CaseBulkActionType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseBulkUpdateRequestAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'case_ids') - if (value = attributes[:'case_ids']).is_a?(Array) - self.case_ids = value - end - end - - if attributes.key?(:'payload') - self.payload = attributes[:'payload'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @case_ids.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param case_ids [Object] Object to be assigned - # @!visibility private - def case_ids=(case_ids) - if case_ids.nil? - fail ArgumentError, 'invalid value for "case_ids", case_ids cannot be nil.' - end - @case_ids = case_ids - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - case_ids == o.case_ids && - payload == o.payload && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [case_ids, payload, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_bulk_update_request_data.rb b/lib/datadog_api_client/v2/models/case_bulk_update_request_data.rb deleted file mode 100644 index 587da92ae88b..000000000000 --- a/lib/datadog_api_client/v2/models/case_bulk_update_request_data.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object wrapping the bulk update type and attributes. - class CaseBulkUpdateRequestData - include BaseGenericModel - - # Attributes for the bulk update, specifying which cases to update and the action to apply. - attr_reader :attributes - - # JSON:API resource type for bulk case operations. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseBulkUpdateRequestAttributes', - :'type' => :'CaseBulkResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseBulkUpdateRequestData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_comment.rb b/lib/datadog_api_client/v2/models/case_comment.rb index 8e3464942341..f2213389686b 100644 --- a/lib/datadog_api_client/v2/models/case_comment.rb +++ b/lib/datadog_api_client/v2/models/case_comment.rb @@ -24,7 +24,7 @@ class CaseComment # Case comment attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_count_group.rb b/lib/datadog_api_client/v2/models/case_count_group.rb deleted file mode 100644 index c91a5b03def2..000000000000 --- a/lib/datadog_api_client/v2/models/case_count_group.rb +++ /dev/null @@ -1,146 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A facet group containing counts broken down by the distinct values of a case field (for example, status or priority). - class CaseCountGroup - include BaseGenericModel - - # The name of the field being grouped on (for example, `status` or `priority`). - attr_reader :group - - # Values within this group. - attr_reader :group_values - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'group' => :'group', - :'group_values' => :'group_values' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'group' => :'String', - :'group_values' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCountGroup` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'group') - self.group = attributes[:'group'] - end - - if attributes.key?(:'group_values') - if (value = attributes[:'group_values']).is_a?(Array) - self.group_values = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @group.nil? - return false if @group_values.nil? - true - end - - # Custom attribute writer method with validation - # @param group [Object] Object to be assigned - # @!visibility private - def group=(group) - if group.nil? - fail ArgumentError, 'invalid value for "group", group cannot be nil.' - end - @group = group - end - - # Custom attribute writer method with validation - # @param group_values [Object] Object to be assigned - # @!visibility private - def group_values=(group_values) - if group_values.nil? - fail ArgumentError, 'invalid value for "group_values", group_values cannot be nil.' - end - @group_values = group_values - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - group == o.group && - group_values == o.group_values && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [group, group_values, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_count_response.rb b/lib/datadog_api_client/v2/models/case_count_response.rb deleted file mode 100644 index 94d4b3c5e544..000000000000 --- a/lib/datadog_api_client/v2/models/case_count_response.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing the total number of cases matching a query, optionally grouped by specified fields. - class CaseCountResponse - include BaseGenericModel - - # Data object containing the count results, including per-field group breakdowns. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseCountResponseData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCountResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_count_response_attributes.rb b/lib/datadog_api_client/v2/models/case_count_response_attributes.rb deleted file mode 100644 index b7c635766781..000000000000 --- a/lib/datadog_api_client/v2/models/case_count_response_attributes.rb +++ /dev/null @@ -1,125 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for the count response, including the total count and optional facet breakdowns. - class CaseCountResponseAttributes - include BaseGenericModel - - # List of facet groups, one per field specified in `group_bys`. - attr_reader :groups - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'groups' => :'groups' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'groups' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCountResponseAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'groups') - if (value = attributes[:'groups']).is_a?(Array) - self.groups = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @groups.nil? - true - end - - # Custom attribute writer method with validation - # @param groups [Object] Object to be assigned - # @!visibility private - def groups=(groups) - if groups.nil? - fail ArgumentError, 'invalid value for "groups", groups cannot be nil.' - end - @groups = groups - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - groups == o.groups && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [groups, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_create.rb b/lib/datadog_api_client/v2/models/case_create.rb index ae11d67a80c8..3e1e8eb70cd3 100644 --- a/lib/datadog_api_client/v2/models/case_create.rb +++ b/lib/datadog_api_client/v2/models/case_create.rb @@ -27,7 +27,7 @@ class CaseCreate # Relationships formed with the case on creation attr_accessor :relationships - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_empty.rb b/lib/datadog_api_client/v2/models/case_empty.rb index b7ac9c21ead7..800e88daf1ab 100644 --- a/lib/datadog_api_client/v2/models/case_empty.rb +++ b/lib/datadog_api_client/v2/models/case_empty.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class CaseEmpty include BaseGenericModel - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_insight.rb b/lib/datadog_api_client/v2/models/case_insight.rb deleted file mode 100644 index f8d7be670f39..000000000000 --- a/lib/datadog_api_client/v2/models/case_insight.rb +++ /dev/null @@ -1,165 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A reference to an external Datadog resource that provides investigative context for a case, such as a security signal, monitor alert, error tracking issue, or incident. - class CaseInsight - include BaseGenericModel - - # The URL path or deep link to the insight resource within Datadog (for example, `/monitors/12345?q=total`). - attr_reader :ref - - # The unique identifier of the referenced Datadog resource (for example, a monitor ID, incident ID, or signal ID). - attr_reader :resource_id - - # The type of Datadog resource linked to the case as contextual evidence. Each type corresponds to a different Datadog product signal (for example, a security finding, a monitor alert, or an incident). - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'ref' => :'ref', - :'resource_id' => :'resource_id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'ref' => :'String', - :'resource_id' => :'String', - :'type' => :'CaseInsightType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseInsight` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'ref') - self.ref = attributes[:'ref'] - end - - if attributes.key?(:'resource_id') - self.resource_id = attributes[:'resource_id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @ref.nil? - return false if @resource_id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param ref [Object] Object to be assigned - # @!visibility private - def ref=(ref) - if ref.nil? - fail ArgumentError, 'invalid value for "ref", ref cannot be nil.' - end - @ref = ref - end - - # Custom attribute writer method with validation - # @param resource_id [Object] Object to be assigned - # @!visibility private - def resource_id=(resource_id) - if resource_id.nil? - fail ArgumentError, 'invalid value for "resource_id", resource_id cannot be nil.' - end - @resource_id = resource_id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - ref == o.ref && - resource_id == o.resource_id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [ref, resource_id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_insight_type.rb b/lib/datadog_api_client/v2/models/case_insight_type.rb deleted file mode 100644 index aa41b73bd18c..000000000000 --- a/lib/datadog_api_client/v2/models/case_insight_type.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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The type of Datadog resource linked to the case as contextual evidence. Each type corresponds to a different Datadog product signal (for example, a security finding, a monitor alert, or an incident). - class CaseInsightType - include BaseEnumModel - - SECURITY_SIGNAL = "SECURITY_SIGNAL".freeze - MONITOR = "MONITOR".freeze - EVENT_CORRELATION = "EVENT_CORRELATION".freeze - ERROR_TRACKING = "ERROR_TRACKING".freeze - CLOUD_COST_RECOMMENDATION = "CLOUD_COST_RECOMMENDATION".freeze - INCIDENT = "INCIDENT".freeze - SENSITIVE_DATA_SCANNER_ISSUE = "SENSITIVE_DATA_SCANNER_ISSUE".freeze - EVENT = "EVENT".freeze - WATCHDOG_STORY = "WATCHDOG_STORY".freeze - WIDGET = "WIDGET".freeze - SECURITY_FINDING = "SECURITY_FINDING".freeze - INSIGHT_SCORECARD_CAMPAIGN = "INSIGHT_SCORECARD_CAMPAIGN".freeze - RESOURCE_POLICY = "RESOURCE_POLICY".freeze - APM_RECOMMENDATION = "APM_RECOMMENDATION".freeze - SCM_URL = "SCM_URL".freeze - PROFILING_DOWNSIZING_EXPERIMENT = "PROFILING_DOWNSIZING_EXPERIMENT".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/case_insights_attributes.rb b/lib/datadog_api_client/v2/models/case_insights_attributes.rb deleted file mode 100644 index 26b8ce8d2267..000000000000 --- a/lib/datadog_api_client/v2/models/case_insights_attributes.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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for adding or removing insights from a case. - class CaseInsightsAttributes - include BaseGenericModel - - # Array of insights to add to or remove from a case. - attr_reader :insights - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'insights' => :'insights' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'insights' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseInsightsAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'insights') - if (value = attributes[:'insights']).is_a?(Array) - self.insights = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @insights.nil? - return false if @insights.length > 100 - return false if @insights.length < 1 - true - end - - # Custom attribute writer method with validation - # @param insights [Object] Object to be assigned - # @!visibility private - def insights=(insights) - if insights.nil? - fail ArgumentError, 'invalid value for "insights", insights cannot be nil.' - end - if insights.length > 100 - fail ArgumentError, 'invalid value for "insights", number of items must be less than or equal to 100.' - end - if insights.length < 1 - fail ArgumentError, 'invalid value for "insights", number of items must be greater than or equal to 1.' - end - @insights = insights - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - insights == o.insights && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [insights, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_insights_data.rb b/lib/datadog_api_client/v2/models/case_insights_data.rb deleted file mode 100644 index 16a2a81692aa..000000000000 --- a/lib/datadog_api_client/v2/models/case_insights_data.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object containing the insights to add or remove. - class CaseInsightsData - include BaseGenericModel - - # Attributes for adding or removing insights from a case. - attr_reader :attributes - - # JSON:API resource type for cases. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseInsightsAttributes', - :'type' => :'CaseResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseInsightsData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_link_attributes.rb b/lib/datadog_api_client/v2/models/case_link_attributes.rb deleted file mode 100644 index 538737230643..000000000000 --- a/lib/datadog_api_client/v2/models/case_link_attributes.rb +++ /dev/null @@ -1,207 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes describing a directional relationship between two entities (cases, incidents, or pages). - class CaseLinkAttributes - include BaseGenericModel - - # The UUID of the child (target) entity in the relationship. - attr_reader :child_entity_id - - # The type of the child entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`. - attr_reader :child_entity_type - - # The UUID of the parent (source) entity in the relationship. - attr_reader :parent_entity_id - - # The type of the parent entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`. - attr_reader :parent_entity_type - - # The type of directional relationship. Allowed values: `RELATES_TO` (bidirectional association), `CAUSES` (parent causes child), `BLOCKS` (parent blocks child), `DUPLICATES` (parent duplicates child), `PARENT_OF` (hierarchical), `SUCCESSOR_OF` (sequence), `ESCALATES_TO` (priority escalation). - attr_reader :relationship - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'child_entity_id' => :'child_entity_id', - :'child_entity_type' => :'child_entity_type', - :'parent_entity_id' => :'parent_entity_id', - :'parent_entity_type' => :'parent_entity_type', - :'relationship' => :'relationship' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'child_entity_id' => :'String', - :'child_entity_type' => :'String', - :'parent_entity_id' => :'String', - :'parent_entity_type' => :'String', - :'relationship' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseLinkAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'child_entity_id') - self.child_entity_id = attributes[:'child_entity_id'] - end - - if attributes.key?(:'child_entity_type') - self.child_entity_type = attributes[:'child_entity_type'] - end - - if attributes.key?(:'parent_entity_id') - self.parent_entity_id = attributes[:'parent_entity_id'] - end - - if attributes.key?(:'parent_entity_type') - self.parent_entity_type = attributes[:'parent_entity_type'] - end - - if attributes.key?(:'relationship') - self.relationship = attributes[:'relationship'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @child_entity_id.nil? - return false if @child_entity_type.nil? - return false if @parent_entity_id.nil? - return false if @parent_entity_type.nil? - return false if @relationship.nil? - true - end - - # Custom attribute writer method with validation - # @param child_entity_id [Object] Object to be assigned - # @!visibility private - def child_entity_id=(child_entity_id) - if child_entity_id.nil? - fail ArgumentError, 'invalid value for "child_entity_id", child_entity_id cannot be nil.' - end - @child_entity_id = child_entity_id - end - - # Custom attribute writer method with validation - # @param child_entity_type [Object] Object to be assigned - # @!visibility private - def child_entity_type=(child_entity_type) - if child_entity_type.nil? - fail ArgumentError, 'invalid value for "child_entity_type", child_entity_type cannot be nil.' - end - @child_entity_type = child_entity_type - end - - # Custom attribute writer method with validation - # @param parent_entity_id [Object] Object to be assigned - # @!visibility private - def parent_entity_id=(parent_entity_id) - if parent_entity_id.nil? - fail ArgumentError, 'invalid value for "parent_entity_id", parent_entity_id cannot be nil.' - end - @parent_entity_id = parent_entity_id - end - - # Custom attribute writer method with validation - # @param parent_entity_type [Object] Object to be assigned - # @!visibility private - def parent_entity_type=(parent_entity_type) - if parent_entity_type.nil? - fail ArgumentError, 'invalid value for "parent_entity_type", parent_entity_type cannot be nil.' - end - @parent_entity_type = parent_entity_type - end - - # Custom attribute writer method with validation - # @param relationship [Object] Object to be assigned - # @!visibility private - def relationship=(relationship) - if relationship.nil? - fail ArgumentError, 'invalid value for "relationship", relationship cannot be nil.' - end - @relationship = relationship - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - child_entity_id == o.child_entity_id && - child_entity_type == o.child_entity_type && - parent_entity_id == o.parent_entity_id && - parent_entity_type == o.parent_entity_type && - relationship == o.relationship && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [child_entity_id, child_entity_type, parent_entity_id, parent_entity_type, relationship, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_link_create.rb b/lib/datadog_api_client/v2/models/case_link_create.rb deleted file mode 100644 index c778b8c02184..000000000000 --- a/lib/datadog_api_client/v2/models/case_link_create.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for creating a case link. - class CaseLinkCreate - include BaseGenericModel - - # Attributes describing a directional relationship between two entities (cases, incidents, or pages). - attr_reader :attributes - - # JSON:API resource type for case links. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseLinkAttributes', - :'type' => :'CaseLinkResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseLinkCreate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_link_response.rb b/lib/datadog_api_client/v2/models/case_link_response.rb deleted file mode 100644 index 32d0d64fc1fa..000000000000 --- a/lib/datadog_api_client/v2/models/case_link_response.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a single case link. - class CaseLinkResponse - include BaseGenericModel - - # A directional link representing a relationship between two entities. At least one entity must be a case. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseLink' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseLinkResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_links_response.rb b/lib/datadog_api_client/v2/models/case_links_response.rb deleted file mode 100644 index 5b2ff3a4ccb2..000000000000 --- a/lib/datadog_api_client/v2/models/case_links_response.rb +++ /dev/null @@ -1,125 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a list of case links. - class CaseLinksResponse - include BaseGenericModel - - # A list of case links. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseLinksResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_resource_type.rb b/lib/datadog_api_client/v2/models/case_resource_type.rb index e0e9c8f4201a..967786b108fa 100644 --- a/lib/datadog_api_client/v2/models/case_resource_type.rb +++ b/lib/datadog_api_client/v2/models/case_resource_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for cases. + # Case resource type class CaseResourceType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/case_type_create.rb b/lib/datadog_api_client/v2/models/case_type_create.rb index 53df7d267273..874b7c82c0c3 100644 --- a/lib/datadog_api_client/v2/models/case_type_create.rb +++ b/lib/datadog_api_client/v2/models/case_type_create.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Data object for creating a case type. + # Case type class CaseTypeCreate include BaseGenericModel - # Attributes of a case type, which define a classification category for cases. Organizations use case types to model different workflows (for example, Security Incident, Bug Report, Change Request). + # Case Type resource attributes attr_reader :attributes - # JSON:API resource type for case types. + # Case type resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_type_create_request.rb b/lib/datadog_api_client/v2/models/case_type_create_request.rb index de73024c903c..412a5408f25e 100644 --- a/lib/datadog_api_client/v2/models/case_type_create_request.rb +++ b/lib/datadog_api_client/v2/models/case_type_create_request.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for creating a case type. + # Case type create request class CaseTypeCreateRequest include BaseGenericModel - # Data object for creating a case type. + # Case type attr_reader :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_type_resource.rb b/lib/datadog_api_client/v2/models/case_type_resource.rb index 736c04a2495d..9b28ee4b9bb5 100644 --- a/lib/datadog_api_client/v2/models/case_type_resource.rb +++ b/lib/datadog_api_client/v2/models/case_type_resource.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A case type that defines a classification category for cases. Each case type can have its own custom attributes, statuses, and automation rules. + # The definition of `CaseType` object. class CaseTypeResource include BaseGenericModel - # Attributes of a case type, which define a classification category for cases. Organizations use case types to model different workflows (for example, Security Incident, Bug Report, Change Request). + # Case Type resource attributes attr_accessor :attributes # Case type's identifier attr_accessor :id - # JSON:API resource type for case types. + # Case type resource type attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_type_resource_attributes.rb b/lib/datadog_api_client/v2/models/case_type_resource_attributes.rb index 71a28d234182..b317858dc7b0 100644 --- a/lib/datadog_api_client/v2/models/case_type_resource_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_type_resource_attributes.rb @@ -17,20 +17,20 @@ require 'time' module DatadogAPIClient::V2 - # Attributes of a case type, which define a classification category for cases. Organizations use case types to model different workflows (for example, Security Incident, Bug Report, Change Request). + # Case Type resource attributes class CaseTypeResourceAttributes include BaseGenericModel - # Timestamp when the case type was marked as deleted. A null value indicates the case type is active. + # Timestamp of when the case type was deleted attr_accessor :deleted_at - # A detailed description explaining when this case type should be used. + # Case type description. attr_accessor :description - # An emoji icon representing the case type in the UI. + # Case type emoji. attr_accessor :emoji - # The display name of the case type, shown in the Case Management UI when creating or viewing cases. + # Case type name. attr_reader :name attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_type_resource_type.rb b/lib/datadog_api_client/v2/models/case_type_resource_type.rb index 57e3f78e128c..d5c743dea544 100644 --- a/lib/datadog_api_client/v2/models/case_type_resource_type.rb +++ b/lib/datadog_api_client/v2/models/case_type_resource_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for case types. + # Case type resource type class CaseTypeResourceType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/case_type_response.rb b/lib/datadog_api_client/v2/models/case_type_response.rb index bfc0ab3e5ccf..a1a486804aa3 100644 --- a/lib/datadog_api_client/v2/models/case_type_response.rb +++ b/lib/datadog_api_client/v2/models/case_type_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Response containing a single case type. + # Case type response class CaseTypeResponse include BaseGenericModel - # A case type that defines a classification category for cases. Each case type can have its own custom attributes, statuses, and automation rules. + # The definition of `CaseType` object. attr_accessor :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_type_update.rb b/lib/datadog_api_client/v2/models/case_type_update.rb deleted file mode 100644 index 50c26ff2d4c2..000000000000 --- a/lib/datadog_api_client/v2/models/case_type_update.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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a case type. - class CaseTypeUpdate - include BaseGenericModel - - # Attributes of a case type, which define a classification category for cases. Organizations use case types to model different workflows (for example, Security Incident, Bug Report, Change Request). - attr_accessor :attributes - - # JSON:API resource type for case types. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseTypeResourceAttributes', - :'type' => :'CaseTypeResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseTypeUpdate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_types_response.rb b/lib/datadog_api_client/v2/models/case_types_response.rb index 0104a30e7506..697aa99c4c79 100644 --- a/lib/datadog_api_client/v2/models/case_types_response.rb +++ b/lib/datadog_api_client/v2/models/case_types_response.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Response containing a list of case types. + # Case types response. class CaseTypesResponse include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/case_update_attributes.rb b/lib/datadog_api_client/v2/models/case_update_attributes.rb index 4205c6edf2cb..d65f0a256721 100644 --- a/lib/datadog_api_client/v2/models/case_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_update_attributes.rb @@ -24,7 +24,7 @@ class CaseUpdateAttributes # Case update attributes attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_attributes_attributes.rb b/lib/datadog_api_client/v2/models/case_update_attributes_attributes.rb index 94a273e87fe3..383966e519fa 100644 --- a/lib/datadog_api_client/v2/models/case_update_attributes_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_update_attributes_attributes.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class CaseUpdateAttributesAttributes include BaseGenericModel - # Key-value pairs of case attributes. Each key maps to an array of string values, used for flexible metadata such as labels or tags. + # The definition of `CaseObjectAttributes` object. attr_reader :attributes attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_comment.rb b/lib/datadog_api_client/v2/models/case_update_comment.rb deleted file mode 100644 index d30653c7dc99..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_comment.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a case comment. - class CaseUpdateComment - include BaseGenericModel - - # Attributes for updating a comment. - attr_reader :attributes - - # JSON:API resource type for cases. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseUpdateCommentAttributes', - :'type' => :'CaseResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateComment` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_comment_attributes.rb b/lib/datadog_api_client/v2/models/case_update_comment_attributes.rb deleted file mode 100644 index 7813378c875e..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_comment_attributes.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for updating a comment. - class CaseUpdateCommentAttributes - include BaseGenericModel - - # The updated comment message. - attr_reader :comment - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'comment' => :'comment' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'comment' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateCommentAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'comment') - self.comment = attributes[:'comment'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @comment.nil? - true - end - - # Custom attribute writer method with validation - # @param comment [Object] Object to be assigned - # @!visibility private - def comment=(comment) - if comment.nil? - fail ArgumentError, 'invalid value for "comment", comment cannot be nil.' - end - @comment = comment - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - comment == o.comment && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [comment, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_comment_request.rb b/lib/datadog_api_client/v2/models/case_update_comment_request.rb deleted file mode 100644 index 3b67f1dd66da..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_comment_request.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating a comment on a case timeline. - class CaseUpdateCommentRequest - include BaseGenericModel - - # Data object for updating a case comment. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseUpdateComment' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateCommentRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_custom_attribute.rb b/lib/datadog_api_client/v2/models/case_update_custom_attribute.rb index d1f115c6d453..986d0f7de606 100644 --- a/lib/datadog_api_client/v2/models/case_update_custom_attribute.rb +++ b/lib/datadog_api_client/v2/models/case_update_custom_attribute.rb @@ -21,10 +21,10 @@ module DatadogAPIClient::V2 class CaseUpdateCustomAttribute include BaseGenericModel - # A typed value for a custom attribute on a specific case. + # Custom attribute values attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_description.rb b/lib/datadog_api_client/v2/models/case_update_description.rb index 6a1f13055390..1167c430886c 100644 --- a/lib/datadog_api_client/v2/models/case_update_description.rb +++ b/lib/datadog_api_client/v2/models/case_update_description.rb @@ -24,7 +24,7 @@ class CaseUpdateDescription # Case update description attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_due_date.rb b/lib/datadog_api_client/v2/models/case_update_due_date.rb deleted file mode 100644 index 3ca5afeefd25..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_due_date.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a case's due date. - class CaseUpdateDueDate - include BaseGenericModel - - # Attributes for setting or clearing a case's due date. - attr_reader :attributes - - # JSON:API resource type for cases. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseUpdateDueDateAttributes', - :'type' => :'CaseResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateDueDate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_due_date_attributes.rb b/lib/datadog_api_client/v2/models/case_update_due_date_attributes.rb deleted file mode 100644 index 37f7a69d883c..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_due_date_attributes.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for setting or clearing a case's due date. - class CaseUpdateDueDateAttributes - include BaseGenericModel - - # The target resolution date for the case, in `YYYY-MM-DD` format. Set to `null` to clear the due date. - attr_reader :due_date - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'due_date' => :'due_date' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'due_date' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateDueDateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'due_date') - self.due_date = attributes[:'due_date'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @due_date.nil? - true - end - - # Custom attribute writer method with validation - # @param due_date [Object] Object to be assigned - # @!visibility private - def due_date=(due_date) - if due_date.nil? - fail ArgumentError, 'invalid value for "due_date", due_date cannot be nil.' - end - @due_date = due_date - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - due_date == o.due_date && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [due_date, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_due_date_request.rb b/lib/datadog_api_client/v2/models/case_update_due_date_request.rb deleted file mode 100644 index db434df49cd2..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_due_date_request.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating a case's due date. - class CaseUpdateDueDateRequest - include BaseGenericModel - - # Data object for updating a case's due date. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseUpdateDueDate' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateDueDateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_priority.rb b/lib/datadog_api_client/v2/models/case_update_priority.rb index 7fce18a8c47f..dfc7cd1751f3 100644 --- a/lib/datadog_api_client/v2/models/case_update_priority.rb +++ b/lib/datadog_api_client/v2/models/case_update_priority.rb @@ -24,7 +24,7 @@ class CaseUpdatePriority # Case update priority attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_resolved_reason.rb b/lib/datadog_api_client/v2/models/case_update_resolved_reason.rb deleted file mode 100644 index 21b79e1248e7..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_resolved_reason.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a case's resolved reason. - class CaseUpdateResolvedReason - include BaseGenericModel - - # Attributes for setting the resolution reason on a security case. - attr_reader :attributes - - # JSON:API resource type for cases. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseUpdateResolvedReasonAttributes', - :'type' => :'CaseResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateResolvedReason` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_resolved_reason_attributes.rb b/lib/datadog_api_client/v2/models/case_update_resolved_reason_attributes.rb deleted file mode 100644 index ab7d1370c503..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_resolved_reason_attributes.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for setting the resolution reason on a security case. - class CaseUpdateResolvedReasonAttributes - include BaseGenericModel - - # The reason the security case was resolved (for example, `FALSE_POSITIVE`, `TRUE_POSITIVE`, `BENIGN_POSITIVE`). - attr_reader :security_resolved_reason - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'security_resolved_reason' => :'security_resolved_reason' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'security_resolved_reason' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateResolvedReasonAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'security_resolved_reason') - self.security_resolved_reason = attributes[:'security_resolved_reason'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @security_resolved_reason.nil? - true - end - - # Custom attribute writer method with validation - # @param security_resolved_reason [Object] Object to be assigned - # @!visibility private - def security_resolved_reason=(security_resolved_reason) - if security_resolved_reason.nil? - fail ArgumentError, 'invalid value for "security_resolved_reason", security_resolved_reason cannot be nil.' - end - @security_resolved_reason = security_resolved_reason - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - security_resolved_reason == o.security_resolved_reason && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [security_resolved_reason, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_resolved_reason_request.rb b/lib/datadog_api_client/v2/models/case_update_resolved_reason_request.rb deleted file mode 100644 index 020957932604..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_resolved_reason_request.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating the resolution reason on a closed security case. - class CaseUpdateResolvedReasonRequest - include BaseGenericModel - - # Data object for updating a case's resolved reason. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseUpdateResolvedReason' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateResolvedReasonRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_status.rb b/lib/datadog_api_client/v2/models/case_update_status.rb index 37ad158349ac..77d652d314c6 100644 --- a/lib/datadog_api_client/v2/models/case_update_status.rb +++ b/lib/datadog_api_client/v2/models/case_update_status.rb @@ -24,7 +24,7 @@ class CaseUpdateStatus # Case update status attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_title.rb b/lib/datadog_api_client/v2/models/case_update_title.rb index 55311210b2da..b5f41b6d4fb9 100644 --- a/lib/datadog_api_client/v2/models/case_update_title.rb +++ b/lib/datadog_api_client/v2/models/case_update_title.rb @@ -24,7 +24,7 @@ class CaseUpdateTitle # Case update title attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_view.rb b/lib/datadog_api_client/v2/models/case_view.rb deleted file mode 100644 index 4f5fe4fa77f3..000000000000 --- a/lib/datadog_api_client/v2/models/case_view.rb +++ /dev/null @@ -1,175 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A saved case view that provides a filtered, reusable list of cases matching a specific query. Views act as persistent dashboards for monitoring case subsets. - class CaseView - include BaseGenericModel - - # Attributes of a case view, including the filter query and optional notification rule. - attr_reader :attributes - - # The view's identifier. - attr_reader :id - - # Related resources for the case view, including the creator, last modifier, and associated project. - attr_accessor :relationships - - # JSON:API resource type for case views. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'id' => :'id', - :'relationships' => :'relationships', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseViewAttributes', - :'id' => :'String', - :'relationships' => :'CaseViewRelationships', - :'type' => :'CaseViewResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseView` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - id == o.id && - relationships == o.relationships && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, id, relationships, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_view_create.rb b/lib/datadog_api_client/v2/models/case_view_create.rb deleted file mode 100644 index e04bba9a974a..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_create.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for creating a case view. - class CaseViewCreate - include BaseGenericModel - - # Attributes required to create a case view. - attr_reader :attributes - - # JSON:API resource type for case views. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseViewCreateAttributes', - :'type' => :'CaseViewResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewCreate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_view_create_attributes.rb b/lib/datadog_api_client/v2/models/case_view_create_attributes.rb deleted file mode 100644 index 00d718839eaf..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_create_attributes.rb +++ /dev/null @@ -1,175 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes required to create a case view. - class CaseViewCreateAttributes - include BaseGenericModel - - # The name of the view. - attr_reader :name - - # The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - attr_accessor :np_rule_id - - # The UUID of the project this view belongs to. Views are scoped to a single project. - attr_reader :project_id - - # The query used to filter cases in this view. - attr_reader :query - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name', - :'np_rule_id' => :'np_rule_id', - :'project_id' => :'project_id', - :'query' => :'query' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String', - :'np_rule_id' => :'String', - :'project_id' => :'String', - :'query' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewCreateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'np_rule_id') - self.np_rule_id = attributes[:'np_rule_id'] - end - - if attributes.key?(:'project_id') - self.project_id = attributes[:'project_id'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @name.nil? - return false if @project_id.nil? - return false if @query.nil? - true - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Custom attribute writer method with validation - # @param project_id [Object] Object to be assigned - # @!visibility private - def project_id=(project_id) - if project_id.nil? - fail ArgumentError, 'invalid value for "project_id", project_id cannot be nil.' - end - @project_id = project_id - end - - # Custom attribute writer method with validation - # @param query [Object] Object to be assigned - # @!visibility private - def query=(query) - if query.nil? - fail ArgumentError, 'invalid value for "query", query cannot be nil.' - end - @query = query - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - np_rule_id == o.np_rule_id && - project_id == o.project_id && - query == o.query && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, np_rule_id, project_id, query, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_view_response.rb b/lib/datadog_api_client/v2/models/case_view_response.rb deleted file mode 100644 index f5a2adab3de6..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_response.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a single case view. - class CaseViewResponse - include BaseGenericModel - - # A saved case view that provides a filtered, reusable list of cases matching a specific query. Views act as persistent dashboards for monitoring case subsets. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseView' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_view_update.rb b/lib/datadog_api_client/v2/models/case_view_update.rb deleted file mode 100644 index f35e40625995..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_update.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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a case view. - class CaseViewUpdate - include BaseGenericModel - - # Attributes that can be updated on a case view. All fields are optional; only provided fields are changed. - attr_accessor :attributes - - # JSON:API resource type for case views. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseViewUpdateAttributes', - :'type' => :'CaseViewResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewUpdate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_view_update_attributes.rb b/lib/datadog_api_client/v2/models/case_view_update_attributes.rb deleted file mode 100644 index a3a92a02757f..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_update_attributes.rb +++ /dev/null @@ -1,125 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes that can be updated on a case view. All fields are optional; only provided fields are changed. - class CaseViewUpdateAttributes - include BaseGenericModel - - # The name of the view. - attr_accessor :name - - # The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - attr_accessor :np_rule_id - - # The query used to filter cases in this view. - attr_accessor :query - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name', - :'np_rule_id' => :'np_rule_id', - :'query' => :'query' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String', - :'np_rule_id' => :'String', - :'query' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewUpdateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'np_rule_id') - self.np_rule_id = attributes[:'np_rule_id'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - np_rule_id == o.np_rule_id && - query == o.query && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, np_rule_id, query, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_watcher.rb b/lib/datadog_api_client/v2/models/case_watcher.rb deleted file mode 100644 index 3bd4faa392f4..000000000000 --- a/lib/datadog_api_client/v2/models/case_watcher.rb +++ /dev/null @@ -1,165 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Represents a user who is subscribed to notifications for a case. Watchers receive updates when the case's status, priority, assignee, or comments change. - class CaseWatcher - include BaseGenericModel - - # The primary identifier of the case watcher. - attr_reader :id - - # Relationships for a case watcher, linking to the underlying user resource. - attr_reader :relationships - - # JSON:API resource type for case watchers. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'id' => :'id', - :'relationships' => :'relationships', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'id' => :'String', - :'relationships' => :'CaseWatcherRelationships', - :'type' => :'CaseWatcherResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseWatcher` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @id.nil? - return false if @relationships.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param relationships [Object] Object to be assigned - # @!visibility private - def relationships=(relationships) - if relationships.nil? - fail ArgumentError, 'invalid value for "relationships", relationships cannot be nil.' - end - @relationships = relationships - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - relationships == o.relationships && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [id, relationships, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_watcher_relationships.rb b/lib/datadog_api_client/v2/models/case_watcher_relationships.rb deleted file mode 100644 index efb530d45aa8..000000000000 --- a/lib/datadog_api_client/v2/models/case_watcher_relationships.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Relationships for a case watcher, linking to the underlying user resource. - class CaseWatcherRelationships - include BaseGenericModel - - # The user relationship for a case watcher. - attr_reader :user - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'user' => :'user' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'user' => :'CaseWatcherUserRelationship' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseWatcherRelationships` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'user') - self.user = attributes[:'user'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @user.nil? - true - end - - # Custom attribute writer method with validation - # @param user [Object] Object to be assigned - # @!visibility private - def user=(user) - if user.nil? - fail ArgumentError, 'invalid value for "user", user cannot be nil.' - end - @user = user - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user == o.user && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [user, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_watcher_user_relationship.rb b/lib/datadog_api_client/v2/models/case_watcher_user_relationship.rb deleted file mode 100644 index 5b62e26eb150..000000000000 --- a/lib/datadog_api_client/v2/models/case_watcher_user_relationship.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The user relationship for a case watcher. - class CaseWatcherUserRelationship - include BaseGenericModel - - # Relationship to user object. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'UserRelationshipData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseWatcherUserRelationship` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_watchers_response.rb b/lib/datadog_api_client/v2/models/case_watchers_response.rb deleted file mode 100644 index 4eaad11ff1ef..000000000000 --- a/lib/datadog_api_client/v2/models/case_watchers_response.rb +++ /dev/null @@ -1,125 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing the list of users watching a case. - class CaseWatchersResponse - include BaseGenericModel - - # List of case watchers. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseWatchersResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config.rb b/lib/datadog_api_client/v2/models/custom_attribute_config.rb index b78efdeb6a45..1db82cea9155 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A custom attribute configuration that defines an organization-specific metadata field on cases. Custom attributes are scoped to a case type and can hold text, URLs, numbers, or predefined select options. + # The definition of `CustomAttributeConfig` object. class CustomAttributeConfig include BaseGenericModel - # Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type. + # Custom attribute resource attributes attr_accessor :attributes # Custom attribute configs identifier attr_accessor :id - # JSON:API resource type for custom attribute configurations. + # Custom attributes config JSON:API resource type attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_attributes_create.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_attributes_create.rb index 89cda11d1b36..11f6ca147db7 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_attributes_create.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_attributes_create.rb @@ -17,23 +17,23 @@ require 'time' module DatadogAPIClient::V2 - # Attributes required to create a custom attribute configuration. + # Custom attribute config resource attributes class CustomAttributeConfigAttributesCreate include BaseGenericModel - # A description explaining the purpose and expected values for this custom attribute. + # Custom attribute description. attr_accessor :description - # The human-readable label shown in the Case Management UI for this custom attribute. + # Custom attribute name. attr_reader :display_name - # If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed. + # Whether multiple values can be set attr_reader :is_multi - # The programmatic key used to reference this custom attribute in search queries and API calls. + # Custom attribute key. This will be the value use to search on this custom attribute attr_reader :key - # The data type of the custom attribute, which determines the allowed values and UI input control. + # Custom attributes type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_create.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_create.rb index 9aa9877b5f53..1dd69d393f32 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_create.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_create.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Data object for creating a custom attribute configuration. + # Custom attribute config class CustomAttributeConfigCreate include BaseGenericModel - # Attributes required to create a custom attribute configuration. + # Custom attribute config resource attributes attr_reader :attributes - # JSON:API resource type for custom attribute configurations. + # Custom attributes config JSON:API resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_create_request.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_create_request.rb index 76dfa49cbe44..218c169ce4c9 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_create_request.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_create_request.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for creating a custom attribute configuration. + # Custom attribute config create request class CustomAttributeConfigCreateRequest include BaseGenericModel - # Data object for creating a custom attribute configuration. + # Custom attribute config attr_reader :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_resource_attributes.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_resource_attributes.rb index 4c7236e5f6fb..ba238edb4cd1 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_resource_attributes.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_resource_attributes.rb @@ -17,26 +17,26 @@ require 'time' module DatadogAPIClient::V2 - # Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type. + # Custom attribute resource attributes class CustomAttributeConfigResourceAttributes include BaseGenericModel - # The UUID of the case type this custom attribute belongs to. + # Custom attribute config identifier. attr_reader :case_type_id - # A description explaining the purpose and expected values for this custom attribute. + # Custom attribute description. attr_accessor :description - # The human-readable label shown in the Case Management UI for this custom attribute. + # Custom attribute name. attr_reader :display_name - # If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed. + # Whether multiple values can be set attr_reader :is_multi - # The programmatic key used to reference this custom attribute in search queries and API calls. + # Custom attribute key. This will be the value use to search on this custom attribute attr_reader :key - # The data type of the custom attribute, which determines the allowed values and UI input control. + # Custom attributes type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_resource_type.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_resource_type.rb index 8327df42b053..a0d880da5375 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_resource_type.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_resource_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for custom attribute configurations. + # Custom attributes config JSON:API resource type class CustomAttributeConfigResourceType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_response.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_response.rb index 2619759ee411..f9269f21d020 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_response.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Response containing a single custom attribute configuration. + # Custom attribute config response. class CustomAttributeConfigResponse include BaseGenericModel - # A custom attribute configuration that defines an organization-specific metadata field on cases. Custom attributes are scoped to a case type and can hold text, URLs, numbers, or predefined select options. + # The definition of `CustomAttributeConfig` object. attr_accessor :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_update.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_update.rb deleted file mode 100644 index a81741d7449d..000000000000 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_update.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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a custom attribute configuration. - class CustomAttributeConfigUpdate - include BaseGenericModel - - # Attributes that can be updated on a custom attribute configuration. All fields are optional; only provided fields are changed. - attr_accessor :attributes - - # JSON:API resource type for custom attribute configurations. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CustomAttributeConfigUpdateAttributes', - :'type' => :'CustomAttributeConfigResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomAttributeConfigUpdate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_update_attributes.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_update_attributes.rb deleted file mode 100644 index 1259abe6ab16..000000000000 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_update_attributes.rb +++ /dev/null @@ -1,145 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes that can be updated on a custom attribute configuration. All fields are optional; only provided fields are changed. - class CustomAttributeConfigUpdateAttributes - include BaseGenericModel - - # A description explaining the purpose and expected values for this custom attribute. - attr_accessor :description - - # The human-readable label shown in the Case Management UI for this custom attribute. - attr_accessor :display_name - - # An external field identifier to auto-populate this attribute from (used for integrations with external systems). - attr_accessor :map_from - - # The data type of the custom attribute, which determines the allowed values and UI input control. - attr_accessor :type - - # Type-specific configuration for the custom attribute. For SELECT-type attributes, this contains the list of allowed options. - attr_accessor :type_data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'description' => :'description', - :'display_name' => :'display_name', - :'map_from' => :'map_from', - :'type' => :'type', - :'type_data' => :'type_data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'description' => :'String', - :'display_name' => :'String', - :'map_from' => :'String', - :'type' => :'CustomAttributeType', - :'type_data' => :'CustomAttributeTypeData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomAttributeConfigUpdateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'map_from') - self.map_from = attributes[:'map_from'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'type_data') - self.type_data = attributes[:'type_data'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - description == o.description && - display_name == o.display_name && - map_from == o.map_from && - type == o.type && - type_data == o.type_data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [description, display_name, map_from, type, type_data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_update_request.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_update_request.rb deleted file mode 100644 index f7bdec82308f..000000000000 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_update_request.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating a custom attribute configuration. - class CustomAttributeConfigUpdateRequest - include BaseGenericModel - - # Data object for updating a custom attribute configuration. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CustomAttributeConfigUpdate' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomAttributeConfigUpdateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_configs_response.rb b/lib/datadog_api_client/v2/models/custom_attribute_configs_response.rb index ab483099ce1c..04f397c542fb 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_configs_response.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_configs_response.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Response containing a list of custom attribute configurations. + # Custom attribute configs response. class CustomAttributeConfigsResponse include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/custom_attribute_type.rb b/lib/datadog_api_client/v2/models/custom_attribute_type.rb index de62c0f6dcf5..64ba08a58311 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_type.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The data type of the custom attribute, which determines the allowed values and UI input control. + # Custom attributes type class CustomAttributeType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/custom_attribute_type_data.rb b/lib/datadog_api_client/v2/models/custom_attribute_type_data.rb deleted file mode 100644 index f7e76514867f..000000000000 --- a/lib/datadog_api_client/v2/models/custom_attribute_type_data.rb +++ /dev/null @@ -1,107 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Type-specific configuration for the custom attribute. For SELECT-type attributes, this contains the list of allowed options. - class CustomAttributeTypeData - include BaseGenericModel - - # Options for SELECT type custom attributes. - attr_accessor :options - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'options' => :'options' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'options' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomAttributeTypeData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'options') - if (value = attributes[:'options']).is_a?(Array) - self.options = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - options == o.options && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [options, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_value.rb b/lib/datadog_api_client/v2/models/custom_attribute_value.rb index a9ee8c94346d..d8cb9ad15a45 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_value.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_value.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A typed value for a custom attribute on a specific case. + # Custom attribute values class CustomAttributeValue include BaseGenericModel # If true, value must be an array attr_reader :is_multi - # The data type of the custom attribute, which determines the allowed values and UI input control. + # Custom attributes type attr_reader :type - # The value of a custom attribute. The accepted format depends on the attribute's type and whether it accepts multiple values. + # Union of supported value for a custom attribute attr_reader :value attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_values_union.rb b/lib/datadog_api_client/v2/models/custom_attribute_values_union.rb index 31dc05f9faf0..b651f2309d56 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_values_union.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_values_union.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The value of a custom attribute. The accepted format depends on the attribute's type and whether it accepts multiple values. + # Union of supported value for a custom attribute module CustomAttributeValuesUnion class << self include BaseOneOfModel diff --git a/lib/datadog_api_client/v2/models/maintenance_window_attributes.rb b/lib/datadog_api_client/v2/models/maintenance_window_attributes.rb deleted file mode 100644 index 089144a81dd6..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_attributes.rb +++ /dev/null @@ -1,206 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes of a maintenance window, including its schedule and the query that determines which cases are affected. - class MaintenanceWindowAttributes - include BaseGenericModel - - # The UUID of the user who created this maintenance window. Read-only. - attr_accessor :created_by - - # The ISO 8601 timestamp when the maintenance window ends and normal notification behavior resumes. - attr_reader :end_at - - # A human-readable name for the maintenance window (for example, `Database migration - Dec 15`). - attr_reader :name - - # A case search query that determines which cases are affected during the maintenance window. Uses the same syntax as the Case Management search bar. - attr_reader :query - - # The ISO 8601 timestamp when the maintenance window begins and notifications start being suppressed. - attr_reader :start_at - - # The UUID of the user who last modified this maintenance window. Read-only. - attr_accessor :updated_by - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_by' => :'created_by', - :'end_at' => :'end_at', - :'name' => :'name', - :'query' => :'query', - :'start_at' => :'start_at', - :'updated_by' => :'updated_by' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_by' => :'String', - :'end_at' => :'Time', - :'name' => :'String', - :'query' => :'String', - :'start_at' => :'Time', - :'updated_by' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created_by') - self.created_by = attributes[:'created_by'] - end - - if attributes.key?(:'end_at') - self.end_at = attributes[:'end_at'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.key?(:'start_at') - self.start_at = attributes[:'start_at'] - end - - if attributes.key?(:'updated_by') - self.updated_by = attributes[:'updated_by'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @end_at.nil? - return false if @name.nil? - return false if @query.nil? - return false if @start_at.nil? - true - end - - # Custom attribute writer method with validation - # @param end_at [Object] Object to be assigned - # @!visibility private - def end_at=(end_at) - if end_at.nil? - fail ArgumentError, 'invalid value for "end_at", end_at cannot be nil.' - end - @end_at = end_at - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Custom attribute writer method with validation - # @param query [Object] Object to be assigned - # @!visibility private - def query=(query) - if query.nil? - fail ArgumentError, 'invalid value for "query", query cannot be nil.' - end - @query = query - end - - # Custom attribute writer method with validation - # @param start_at [Object] Object to be assigned - # @!visibility private - def start_at=(start_at) - if start_at.nil? - fail ArgumentError, 'invalid value for "start_at", start_at cannot be nil.' - end - @start_at = start_at - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_by == o.created_by && - end_at == o.end_at && - name == o.name && - query == o.query && - start_at == o.start_at && - updated_by == o.updated_by && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_by, end_at, name, query, start_at, updated_by, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_create_request.rb b/lib/datadog_api_client/v2/models/maintenance_window_create_request.rb deleted file mode 100644 index 6aa6f78782d3..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_create_request.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for creating a maintenance window. - class MaintenanceWindowCreateRequest - include BaseGenericModel - - # Data object for creating a maintenance window. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'MaintenanceWindowCreate' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowCreateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_resource_type.rb b/lib/datadog_api_client/v2/models/maintenance_window_resource_type.rb deleted file mode 100644 index 681018c99926..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_resource_type.rb +++ /dev/null @@ -1,26 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # JSON:API resource type for maintenance windows. - class MaintenanceWindowResourceType - include BaseEnumModel - - MAINTENANCE_WINDOW = "maintenance_window".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_response.rb b/lib/datadog_api_client/v2/models/maintenance_window_response.rb deleted file mode 100644 index b572e9918ecf..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_response.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a single maintenance window. - class MaintenanceWindowResponse - include BaseGenericModel - - # A maintenance window that defines a scheduled time period during which case-related notifications and automation rules are suppressed. Each maintenance window applies to cases matching a specified query. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'MaintenanceWindow' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_update.rb b/lib/datadog_api_client/v2/models/maintenance_window_update.rb deleted file mode 100644 index 60639773c83d..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_update.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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a maintenance window. - class MaintenanceWindowUpdate - include BaseGenericModel - - # Attributes that can be updated on a maintenance window. All fields are optional; only provided fields are changed. - attr_accessor :attributes - - # JSON:API resource type for maintenance windows. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'MaintenanceWindowUpdateAttributes', - :'type' => :'MaintenanceWindowResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowUpdate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_update_attributes.rb b/lib/datadog_api_client/v2/models/maintenance_window_update_attributes.rb deleted file mode 100644 index b7b517c3abce..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_update_attributes.rb +++ /dev/null @@ -1,135 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes that can be updated on a maintenance window. All fields are optional; only provided fields are changed. - class MaintenanceWindowUpdateAttributes - include BaseGenericModel - - # The end time of the maintenance window. - attr_accessor :end_at - - # The name of the maintenance window. - attr_accessor :name - - # The query to filter event management cases for this maintenance window. - attr_accessor :query - - # The start time of the maintenance window. - attr_accessor :start_at - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'end_at' => :'end_at', - :'name' => :'name', - :'query' => :'query', - :'start_at' => :'start_at' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'end_at' => :'Time', - :'name' => :'String', - :'query' => :'String', - :'start_at' => :'Time' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowUpdateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'end_at') - self.end_at = attributes[:'end_at'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.key?(:'start_at') - self.start_at = attributes[:'start_at'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - end_at == o.end_at && - name == o.name && - query == o.query && - start_at == o.start_at && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [end_at, name, query, start_at, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_update_request.rb b/lib/datadog_api_client/v2/models/maintenance_window_update_request.rb deleted file mode 100644 index 561d305a34de..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_update_request.rb +++ /dev/null @@ -1,123 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating a maintenance window. - class MaintenanceWindowUpdateRequest - include BaseGenericModel - - # Data object for updating a maintenance window. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'MaintenanceWindowUpdate' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowUpdateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_windows_response.rb b/lib/datadog_api_client/v2/models/maintenance_windows_response.rb deleted file mode 100644 index 29f16c8a9bc9..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_windows_response.rb +++ /dev/null @@ -1,125 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a list of maintenance windows. - class MaintenanceWindowsResponse - include BaseGenericModel - - # List of maintenance windows. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowsResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_view_attributes.rb b/lib/datadog_api_client/v2/models/model_lab_artifact_info.rb similarity index 63% rename from lib/datadog_api_client/v2/models/case_view_attributes.rb rename to lib/datadog_api_client/v2/models/model_lab_artifact_info.rb index 9048ef887fcb..1b83ce8e09c6 100644 --- a/lib/datadog_api_client/v2/models/case_view_attributes.rb +++ b/lib/datadog_api_client/v2/models/model_lab_artifact_info.rb @@ -17,24 +17,21 @@ require 'time' module DatadogAPIClient::V2 - # Attributes of a case view, including the filter query and optional notification rule. - class CaseViewAttributes + # Information about a project-level artifact file. + class ModelLabArtifactInfo include BaseGenericModel - # Timestamp when the view was created. - attr_reader :created_at - - # Timestamp when the view was last modified. - attr_accessor :modified_at + # The full artifact path relative to the project's artifact root. + attr_reader :artifact_path - # A human-readable name for the view, displayed in the Case Management UI. - attr_reader :name + # The date and time the artifact was created. + attr_reader :created_at - # The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - attr_accessor :np_rule_id + # The size of the file in bytes. + attr_accessor :file_size - # The search query that determines which cases appear in this view. Uses the same syntax as the Case Management search bar (for example, `status:open priority:P1`). - attr_reader :query + # The filename of the artifact. + attr_reader :filename attr_accessor :additional_properties @@ -42,11 +39,10 @@ class CaseViewAttributes # @!visibility private def self.attribute_map { + :'artifact_path' => :'artifact_path', :'created_at' => :'created_at', - :'modified_at' => :'modified_at', - :'name' => :'name', - :'np_rule_id' => :'np_rule_id', - :'query' => :'query' + :'file_size' => :'file_size', + :'filename' => :'filename' } end @@ -54,20 +50,27 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'artifact_path' => :'String', :'created_at' => :'Time', - :'modified_at' => :'Time', - :'name' => :'String', - :'np_rule_id' => :'String', - :'query' => :'String' + :'file_size' => :'Integer', + :'filename' => :'String' } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'file_size', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabArtifactInfo` initialize method" end self.additional_properties = {} @@ -80,24 +83,20 @@ def initialize(attributes = {}) end } - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] + if attributes.key?(:'artifact_path') + self.artifact_path = attributes[:'artifact_path'] end - if attributes.key?(:'modified_at') - self.modified_at = attributes[:'modified_at'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] end - if attributes.key?(:'np_rule_id') - self.np_rule_id = attributes[:'np_rule_id'] + if attributes.key?(:'file_size') + self.file_size = attributes[:'file_size'] end - if attributes.key?(:'query') - self.query = attributes[:'query'] + if attributes.key?(:'filename') + self.filename = attributes[:'filename'] end end @@ -105,40 +104,40 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if @artifact_path.nil? return false if @created_at.nil? - return false if @name.nil? - return false if @query.nil? + return false if @filename.nil? true end # Custom attribute writer method with validation - # @param created_at [Object] Object to be assigned + # @param artifact_path [Object] Object to be assigned # @!visibility private - def created_at=(created_at) - if created_at.nil? - fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + def artifact_path=(artifact_path) + if artifact_path.nil? + fail ArgumentError, 'invalid value for "artifact_path", artifact_path cannot be nil.' end - @created_at = created_at + @artifact_path = artifact_path end # Custom attribute writer method with validation - # @param name [Object] Object to be assigned + # @param created_at [Object] Object to be assigned # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' end - @name = name + @created_at = created_at end # Custom attribute writer method with validation - # @param query [Object] Object to be assigned + # @param filename [Object] Object to be assigned # @!visibility private - def query=(query) - if query.nil? - fail ArgumentError, 'invalid value for "query", query cannot be nil.' + def filename=(filename) + if filename.nil? + fail ArgumentError, 'invalid value for "filename", filename cannot be nil.' end - @query = query + @filename = filename end # Returns the object in the form of hash, with additionalProperties support. @@ -167,11 +166,10 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + artifact_path == o.artifact_path && created_at == o.created_at && - modified_at == o.modified_at && - name == o.name && - np_rule_id == o.np_rule_id && - query == o.query && + file_size == o.file_size && + filename == o.filename && additional_properties == o.additional_properties end @@ -179,7 +177,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [created_at, modified_at, name, np_rule_id, query, additional_properties].hash + [artifact_path, created_at, file_size, filename, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_group_by.rb b/lib/datadog_api_client/v2/models/model_lab_artifact_object_info.rb similarity index 65% rename from lib/datadog_api_client/v2/models/case_aggregate_group_by.rb rename to lib/datadog_api_client/v2/models/model_lab_artifact_object_info.rb index 08ed0b454bf7..605e7ee9235e 100644 --- a/lib/datadog_api_client/v2/models/case_aggregate_group_by.rb +++ b/lib/datadog_api_client/v2/models/model_lab_artifact_object_info.rb @@ -17,15 +17,18 @@ require 'time' module DatadogAPIClient::V2 - # Configuration for grouping aggregated results by one or more case fields. - class CaseAggregateGroupBy + # Information about an artifact file or directory within a run. + class ModelLabArtifactObjectInfo include BaseGenericModel - # Fields to group by. - attr_reader :groups + # The size of the file in bytes. + attr_accessor :file_size - # Maximum number of groups to return. - attr_reader :limit + # Whether this artifact entry is a directory. + attr_reader :is_dir + + # The path of the artifact relative to the run's artifact root. + attr_reader :path attr_accessor :additional_properties @@ -33,8 +36,9 @@ class CaseAggregateGroupBy # @!visibility private def self.attribute_map { - :'groups' => :'groups', - :'limit' => :'limit' + :'file_size' => :'file_size', + :'is_dir' => :'is_dir', + :'path' => :'path' } end @@ -42,17 +46,26 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'groups' => :'Array', - :'limit' => :'Integer' + :'file_size' => :'Integer', + :'is_dir' => :'Boolean', + :'path' => :'String' } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'file_size', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateGroupBy` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabArtifactObjectInfo` initialize method" end self.additional_properties = {} @@ -65,14 +78,16 @@ def initialize(attributes = {}) end } - if attributes.key?(:'groups') - if (value = attributes[:'groups']).is_a?(Array) - self.groups = value - end + if attributes.key?(:'file_size') + self.file_size = attributes[:'file_size'] + end + + if attributes.key?(:'is_dir') + self.is_dir = attributes[:'is_dir'] end - if attributes.key?(:'limit') - self.limit = attributes[:'limit'] + if attributes.key?(:'path') + self.path = attributes[:'path'] end end @@ -80,33 +95,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @groups.nil? - return false if @limit.nil? - return false if @limit > 1000 + return false if @is_dir.nil? + return false if @path.nil? true end # Custom attribute writer method with validation - # @param groups [Object] Object to be assigned + # @param is_dir [Object] Object to be assigned # @!visibility private - def groups=(groups) - if groups.nil? - fail ArgumentError, 'invalid value for "groups", groups cannot be nil.' + def is_dir=(is_dir) + if is_dir.nil? + fail ArgumentError, 'invalid value for "is_dir", is_dir cannot be nil.' end - @groups = groups + @is_dir = is_dir end # Custom attribute writer method with validation - # @param limit [Object] Object to be assigned + # @param path [Object] Object to be assigned # @!visibility private - def limit=(limit) - if limit.nil? - fail ArgumentError, 'invalid value for "limit", limit cannot be nil.' - end - if limit > 1000 - fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 1000.' + def path=(path) + if path.nil? + fail ArgumentError, 'invalid value for "path", path cannot be nil.' end - @limit = limit + @path = path end # Returns the object in the form of hash, with additionalProperties support. @@ -135,8 +146,9 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - groups == o.groups && - limit == o.limit && + file_size == o.file_size && + is_dir == o.is_dir && + path == o.path && additional_properties == o.additional_properties end @@ -144,7 +156,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [groups, limit, additional_properties].hash + [file_size, is_dir, path, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/model_lab_facet_keys_attributes.rb b/lib/datadog_api_client/v2/models/model_lab_facet_keys_attributes.rb new file mode 100644 index 000000000000..9c56d34b9f41 --- /dev/null +++ b/lib/datadog_api_client/v2/models/model_lab_facet_keys_attributes.rb @@ -0,0 +1,168 @@ +=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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Available facet key names for filtering resources. + class ModelLabFacetKeysAttributes + include BaseGenericModel + + # The list of available metric facet keys. + attr_accessor :metrics + + # The list of available parameter facet keys. + attr_reader :parameters + + # The list of available tag facet keys. + attr_reader :tags + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'metrics' => :'metrics', + :'parameters' => :'parameters', + :'tags' => :'tags' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'metrics' => :'Array', + :'parameters' => :'Array', + :'tags' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'metrics', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabFacetKeysAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'metrics') + if (value = attributes[:'metrics']).is_a?(Array) + self.metrics = value + end + end + + if attributes.key?(:'parameters') + if (value = attributes[:'parameters']).is_a?(Array) + self.parameters = value + end + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @parameters.nil? + return false if @tags.nil? + true + end + + # Custom attribute writer method with validation + # @param parameters [Object] Object to be assigned + # @!visibility private + def parameters=(parameters) + if parameters.nil? + fail ArgumentError, 'invalid value for "parameters", parameters cannot be nil.' + end + @parameters = parameters + end + + # Custom attribute writer method with validation + # @param tags [Object] Object to be assigned + # @!visibility private + def tags=(tags) + if tags.nil? + fail ArgumentError, 'invalid value for "tags", tags cannot be nil.' + end + @tags = tags + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + metrics == o.metrics && + parameters == o.parameters && + tags == o.tags && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [metrics, parameters, tags, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_count_response_data.rb b/lib/datadog_api_client/v2/models/model_lab_facet_keys_data.rb similarity index 91% rename from lib/datadog_api_client/v2/models/case_count_response_data.rb rename to lib/datadog_api_client/v2/models/model_lab_facet_keys_data.rb index 2de85b14855f..1629a5a0d0db 100644 --- a/lib/datadog_api_client/v2/models/case_count_response_data.rb +++ b/lib/datadog_api_client/v2/models/model_lab_facet_keys_data.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # Data object containing the count results, including per-field group breakdowns. - class CaseCountResponseData + # A facet keys JSON:API resource object. + class ModelLabFacetKeysData include BaseGenericModel - # Attributes for the count response, including the total count and optional facet breakdowns. + # Available facet key names for filtering resources. attr_reader :attributes - # Count response identifier. + # The unique identifier of the facet keys resource. attr_reader :id - # Count resource type. + # The JSON:API type for a facet keys resource. attr_reader :type attr_accessor :additional_properties @@ -46,9 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'CaseCountResponseAttributes', + :'attributes' => :'ModelLabFacetKeysAttributes', :'id' => :'String', - :'type' => :'String' + :'type' => :'ModelLabFacetKeysType' } end @@ -57,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCountResponseData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabFacetKeysData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/case_view_create_request.rb b/lib/datadog_api_client/v2/models/model_lab_facet_keys_response.rb similarity index 92% rename from lib/datadog_api_client/v2/models/case_view_create_request.rb rename to lib/datadog_api_client/v2/models/model_lab_facet_keys_response.rb index ba15cdf0aaa5..d8261d240f1d 100644 --- a/lib/datadog_api_client/v2/models/case_view_create_request.rb +++ b/lib/datadog_api_client/v2/models/model_lab_facet_keys_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for creating a case view. - class CaseViewCreateRequest + # Response containing available facet keys. + class ModelLabFacetKeysResponse include BaseGenericModel - # Data object for creating a case view. + # A facet keys JSON:API resource object. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'CaseViewCreate' + :'data' => :'ModelLabFacetKeysData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewCreateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabFacetKeysResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/case_link_resource_type.rb b/lib/datadog_api_client/v2/models/model_lab_facet_keys_type.rb similarity index 83% rename from lib/datadog_api_client/v2/models/case_link_resource_type.rb rename to lib/datadog_api_client/v2/models/model_lab_facet_keys_type.rb index 0f78749ff688..073a3219e661 100644 --- a/lib/datadog_api_client/v2/models/case_link_resource_type.rb +++ b/lib/datadog_api_client/v2/models/model_lab_facet_keys_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for case links. - class CaseLinkResourceType + # The JSON:API type for a facet keys resource. + class ModelLabFacetKeysType include BaseEnumModel - LINK = "link".freeze + FACET_KEYS = "facet_keys".freeze end end diff --git a/lib/datadog_api_client/v2/models/model_lab_facet_type.rb b/lib/datadog_api_client/v2/models/model_lab_facet_type.rb new file mode 100644 index 000000000000..f822b61ccf6b --- /dev/null +++ b/lib/datadog_api_client/v2/models/model_lab_facet_type.rb @@ -0,0 +1,29 @@ +=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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of facet for filtering Model Lab runs. + class ModelLabFacetType + include BaseEnumModel + + PARAMETER = "parameter".freeze + ATTRIBUTE = "attribute".freeze + TAG = "tag".freeze + METRIC = "metric".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_create_attributes.rb b/lib/datadog_api_client/v2/models/model_lab_facet_values_attributes.rb similarity index 54% rename from lib/datadog_api_client/v2/models/maintenance_window_create_attributes.rb rename to lib/datadog_api_client/v2/models/model_lab_facet_values_attributes.rb index c610b816599c..83d9c7cefa40 100644 --- a/lib/datadog_api_client/v2/models/maintenance_window_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/model_lab_facet_values_attributes.rb @@ -17,21 +17,24 @@ require 'time' module DatadogAPIClient::V2 - # Attributes required to create a maintenance window. - class MaintenanceWindowCreateAttributes + # Available values for a specific facet key. + class ModelLabFacetValuesAttributes include BaseGenericModel - # The end time of the maintenance window. - attr_reader :end_at + # The name of the facet. + attr_reader :facet_name - # The name of the maintenance window. - attr_reader :name + # The type of the facet. + attr_reader :facet_type - # The query to filter event management cases for this maintenance window. - attr_reader :query + # The ranges for each metric statistic. + attr_accessor :metric_stat_ranges - # The start time of the maintenance window. - attr_reader :start_at + # The numeric range of values for a facet. + attr_accessor :numeric_range + + # The list of available string values for this facet. + attr_reader :values attr_accessor :additional_properties @@ -39,10 +42,11 @@ class MaintenanceWindowCreateAttributes # @!visibility private def self.attribute_map { - :'end_at' => :'end_at', - :'name' => :'name', - :'query' => :'query', - :'start_at' => :'start_at' + :'facet_name' => :'facet_name', + :'facet_type' => :'facet_type', + :'metric_stat_ranges' => :'metric_stat_ranges', + :'numeric_range' => :'numeric_range', + :'values' => :'values' } end @@ -50,10 +54,11 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'end_at' => :'Time', - :'name' => :'String', - :'query' => :'String', - :'start_at' => :'Time' + :'facet_name' => :'String', + :'facet_type' => :'String', + :'metric_stat_ranges' => :'Array', + :'numeric_range' => :'ModelLabNumericRange', + :'values' => :'Array' } end @@ -62,7 +67,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowCreateAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabFacetValuesAttributes` initialize method" end self.additional_properties = {} @@ -75,20 +80,28 @@ def initialize(attributes = {}) end } - if attributes.key?(:'end_at') - self.end_at = attributes[:'end_at'] + if attributes.key?(:'facet_name') + self.facet_name = attributes[:'facet_name'] end - if attributes.key?(:'name') - self.name = attributes[:'name'] + if attributes.key?(:'facet_type') + self.facet_type = attributes[:'facet_type'] end - if attributes.key?(:'query') - self.query = attributes[:'query'] + if attributes.key?(:'metric_stat_ranges') + if (value = attributes[:'metric_stat_ranges']).is_a?(Array) + self.metric_stat_ranges = value + end end - if attributes.key?(:'start_at') - self.start_at = attributes[:'start_at'] + if attributes.key?(:'numeric_range') + self.numeric_range = attributes[:'numeric_range'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = value + end end end @@ -96,51 +109,40 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @end_at.nil? - return false if @name.nil? - return false if @query.nil? - return false if @start_at.nil? + return false if @facet_name.nil? + return false if @facet_type.nil? + return false if @values.nil? true end # Custom attribute writer method with validation - # @param end_at [Object] Object to be assigned - # @!visibility private - def end_at=(end_at) - if end_at.nil? - fail ArgumentError, 'invalid value for "end_at", end_at cannot be nil.' - end - @end_at = end_at - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned + # @param facet_name [Object] Object to be assigned # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' + def facet_name=(facet_name) + if facet_name.nil? + fail ArgumentError, 'invalid value for "facet_name", facet_name cannot be nil.' end - @name = name + @facet_name = facet_name end # Custom attribute writer method with validation - # @param query [Object] Object to be assigned + # @param facet_type [Object] Object to be assigned # @!visibility private - def query=(query) - if query.nil? - fail ArgumentError, 'invalid value for "query", query cannot be nil.' + def facet_type=(facet_type) + if facet_type.nil? + fail ArgumentError, 'invalid value for "facet_type", facet_type cannot be nil.' end - @query = query + @facet_type = facet_type end # Custom attribute writer method with validation - # @param start_at [Object] Object to be assigned + # @param values [Object] Object to be assigned # @!visibility private - def start_at=(start_at) - if start_at.nil? - fail ArgumentError, 'invalid value for "start_at", start_at cannot be nil.' + def values=(values) + if values.nil? + fail ArgumentError, 'invalid value for "values", values cannot be nil.' end - @start_at = start_at + @values = values end # Returns the object in the form of hash, with additionalProperties support. @@ -169,10 +171,11 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - end_at == o.end_at && - name == o.name && - query == o.query && - start_at == o.start_at && + facet_name == o.facet_name && + facet_type == o.facet_type && + metric_stat_ranges == o.metric_stat_ranges && + numeric_range == o.numeric_range && + values == o.values && additional_properties == o.additional_properties end @@ -180,7 +183,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [end_at, name, query, start_at, additional_properties].hash + [facet_name, facet_type, metric_stat_ranges, numeric_range, values, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_link.rb b/lib/datadog_api_client/v2/models/model_lab_facet_values_data.rb similarity index 90% rename from lib/datadog_api_client/v2/models/case_link.rb rename to lib/datadog_api_client/v2/models/model_lab_facet_values_data.rb index 5a1a0b9b2390..7a9922633d00 100644 --- a/lib/datadog_api_client/v2/models/case_link.rb +++ b/lib/datadog_api_client/v2/models/model_lab_facet_values_data.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A directional link representing a relationship between two entities. At least one entity must be a case. - class CaseLink + # A facet values JSON:API resource object. + class ModelLabFacetValuesData include BaseGenericModel - # Attributes describing a directional relationship between two entities (cases, incidents, or pages). + # Available values for a specific facet key. attr_reader :attributes - # The case link identifier. + # The unique identifier of the facet values resource. attr_reader :id - # JSON:API resource type for case links. + # The JSON:API type for a facet values resource. attr_reader :type attr_accessor :additional_properties @@ -46,9 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'CaseLinkAttributes', + :'attributes' => :'ModelLabFacetValuesAttributes', :'id' => :'String', - :'type' => :'CaseLinkResourceType' + :'type' => :'ModelLabFacetValuesType' } end @@ -57,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseLink` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabFacetValuesData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/automation_rule_create_request.rb b/lib/datadog_api_client/v2/models/model_lab_facet_values_response.rb similarity index 92% rename from lib/datadog_api_client/v2/models/automation_rule_create_request.rb rename to lib/datadog_api_client/v2/models/model_lab_facet_values_response.rb index 2c54834c02b4..6d6bb4142ead 100644 --- a/lib/datadog_api_client/v2/models/automation_rule_create_request.rb +++ b/lib/datadog_api_client/v2/models/model_lab_facet_values_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for creating an automation rule. - class AutomationRuleCreateRequest + # Response containing available values for a facet key. + class ModelLabFacetValuesResponse include BaseGenericModel - # Data object for creating an automation rule. + # A facet values JSON:API resource object. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'AutomationRuleCreate' + :'data' => :'ModelLabFacetValuesData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleCreateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabFacetValuesResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/model_lab_facet_values_type.rb b/lib/datadog_api_client/v2/models/model_lab_facet_values_type.rb new file mode 100644 index 000000000000..98b53c79a559 --- /dev/null +++ b/lib/datadog_api_client/v2/models/model_lab_facet_values_type.rb @@ -0,0 +1,26 @@ +=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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The JSON:API type for a facet values resource. + class ModelLabFacetValuesType + include BaseEnumModel + + FACET_VALUES = "facet_values".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_create.rb b/lib/datadog_api_client/v2/models/model_lab_metric_stat_range.rb similarity index 65% rename from lib/datadog_api_client/v2/models/maintenance_window_create.rb rename to lib/datadog_api_client/v2/models/model_lab_metric_stat_range.rb index 870f1227a484..32b77da5166d 100644 --- a/lib/datadog_api_client/v2/models/maintenance_window_create.rb +++ b/lib/datadog_api_client/v2/models/model_lab_metric_stat_range.rb @@ -17,15 +17,18 @@ require 'time' module DatadogAPIClient::V2 - # Data object for creating a maintenance window. - class MaintenanceWindowCreate + # The range of values for a specific metric statistic. + class ModelLabMetricStatRange include BaseGenericModel - # Attributes required to create a maintenance window. - attr_reader :attributes + # The maximum value of the statistic. + attr_reader :max - # JSON:API resource type for maintenance windows. - attr_reader :type + # The minimum value of the statistic. + attr_reader :min + + # The metric statistic name. + attr_reader :stat attr_accessor :additional_properties @@ -33,8 +36,9 @@ class MaintenanceWindowCreate # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', - :'type' => :'type' + :'max' => :'max', + :'min' => :'min', + :'stat' => :'stat' } end @@ -42,8 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'MaintenanceWindowCreateAttributes', - :'type' => :'MaintenanceWindowResourceType' + :'max' => :'Float', + :'min' => :'Float', + :'stat' => :'String' } end @@ -52,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowCreate` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabMetricStatRange` initialize method" end self.additional_properties = {} @@ -65,12 +70,16 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.key?(:'max') + self.max = attributes[:'max'] + end + + if attributes.key?(:'min') + self.min = attributes[:'min'] end - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'stat') + self.stat = attributes[:'stat'] end end @@ -78,29 +87,40 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? - return false if @type.nil? + return false if @max.nil? + return false if @min.nil? + return false if @stat.nil? true end # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned + # @param max [Object] Object to be assigned + # @!visibility private + def max=(max) + if max.nil? + fail ArgumentError, 'invalid value for "max", max cannot be nil.' + end + @max = max + end + + # Custom attribute writer method with validation + # @param min [Object] Object to be assigned # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + def min=(min) + if min.nil? + fail ArgumentError, 'invalid value for "min", min cannot be nil.' end - @attributes = attributes + @min = min end # Custom attribute writer method with validation - # @param type [Object] Object to be assigned + # @param stat [Object] Object to be assigned # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' + def stat=(stat) + if stat.nil? + fail ArgumentError, 'invalid value for "stat", stat cannot be nil.' end - @type = type + @stat = stat end # Returns the object in the form of hash, with additionalProperties support. @@ -129,8 +149,9 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && - type == o.type && + max == o.max && + min == o.min && + stat == o.stat && additional_properties == o.additional_properties end @@ -138,7 +159,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, type, additional_properties].hash + [max, min, stat, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/model_lab_metric_summary.rb b/lib/datadog_api_client/v2/models/model_lab_metric_summary.rb new file mode 100644 index 000000000000..3982c772575a --- /dev/null +++ b/lib/datadog_api_client/v2/models/model_lab_metric_summary.rb @@ -0,0 +1,228 @@ +=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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Summary statistics for a metric recorded during a Model Lab run. + class ModelLabMetricSummary + include BaseGenericModel + + # The total number of recorded values. + attr_reader :count + + # The first step at which the metric was recorded. + attr_accessor :first_step + + # The metric name. + attr_reader :key + + # The last step at which the metric was recorded. + attr_accessor :last_step + + # The most recently recorded value. + attr_accessor :latest + + # The maximum recorded value. + attr_accessor :max + + # The mean of recorded values. + attr_accessor :mean + + # The minimum recorded value. + attr_accessor :min + + # The standard deviation of recorded values. + attr_accessor :stddev + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'count' => :'count', + :'first_step' => :'first_step', + :'key' => :'key', + :'last_step' => :'last_step', + :'latest' => :'latest', + :'max' => :'max', + :'mean' => :'mean', + :'min' => :'min', + :'stddev' => :'stddev' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'count' => :'Integer', + :'first_step' => :'Integer', + :'key' => :'String', + :'last_step' => :'Integer', + :'latest' => :'Float', + :'max' => :'Float', + :'mean' => :'Float', + :'min' => :'Float', + :'stddev' => :'Float' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'first_step', + :'last_step', + :'latest', + :'max', + :'mean', + :'min', + :'stddev', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabMetricSummary` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'count') + self.count = attributes[:'count'] + end + + if attributes.key?(:'first_step') + self.first_step = attributes[:'first_step'] + end + + if attributes.key?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'last_step') + self.last_step = attributes[:'last_step'] + end + + if attributes.key?(:'latest') + self.latest = attributes[:'latest'] + end + + if attributes.key?(:'max') + self.max = attributes[:'max'] + end + + if attributes.key?(:'mean') + self.mean = attributes[:'mean'] + end + + if attributes.key?(:'min') + self.min = attributes[:'min'] + end + + if attributes.key?(:'stddev') + self.stddev = attributes[:'stddev'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @count.nil? + return false if @key.nil? + true + end + + # Custom attribute writer method with validation + # @param count [Object] Object to be assigned + # @!visibility private + def count=(count) + if count.nil? + fail ArgumentError, 'invalid value for "count", count cannot be nil.' + end + @count = count + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + count == o.count && + first_step == o.first_step && + key == o.key && + last_step == o.last_step && + latest == o.latest && + max == o.max && + mean == o.mean && + min == o.min && + stddev == o.stddev && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [count, first_step, key, last_step, latest, max, mean, min, stddev, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/automation_rule_update.rb b/lib/datadog_api_client/v2/models/model_lab_numeric_range.rb similarity index 72% rename from lib/datadog_api_client/v2/models/automation_rule_update.rb rename to lib/datadog_api_client/v2/models/model_lab_numeric_range.rb index abf5d100e404..6f71cda47427 100644 --- a/lib/datadog_api_client/v2/models/automation_rule_update.rb +++ b/lib/datadog_api_client/v2/models/model_lab_numeric_range.rb @@ -17,15 +17,15 @@ require 'time' module DatadogAPIClient::V2 - # Data object for updating an automation rule. - class AutomationRuleUpdate + # The numeric range of values for a facet. + class ModelLabNumericRange include BaseGenericModel - # Attributes required to create an automation rule. - attr_accessor :attributes + # The maximum value. + attr_reader :max - # JSON:API resource type for case automation rules. - attr_reader :type + # The minimum value. + attr_reader :min attr_accessor :additional_properties @@ -33,8 +33,8 @@ class AutomationRuleUpdate # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', - :'type' => :'type' + :'max' => :'max', + :'min' => :'min' } end @@ -42,8 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'AutomationRuleCreateAttributes', - :'type' => :'CaseAutomationRuleResourceType' + :'max' => :'Float', + :'min' => :'Float' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleUpdate` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabNumericRange` initialize method" end self.additional_properties = {} @@ -65,12 +65,12 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.key?(:'max') + self.max = attributes[:'max'] end - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'min') + self.min = attributes[:'min'] end end @@ -78,18 +78,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @type.nil? + return false if @max.nil? + return false if @min.nil? true end # Custom attribute writer method with validation - # @param type [Object] Object to be assigned + # @param max [Object] Object to be assigned # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' + def max=(max) + if max.nil? + fail ArgumentError, 'invalid value for "max", max cannot be nil.' end - @type = type + @max = max + end + + # Custom attribute writer method with validation + # @param min [Object] Object to be assigned + # @!visibility private + def min=(min) + if min.nil? + fail ArgumentError, 'invalid value for "min", min cannot be nil.' + end + @min = min end # Returns the object in the form of hash, with additionalProperties support. @@ -118,8 +129,8 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && - type == o.type && + max == o.max && + min == o.min && additional_properties == o.additional_properties end @@ -127,7 +138,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, type, additional_properties].hash + [max, min, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_view_update_request.rb b/lib/datadog_api_client/v2/models/model_lab_page_meta.rb similarity index 81% rename from lib/datadog_api_client/v2/models/case_view_update_request.rb rename to lib/datadog_api_client/v2/models/model_lab_page_meta.rb index 0cdcfc79e116..e7b978d7baf7 100644 --- a/lib/datadog_api_client/v2/models/case_view_update_request.rb +++ b/lib/datadog_api_client/v2/models/model_lab_page_meta.rb @@ -17,12 +17,12 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for updating a case view. - class CaseViewUpdateRequest + # Pagination metadata for a list response. + class ModelLabPageMeta include BaseGenericModel - # Data object for updating a case view. - attr_reader :data + # Pagination details for a list response. + attr_reader :page attr_accessor :additional_properties @@ -30,7 +30,7 @@ class CaseViewUpdateRequest # @!visibility private def self.attribute_map { - :'data' => :'data' + :'page' => :'page' } end @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'CaseViewUpdate' + :'page' => :'ModelLabPageMetaPage' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewUpdateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabPageMeta` initialize method" end self.additional_properties = {} @@ -60,8 +60,8 @@ def initialize(attributes = {}) end } - if attributes.key?(:'data') - self.data = attributes[:'data'] + if attributes.key?(:'page') + self.page = attributes[:'page'] end end @@ -69,18 +69,18 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @data.nil? + return false if @page.nil? true end # Custom attribute writer method with validation - # @param data [Object] Object to be assigned + # @param page [Object] Object to be assigned # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' + def page=(page) + if page.nil? + fail ArgumentError, 'invalid value for "page", page cannot be nil.' end - @data = data + @page = page end # Returns the object in the form of hash, with additionalProperties support. @@ -109,7 +109,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - data == o.data && + page == o.page && additional_properties == o.additional_properties end @@ -117,7 +117,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, additional_properties].hash + [page, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_response_attributes.rb b/lib/datadog_api_client/v2/models/model_lab_page_meta_page.rb similarity index 53% rename from lib/datadog_api_client/v2/models/case_aggregate_response_attributes.rb rename to lib/datadog_api_client/v2/models/model_lab_page_meta_page.rb index 2bf0512ab346..3ae06daca2fc 100644 --- a/lib/datadog_api_client/v2/models/case_aggregate_response_attributes.rb +++ b/lib/datadog_api_client/v2/models/model_lab_page_meta_page.rb @@ -17,24 +17,48 @@ require 'time' module DatadogAPIClient::V2 - # Attributes of the aggregation result, including the total count across all groups and the per-group breakdowns. - class CaseAggregateResponseAttributes + # Pagination details for a list response. + class ModelLabPageMetaPage include BaseGenericModel - # Aggregated groups. - attr_reader :groups + # The first page number. + attr_accessor :first_number - # Total count of aggregated cases. + # The last page number. + attr_accessor :last_number + + # The next page number. + attr_accessor :next_number + + # The current page number. + attr_reader :number + + # The previous page number. + attr_accessor :prev_number + + # The number of items per page. + attr_reader :size + + # The total number of items. attr_reader :total + # The pagination type. + attr_accessor :type + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'groups' => :'groups', - :'total' => :'total' + :'first_number' => :'first_number', + :'last_number' => :'last_number', + :'next_number' => :'next_number', + :'number' => :'number', + :'prev_number' => :'prev_number', + :'size' => :'size', + :'total' => :'total', + :'type' => :'type' } end @@ -42,17 +66,32 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'groups' => :'Array', - :'total' => :'Float' + :'first_number' => :'Integer', + :'last_number' => :'Integer', + :'next_number' => :'Integer', + :'number' => :'Integer', + :'prev_number' => :'Integer', + :'size' => :'Integer', + :'total' => :'Integer', + :'type' => :'String' } end + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'next_number', + :'prev_number', + ]) + end + # Initializes the object # @param attributes [Hash] Model attributes in the form of hash # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateResponseAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabPageMetaPage` initialize method" end self.additional_properties = {} @@ -65,34 +104,67 @@ def initialize(attributes = {}) end } - if attributes.key?(:'groups') - if (value = attributes[:'groups']).is_a?(Array) - self.groups = value - end + if attributes.key?(:'first_number') + self.first_number = attributes[:'first_number'] + end + + if attributes.key?(:'last_number') + self.last_number = attributes[:'last_number'] + end + + if attributes.key?(:'next_number') + self.next_number = attributes[:'next_number'] + end + + if attributes.key?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'prev_number') + self.prev_number = attributes[:'prev_number'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] end if attributes.key?(:'total') self.total = attributes[:'total'] end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end end # Check to see if the all the properties in the model are valid # @return true if the model is valid # @!visibility private def valid? - return false if @groups.nil? + return false if @number.nil? + return false if @size.nil? return false if @total.nil? true end # Custom attribute writer method with validation - # @param groups [Object] Object to be assigned + # @param number [Object] Object to be assigned + # @!visibility private + def number=(number) + if number.nil? + fail ArgumentError, 'invalid value for "number", number cannot be nil.' + end + @number = number + end + + # Custom attribute writer method with validation + # @param size [Object] Object to be assigned # @!visibility private - def groups=(groups) - if groups.nil? - fail ArgumentError, 'invalid value for "groups", groups cannot be nil.' + def size=(size) + if size.nil? + fail ArgumentError, 'invalid value for "size", size cannot be nil.' end - @groups = groups + @size = size end # Custom attribute writer method with validation @@ -131,8 +203,14 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - groups == o.groups && + first_number == o.first_number && + last_number == o.last_number && + next_number == o.next_number && + number == o.number && + prev_number == o.prev_number && + size == o.size && total == o.total && + type == o.type && additional_properties == o.additional_properties end @@ -140,7 +218,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [groups, total, additional_properties].hash + [first_number, last_number, next_number, number, prev_number, size, total, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_view_relationships.rb b/lib/datadog_api_client/v2/models/model_lab_pagination_links.rb similarity index 66% rename from lib/datadog_api_client/v2/models/case_view_relationships.rb rename to lib/datadog_api_client/v2/models/model_lab_pagination_links.rb index a47f5b1ca337..2ea4457d1675 100644 --- a/lib/datadog_api_client/v2/models/case_view_relationships.rb +++ b/lib/datadog_api_client/v2/models/model_lab_pagination_links.rb @@ -17,18 +17,24 @@ require 'time' module DatadogAPIClient::V2 - # Related resources for the case view, including the creator, last modifier, and associated project. - class CaseViewRelationships + # Pagination links for navigating list responses. + class ModelLabPaginationLinks include BaseGenericModel - # Relationship to user. - attr_accessor :created_by + # Link to the first page. + attr_accessor :first - # Relationship to user. - attr_accessor :modified_by + # Link to the last page. + attr_accessor :last - # Relationship to project. - attr_accessor :project + # Link to the next page. + attr_accessor :_next + + # Link to the previous page. + attr_accessor :prev + + # Link to the current page. + attr_accessor :_self attr_accessor :additional_properties @@ -36,9 +42,11 @@ class CaseViewRelationships # @!visibility private def self.attribute_map { - :'created_by' => :'created_by', - :'modified_by' => :'modified_by', - :'project' => :'project' + :'first' => :'first', + :'last' => :'last', + :'_next' => :'next', + :'prev' => :'prev', + :'_self' => :'self' } end @@ -46,9 +54,11 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'created_by' => :'NullableUserRelationship', - :'modified_by' => :'NullableUserRelationship', - :'project' => :'ProjectRelationship' + :'first' => :'String', + :'last' => :'String', + :'_next' => :'String', + :'prev' => :'String', + :'_self' => :'String' } end @@ -56,8 +66,8 @@ def self.openapi_types # @!visibility private def self.openapi_nullable Set.new([ - :'created_by', - :'modified_by', + :'_next', + :'prev', ]) end @@ -66,7 +76,7 @@ def self.openapi_nullable # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewRelationships` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabPaginationLinks` initialize method" end self.additional_properties = {} @@ -79,16 +89,24 @@ def initialize(attributes = {}) end } - if attributes.key?(:'created_by') - self.created_by = attributes[:'created_by'] + if attributes.key?(:'first') + self.first = attributes[:'first'] + end + + if attributes.key?(:'last') + self.last = attributes[:'last'] + end + + if attributes.key?(:'_next') + self._next = attributes[:'_next'] end - if attributes.key?(:'modified_by') - self.modified_by = attributes[:'modified_by'] + if attributes.key?(:'prev') + self.prev = attributes[:'prev'] end - if attributes.key?(:'project') - self.project = attributes[:'project'] + if attributes.key?(:'_self') + self._self = attributes[:'_self'] end end @@ -118,9 +136,11 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - created_by == o.created_by && - modified_by == o.modified_by && - project == o.project && + first == o.first && + last == o.last && + _next == o._next && + prev == o.prev && + _self == o._self && additional_properties == o.additional_properties end @@ -128,7 +148,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [created_by, modified_by, project, additional_properties].hash + [first, last, _next, prev, _self, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_views_response.rb b/lib/datadog_api_client/v2/models/model_lab_project_artifacts_attributes.rb similarity index 78% rename from lib/datadog_api_client/v2/models/case_views_response.rb rename to lib/datadog_api_client/v2/models/model_lab_project_artifacts_attributes.rb index 68c150c8dc7a..cd06b886e614 100644 --- a/lib/datadog_api_client/v2/models/case_views_response.rb +++ b/lib/datadog_api_client/v2/models/model_lab_project_artifacts_attributes.rb @@ -17,12 +17,12 @@ require 'time' module DatadogAPIClient::V2 - # Response containing a list of case views. - class CaseViewsResponse + # Artifact listing for a Model Lab project. + class ModelLabProjectArtifactsAttributes include BaseGenericModel - # A list of case views. - attr_reader :data + # The list of artifact files associated with the project. + attr_reader :files attr_accessor :additional_properties @@ -30,7 +30,7 @@ class CaseViewsResponse # @!visibility private def self.attribute_map { - :'data' => :'data' + :'files' => :'files' } end @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Array' + :'files' => :'Array' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewsResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabProjectArtifactsAttributes` initialize method" end self.additional_properties = {} @@ -60,9 +60,9 @@ def initialize(attributes = {}) end } - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value + if attributes.key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value end end end @@ -71,18 +71,18 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @data.nil? + return false if @files.nil? true end # Custom attribute writer method with validation - # @param data [Object] Object to be assigned + # @param files [Object] Object to be assigned # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' + def files=(files) + if files.nil? + fail ArgumentError, 'invalid value for "files", files cannot be nil.' end - @data = data + @files = files end # Returns the object in the form of hash, with additionalProperties support. @@ -111,7 +111,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - data == o.data && + files == o.files && additional_properties == o.additional_properties end @@ -119,7 +119,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, additional_properties].hash + [files, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_response_data.rb b/lib/datadog_api_client/v2/models/model_lab_project_artifacts_data.rb similarity index 89% rename from lib/datadog_api_client/v2/models/case_aggregate_response_data.rb rename to lib/datadog_api_client/v2/models/model_lab_project_artifacts_data.rb index ec1ce6ff579c..9be677fa0e52 100644 --- a/lib/datadog_api_client/v2/models/case_aggregate_response_data.rb +++ b/lib/datadog_api_client/v2/models/model_lab_project_artifacts_data.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # Data object containing the aggregation results, including total count and per-group breakdowns. - class CaseAggregateResponseData + # A project artifacts JSON:API resource object. + class ModelLabProjectArtifactsData include BaseGenericModel - # Attributes of the aggregation result, including the total count across all groups and the per-group breakdowns. + # Artifact listing for a Model Lab project. attr_reader :attributes - # Aggregate response identifier. + # The unique identifier of the project artifacts resource. attr_reader :id - # Aggregate resource type. + # The JSON:API type for a project artifacts resource. attr_reader :type attr_accessor :additional_properties @@ -46,9 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'CaseAggregateResponseAttributes', + :'attributes' => :'ModelLabProjectArtifactsAttributes', :'id' => :'String', - :'type' => :'String' + :'type' => :'ModelLabProjectArtifactsType' } end @@ -57,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateResponseData` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabProjectArtifactsData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/automation_rule_update_request.rb b/lib/datadog_api_client/v2/models/model_lab_project_artifacts_response.rb similarity index 91% rename from lib/datadog_api_client/v2/models/automation_rule_update_request.rb rename to lib/datadog_api_client/v2/models/model_lab_project_artifacts_response.rb index 040a652959e7..6ab7b95beb71 100644 --- a/lib/datadog_api_client/v2/models/automation_rule_update_request.rb +++ b/lib/datadog_api_client/v2/models/model_lab_project_artifacts_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for updating an automation rule. - class AutomationRuleUpdateRequest + # Response containing the artifact listing for a Model Lab project. + class ModelLabProjectArtifactsResponse include BaseGenericModel - # Data object for updating an automation rule. + # A project artifacts JSON:API resource object. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'AutomationRuleUpdate' + :'data' => :'ModelLabProjectArtifactsData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleUpdateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabProjectArtifactsResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/case_aggregate_resource_type.rb b/lib/datadog_api_client/v2/models/model_lab_project_artifacts_type.rb similarity index 80% rename from lib/datadog_api_client/v2/models/case_aggregate_resource_type.rb rename to lib/datadog_api_client/v2/models/model_lab_project_artifacts_type.rb index 7a6a6db2ede8..a6a5adab0d45 100644 --- a/lib/datadog_api_client/v2/models/case_aggregate_resource_type.rb +++ b/lib/datadog_api_client/v2/models/model_lab_project_artifacts_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for case aggregation requests. - class CaseAggregateResourceType + # The JSON:API type for a project artifacts resource. + class ModelLabProjectArtifactsType include BaseEnumModel - AGGREGATE = "aggregate".freeze + PROJECT_FILES = "project_files".freeze end end diff --git a/lib/datadog_api_client/v2/models/model_lab_project_attributes.rb b/lib/datadog_api_client/v2/models/model_lab_project_attributes.rb new file mode 100644 index 000000000000..f85def75545b --- /dev/null +++ b/lib/datadog_api_client/v2/models/model_lab_project_attributes.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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Model Lab project. + class ModelLabProjectAttributes + include BaseGenericModel + + # The storage location for project artifacts. + attr_reader :artifact_storage_location + + # The date and time the project was created. + attr_reader :created_at + + # The date and time the project was soft-deleted. + attr_accessor :deleted_at + + # A description of the project. + attr_reader :description + + # An optional external URL associated with the project. + attr_accessor :external_url + + # Whether the project is starred by the current user. + attr_reader :is_starred + + # The name of the project. + attr_reader :name + + # The UUID of the project owner. + attr_accessor :owner_id + + # The list of tags associated with the project. + attr_reader :tags + + # The date and time the project was last updated. + attr_reader :updated_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'artifact_storage_location' => :'artifact_storage_location', + :'created_at' => :'created_at', + :'deleted_at' => :'deleted_at', + :'description' => :'description', + :'external_url' => :'external_url', + :'is_starred' => :'is_starred', + :'name' => :'name', + :'owner_id' => :'owner_id', + :'tags' => :'tags', + :'updated_at' => :'updated_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'artifact_storage_location' => :'String', + :'created_at' => :'Time', + :'deleted_at' => :'Time', + :'description' => :'String', + :'external_url' => :'String', + :'is_starred' => :'Boolean', + :'name' => :'String', + :'owner_id' => :'String', + :'tags' => :'Array', + :'updated_at' => :'Time' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'deleted_at', + :'external_url', + :'owner_id', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabProjectAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'artifact_storage_location') + self.artifact_storage_location = attributes[:'artifact_storage_location'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'deleted_at') + self.deleted_at = attributes[:'deleted_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'external_url') + self.external_url = attributes[:'external_url'] + end + + if attributes.key?(:'is_starred') + self.is_starred = attributes[:'is_starred'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'owner_id') + self.owner_id = attributes[:'owner_id'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @artifact_storage_location.nil? + return false if @created_at.nil? + return false if @description.nil? + return false if @is_starred.nil? + return false if @name.nil? + return false if @tags.nil? + return false if @updated_at.nil? + true + end + + # Custom attribute writer method with validation + # @param artifact_storage_location [Object] Object to be assigned + # @!visibility private + def artifact_storage_location=(artifact_storage_location) + if artifact_storage_location.nil? + fail ArgumentError, 'invalid value for "artifact_storage_location", artifact_storage_location cannot be nil.' + end + @artifact_storage_location = artifact_storage_location + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param description [Object] Object to be assigned + # @!visibility private + def description=(description) + if description.nil? + fail ArgumentError, 'invalid value for "description", description cannot be nil.' + end + @description = description + end + + # Custom attribute writer method with validation + # @param is_starred [Object] Object to be assigned + # @!visibility private + def is_starred=(is_starred) + if is_starred.nil? + fail ArgumentError, 'invalid value for "is_starred", is_starred cannot be nil.' + end + @is_starred = is_starred + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param tags [Object] Object to be assigned + # @!visibility private + def tags=(tags) + if tags.nil? + fail ArgumentError, 'invalid value for "tags", tags cannot be nil.' + end + @tags = tags + end + + # Custom attribute writer method with validation + # @param updated_at [Object] Object to be assigned + # @!visibility private + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'invalid value for "updated_at", updated_at cannot be nil.' + end + @updated_at = updated_at + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + artifact_storage_location == o.artifact_storage_location && + created_at == o.created_at && + deleted_at == o.deleted_at && + description == o.description && + external_url == o.external_url && + is_starred == o.is_starred && + name == o.name && + owner_id == o.owner_id && + tags == o.tags && + updated_at == o.updated_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [artifact_storage_location, created_at, deleted_at, description, external_url, is_starred, name, owner_id, tags, updated_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/maintenance_window.rb b/lib/datadog_api_client/v2/models/model_lab_project_data.rb similarity index 87% rename from lib/datadog_api_client/v2/models/maintenance_window.rb rename to lib/datadog_api_client/v2/models/model_lab_project_data.rb index ee8d4dddd52b..98d53731521c 100644 --- a/lib/datadog_api_client/v2/models/maintenance_window.rb +++ b/lib/datadog_api_client/v2/models/model_lab_project_data.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A maintenance window that defines a scheduled time period during which case-related notifications and automation rules are suppressed. Each maintenance window applies to cases matching a specified query. - class MaintenanceWindow + # A Model Lab project JSON:API resource object. + class ModelLabProjectData include BaseGenericModel - # Attributes of a maintenance window, including its schedule and the query that determines which cases are affected. + # Attributes of a Model Lab project. attr_reader :attributes - # The maintenance window's identifier. + # The unique identifier of the project. attr_reader :id - # JSON:API resource type for maintenance windows. + # The JSON:API type for a Model Lab project resource. attr_reader :type attr_accessor :additional_properties @@ -46,9 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'MaintenanceWindowAttributes', + :'attributes' => :'ModelLabProjectAttributes', :'id' => :'String', - :'type' => :'MaintenanceWindowResourceType' + :'type' => :'ModelLabProjectType' } end @@ -57,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindow` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabProjectData` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/case_bulk_resource_type.rb b/lib/datadog_api_client/v2/models/model_lab_project_facet_type.rb similarity index 83% rename from lib/datadog_api_client/v2/models/case_bulk_resource_type.rb rename to lib/datadog_api_client/v2/models/model_lab_project_facet_type.rb index 08e463635e92..f67b9a4d3684 100644 --- a/lib/datadog_api_client/v2/models/case_bulk_resource_type.rb +++ b/lib/datadog_api_client/v2/models/model_lab_project_facet_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for bulk case operations. - class CaseBulkResourceType + # The type of facet for filtering Model Lab projects. + class ModelLabProjectFacetType include BaseEnumModel - BULK = "bulk".freeze + TAG = "tag".freeze end end diff --git a/lib/datadog_api_client/v2/models/case_link_create_request.rb b/lib/datadog_api_client/v2/models/model_lab_project_response.rb similarity index 92% rename from lib/datadog_api_client/v2/models/case_link_create_request.rb rename to lib/datadog_api_client/v2/models/model_lab_project_response.rb index 40c1efb4ba79..e00d56e6b366 100644 --- a/lib/datadog_api_client/v2/models/case_link_create_request.rb +++ b/lib/datadog_api_client/v2/models/model_lab_project_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for creating a link between two entities. - class CaseLinkCreateRequest + # Response containing a single Model Lab project. + class ModelLabProjectResponse include BaseGenericModel - # Data object for creating a case link. + # A Model Lab project JSON:API resource object. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'CaseLinkCreate' + :'data' => :'ModelLabProjectData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseLinkCreateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabProjectResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/case_watcher_resource_type.rb b/lib/datadog_api_client/v2/models/model_lab_project_type.rb similarity index 83% rename from lib/datadog_api_client/v2/models/case_watcher_resource_type.rb rename to lib/datadog_api_client/v2/models/model_lab_project_type.rb index c65383a1d597..641fc71838b2 100644 --- a/lib/datadog_api_client/v2/models/case_watcher_resource_type.rb +++ b/lib/datadog_api_client/v2/models/model_lab_project_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for case watchers. - class CaseWatcherResourceType + # The JSON:API type for a Model Lab project resource. + class ModelLabProjectType include BaseEnumModel - WATCHER = "watcher".freeze + PROJECTS = "projects".freeze end end diff --git a/lib/datadog_api_client/v2/models/project_favorites_response.rb b/lib/datadog_api_client/v2/models/model_lab_projects_response.rb similarity index 73% rename from lib/datadog_api_client/v2/models/project_favorites_response.rb rename to lib/datadog_api_client/v2/models/model_lab_projects_response.rb index a634b2760ecc..fb8fe5206833 100644 --- a/lib/datadog_api_client/v2/models/project_favorites_response.rb +++ b/lib/datadog_api_client/v2/models/model_lab_projects_response.rb @@ -17,20 +17,28 @@ require 'time' module DatadogAPIClient::V2 - # Response containing the list of projects the current user has favorited. - class ProjectFavoritesResponse + # Response containing a list of Model Lab projects with pagination metadata. + class ModelLabProjectsResponse include BaseGenericModel - # List of project favorites. + # The list of projects. attr_reader :data + # Pagination links for navigating list responses. + attr_accessor :links + + # Pagination metadata for a list response. + attr_reader :meta + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'data' => :'data' + :'data' => :'data', + :'links' => :'links', + :'meta' => :'meta' } end @@ -38,7 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'Array' + :'data' => :'Array', + :'links' => :'ModelLabPaginationLinks', + :'meta' => :'ModelLabPageMeta' } end @@ -47,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectFavoritesResponse` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabProjectsResponse` initialize method" end self.additional_properties = {} @@ -65,6 +75,14 @@ def initialize(attributes = {}) self.data = value end end + + if attributes.key?(:'links') + self.links = attributes[:'links'] + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end end # Check to see if the all the properties in the model are valid @@ -72,6 +90,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @data.nil? + return false if @meta.nil? true end @@ -85,6 +104,16 @@ def data=(data) @data = data end + # Custom attribute writer method with validation + # @param meta [Object] Object to be assigned + # @!visibility private + def meta=(meta) + if meta.nil? + fail ArgumentError, 'invalid value for "meta", meta cannot be nil.' + end + @meta = meta + end + # Returns the object in the form of hash, with additionalProperties support. # @return [Hash] Returns the object in the form of hash # @!visibility private @@ -112,6 +141,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data && + links == o.links && + meta == o.meta && additional_properties == o.additional_properties end @@ -119,7 +150,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, additional_properties].hash + [data, links, meta, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_group.rb b/lib/datadog_api_client/v2/models/model_lab_run_artifacts_attributes.rb similarity index 67% rename from lib/datadog_api_client/v2/models/case_aggregate_group.rb rename to lib/datadog_api_client/v2/models/model_lab_run_artifacts_attributes.rb index 20c141ae2655..fe3d827f99c3 100644 --- a/lib/datadog_api_client/v2/models/case_aggregate_group.rb +++ b/lib/datadog_api_client/v2/models/model_lab_run_artifacts_attributes.rb @@ -17,15 +17,15 @@ require 'time' module DatadogAPIClient::V2 - # A single group within the aggregation results, containing the group key and its associated count values. - class CaseAggregateGroup + # Artifact listing for a Model Lab run. + class ModelLabRunArtifactsAttributes include BaseGenericModel - # The value of the field being grouped on (for example, `OPEN` when grouping by status). - attr_reader :group + # The list of artifact files and directories. + attr_reader :files - # The count of cases in this group. - attr_reader :value + # The path of the run's artifacts relative to the project's artifact root. + attr_reader :path_in_project attr_accessor :additional_properties @@ -33,8 +33,8 @@ class CaseAggregateGroup # @!visibility private def self.attribute_map { - :'group' => :'group', - :'value' => :'value' + :'files' => :'files', + :'path_in_project' => :'path_in_project' } end @@ -42,8 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'group' => :'String', - :'value' => :'Array' + :'files' => :'Array', + :'path_in_project' => :'String' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateGroup` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabRunArtifactsAttributes` initialize method" end self.additional_properties = {} @@ -65,14 +65,14 @@ def initialize(attributes = {}) end } - if attributes.key?(:'group') - self.group = attributes[:'group'] + if attributes.key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value + end end - if attributes.key?(:'value') - if (value = attributes[:'value']).is_a?(Array) - self.value = value - end + if attributes.key?(:'path_in_project') + self.path_in_project = attributes[:'path_in_project'] end end @@ -80,29 +80,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @group.nil? - return false if @value.nil? + return false if @files.nil? + return false if @path_in_project.nil? true end # Custom attribute writer method with validation - # @param group [Object] Object to be assigned + # @param files [Object] Object to be assigned # @!visibility private - def group=(group) - if group.nil? - fail ArgumentError, 'invalid value for "group", group cannot be nil.' + def files=(files) + if files.nil? + fail ArgumentError, 'invalid value for "files", files cannot be nil.' end - @group = group + @files = files end # Custom attribute writer method with validation - # @param value [Object] Object to be assigned + # @param path_in_project [Object] Object to be assigned # @!visibility private - def value=(value) - if value.nil? - fail ArgumentError, 'invalid value for "value", value cannot be nil.' + def path_in_project=(path_in_project) + if path_in_project.nil? + fail ArgumentError, 'invalid value for "path_in_project", path_in_project cannot be nil.' end - @value = value + @path_in_project = path_in_project end # Returns the object in the form of hash, with additionalProperties support. @@ -131,8 +131,8 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - group == o.group && - value == o.value && + files == o.files && + path_in_project == o.path_in_project && additional_properties == o.additional_properties end @@ -140,7 +140,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [group, value, additional_properties].hash + [files, path_in_project, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/model_lab_run_artifacts_data.rb b/lib/datadog_api_client/v2/models/model_lab_run_artifacts_data.rb new file mode 100644 index 000000000000..98122a7ed783 --- /dev/null +++ b/lib/datadog_api_client/v2/models/model_lab_run_artifacts_data.rb @@ -0,0 +1,165 @@ +=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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A run artifacts JSON:API resource object. + class ModelLabRunArtifactsData + include BaseGenericModel + + # Artifact listing for a Model Lab run. + attr_reader :attributes + + # The unique identifier of the artifacts resource. + attr_reader :id + + # The JSON:API type for a run artifacts resource. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ModelLabRunArtifactsAttributes', + :'id' => :'String', + :'type' => :'ModelLabRunArtifactsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabRunArtifactsData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_insights_request.rb b/lib/datadog_api_client/v2/models/model_lab_run_artifacts_response.rb similarity index 91% rename from lib/datadog_api_client/v2/models/case_insights_request.rb rename to lib/datadog_api_client/v2/models/model_lab_run_artifacts_response.rb index d9088d48a03d..aa8aa3908dbd 100644 --- a/lib/datadog_api_client/v2/models/case_insights_request.rb +++ b/lib/datadog_api_client/v2/models/model_lab_run_artifacts_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for adding or removing case insights. - class CaseInsightsRequest + # Response containing the artifact listing for a Model Lab run. + class ModelLabRunArtifactsResponse include BaseGenericModel - # Data object containing the insights to add or remove. + # A run artifacts JSON:API resource object. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'CaseInsightsData' + :'data' => :'ModelLabRunArtifactsData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseInsightsRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabRunArtifactsResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/case_automation_rule_resource_type.rb b/lib/datadog_api_client/v2/models/model_lab_run_artifacts_type.rb similarity index 82% rename from lib/datadog_api_client/v2/models/case_automation_rule_resource_type.rb rename to lib/datadog_api_client/v2/models/model_lab_run_artifacts_type.rb index ceecf984f734..0f500614c660 100644 --- a/lib/datadog_api_client/v2/models/case_automation_rule_resource_type.rb +++ b/lib/datadog_api_client/v2/models/model_lab_run_artifacts_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for case automation rules. - class CaseAutomationRuleResourceType + # The JSON:API type for a run artifacts resource. + class ModelLabRunArtifactsType include BaseEnumModel - RULE = "rule".freeze + ARTIFACTS = "artifacts".freeze end end diff --git a/lib/datadog_api_client/v2/models/model_lab_run_attributes.rb b/lib/datadog_api_client/v2/models/model_lab_run_attributes.rb new file mode 100644 index 000000000000..43c423d37e95 --- /dev/null +++ b/lib/datadog_api_client/v2/models/model_lab_run_attributes.rb @@ -0,0 +1,454 @@ +=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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Model Lab run. + class ModelLabRunAttributes + include BaseGenericModel + + # The date and time the run completed. + attr_accessor :completed_at + + # The date and time the run was created. + attr_reader :created_at + + # The date and time the run was soft-deleted. + attr_accessor :deleted_at + + # Whether a descendant run matched the applied filters. + attr_reader :descendant_match + + # A description of the run. + attr_reader :description + + # The duration of the run in seconds. + attr_accessor :duration + + # An optional external URL associated with the run. + attr_accessor :external_url + + # Whether the run has child runs. + attr_reader :has_children + + # Whether the run is pinned by the current user. + attr_reader :is_pinned + + # Summary statistics for metrics recorded during the run. + attr_reader :metric_summaries + + # The MLflow artifact storage location for this run. + attr_reader :mlflow_artifact_location + + # The name of the run. + attr_reader :name + + # The UUID of the run owner. + attr_accessor :owner_id + + # The list of parameters used for the run. + attr_accessor :params + + # The ID of the project this run belongs to. + attr_reader :project_id + + # The date and time the run started. + attr_reader :started_at + + # The status of a Model Lab run. + attr_reader :status + + # The list of tags associated with the run. + attr_reader :tags + + # The date and time the run was last updated. + attr_reader :updated_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'completed_at' => :'completed_at', + :'created_at' => :'created_at', + :'deleted_at' => :'deleted_at', + :'descendant_match' => :'descendant_match', + :'description' => :'description', + :'duration' => :'duration', + :'external_url' => :'external_url', + :'has_children' => :'has_children', + :'is_pinned' => :'is_pinned', + :'metric_summaries' => :'metric_summaries', + :'mlflow_artifact_location' => :'mlflow_artifact_location', + :'name' => :'name', + :'owner_id' => :'owner_id', + :'params' => :'params', + :'project_id' => :'project_id', + :'started_at' => :'started_at', + :'status' => :'status', + :'tags' => :'tags', + :'updated_at' => :'updated_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'completed_at' => :'Time', + :'created_at' => :'Time', + :'deleted_at' => :'Time', + :'descendant_match' => :'Boolean', + :'description' => :'String', + :'duration' => :'Float', + :'external_url' => :'String', + :'has_children' => :'Boolean', + :'is_pinned' => :'Boolean', + :'metric_summaries' => :'Array', + :'mlflow_artifact_location' => :'String', + :'name' => :'String', + :'owner_id' => :'String', + :'params' => :'Array', + :'project_id' => :'Integer', + :'started_at' => :'Time', + :'status' => :'ModelLabRunStatus', + :'tags' => :'Array', + :'updated_at' => :'Time' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'completed_at', + :'deleted_at', + :'duration', + :'external_url', + :'owner_id', + :'params', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabRunAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'completed_at') + self.completed_at = attributes[:'completed_at'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'deleted_at') + self.deleted_at = attributes[:'deleted_at'] + end + + if attributes.key?(:'descendant_match') + self.descendant_match = attributes[:'descendant_match'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'duration') + self.duration = attributes[:'duration'] + end + + if attributes.key?(:'external_url') + self.external_url = attributes[:'external_url'] + end + + if attributes.key?(:'has_children') + self.has_children = attributes[:'has_children'] + end + + if attributes.key?(:'is_pinned') + self.is_pinned = attributes[:'is_pinned'] + end + + if attributes.key?(:'metric_summaries') + if (value = attributes[:'metric_summaries']).is_a?(Array) + self.metric_summaries = value + end + end + + if attributes.key?(:'mlflow_artifact_location') + self.mlflow_artifact_location = attributes[:'mlflow_artifact_location'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'owner_id') + self.owner_id = attributes[:'owner_id'] + end + + if attributes.key?(:'params') + if (value = attributes[:'params']).is_a?(Array) + self.params = value + end + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'started_at') + self.started_at = attributes[:'started_at'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @descendant_match.nil? + return false if @description.nil? + return false if @has_children.nil? + return false if @is_pinned.nil? + return false if @metric_summaries.nil? + return false if @mlflow_artifact_location.nil? + return false if @name.nil? + return false if @project_id.nil? + return false if @started_at.nil? + return false if @status.nil? + return false if @tags.nil? + return false if @updated_at.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param descendant_match [Object] Object to be assigned + # @!visibility private + def descendant_match=(descendant_match) + if descendant_match.nil? + fail ArgumentError, 'invalid value for "descendant_match", descendant_match cannot be nil.' + end + @descendant_match = descendant_match + end + + # Custom attribute writer method with validation + # @param description [Object] Object to be assigned + # @!visibility private + def description=(description) + if description.nil? + fail ArgumentError, 'invalid value for "description", description cannot be nil.' + end + @description = description + end + + # Custom attribute writer method with validation + # @param has_children [Object] Object to be assigned + # @!visibility private + def has_children=(has_children) + if has_children.nil? + fail ArgumentError, 'invalid value for "has_children", has_children cannot be nil.' + end + @has_children = has_children + end + + # Custom attribute writer method with validation + # @param is_pinned [Object] Object to be assigned + # @!visibility private + def is_pinned=(is_pinned) + if is_pinned.nil? + fail ArgumentError, 'invalid value for "is_pinned", is_pinned cannot be nil.' + end + @is_pinned = is_pinned + end + + # Custom attribute writer method with validation + # @param metric_summaries [Object] Object to be assigned + # @!visibility private + def metric_summaries=(metric_summaries) + if metric_summaries.nil? + fail ArgumentError, 'invalid value for "metric_summaries", metric_summaries cannot be nil.' + end + @metric_summaries = metric_summaries + end + + # Custom attribute writer method with validation + # @param mlflow_artifact_location [Object] Object to be assigned + # @!visibility private + def mlflow_artifact_location=(mlflow_artifact_location) + if mlflow_artifact_location.nil? + fail ArgumentError, 'invalid value for "mlflow_artifact_location", mlflow_artifact_location cannot be nil.' + end + @mlflow_artifact_location = mlflow_artifact_location + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param project_id [Object] Object to be assigned + # @!visibility private + def project_id=(project_id) + if project_id.nil? + fail ArgumentError, 'invalid value for "project_id", project_id cannot be nil.' + end + @project_id = project_id + end + + # Custom attribute writer method with validation + # @param started_at [Object] Object to be assigned + # @!visibility private + def started_at=(started_at) + if started_at.nil? + fail ArgumentError, 'invalid value for "started_at", started_at cannot be nil.' + end + @started_at = started_at + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Custom attribute writer method with validation + # @param tags [Object] Object to be assigned + # @!visibility private + def tags=(tags) + if tags.nil? + fail ArgumentError, 'invalid value for "tags", tags cannot be nil.' + end + @tags = tags + end + + # Custom attribute writer method with validation + # @param updated_at [Object] Object to be assigned + # @!visibility private + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'invalid value for "updated_at", updated_at cannot be nil.' + end + @updated_at = updated_at + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + completed_at == o.completed_at && + created_at == o.created_at && + deleted_at == o.deleted_at && + descendant_match == o.descendant_match && + description == o.description && + duration == o.duration && + external_url == o.external_url && + has_children == o.has_children && + is_pinned == o.is_pinned && + metric_summaries == o.metric_summaries && + mlflow_artifact_location == o.mlflow_artifact_location && + name == o.name && + owner_id == o.owner_id && + params == o.params && + project_id == o.project_id && + started_at == o.started_at && + status == o.status && + tags == o.tags && + updated_at == o.updated_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [completed_at, created_at, deleted_at, descendant_match, description, duration, external_url, has_children, is_pinned, metric_summaries, mlflow_artifact_location, name, owner_id, params, project_id, started_at, status, tags, updated_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/model_lab_run_data.rb b/lib/datadog_api_client/v2/models/model_lab_run_data.rb new file mode 100644 index 000000000000..f911ced69046 --- /dev/null +++ b/lib/datadog_api_client/v2/models/model_lab_run_data.rb @@ -0,0 +1,165 @@ +=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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A Model Lab run JSON:API resource object. + class ModelLabRunData + include BaseGenericModel + + # Attributes of a Model Lab run. + attr_reader :attributes + + # The unique identifier of the run. + attr_reader :id + + # The JSON:API type for a Model Lab run resource. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ModelLabRunAttributes', + :'id' => :'String', + :'type' => :'ModelLabRunType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabRunData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_count_group_value.rb b/lib/datadog_api_client/v2/models/model_lab_run_param.rb similarity index 82% rename from lib/datadog_api_client/v2/models/case_count_group_value.rb rename to lib/datadog_api_client/v2/models/model_lab_run_param.rb index 6d12b8519220..28de8a6389e3 100644 --- a/lib/datadog_api_client/v2/models/case_count_group_value.rb +++ b/lib/datadog_api_client/v2/models/model_lab_run_param.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # A single value within a count group, representing the number of cases with that specific field value. - class CaseCountGroupValue + # A key-value parameter for a Model Lab run. + class ModelLabRunParam include BaseGenericModel - # Count of cases for this value. - attr_reader :count + # The parameter key. + attr_reader :key - # The group value. + # The parameter value. attr_reader :value attr_accessor :additional_properties @@ -33,7 +33,7 @@ class CaseCountGroupValue # @!visibility private def self.attribute_map { - :'count' => :'count', + :'key' => :'key', :'value' => :'value' } end @@ -42,7 +42,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'count' => :'Integer', + :'key' => :'String', :'value' => :'String' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCountGroupValue` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabRunParam` initialize method" end self.additional_properties = {} @@ -65,8 +65,8 @@ def initialize(attributes = {}) end } - if attributes.key?(:'count') - self.count = attributes[:'count'] + if attributes.key?(:'key') + self.key = attributes[:'key'] end if attributes.key?(:'value') @@ -78,19 +78,19 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @count.nil? + return false if @key.nil? return false if @value.nil? true end # Custom attribute writer method with validation - # @param count [Object] Object to be assigned + # @param key [Object] Object to be assigned # @!visibility private - def count=(count) - if count.nil? - fail ArgumentError, 'invalid value for "count", count cannot be nil.' + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' end - @count = count + @key = key end # Custom attribute writer method with validation @@ -129,7 +129,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - count == o.count && + key == o.key && value == o.value && additional_properties == o.additional_properties end @@ -138,7 +138,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [count, value, additional_properties].hash + [key, value, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_type_update_request.rb b/lib/datadog_api_client/v2/models/model_lab_run_response.rb similarity index 93% rename from lib/datadog_api_client/v2/models/case_type_update_request.rb rename to lib/datadog_api_client/v2/models/model_lab_run_response.rb index 67451e683a86..c873009e7852 100644 --- a/lib/datadog_api_client/v2/models/case_type_update_request.rb +++ b/lib/datadog_api_client/v2/models/model_lab_run_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for updating a case type. - class CaseTypeUpdateRequest + # Response containing a single Model Lab run. + class ModelLabRunResponse include BaseGenericModel - # Data object for updating a case type. + # A Model Lab run JSON:API resource object. attr_reader :data attr_accessor :additional_properties @@ -38,7 +38,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'CaseTypeUpdate' + :'data' => :'ModelLabRunData' } end @@ -47,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseTypeUpdateRequest` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabRunResponse` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/automation_rule_action_type.rb b/lib/datadog_api_client/v2/models/model_lab_run_status.rb similarity index 66% rename from lib/datadog_api_client/v2/models/automation_rule_action_type.rb rename to lib/datadog_api_client/v2/models/model_lab_run_status.rb index 70178e9c576c..a03171d0b447 100644 --- a/lib/datadog_api_client/v2/models/automation_rule_action_type.rb +++ b/lib/datadog_api_client/v2/models/model_lab_run_status.rb @@ -17,11 +17,16 @@ require 'time' module DatadogAPIClient::V2 - # The type of automated action to perform when the rule triggers. `execute_workflow` runs a Datadog workflow; `assign_agent` assigns an AI agent to the case. - class AutomationRuleActionType + # The status of a Model Lab run. + class ModelLabRunStatus include BaseEnumModel - EXECUTE_WORKFLOW = "execute_workflow".freeze - ASSIGN_AGENT = "assign_agent".freeze + PENDING = "pending".freeze + RUNNING = "running".freeze + COMPLETED = "completed".freeze + FAILED = "failed".freeze + KILLED = "killed".freeze + UNRESPONSIVE = "unresponsive".freeze + PAUSED = "paused".freeze end end diff --git a/lib/datadog_api_client/v2/models/case_view_resource_type.rb b/lib/datadog_api_client/v2/models/model_lab_run_type.rb similarity index 85% rename from lib/datadog_api_client/v2/models/case_view_resource_type.rb rename to lib/datadog_api_client/v2/models/model_lab_run_type.rb index 2d851ce89a8c..cc6e064fda26 100644 --- a/lib/datadog_api_client/v2/models/case_view_resource_type.rb +++ b/lib/datadog_api_client/v2/models/model_lab_run_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for case views. - class CaseViewResourceType + # The JSON:API type for a Model Lab run resource. + class ModelLabRunType include BaseEnumModel - VIEW = "view".freeze + RUNS = "runs".freeze end end diff --git a/lib/datadog_api_client/v2/models/automation_rule_action.rb b/lib/datadog_api_client/v2/models/model_lab_runs_response.rb similarity index 75% rename from lib/datadog_api_client/v2/models/automation_rule_action.rb rename to lib/datadog_api_client/v2/models/model_lab_runs_response.rb index 848f56aba009..82681662b76f 100644 --- a/lib/datadog_api_client/v2/models/automation_rule_action.rb +++ b/lib/datadog_api_client/v2/models/model_lab_runs_response.rb @@ -17,15 +17,18 @@ require 'time' module DatadogAPIClient::V2 - # Defines what happens when the rule triggers. Combines an action type with action-specific configuration data. - class AutomationRuleAction + # Response containing a list of Model Lab runs with pagination metadata. + class ModelLabRunsResponse include BaseGenericModel - # Configuration for the action to execute, dependent on the action type. + # The list of runs. attr_reader :data - # The type of automated action to perform when the rule triggers. `execute_workflow` runs a Datadog workflow; `assign_agent` assigns an AI agent to the case. - attr_reader :type + # Pagination links for navigating list responses. + attr_accessor :links + + # Pagination metadata for a list response. + attr_reader :meta attr_accessor :additional_properties @@ -34,7 +37,8 @@ class AutomationRuleAction def self.attribute_map { :'data' => :'data', - :'type' => :'type' + :'links' => :'links', + :'meta' => :'meta' } end @@ -42,8 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'data' => :'AutomationRuleActionData', - :'type' => :'AutomationRuleActionType' + :'data' => :'Array', + :'links' => :'ModelLabPaginationLinks', + :'meta' => :'ModelLabPageMeta' } end @@ -52,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleAction` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabRunsResponse` initialize method" end self.additional_properties = {} @@ -66,11 +71,17 @@ def initialize(attributes = {}) } if attributes.key?(:'data') - self.data = attributes[:'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?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] end end @@ -79,7 +90,7 @@ def initialize(attributes = {}) # @!visibility private def valid? return false if @data.nil? - return false if @type.nil? + return false if @meta.nil? true end @@ -94,13 +105,13 @@ def data=(data) end # Custom attribute writer method with validation - # @param type [Object] Object to be assigned + # @param meta [Object] Object to be assigned # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' + def meta=(meta) + if meta.nil? + fail ArgumentError, 'invalid value for "meta", meta cannot be nil.' end - @type = type + @meta = meta end # Returns the object in the form of hash, with additionalProperties support. @@ -130,7 +141,8 @@ def ==(o) return true if self.equal?(o) self.class == o.class && data == o.data && - type == o.type && + links == o.links && + meta == o.meta && additional_properties == o.additional_properties end @@ -138,7 +150,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [data, type, additional_properties].hash + [data, links, meta, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_select_option.rb b/lib/datadog_api_client/v2/models/model_lab_tag.rb similarity index 82% rename from lib/datadog_api_client/v2/models/custom_attribute_select_option.rb rename to lib/datadog_api_client/v2/models/model_lab_tag.rb index 522a02d98fb2..d056b8c9b154 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_select_option.rb +++ b/lib/datadog_api_client/v2/models/model_lab_tag.rb @@ -17,11 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # A selectable option for a SELECT-type custom attribute. - class CustomAttributeSelectOption + # A key-value tag attached to a resource. + class ModelLabTag include BaseGenericModel - # Option value. + # The tag key. + attr_reader :key + + # The tag value. attr_reader :value attr_accessor :additional_properties @@ -30,6 +33,7 @@ class CustomAttributeSelectOption # @!visibility private def self.attribute_map { + :'key' => :'key', :'value' => :'value' } end @@ -38,6 +42,7 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'key' => :'String', :'value' => :'String' } end @@ -47,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomAttributeSelectOption` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ModelLabTag` initialize method" end self.additional_properties = {} @@ -60,6 +65,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'key') + self.key = attributes[:'key'] + end + if attributes.key?(:'value') self.value = attributes[:'value'] end @@ -69,10 +78,21 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? + return false if @key.nil? return false if @value.nil? true end + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + # Custom attribute writer method with validation # @param value [Object] Object to be assigned # @!visibility private @@ -109,6 +129,7 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + key == o.key && value == o.value && additional_properties == o.additional_properties end @@ -117,7 +138,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [value, additional_properties].hash + [key, value, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/project_favorite.rb b/lib/datadog_api_client/v2/models/project_favorite.rb deleted file mode 100644 index 6fe48d468dd3..000000000000 --- a/lib/datadog_api_client/v2/models/project_favorite.rb +++ /dev/null @@ -1,144 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Represents a case project that the current user has bookmarked for quick access. Favorited projects appear prominently in the Case Management UI. - class ProjectFavorite - include BaseGenericModel - - # The UUID of the favorited project. - attr_reader :id - - # JSON:API resource type for project favorites. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'id' => :'String', - :'type' => :'ProjectFavoriteResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectFavorite` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/project_favorite_resource_type.rb b/lib/datadog_api_client/v2/models/project_favorite_resource_type.rb deleted file mode 100644 index 1e1c71deb9ea..000000000000 --- a/lib/datadog_api_client/v2/models/project_favorite_resource_type.rb +++ /dev/null @@ -1,26 +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://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # JSON:API resource type for project favorites. - class ProjectFavoriteResourceType - include BaseEnumModel - - PROJECT_FAVORITE = "project_favorite".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/timeline_cell.rb b/lib/datadog_api_client/v2/models/timeline_cell.rb index 8c8463155e73..eff1de922436 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Attributes of a timeline cell, representing a single event in a case's chronological activity log (for example, a comment, status change, or assignment update). + # timeline cell class TimelineCell include BaseGenericModel - # The author of the timeline cell. Currently only user authors are supported. + # author of the timeline cell attr_accessor :author - # The content payload of a timeline cell, varying by cell type. + # timeline cell content attr_accessor :cell_content # Timestamp of when the cell was created @@ -36,7 +36,7 @@ class TimelineCell # Timestamp of when the cell was last modified attr_accessor :modified_at - # The type of content in the timeline cell. Currently only `COMMENT` is supported in this endpoint. + # Timeline cell content type attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/timeline_cell_author.rb b/lib/datadog_api_client/v2/models/timeline_cell_author.rb index 260335808816..d4b7c4acfb45 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_author.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_author.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The author of the timeline cell. Currently only user authors are supported. + # author of the timeline cell module TimelineCellAuthor class << self include BaseOneOfModel diff --git a/lib/datadog_api_client/v2/models/timeline_cell_author_user.rb b/lib/datadog_api_client/v2/models/timeline_cell_author_user.rb index 66ec8eb22531..274ddf6a559d 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_author_user.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_author_user.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # A user who authored a timeline cell. + # timeline cell user author class TimelineCellAuthorUser include BaseGenericModel - # Profile information for the user who authored the timeline cell. + # user author content. attr_accessor :content - # The type of timeline cell author. Currently only `USER` is supported. + # user author type. attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/timeline_cell_author_user_content.rb b/lib/datadog_api_client/v2/models/timeline_cell_author_user_content.rb index d66a3f18b25d..8bd93d4d0412 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_author_user_content.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_author_user_content.rb @@ -17,20 +17,20 @@ require 'time' module DatadogAPIClient::V2 - # Profile information for the user who authored the timeline cell. + # user author content. class TimelineCellAuthorUserContent include BaseGenericModel - # The email address of the user. + # user email attr_accessor :email - # The Datadog handle of the user. + # user handle attr_accessor :handle - # The UUID of the user. + # user UUID attr_accessor :id - # The display name of the user. + # user name attr_accessor :name attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/timeline_cell_author_user_type.rb b/lib/datadog_api_client/v2/models/timeline_cell_author_user_type.rb index 21527600064d..76643ee1dd86 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_author_user_type.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_author_user_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The type of timeline cell author. Currently only `USER` is supported. + # user author type. class TimelineCellAuthorUserType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/timeline_cell_content.rb b/lib/datadog_api_client/v2/models/timeline_cell_content.rb index 9166df6f85e9..8a3f4ed465ac 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_content.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_content.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The content payload of a timeline cell, varying by cell type. + # timeline cell content module TimelineCellContent class << self include BaseOneOfModel diff --git a/lib/datadog_api_client/v2/models/timeline_cell_content_comment.rb b/lib/datadog_api_client/v2/models/timeline_cell_content_comment.rb index dbcd86330a55..ad7fb072114c 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_content_comment.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_content_comment.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # The content of a comment timeline cell. + # comment content class TimelineCellContentComment include BaseGenericModel - # The text content of the comment. Supports Markdown formatting. + # comment message attr_accessor :message attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/timeline_cell_resource.rb b/lib/datadog_api_client/v2/models/timeline_cell_resource.rb index 5c1e21b5733c..35e988e7b8d8 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_resource.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_resource.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A timeline cell resource representing a single entry in a case's activity timeline. + # Timeline cell JSON:API resource class TimelineCellResource include BaseGenericModel - # Attributes of a timeline cell, representing a single event in a case's chronological activity log (for example, a comment, status change, or assignment update). + # timeline cell attr_reader :attributes # Timeline cell's identifier attr_reader :id - # JSON:API resource type for timeline cells. + # Timeline cell JSON:API resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/timeline_cell_resource_type.rb b/lib/datadog_api_client/v2/models/timeline_cell_resource_type.rb index 4d22d0b60d24..0e1dddb79835 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_resource_type.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_resource_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for timeline cells. + # Timeline cell JSON:API resource type class TimelineCellResourceType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/timeline_cell_type.rb b/lib/datadog_api_client/v2/models/timeline_cell_type.rb index 1afc72a7e8cc..25b6ea18b771 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_type.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The type of content in the timeline cell. Currently only `COMMENT` is supported in this endpoint. + # Timeline cell content type class TimelineCellType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/timeline_response.rb b/lib/datadog_api_client/v2/models/timeline_response.rb index 81061ff5bc27..a1413a23fb04 100644 --- a/lib/datadog_api_client/v2/models/timeline_response.rb +++ b/lib/datadog_api_client/v2/models/timeline_response.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Response containing the chronological list of timeline cells for a case. + # Timeline response class TimelineResponse include BaseGenericModel