From 98b45e90033d1c100b44991b55c277883ed9ace1 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 19 May 2026 21:25:26 +0000 Subject: [PATCH] Regenerate client from commit 89c5e0f of spec repo --- .generator/schemas/v2/openapi.yaml | 4621 ++++++++++++++++- .../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 + .../AggregateLLMObsExperimentation.rb | 41 + .../ListLLMObsExperimentEvents.rb | 8 + .../SearchLLMObsExperimentation.rb | 35 + .../SimpleSearchLLMObsExperimentation.rb | 41 + features/scenarios_model_mapping.rb | 143 + features/v2/case_management.feature | 852 +++ features/v2/case_management_attribute.feature | 30 + features/v2/case_management_type.feature | 27 + features/v2/llm_observability.feature | 80 + features/v2/undo.json | 301 +- lib/datadog_api_client/configuration.rb | 40 + lib/datadog_api_client/inflector.rb | 137 + .../v2/api/case_management_api.rb | 3692 ++++++++++--- .../v2/api/case_management_attribute_api.rb | 89 +- .../v2/api/case_management_type_api.rb | 80 +- .../v2/api/llm_observability_api.rb | 304 ++ .../v2/models/automation_rule.rb | 175 + .../v2/models/automation_rule_action.rb | 144 + .../v2/models/automation_rule_action_data.rb | 125 + .../v2/models/automation_rule_action_type.rb | 27 + .../v2/models/automation_rule_attributes.rb | 217 + .../v2/models/automation_rule_create.rb | 144 + .../automation_rule_create_attributes.rb | 175 + .../models/automation_rule_create_request.rb | 123 + .../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_rule_update.rb | 133 + .../models/automation_rule_update_request.rb | 123 + .../v2/models/automation_rules_response.rb | 125 + lib/datadog_api_client/v2/models/case.rb | 2 +- .../v2/models/case_aggregate_group.rb | 146 + .../v2/models/case_aggregate_group_by.rb | 150 + .../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_resource_type.rb | 26 + .../v2/models/case_aggregate_response.rb | 123 + .../case_aggregate_response_attributes.rb | 146 + .../v2/models/case_aggregate_response_data.rb | 165 + .../v2/models/case_assign.rb | 2 +- .../v2/models/case_attributes.rb | 2 +- .../case_automation_rule_resource_type.rb | 26 + .../v2/models/case_automation_rule_state.rb | 27 + .../v2/models/case_bulk_action_type.rb | 35 + .../v2/models/case_bulk_resource_type.rb | 26 + .../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_group_value.rb | 144 + .../v2/models/case_count_response.rb | 123 + .../models/case_count_response_attributes.rb | 125 + .../v2/models/case_count_response_data.rb | 165 + .../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_insights_request.rb | 123 + lib/datadog_api_client/v2/models/case_link.rb | 165 + .../v2/models/case_link_attributes.rb | 207 + .../v2/models/case_link_create.rb | 144 + .../v2/models/case_link_create_request.rb | 123 + .../v2/models/case_link_resource_type.rb | 26 + .../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_type_update_request.rb | 123 + .../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_attributes.rb | 185 + .../v2/models/case_view_create.rb | 144 + .../v2/models/case_view_create_attributes.rb | 175 + .../v2/models/case_view_create_request.rb | 123 + .../v2/models/case_view_relationships.rb | 134 + .../v2/models/case_view_resource_type.rb | 26 + .../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_view_update_request.rb | 123 + .../v2/models/case_views_response.rb | 125 + .../v2/models/case_watcher.rb | 165 + .../v2/models/case_watcher_relationships.rb | 123 + .../v2/models/case_watcher_resource_type.rb | 26 + .../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 +- .../models/custom_attribute_select_option.rb | 123 + .../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 +- .../llm_obs_experiment_eval_metric_event.rb | 270 + .../models/llm_obs_experiment_events_type.rb | 26 + ...ment_events_v2_data_attributes_response.rb | 148 + ..._obs_experiment_events_v2_data_response.rb | 165 + .../llm_obs_experiment_events_v2_response.rb | 133 + .../llm_obs_experiment_run_data_response.rb | 171 + .../llm_obs_experiment_span_with_evals.rb | 237 + ...obs_experimentation_analytics_aggregate.rb | 239 + ...m_obs_experimentation_analytics_compute.rb | 133 + ...ation_analytics_data_attributes_request.rb | 123 + ...tion_analytics_data_attributes_response.rb | 144 + ..._experimentation_analytics_data_request.rb | 144 + ...experimentation_analytics_data_response.rb | 165 + ..._obs_experimentation_analytics_group_by.rb | 123 + ...m_obs_experimentation_analytics_request.rb | 123 + ..._obs_experimentation_analytics_response.rb | 123 + ...lm_obs_experimentation_analytics_result.rb | 125 + ...lm_obs_experimentation_analytics_search.rb | 123 + ...bs_experimentation_analytics_time_range.rb | 144 + ...llm_obs_experimentation_analytics_value.rb | 133 + ...llm_obs_experimentation_content_preview.rb | 105 + .../llm_obs_experimentation_cursor_page.rb | 115 + .../models/llm_obs_experimentation_filter.rb | 173 + .../models/llm_obs_experimentation_include.rb | 105 + .../llm_obs_experimentation_number_page.rb | 148 + ...entation_search_data_attributes_request.rb | 153 + ...obs_experimentation_search_data_request.rb | 144 + ...bs_experimentation_search_data_response.rb | 165 + .../llm_obs_experimentation_search_request.rb | 123 + ...llm_obs_experimentation_search_response.rb | 133 + .../llm_obs_experimentation_search_results.rb | 167 + ...n_simple_search_data_attributes_request.rb | 165 + ...erimentation_simple_search_data_request.rb | 144 + ...rimentation_simple_search_data_response.rb | 165 + ..._obs_experimentation_simple_search_meta.rb | 105 + ...experimentation_simple_search_meta_page.rb | 186 + ...s_experimentation_simple_search_request.rb | 123 + ..._experimentation_simple_search_response.rb | 133 + .../llm_obs_experimentation_sort_field.rb | 133 + ...bs_experimentation_sort_field_direction.rb | 27 + .../v2/models/llm_obs_experimentation_type.rb | 26 + .../v2/models/maintenance_window.rb | 165 + .../models/maintenance_window_attributes.rb | 206 + .../v2/models/maintenance_window_create.rb | 144 + .../maintenance_window_create_attributes.rb | 186 + .../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 + .../v2/models/project_favorite.rb | 144 + .../models/project_favorite_resource_type.rb | 26 + .../v2/models/project_favorites_response.rb | 125 + .../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 +- 233 files changed, 28053 insertions(+), 850 deletions(-) create mode 100644 examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb create mode 100644 examples/v2/case-management-type/UpdateCaseType.rb create mode 100644 examples/v2/case-management/AddCaseInsights.rb create mode 100644 examples/v2/case-management/AggregateCases.rb create mode 100644 examples/v2/case-management/BulkUpdateCases.rb create mode 100644 examples/v2/case-management/CountCases.rb create mode 100644 examples/v2/case-management/CreateCaseAutomationRule.rb create mode 100644 examples/v2/case-management/CreateCaseLink.rb create mode 100644 examples/v2/case-management/CreateCaseView.rb create mode 100644 examples/v2/case-management/CreateMaintenanceWindow.rb create mode 100644 examples/v2/case-management/DeleteCaseAutomationRule.rb create mode 100644 examples/v2/case-management/DeleteCaseLink.rb create mode 100644 examples/v2/case-management/DeleteCaseView.rb create mode 100644 examples/v2/case-management/DeleteMaintenanceWindow.rb create mode 100644 examples/v2/case-management/DisableCaseAutomationRule.rb create mode 100644 examples/v2/case-management/EnableCaseAutomationRule.rb create mode 100644 examples/v2/case-management/FavoriteCaseProject.rb create mode 100644 examples/v2/case-management/GetCaseAutomationRule.rb create mode 100644 examples/v2/case-management/GetCaseView.rb create mode 100644 examples/v2/case-management/ListCaseAutomationRules.rb create mode 100644 examples/v2/case-management/ListCaseLinks.rb create mode 100644 examples/v2/case-management/ListCaseTimeline.rb create mode 100644 examples/v2/case-management/ListCaseViews.rb create mode 100644 examples/v2/case-management/ListCaseWatchers.rb create mode 100644 examples/v2/case-management/ListMaintenanceWindows.rb create mode 100644 examples/v2/case-management/ListUserCaseProjectFavorites.rb create mode 100644 examples/v2/case-management/RemoveCaseInsights.rb create mode 100644 examples/v2/case-management/UnfavoriteCaseProject.rb create mode 100644 examples/v2/case-management/UnwatchCase.rb create mode 100644 examples/v2/case-management/UpdateCaseAutomationRule.rb create mode 100644 examples/v2/case-management/UpdateCaseComment.rb create mode 100644 examples/v2/case-management/UpdateCaseDueDate.rb create mode 100644 examples/v2/case-management/UpdateCaseResolvedReason.rb create mode 100644 examples/v2/case-management/UpdateCaseView.rb create mode 100644 examples/v2/case-management/UpdateMaintenanceWindow.rb create mode 100644 examples/v2/case-management/WatchCase.rb create mode 100644 examples/v2/llm-observability/AggregateLLMObsExperimentation.rb create mode 100644 examples/v2/llm-observability/ListLLMObsExperimentEvents.rb create mode 100644 examples/v2/llm-observability/SearchLLMObsExperimentation.rb create mode 100644 examples/v2/llm-observability/SimpleSearchLLMObsExperimentation.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_action.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_action_data.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_action_type.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_create.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_create_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_response.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_trigger.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_trigger_data.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_trigger_type.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_update.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rule_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/automation_rules_response.rb create mode 100644 lib/datadog_api_client/v2/models/case_aggregate_group.rb create mode 100644 lib/datadog_api_client/v2/models/case_aggregate_group_by.rb create mode 100644 lib/datadog_api_client/v2/models/case_aggregate_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_aggregate_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_aggregate_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/case_aggregate_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/case_aggregate_response.rb create mode 100644 lib/datadog_api_client/v2/models/case_aggregate_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_aggregate_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/case_automation_rule_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/case_automation_rule_state.rb create mode 100644 lib/datadog_api_client/v2/models/case_bulk_action_type.rb create mode 100644 lib/datadog_api_client/v2/models/case_bulk_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/case_bulk_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_bulk_update_request_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_bulk_update_request_data.rb create mode 100644 lib/datadog_api_client/v2/models/case_count_group.rb create mode 100644 lib/datadog_api_client/v2/models/case_count_group_value.rb create mode 100644 lib/datadog_api_client/v2/models/case_count_response.rb create mode 100644 lib/datadog_api_client/v2/models/case_count_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_count_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/case_insight.rb create mode 100644 lib/datadog_api_client/v2/models/case_insight_type.rb create mode 100644 lib/datadog_api_client/v2/models/case_insights_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_insights_data.rb create mode 100644 lib/datadog_api_client/v2/models/case_insights_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_link.rb create mode 100644 lib/datadog_api_client/v2/models/case_link_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_link_create.rb create mode 100644 lib/datadog_api_client/v2/models/case_link_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_link_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/case_link_response.rb create mode 100644 lib/datadog_api_client/v2/models/case_links_response.rb create mode 100644 lib/datadog_api_client/v2/models/case_type_update.rb create mode 100644 lib/datadog_api_client/v2/models/case_type_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_update_comment.rb create mode 100644 lib/datadog_api_client/v2/models/case_update_comment_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_update_comment_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_update_due_date.rb create mode 100644 lib/datadog_api_client/v2/models/case_update_due_date_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_update_due_date_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_update_resolved_reason.rb create mode 100644 lib/datadog_api_client/v2/models/case_update_resolved_reason_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_update_resolved_reason_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_view.rb create mode 100644 lib/datadog_api_client/v2/models/case_view_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_view_create.rb create mode 100644 lib/datadog_api_client/v2/models/case_view_create_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_view_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_view_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/case_view_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/case_view_response.rb create mode 100644 lib/datadog_api_client/v2/models/case_view_update.rb create mode 100644 lib/datadog_api_client/v2/models/case_view_update_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_view_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_views_response.rb create mode 100644 lib/datadog_api_client/v2/models/case_watcher.rb create mode 100644 lib/datadog_api_client/v2/models/case_watcher_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/case_watcher_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/case_watcher_user_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/case_watchers_response.rb create mode 100644 lib/datadog_api_client/v2/models/custom_attribute_config_update.rb create mode 100644 lib/datadog_api_client/v2/models/custom_attribute_config_update_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/custom_attribute_config_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/custom_attribute_select_option.rb create mode 100644 lib/datadog_api_client/v2/models/custom_attribute_type_data.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_eval_metric_event.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_events_type.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_run_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experiment_span_with_evals.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_aggregate.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_compute.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_group_by.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_result.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_search.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_time_range.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_value.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_content_preview.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_cursor_page.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_filter.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_include.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_number_page.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_search_results.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta_page.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_request.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_response.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field_direction.rb create mode 100644 lib/datadog_api_client/v2/models/llm_obs_experimentation_type.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_window.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_window_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_window_create.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_window_create_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_window_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_window_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_window_response.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_window_update.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_window_update_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_window_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/maintenance_windows_response.rb create mode 100644 lib/datadog_api_client/v2/models/project_favorite.rb create mode 100644 lib/datadog_api_client/v2/models/project_favorite_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/project_favorites_response.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 0f0a8a4eda9b..901b7a232478 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: Case type's UUID + description: The UUID of the case type. example: "f98a5a5b-e0ff-45d4-b2f5-afe6e74de505" in: path name: case_type_id @@ -257,7 +257,7 @@ components: schema: type: string CellIDPathParameter: - description: Timeline cell's UUID + description: The UUID of the timeline cell (comment) to update. example: "f98a5a5b-e0ff-45d4-b2f5-afe6e74de504" in: path name: cell_id @@ -853,6 +853,22 @@ 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`. @@ -1441,6 +1457,14 @@ 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 @@ -1619,6 +1643,22 @@ 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 @@ -7626,6 +7666,219 @@ 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" @@ -10890,6 +11143,128 @@ 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: @@ -10982,6 +11357,102 @@ 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: @@ -11011,6 +11482,75 @@ 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: @@ -11094,6 +11634,86 @@ 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: @@ -11110,6 +11730,106 @@ 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: @@ -11352,7 +12072,7 @@ components: description: An attribute value. type: string type: array - description: The definition of `CaseObjectAttributes` object. + 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. type: object CasePriority: default: NOT_DEFINED @@ -11387,7 +12107,7 @@ components: type: object CaseResourceType: default: case - description: Case resource type + description: JSON:API resource type for cases. enum: - case example: case @@ -11467,7 +12187,7 @@ components: x-enum-varnames: - STANDARD CaseTypeCreate: - description: Case type + description: Data object for creating a case type. properties: attributes: $ref: "#/components/schemas/CaseTypeResourceAttributes" @@ -11478,7 +12198,7 @@ components: - type type: object CaseTypeCreateRequest: - description: Case type create request + description: Request payload for creating a case type. properties: data: $ref: "#/components/schemas/CaseTypeCreate" @@ -11486,7 +12206,7 @@ components: - data type: object CaseTypeResource: - description: The definition of `CaseType` object. + description: A case type that defines a classification category for cases. Each case type can have its own custom attributes, statuses, and automation rules. properties: attributes: $ref: "#/components/schemas/CaseTypeResourceAttributes" @@ -11498,24 +12218,24 @@ components: $ref: "#/components/schemas/CaseTypeResourceType" type: object CaseTypeResourceAttributes: - description: Case Type resource attributes + 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)." properties: deleted_at: - description: Timestamp of when the case type was deleted + description: Timestamp when the case type was marked as deleted. A null value indicates the case type is active. format: date-time nullable: true readOnly: true type: string description: - description: Case type description. + description: A detailed description explaining when this case type should be used. example: "Investigations done in case management" type: string emoji: - description: Case type emoji. + description: An emoji icon representing the case type in the UI. example: "🕵🏻‍♂️" type: string name: - description: Case type name. + description: The display name of the case type, shown in the Case Management UI when creating or viewing cases. example: "Investigation" type: string required: @@ -11523,7 +12243,7 @@ components: type: object CaseTypeResourceType: default: case_type - description: Case type resource type + description: JSON:API resource type for case types. enum: - case_type example: case_type @@ -11531,13 +12251,31 @@ components: x-enum-varnames: - CASE_TYPE CaseTypeResponse: - description: Case type response + description: Response containing a single case type. 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: Case types response. + description: Response containing a list of case types. properties: data: description: List of case types @@ -11572,6 +12310,35 @@ 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: @@ -11620,6 +12387,35 @@ 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: @@ -11647,6 +12443,35 @@ 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: @@ -11704,6 +12529,217 @@ 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: @@ -20357,7 +21393,7 @@ components: $ref: "#/components/schemas/CsmServerlessCoverageAnalysisData" type: object CustomAttributeConfig: - description: The definition of `CustomAttributeConfig` object. + 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." properties: attributes: $ref: "#/components/schemas/CustomAttributeConfigResourceAttributes" @@ -20369,22 +21405,22 @@ components: $ref: "#/components/schemas/CustomAttributeConfigResourceType" type: object CustomAttributeConfigAttributesCreate: - description: Custom attribute config resource attributes + description: Attributes required to create a custom attribute configuration. properties: description: - description: Custom attribute description. + description: A description explaining the purpose and expected values for this custom attribute. example: "AWS Region, must be a valid region supported by AWS" type: string display_name: - description: Custom attribute name. + description: The human-readable label shown in the Case Management UI for this custom attribute. example: "AWS Region" type: string is_multi: - description: Whether multiple values can be set + description: "If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed." example: true type: boolean key: - description: Custom attribute key. This will be the value use to search on this custom attribute + description: The programmatic key used to reference this custom attribute in search queries and API calls. example: "aws_region" type: string type: @@ -20396,7 +21432,7 @@ components: - is_multi type: object CustomAttributeConfigCreate: - description: Custom attribute config + description: Data object for creating a custom attribute configuration. properties: attributes: $ref: "#/components/schemas/CustomAttributeConfigAttributesCreate" @@ -20407,7 +21443,7 @@ components: - type type: object CustomAttributeConfigCreateRequest: - description: Custom attribute config create request + description: Request payload for creating a custom attribute configuration. properties: data: $ref: "#/components/schemas/CustomAttributeConfigCreate" @@ -20415,26 +21451,26 @@ components: - data type: object CustomAttributeConfigResourceAttributes: - description: Custom attribute resource attributes + description: "Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type." properties: case_type_id: - description: Custom attribute config identifier. + description: The UUID of the case type this custom attribute belongs to. example: "aeadc05e-98a8-11ec-ac2c-da7ad0900001" type: string description: - description: Custom attribute description. + description: A description explaining the purpose and expected values for this custom attribute. example: "AWS Region, must be a valid region supported by AWS" type: string display_name: - description: Custom attribute name. + description: The human-readable label shown in the Case Management UI for this custom attribute. example: "AWS Region" type: string is_multi: - description: Whether multiple values can be set + description: "If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed." example: true type: boolean key: - description: Custom attribute key. This will be the value use to search on this custom attribute + description: The programmatic key used to reference this custom attribute in search queries and API calls. example: "aws_region" type: string type: @@ -20448,7 +21484,7 @@ components: type: object CustomAttributeConfigResourceType: default: custom_attribute - description: Custom attributes config JSON:API resource type + description: JSON:API resource type for custom attribute configurations. enum: - custom_attribute example: custom_attribute @@ -20456,13 +21492,50 @@ components: x-enum-varnames: - CUSTOM_ATTRIBUTE CustomAttributeConfigResponse: - description: Custom attribute config response. + description: Response containing a single custom attribute configuration. 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: Custom attribute configs response. + description: Response containing a list of custom attribute configurations. properties: data: description: List of custom attribute configs of case type @@ -20471,27 +21544,37 @@ components: type: array type: object CustomAttributeMultiNumberValue: - description: Values of multi NUMBER custom attribute + description: An array of numeric values for a multi-value NUMBER-type custom attribute. items: description: NUMBER value format: double type: number type: array CustomAttributeMultiStringValue: - description: Value of multi TEXT/URL/NUMBER/SELECT custom attribute + description: An array of string values for a multi-value TEXT, URL, or SELECT-type custom attribute. items: description: TEXT/URL/NUMBER/SELECT Value type: string type: array CustomAttributeNumberValue: - description: Value of NUMBER custom attribute + description: A numeric value for a NUMBER-type 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: Value of TEXT/URL/NUMBER/SELECT custom attribute + description: A string value for a TEXT, URL, or SELECT-type custom attribute. type: string CustomAttributeType: - description: Custom attributes type + description: "The data type of the custom attribute, which determines the allowed values and UI input control." enum: - URL - TEXT @@ -20504,8 +21587,17 @@ 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: Custom attribute values + description: A typed value for a custom attribute on a specific case. properties: is_multi: description: If true, value must be an array @@ -20521,7 +21613,7 @@ components: - value type: object CustomAttributeValuesUnion: - description: Union of supported value for a custom attribute + description: The value of a custom attribute. The accepted format depends on the attribute's type and whether it accepts multiple values. example: "" oneOf: - $ref: "#/components/schemas/CustomAttributeStringValue" @@ -42033,6 +43125,75 @@ components: - type - attributes type: object + LLMObsExperimentEvalMetricEvent: + description: An evaluation metric event associated with an experiment span. + properties: + assessment: + $ref: "#/components/schemas/LLMObsMetricAssessment" + boolean_value: + description: Boolean value. Present when `metric_type` is `boolean`. + nullable: true + type: boolean + categorical_value: + description: Categorical value. Present when `metric_type` is `categorical`. + nullable: true + type: string + eval_source_type: + description: Source type of the evaluation. + example: "managed" + type: string + id: + description: Unique identifier of the evaluation metric event. + example: "00000000-0000-0000-0000-000000000001" + type: string + json_value: + additionalProperties: {} + description: JSON value. Present when `metric_type` is `json`. + nullable: true + type: object + label: + description: Label or name for the metric. + example: "faithfulness" + type: string + metadata: + additionalProperties: {} + description: Arbitrary metadata associated with the metric. + nullable: true + type: object + metric_source: + description: Source of the metric. Either `custom` (user-submitted) or `summary` (experiment-level aggregate). + example: "custom" + type: string + metric_type: + $ref: "#/components/schemas/LLMObsMetricScoreType" + reasoning: + description: Human-readable reasoning for the metric value. + nullable: true + type: string + score_value: + description: Numeric score. Present when `metric_type` is `score`. + format: double + nullable: true + type: number + span_id: + description: Span ID this metric is associated with. + example: "span-7a1b2c3d" + type: string + tags: + description: Tags associated with the metric. + items: + type: string + type: array + timestamp_ms: + description: Timestamp when the metric was recorded, in milliseconds since Unix epoch. + example: 1705314600000 + format: int64 + type: integer + trace_id: + description: Trace ID linking this metric to a span. + example: "abc123def456" + type: string + type: object LLMObsExperimentEventsDataAttributesRequest: description: Attributes for pushing experiment events including spans and metrics. properties: @@ -42066,6 +43227,57 @@ components: required: - data type: object + LLMObsExperimentEventsType: + description: Resource type for an experiment events collection. + enum: + - experiment_events + example: experiment_events + type: string + x-enum-varnames: + - EXPERIMENT_EVENTS + LLMObsExperimentEventsV2DataAttributesResponse: + description: Attributes of an experiment events response. + properties: + spans: + description: Experiment spans, each enriched with their associated evaluation metrics. + items: + $ref: "#/components/schemas/LLMObsExperimentSpanWithEvals" + type: array + summary_metrics: + description: Experiment-level summary evaluation metrics (not tied to individual spans). + items: + $ref: "#/components/schemas/LLMObsExperimentEvalMetricEvent" + type: array + required: + - spans + - summary_metrics + type: object + LLMObsExperimentEventsV2DataResponse: + description: JSON:API data object for an experiment events response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentEventsV2DataAttributesResponse" + id: + description: Identifier for this events resource. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsExperimentEventsType" + required: + - id + - type + - attributes + type: object + LLMObsExperimentEventsV2Response: + description: Response for listing experiment events (v2/v3). Returns spans and summary metrics in a single resource. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentEventsV2DataResponse" + meta: + $ref: "#/components/schemas/LLMObsCursorMeta" + required: + - data + type: object LLMObsExperimentMetric: description: A metric associated with an LLM Observability experiment span. properties: @@ -42144,6 +43356,34 @@ components: required: - data type: object + LLMObsExperimentRunDataResponse: + description: Data object for an LLM Observability experiment run. + properties: + aggregate_data: + additionalProperties: {} + description: Aggregated metric data for this run. + nullable: true + type: object + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + experiment_id: + description: Identifier of the experiment this run belongs to. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + id: + description: Unique identifier of the experiment run. + example: "7a1b2c3d-4e5f-6789-abcd-ef0123456789" + type: string + run_number: + description: Sequential number of this run within the experiment. + example: 1 + format: int32 + maximum: 2147483647 + type: integer + type: object LLMObsExperimentSpan: description: A span associated with an LLM Observability experiment. properties: @@ -42237,6 +43477,63 @@ components: x-enum-varnames: - OK - ERROR + LLMObsExperimentSpanWithEvals: + description: An experiment span enriched with its associated evaluation metrics. + properties: + dataset_record_id: + description: ID of the dataset record this span evaluated. + nullable: true + type: string + duration: + description: Duration of the span in nanoseconds. + example: 1500000000.0 + format: double + type: number + eval_metrics: + description: Evaluation metrics associated with this span. + items: + $ref: "#/components/schemas/LLMObsExperimentEvalMetricEvent" + type: array + id: + description: Unique identifier of the span. + example: "00000000-0000-0000-0000-000000000001" + type: string + meta: + $ref: "#/components/schemas/LLMObsExperimentSpanMeta" + metrics: + additionalProperties: + format: double + type: number + description: Numeric metrics attached to the span. + type: object + name: + description: Name of the span. + example: "llm_call" + type: string + parent_id: + description: Parent span ID, if any. + type: string + span_id: + description: Span ID. + example: "span-7a1b2c3d" + type: string + start_ns: + description: Start time in nanoseconds since Unix epoch. + example: 1705314600000000000 + format: int64 + type: integer + status: + $ref: "#/components/schemas/LLMObsExperimentSpanStatus" + tags: + description: Tags associated with the span. + items: + type: string + type: array + trace_id: + description: Trace ID. + example: "abc123def456" + type: string + type: object LLMObsExperimentType: description: Resource type of an LLM Observability experiment. enum: @@ -42274,6 +43571,493 @@ components: required: - data type: object + LLMObsExperimentationAnalyticsAggregate: + description: Analytics aggregation parameters. + properties: + compute: + description: List of metric computations to perform. + items: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsCompute" + minItems: 1 + type: array + dataset_version: + description: Filter to a specific dataset version. + format: int64 + nullable: true + type: integer + group_by: + description: Fields to group results by. + items: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsGroupBy" + type: array + indexes: + description: Data indexes to query. At least one is required. + example: + - "experiment-evals" + items: + type: string + minItems: 1 + type: array + limit: + description: Maximum number of results to return. + example: 1000 + format: int32 + maximum: 2147483647 + nullable: true + type: integer + search: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsSearch" + time: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsTimeRange" + required: + - compute + - indexes + - search + type: object + LLMObsExperimentationAnalyticsCompute: + description: A single metric computation definition. + properties: + metric: + description: Name of the metric to compute. + example: "score_value" + type: string + name: + description: Optional alias for this computation in the response. + example: "avg_faithfulness" + type: string + required: + - metric + type: object + LLMObsExperimentationAnalyticsDataAttributesRequest: + description: Attributes for an analytics request. + properties: + aggregate: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsAggregate" + required: + - aggregate + type: object + LLMObsExperimentationAnalyticsDataAttributesResponse: + description: Attributes of an analytics response. + properties: + hit_count: + description: Total number of events matched by the query before grouping. + example: 1500 + format: int64 + type: integer + result: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsResult" + required: + - hit_count + - result + type: object + LLMObsExperimentationAnalyticsDataRequest: + description: Data object for an analytics request. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - type + - attributes + type: object + LLMObsExperimentationAnalyticsDataResponse: + description: JSON:API data object for an analytics response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsDataAttributesResponse" + id: + description: Server-generated identifier for this analytics result. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - id + - type + - attributes + type: object + LLMObsExperimentationAnalyticsGroupBy: + description: A field to group analytics results by. + properties: + field: + description: Field name to group by. + example: "span_id" + type: string + required: + - field + type: object + LLMObsExperimentationAnalyticsRequest: + description: Request to run an analytics aggregation over LLM Observability experimentation data. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsDataRequest" + required: + - data + type: object + LLMObsExperimentationAnalyticsResponse: + description: Response to an analytics query. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsDataResponse" + required: + - data + type: object + LLMObsExperimentationAnalyticsResult: + description: Analytics query result containing all buckets. + properties: + values: + description: List of result buckets. + items: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsValue" + type: array + required: + - values + type: object + LLMObsExperimentationAnalyticsSearch: + description: Search query for filtering analytics data. + properties: + query: + description: Filter expression. + example: "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + required: + - query + type: object + LLMObsExperimentationAnalyticsTimeRange: + description: Unix-millisecond time range for filtering analytics data. + properties: + from: + description: Start of the time range in milliseconds since Unix epoch. + example: 1705312200000 + format: int64 + type: integer + to: + description: End of the time range in milliseconds since Unix epoch. + example: 1705315800000 + format: int64 + type: integer + required: + - from + - to + type: object + LLMObsExperimentationAnalyticsValue: + description: A single analytics result bucket. + properties: + by: + additionalProperties: {} + description: The group-by field values for this bucket. + example: + span_id: "span-7a1b2c3d" + type: object + metrics: + additionalProperties: {} + description: Computed metric values for this bucket. + example: + score_value: 0.85 + type: object + required: + - metrics + type: object + LLMObsExperimentationContentPreview: + description: Options to control content preview truncation. + properties: + limit: + description: Maximum number of characters to include in content previews. + example: 500 + format: int64 + type: integer + type: object + LLMObsExperimentationCursorPage: + description: Cursor-based pagination parameters. + properties: + cursor: + description: Opaque cursor returned from a previous response to fetch the next page. + type: string + limit: + description: Maximum number of results per page. + example: 100 + format: int64 + type: integer + type: object + LLMObsExperimentationFilter: + description: Filter criteria for an experimentation search request. + properties: + include_deleted: + default: false + description: When `true`, include soft-deleted entities alongside active ones. + type: boolean + is_deleted: + default: false + description: When `true`, return only soft-deleted entities. + type: boolean + query: + description: Free-text search query. + example: "my experiment" + type: string + scope: + description: >- + Entity types to search. Valid values are `projects`, `datasets`, `dataset_records`, `experiments`, and `experiment_runs`. + example: + - "experiments" + items: + example: "experiments" + type: string + type: array + version: + description: Filter dataset records by a specific dataset version. + format: int64 + nullable: true + type: integer + required: + - scope + type: object + LLMObsExperimentationInclude: + description: Additional data to include in the response. + properties: + user_data: + default: false + description: When `true`, enrich results with author user data (name and email). + type: boolean + type: object + LLMObsExperimentationNumberPage: + description: Offset-based pagination parameters for simple search. + properties: + limit: + description: Maximum number of results per page. + example: 50 + format: int32 + maximum: 2147483647 + type: integer + number: + description: Page number to retrieve (1-indexed). + example: 1 + format: int32 + maximum: 2147483647 + minimum: 1 + type: integer + type: object + LLMObsExperimentationSearchDataAttributesRequest: + description: Attributes for an experimentation search request. + properties: + content_preview: + $ref: "#/components/schemas/LLMObsExperimentationContentPreview" + filter: + $ref: "#/components/schemas/LLMObsExperimentationFilter" + include: + $ref: "#/components/schemas/LLMObsExperimentationInclude" + page: + $ref: "#/components/schemas/LLMObsExperimentationCursorPage" + required: + - filter + type: object + LLMObsExperimentationSearchDataRequest: + description: Data object for an experimentation search request. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationSearchDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - type + - attributes + type: object + LLMObsExperimentationSearchDataResponse: + description: JSON:API data object for an experimentation search response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationSearchResults" + id: + description: Server-generated identifier for this search result. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - id + - type + - attributes + type: object + LLMObsExperimentationSearchRequest: + description: Request to search across LLM Observability experimentation entities using cursor-based pagination. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationSearchDataRequest" + required: + - data + type: object + LLMObsExperimentationSearchResponse: + description: Response to a cursor-based experimentation search. Returns `200 OK` when all results fit in one page; `206 Partial Content` when a next-page cursor is available. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationSearchDataResponse" + meta: + $ref: "#/components/schemas/LLMObsCursorMeta" + required: + - data + type: object + LLMObsExperimentationSearchResults: + description: The matching experimentation entities grouped by type. + properties: + dataset_records: + description: Matching dataset records. Present when `dataset_records` is included in `filter.scope`. + items: + $ref: "#/components/schemas/LLMObsDatasetRecordDataResponse" + nullable: true + type: array + datasets: + description: Matching datasets. Present when `datasets` is included in `filter.scope`. + items: + $ref: "#/components/schemas/LLMObsDatasetDataResponse" + nullable: true + type: array + experiment_runs: + description: Matching experiment runs. Present when `experiment_runs` is included in `filter.scope`. + items: + $ref: "#/components/schemas/LLMObsExperimentRunDataResponse" + nullable: true + type: array + experiments: + description: Matching experiments. Present when `experiments` is included in `filter.scope`. + items: + $ref: "#/components/schemas/LLMObsExperimentDataAttributesResponse" + nullable: true + type: array + projects: + description: Matching projects. Present when `projects` is included in `filter.scope`. + items: + $ref: "#/components/schemas/LLMObsProjectDataResponse" + nullable: true + type: array + type: object + LLMObsExperimentationSimpleSearchDataAttributesRequest: + description: Attributes for an experimentation simple search request. + properties: + content_preview: + $ref: "#/components/schemas/LLMObsExperimentationContentPreview" + filter: + $ref: "#/components/schemas/LLMObsExperimentationFilter" + include: + $ref: "#/components/schemas/LLMObsExperimentationInclude" + page: + $ref: "#/components/schemas/LLMObsExperimentationNumberPage" + sort: + description: Sort order for results. + items: + $ref: "#/components/schemas/LLMObsExperimentationSortField" + type: array + required: + - filter + type: object + LLMObsExperimentationSimpleSearchDataRequest: + description: Data object for an experimentation simple search request. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchDataAttributesRequest" + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - type + - attributes + type: object + LLMObsExperimentationSimpleSearchDataResponse: + description: JSON:API data object for a simple search response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsExperimentationSearchResults" + id: + description: Server-generated identifier for this search result. + example: "00000000-0000-0000-0000-000000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsExperimentationType" + required: + - id + - type + - attributes + type: object + LLMObsExperimentationSimpleSearchMeta: + description: Pagination metadata for a simple search response. + properties: + page: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchMetaPage" + type: object + LLMObsExperimentationSimpleSearchMetaPage: + description: Page metadata. + properties: + current: + description: Current page number. + example: 1 + format: int32 + maximum: 2147483647 + type: integer + limit: + description: Page size used for this response. + example: 50 + format: int32 + maximum: 2147483647 + type: integer + total_count: + description: Total number of matching results (capped at the maximum search limit). + example: 193 + format: int32 + maximum: 2147483647 + type: integer + total_pages: + description: Total number of pages available. + example: 4 + format: int32 + maximum: 2147483647 + type: integer + type: object + LLMObsExperimentationSimpleSearchRequest: + description: Request to search across LLM Observability experimentation entities using offset-based pagination. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchDataRequest" + required: + - data + type: object + LLMObsExperimentationSimpleSearchResponse: + description: Response to an offset-based experimentation simple search. + properties: + data: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchDataResponse" + meta: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchMeta" + required: + - data + type: object + LLMObsExperimentationSortField: + description: A field and direction to sort results by. + properties: + direction: + $ref: "#/components/schemas/LLMObsExperimentationSortFieldDirection" + field: + description: The field name to sort on. + example: "created_at" + type: string + required: + - field + type: object + LLMObsExperimentationSortFieldDirection: + description: Sort direction. + enum: + - asc + - desc + example: "desc" + type: string + x-enum-varnames: + - ASC + - DESC + LLMObsExperimentationType: + description: Resource type for experimentation search and analytics operations. + enum: + - experimentation + example: experimentation + type: string + x-enum-varnames: + - EXPERIMENTATION LLMObsExperimentsResponse: description: Response containing a list of LLM Observability experiments. properties: @@ -45325,6 +47109,167 @@ 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: @@ -59450,6 +61395,39 @@ 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: @@ -82696,7 +84674,7 @@ components: - restrictions type: object TimelineCell: - description: timeline cell + 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)." properties: author: $ref: "#/components/schemas/TimelineCellAuthor" @@ -82721,11 +84699,11 @@ components: $ref: "#/components/schemas/TimelineCellType" type: object TimelineCellAuthor: - description: author of the timeline cell + description: The author of the timeline cell. Currently only user authors are supported. oneOf: - $ref: "#/components/schemas/TimelineCellAuthorUser" TimelineCellAuthorUser: - description: timeline cell user author + description: A user who authored a timeline cell. properties: content: $ref: "#/components/schemas/TimelineCellAuthorUserContent" @@ -82733,23 +84711,23 @@ components: $ref: "#/components/schemas/TimelineCellAuthorUserType" type: object TimelineCellAuthorUserContent: - description: user author content. + description: Profile information for the user who authored the timeline cell. properties: email: - description: user email + description: The email address of the user. type: string handle: - description: user handle + description: The Datadog handle of the user. type: string id: - description: user UUID + description: The UUID of the user. type: string name: - description: user name + description: The display name of the user. type: string type: object TimelineCellAuthorUserType: - description: user author type. + description: The type of timeline cell author. Currently only `USER` is supported. enum: - USER example: USER @@ -82757,18 +84735,18 @@ components: x-enum-varnames: - USER TimelineCellContent: - description: timeline cell content + description: The content payload of a timeline cell, varying by cell type. oneOf: - $ref: "#/components/schemas/TimelineCellContentComment" TimelineCellContentComment: - description: comment content + description: The content of a comment timeline cell. properties: message: - description: comment message + description: The text content of the comment. Supports Markdown formatting. type: string type: object TimelineCellResource: - description: Timeline cell JSON:API resource + description: A timeline cell resource representing a single entry in a case's activity timeline. properties: attributes: $ref: "#/components/schemas/TimelineCell" @@ -82785,7 +84763,7 @@ components: type: object TimelineCellResourceType: default: timeline_cell - description: Timeline cell JSON:API resource type + description: JSON:API resource type for timeline cells. enum: - timeline_cell example: timeline_cell @@ -82793,7 +84771,7 @@ components: x-enum-varnames: - TIMELINE_CELL TimelineCellType: - description: Timeline cell content type + description: The type of content in the timeline cell. Currently only `COMMENT` is supported in this endpoint. enum: - COMMENT example: COMMENT @@ -82801,7 +84779,7 @@ components: x-enum-varnames: - COMMENT TimelineResponse: - description: Timeline response + description: Response containing the chronological list of timeline cells for a case. properties: data: description: The `TimelineResponse` `data`. @@ -87438,6 +89416,7 @@ 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. @@ -87459,6 +89438,8 @@ 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. @@ -94287,6 +96268,336 @@ 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: >- @@ -94378,6 +96689,44 @@ 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`. @@ -94497,6 +96846,65 @@ 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: >- @@ -94705,6 +97113,418 @@ 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 @@ -94833,6 +97653,65 @@ 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 @@ -94947,6 +97826,305 @@ 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: >- @@ -95265,6 +98443,50 @@ 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 @@ -95361,13 +98583,224 @@ paths: $ref: "#/components/schemas/CaseResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + $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 "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" security: @@ -95375,13 +98808,16 @@ paths: appKeyAuth: [] - AuthZ: - cases_write - summary: Update case custom attribute + summary: Remove insights from a case tags: - Case Management - /api/v2/cases/{case_id}/description: - post: - description: Update case description - operationId: UpdateCaseDescription + 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 parameters: - $ref: "#/components/parameters/CaseIDPathParameter" requestBody: @@ -95392,11 +98828,14 @@ paths: value: data: attributes: - description: Seeing some weird memory increase... We shouldn't ignore this + insights: + - ref: "/monitors/12345?q=total" + resource_id: "12345" + type: SECURITY_SIGNAL type: case schema: - $ref: "#/components/schemas/CaseUpdateDescriptionRequest" - description: Case description update payload + $ref: "#/components/schemas/CaseInsightsRequest" + description: Case insights request. required: true responses: "200": @@ -95424,13 +98863,29 @@ paths: $ref: "#/components/schemas/CaseResponse" description: OK "400": - $ref: "#/components/responses/BadRequestResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request "401": - $ref: "#/components/responses/UnauthorizedResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized "403": - $ref: "#/components/responses/ForbiddenResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden "404": - $ref: "#/components/responses/NotFoundResponse" + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" security: @@ -95438,9 +98893,12 @@ paths: appKeyAuth: [] - AuthZ: - cases_write - summary: Update case description + summary: Add insights to 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/cases/{case_id}/priority: post: description: Update case priority @@ -95944,6 +99402,72 @@ 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 @@ -96008,6 +99532,72 @@ 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 @@ -96193,6 +99783,112 @@ 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. @@ -116438,6 +120134,296 @@ 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/llm-obs/v1/experimentation/analytics: + post: + description: |- + Execute an analytics aggregation over LLM Observability experimentation data. + Use this endpoint to compute metrics (for example average eval scores) grouped by fields such as `span_id` or `experiment_id`. + + At least one `compute` definition and one `index` must be provided. + operationId: AggregateLLMObsExperimentation + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + aggregate: + compute: + - metric: score_value + name: avg_faithfulness + group_by: + - field: span_id + indexes: + - experiment-evals + search: + query: "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012 @label:faithfulness" + type: experimentation + schema: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsRequest" + description: Analytics payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + hit_count: 42 + result: + values: + - by: + span_id: span-7a1b2c3d + metrics: + avg_faithfulness: 0.87 + id: 00000000-0000-0000-0000-000000000001 + type: experimentation + schema: + $ref: "#/components/schemas/LLMObsExperimentationAnalyticsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Aggregate LLM Observability experimentation + tags: + - LLM Observability + 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/llm-obs/v1/experimentation/search: + post: + description: |- + Search across LLM Observability experimentation entities — projects, datasets, dataset records, experiments, and experiment runs — using cursor-based pagination. + + The `filter.scope` field controls which entity types are returned. At least one valid scope must be provided. + + Returns `200 OK` when all results fit in a single page. Returns `206 Partial Content` with a cursor in `meta.after` when additional pages are available. + operationId: SearchLLMObsExperimentation + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + filter: + query: "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751" + scope: + - experiments + page: + limit: 50 + type: experimentation + schema: + $ref: "#/components/schemas/LLMObsExperimentationSearchRequest" + description: Experimentation search payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + experiments: + - created_at: "2024-01-01T00:00:00+00:00" + dataset_id: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d + description: "" + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + name: My Experiment v1 + project_id: a33671aa-24fd-4dcd-9b33-a8ec7dde7751 + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000001 + type: experimentation + meta: + after: + schema: + $ref: "#/components/schemas/LLMObsExperimentationSearchResponse" + description: OK — all results returned in a single page. + "206": + content: + application/json: + examples: + default: + value: + data: + attributes: + experiments: + - created_at: "2024-01-01T00:00:00+00:00" + dataset_id: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d + description: "" + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + name: My Experiment v1 + project_id: a33671aa-24fd-4dcd-9b33-a8ec7dde7751 + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000001 + type: experimentation + meta: + after: eyJpZCI6ImFiYzEyMyJ9 + schema: + $ref: "#/components/schemas/LLMObsExperimentationSearchResponse" + description: Partial Content — more results are available. Use `meta.after` as the next `page.cursor`. + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Search LLM Observability experimentation entities + tags: + - LLM Observability + 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/llm-obs/v1/experimentation/simple-search: + post: + description: |- + Search across LLM Observability experimentation entities using offset-based (page-number) pagination. + Use this endpoint when you need total page count or want to navigate to a specific page number. + + The `filter.scope` field controls which entity types are returned. At least one valid scope must be provided. + operationId: SimpleSearchLLMObsExperimentation + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + filter: + query: "@project_id:a33671aa-24fd-4dcd-9b33-a8ec7dde7751" + scope: + - experiments + page: + limit: 50 + number: 1 + sort: + - direction: desc + field: created_at + type: experimentation + schema: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchRequest" + description: Simple search payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + experiments: + - created_at: "2024-01-01T00:00:00+00:00" + description: "" + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + name: My Experiment v1 + project_id: a33671aa-24fd-4dcd-9b33-a8ec7dde7751 + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000001 + type: experimentation + meta: + page: + current: 1 + limit: 50 + total_count: 63 + total_pages: 2 + schema: + $ref: "#/components/schemas/LLMObsExperimentationSimpleSearchResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Simple search experimentation entities + tags: + - LLM Observability + 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/llm-obs/v1/experiments: get: description: List all LLM Observability experiments sorted by creation date, newest first. @@ -117543,30 +121529,184 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Update LLM Observability dataset records + summary: Update LLM Observability dataset records + tags: + - LLM Observability + 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: Append one or more records to an LLM Observability dataset. + operationId: CreateLLMObsDatasetRecords + parameters: + - $ref: "#/components/parameters/LLMObsProjectIDPathParameter" + - $ref: "#/components/parameters/LLMObsDatasetIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + type: records + schema: + $ref: "#/components/schemas/LLMObsDatasetRecordsRequest" + description: Append records payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - records: + - created_at: "2024-01-01T00:00:00+00:00" + dataset_id: 00000000-0000-0000-0000-000000000024 + expected_output: + answer: "Paris" + id: 00000000-0000-0000-0000-000000000023 + input: + question: "What is the capital of France?" + metadata: + updated_at: "2024-01-01T00:00:00+00:00" + schema: + $ref: "#/components/schemas/LLMObsDatasetRecordsMutationResponse" + description: OK + "201": + content: + application/json: + examples: + default: + value: + data: + - records: + - created_at: "2024-01-01T00:00:00+00:00" + dataset_id: 00000000-0000-0000-0000-000000000026 + expected_output: + answer: "Paris" + id: 00000000-0000-0000-0000-000000000025 + input: + question: "What is the capital of France?" + metadata: + updated_at: "2024-01-01T00:00:00+00:00" + schema: + $ref: "#/components/schemas/LLMObsDatasetRecordsMutationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "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" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Append records to an LLM Observability dataset + tags: + - LLM Observability + 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/llm-obs/v1/{project_id}/datasets/{dataset_id}/records/delete: + post: + description: Delete one or more records from an LLM Observability dataset. + operationId: DeleteLLMObsDatasetRecords + parameters: + - $ref: "#/components/parameters/LLMObsProjectIDPathParameter" + - $ref: "#/components/parameters/LLMObsDatasetIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + record_ids: + - rec-7c3f5a1b-9e2d-4f8a-b1c6-3d7e9f0a2b4c + type: records + schema: + $ref: "#/components/schemas/LLMObsDeleteDatasetRecordsRequest" + description: Delete records payload. + required: true + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "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" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete LLM Observability dataset records tags: - LLM Observability 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: Append one or more records to an LLM Observability dataset. - operationId: CreateLLMObsDatasetRecords + /api/v2/llm-obs/v3/experiments/{experiment_id}/events: + get: + description: Retrieve spans and experiment-level summary metrics for a given experiment with cursor-based pagination. + operationId: ListLLMObsExperimentEvents parameters: - - $ref: "#/components/parameters/LLMObsProjectIDPathParameter" - - $ref: "#/components/parameters/LLMObsDatasetIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - type: records - schema: - $ref: "#/components/schemas/LLMObsDatasetRecordsRequest" - description: Append records payload. - required: true + - $ref: "#/components/parameters/LLMObsExperimentIDPathParameter" + - description: Maximum number of spans to return per page. Defaults to 5000. + in: query + name: page[limit] + schema: + default: 5000 + format: int64 + type: integer + - description: Opaque cursor from a previous response to fetch the next page of results. + in: query + name: page[cursor] + schema: + type: string responses: "200": content: @@ -117575,39 +121715,25 @@ paths: default: value: data: - - records: - - created_at: "2024-01-01T00:00:00+00:00" - dataset_id: 00000000-0000-0000-0000-000000000024 - expected_output: - answer: "Paris" - id: 00000000-0000-0000-0000-000000000023 - input: - question: "What is the capital of France?" - metadata: - updated_at: "2024-01-01T00:00:00+00:00" + attributes: + spans: + - duration: 1500000000.0 + eval_metrics: [] + id: 00000000-0000-0000-0000-000000000002 + name: llm_call + span_id: span-7a1b2c3d + start_ns: 1705314600000000000 + status: ok + tags: [] + trace_id: abc123def456 + summary_metrics: [] + id: 00000000-0000-0000-0000-000000000001 + type: experiment_events + meta: + after: schema: - $ref: "#/components/schemas/LLMObsDatasetRecordsMutationResponse" + $ref: "#/components/schemas/LLMObsExperimentEventsV2Response" description: OK - "201": - content: - application/json: - examples: - default: - value: - data: - - records: - - created_at: "2024-01-01T00:00:00+00:00" - dataset_id: 00000000-0000-0000-0000-000000000026 - expected_output: - answer: "Paris" - id: 00000000-0000-0000-0000-000000000025 - input: - question: "What is the capital of France?" - metadata: - updated_at: "2024-01-01T00:00:00+00:00" - schema: - $ref: "#/components/schemas/LLMObsDatasetRecordsMutationResponse" - description: Created "400": content: application/json: @@ -117634,70 +121760,16 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Append records to an LLM Observability dataset - tags: - - LLM Observability - 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/llm-obs/v1/{project_id}/datasets/{dataset_id}/records/delete: - post: - description: Delete one or more records from an LLM Observability dataset. - operationId: DeleteLLMObsDatasetRecords - parameters: - - $ref: "#/components/parameters/LLMObsProjectIDPathParameter" - - $ref: "#/components/parameters/LLMObsDatasetIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - record_ids: - - rec-7c3f5a1b-9e2d-4f8a-b1c6-3d7e9f0a2b4c - type: records - schema: - $ref: "#/components/schemas/LLMObsDeleteDatasetRecordsRequest" - description: Delete records payload. - required: true - responses: - "204": - description: No Content - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "404": + "500": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" + description: Internal Server Error security: - apiKeyAuth: [] appKeyAuth: [] - summary: Delete LLM Observability dataset records + summary: List events for an LLM Observability experiment tags: - LLM Observability x-unstable: |- @@ -119836,6 +123908,199 @@ 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: |- diff --git a/examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb b/examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb new file mode 100644 index 000000000000..641b70d9362c --- /dev/null +++ b/examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb @@ -0,0 +1,26 @@ +# 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 new file mode 100644 index 000000000000..0a63cc3bc2da --- /dev/null +++ b/examples/v2/case-management-type/UpdateCaseType.rb @@ -0,0 +1,19 @@ +# 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 new file mode 100644 index 000000000000..eaaec5bf0760 --- /dev/null +++ b/examples/v2/case-management/AddCaseInsights.rb @@ -0,0 +1,23 @@ +# 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 new file mode 100644 index 000000000000..937cb68545e0 --- /dev/null +++ b/examples/v2/case-management/AggregateCases.rb @@ -0,0 +1,23 @@ +# 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 new file mode 100644 index 000000000000..47775076dbab --- /dev/null +++ b/examples/v2/case-management/BulkUpdateCases.rb @@ -0,0 +1,24 @@ +# 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 new file mode 100644 index 000000000000..2a93c7f202ea --- /dev/null +++ b/examples/v2/case-management/CountCases.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..4df20a9a6199 --- /dev/null +++ b/examples/v2/case-management/CreateCaseAutomationRule.rb @@ -0,0 +1,28 @@ +# 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 new file mode 100644 index 000000000000..63dad423c442 --- /dev/null +++ b/examples/v2/case-management/CreateCaseLink.rb @@ -0,0 +1,21 @@ +# 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 new file mode 100644 index 000000000000..d1c90d2e529b --- /dev/null +++ b/examples/v2/case-management/CreateCaseView.rb @@ -0,0 +1,19 @@ +# 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 new file mode 100644 index 000000000000..95846eda3df9 --- /dev/null +++ b/examples/v2/case-management/CreateMaintenanceWindow.rb @@ -0,0 +1,20 @@ +# 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 new file mode 100644 index 000000000000..363031e58ca3 --- /dev/null +++ b/examples/v2/case-management/DeleteCaseAutomationRule.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..f140dd39a298 --- /dev/null +++ b/examples/v2/case-management/DeleteCaseLink.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..4bf89a91cc67 --- /dev/null +++ b/examples/v2/case-management/DeleteCaseView.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..85cb4fbbaa11 --- /dev/null +++ b/examples/v2/case-management/DeleteMaintenanceWindow.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..160008e29c46 --- /dev/null +++ b/examples/v2/case-management/DisableCaseAutomationRule.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..342ea386d886 --- /dev/null +++ b/examples/v2/case-management/EnableCaseAutomationRule.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..f534273accf0 --- /dev/null +++ b/examples/v2/case-management/FavoriteCaseProject.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..e66cf32e78d1 --- /dev/null +++ b/examples/v2/case-management/GetCaseAutomationRule.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..632c21fd9511 --- /dev/null +++ b/examples/v2/case-management/GetCaseView.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..648da95f8f4c --- /dev/null +++ b/examples/v2/case-management/ListCaseAutomationRules.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..0d74c08e6ed0 --- /dev/null +++ b/examples/v2/case-management/ListCaseLinks.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..00881e28694c --- /dev/null +++ b/examples/v2/case-management/ListCaseTimeline.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..83c0d0c6acc3 --- /dev/null +++ b/examples/v2/case-management/ListCaseViews.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..31f0f27ec425 --- /dev/null +++ b/examples/v2/case-management/ListCaseWatchers.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..6aa842e0d150 --- /dev/null +++ b/examples/v2/case-management/ListMaintenanceWindows.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..0c3b8372a7d5 --- /dev/null +++ b/examples/v2/case-management/ListUserCaseProjectFavorites.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..2707ebb93d53 --- /dev/null +++ b/examples/v2/case-management/RemoveCaseInsights.rb @@ -0,0 +1,23 @@ +# 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 new file mode 100644 index 000000000000..3403a0b5ddaf --- /dev/null +++ b/examples/v2/case-management/UnfavoriteCaseProject.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..905b370ac5f8 --- /dev/null +++ b/examples/v2/case-management/UnwatchCase.rb @@ -0,0 +1,8 @@ +# 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 new file mode 100644 index 000000000000..b02f5b182e33 --- /dev/null +++ b/examples/v2/case-management/UpdateCaseAutomationRule.rb @@ -0,0 +1,28 @@ +# 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 new file mode 100644 index 000000000000..b3509c72d093 --- /dev/null +++ b/examples/v2/case-management/UpdateCaseComment.rb @@ -0,0 +1,17 @@ +# 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 new file mode 100644 index 000000000000..c1dce3c5fc21 --- /dev/null +++ b/examples/v2/case-management/UpdateCaseDueDate.rb @@ -0,0 +1,17 @@ +# 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 new file mode 100644 index 000000000000..ef98037a2d57 --- /dev/null +++ b/examples/v2/case-management/UpdateCaseResolvedReason.rb @@ -0,0 +1,17 @@ +# 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 new file mode 100644 index 000000000000..2395b959f12a --- /dev/null +++ b/examples/v2/case-management/UpdateCaseView.rb @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 000000000000..e0b6049d5051 --- /dev/null +++ b/examples/v2/case-management/UpdateMaintenanceWindow.rb @@ -0,0 +1,15 @@ +# 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 new file mode 100644 index 000000000000..39f8e2f33793 --- /dev/null +++ b/examples/v2/case-management/WatchCase.rb @@ -0,0 +1,8 @@ +# 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/llm-observability/AggregateLLMObsExperimentation.rb b/examples/v2/llm-observability/AggregateLLMObsExperimentation.rb new file mode 100644 index 000000000000..2dfba37bc76a --- /dev/null +++ b/examples/v2/llm-observability/AggregateLLMObsExperimentation.rb @@ -0,0 +1,41 @@ +# Aggregate LLM Observability experimentation returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.aggregate_llm_obs_experimentation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new + +body = DatadogAPIClient::V2::LLMObsExperimentationAnalyticsRequest.new({ + data: DatadogAPIClient::V2::LLMObsExperimentationAnalyticsDataRequest.new({ + attributes: DatadogAPIClient::V2::LLMObsExperimentationAnalyticsDataAttributesRequest.new({ + aggregate: DatadogAPIClient::V2::LLMObsExperimentationAnalyticsAggregate.new({ + compute: [ + DatadogAPIClient::V2::LLMObsExperimentationAnalyticsCompute.new({ + metric: "score_value", + name: "avg_faithfulness", + }), + ], + dataset_version: nil, + group_by: [ + DatadogAPIClient::V2::LLMObsExperimentationAnalyticsGroupBy.new({ + field: "span_id", + }), + ], + indexes: [ + "experiment-evals", + ], + limit: 1000, + search: DatadogAPIClient::V2::LLMObsExperimentationAnalyticsSearch.new({ + query: "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012", + }), + time: DatadogAPIClient::V2::LLMObsExperimentationAnalyticsTimeRange.new({ + from: 1705312200000, + to: 1705315800000, + }), + }), + }), + type: DatadogAPIClient::V2::LLMObsExperimentationType::EXPERIMENTATION, + }), +}) +p api_instance.aggregate_llm_obs_experimentation(body) diff --git a/examples/v2/llm-observability/ListLLMObsExperimentEvents.rb b/examples/v2/llm-observability/ListLLMObsExperimentEvents.rb new file mode 100644 index 000000000000..5c8f78774b04 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsExperimentEvents.rb @@ -0,0 +1,8 @@ +# List events for an LLM Observability experiment returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_llm_obs_experiment_events".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new +p api_instance.list_llm_obs_experiment_events("experiment_id") diff --git a/examples/v2/llm-observability/SearchLLMObsExperimentation.rb b/examples/v2/llm-observability/SearchLLMObsExperimentation.rb new file mode 100644 index 000000000000..180dafb61d8e --- /dev/null +++ b/examples/v2/llm-observability/SearchLLMObsExperimentation.rb @@ -0,0 +1,35 @@ +# Search LLM Observability experimentation entities returns "Partial Content — more results are available. Use +# `meta.after` as the next `page.cursor`." response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.search_llm_obs_experimentation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new + +body = DatadogAPIClient::V2::LLMObsExperimentationSearchRequest.new({ + data: DatadogAPIClient::V2::LLMObsExperimentationSearchDataRequest.new({ + attributes: DatadogAPIClient::V2::LLMObsExperimentationSearchDataAttributesRequest.new({ + content_preview: DatadogAPIClient::V2::LLMObsExperimentationContentPreview.new({ + limit: 500, + }), + filter: DatadogAPIClient::V2::LLMObsExperimentationFilter.new({ + include_deleted: false, + is_deleted: false, + query: "my experiment", + scope: [ + "experiments", + ], + version: nil, + }), + include: DatadogAPIClient::V2::LLMObsExperimentationInclude.new({ + user_data: false, + }), + page: DatadogAPIClient::V2::LLMObsExperimentationCursorPage.new({ + limit: 100, + }), + }), + type: DatadogAPIClient::V2::LLMObsExperimentationType::EXPERIMENTATION, + }), +}) +p api_instance.search_llm_obs_experimentation(body) diff --git a/examples/v2/llm-observability/SimpleSearchLLMObsExperimentation.rb b/examples/v2/llm-observability/SimpleSearchLLMObsExperimentation.rb new file mode 100644 index 000000000000..bd9ca69ca71a --- /dev/null +++ b/examples/v2/llm-observability/SimpleSearchLLMObsExperimentation.rb @@ -0,0 +1,41 @@ +# Simple search experimentation entities returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.simple_search_llm_obs_experimentation".to_sym] = true +end +api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new + +body = DatadogAPIClient::V2::LLMObsExperimentationSimpleSearchRequest.new({ + data: DatadogAPIClient::V2::LLMObsExperimentationSimpleSearchDataRequest.new({ + attributes: DatadogAPIClient::V2::LLMObsExperimentationSimpleSearchDataAttributesRequest.new({ + content_preview: DatadogAPIClient::V2::LLMObsExperimentationContentPreview.new({ + limit: 500, + }), + filter: DatadogAPIClient::V2::LLMObsExperimentationFilter.new({ + include_deleted: false, + is_deleted: false, + query: "my experiment", + scope: [ + "experiments", + ], + version: nil, + }), + include: DatadogAPIClient::V2::LLMObsExperimentationInclude.new({ + user_data: false, + }), + page: DatadogAPIClient::V2::LLMObsExperimentationNumberPage.new({ + limit: 50, + number: 1, + }), + sort: [ + DatadogAPIClient::V2::LLMObsExperimentationSortField.new({ + direction: DatadogAPIClient::V2::LLMObsExperimentationSortFieldDirection::DESC, + field: "created_at", + }), + ], + }), + type: DatadogAPIClient::V2::LLMObsExperimentationType::EXPERIMENTATION, + }), +}) +p api_instance.simple_search_llm_obs_experimentation(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 52b06deca4df..9fd6af3114f8 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -951,6 +951,15 @@ "queue_id" => "String", "body" => "LLMObsAnnotationQueueLabelSchemaUpdateRequest", }, + "v2.AggregateLLMObsExperimentation" => { + "body" => "LLMObsExperimentationAnalyticsRequest", + }, + "v2.SearchLLMObsExperimentation" => { + "body" => "LLMObsExperimentationSearchRequest", + }, + "v2.SimpleSearchLLMObsExperimentation" => { + "body" => "LLMObsExperimentationSimpleSearchRequest", + }, "v2.ListLLMObsExperiments" => { "filter_project_id" => "String", "filter_dataset_id" => "String", @@ -1030,6 +1039,11 @@ "dataset_id" => "String", "body" => "LLMObsDeleteDatasetRecordsRequest", }, + "v2.ListLLMObsExperimentEvents" => { + "experiment_id" => "String", + "page_limit" => "Integer", + "page_cursor" => "String", + }, "v2.CreateDatastore" => { "body" => "CreateAppsDatastoreRequest", }, @@ -1441,6 +1455,28 @@ "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", }, @@ -1454,6 +1490,12 @@ "project_id" => "String", "body" => "ProjectUpdateRequest", }, + "v2.UnfavoriteCaseProject" => { + "project_id" => "String", + }, + "v2.FavoriteCaseProject" => { + "project_id" => "String", + }, "v2.GetProjectNotificationRules" => { "project_id" => "String", }, @@ -1470,6 +1512,50 @@ "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", }, @@ -1493,6 +1579,11 @@ "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", @@ -1506,6 +1597,18 @@ "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", @@ -1537,10 +1640,20 @@ "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", @@ -1553,12 +1666,37 @@ "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", }, @@ -1570,6 +1708,11 @@ "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", diff --git a/features/v2/case_management.feature b/features/v2/case_management.feature index bd67a8ddf2cc..04f9d8e0698d 100644 --- a/features/v2/case_management.feature +++ b/features/v2/case_management.feature @@ -10,6 +10,57 @@ 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 @@ -64,6 +115,30 @@ 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 @@ -90,6 +165,27 @@ 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 @@ -144,6 +240,30 @@ 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 @@ -170,6 +290,54 @@ 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 @@ -215,6 +383,33 @@ 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 @@ -242,6 +437,78 @@ 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 @@ -258,6 +525,24 @@ 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 @@ -306,6 +591,108 @@ 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 @@ -324,6 +711,57 @@ 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 @@ -452,6 +890,147 @@ 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 @@ -490,6 +1069,33 @@ 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 @@ -569,6 +1175,111 @@ 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 @@ -622,6 +1333,36 @@ 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 @@ -648,6 +1389,36 @@ 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 @@ -708,6 +1479,33 @@ 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 @@ -762,6 +1560,33 @@ 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 @@ -814,3 +1639,30 @@ 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 3ac06e724b79..47806e809c06 100644 --- a/features/v2/case_management_attribute.feature +++ b/features/v2/case_management_attribute.feature @@ -75,3 +75,33 @@ 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 0773d7d241b5..260ac3d3c42b 100644 --- a/features/v2/case_management_type.feature +++ b/features/v2/case_management_type.feature @@ -44,3 +44,30 @@ 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/llm_observability.feature b/features/v2/llm_observability.feature index 20b95487da8b..e8661824fd46 100644 --- a/features/v2/llm_observability.feature +++ b/features/v2/llm_observability.feature @@ -53,6 +53,22 @@ Feature: LLM Observability When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability + Scenario: Aggregate LLM Observability experimentation returns "Bad Request" response + Given operation "AggregateLLMObsExperimentation" enabled + And new "AggregateLLMObsExperimentation" request + And body with value {"data": {"attributes": {"aggregate": {"compute": [{"metric": "score_value", "name": "avg_faithfulness"}], "dataset_version": null, "group_by": [{"field": "span_id"}], "indexes": ["experiment-evals"], "limit": 1000, "search": {"query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012"}, "time": {"from": 1705312200000, "to": 1705315800000}}}, "type": "experimentation"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Aggregate LLM Observability experimentation returns "OK" response + Given operation "AggregateLLMObsExperimentation" enabled + And new "AggregateLLMObsExperimentation" request + And body with value {"data": {"attributes": {"aggregate": {"compute": [{"metric": "score_value", "name": "avg_faithfulness"}], "dataset_version": null, "group_by": [{"field": "span_id"}], "indexes": ["experiment-evals"], "limit": 1000, "search": {"query": "@experiment_id:3fd6b5e0-8910-4b1c-a7d0-5b84de329012"}, "time": {"from": 1705312200000, "to": 1705315800000}}}, "type": "experimentation"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Append records to an LLM Observability dataset returns "Bad Request" response Given operation "CreateLLMObsDatasetRecords" enabled @@ -542,6 +558,30 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: List events for an LLM Observability experiment returns "Bad Request" response + Given operation "ListLLMObsExperimentEvents" enabled + And new "ListLLMObsExperimentEvents" request + And request contains "experiment_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 events for an LLM Observability experiment returns "Not Found" response + Given operation "ListLLMObsExperimentEvents" enabled + And new "ListLLMObsExperimentEvents" request + And request contains "experiment_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: List events for an LLM Observability experiment returns "OK" response + Given operation "ListLLMObsExperimentEvents" enabled + And new "ListLLMObsExperimentEvents" request + And request contains "experiment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Push events for an LLM Observability experiment returns "Accepted" response Given operation "CreateLLMObsExperimentEvents" enabled @@ -569,6 +609,46 @@ Feature: LLM Observability When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability + Scenario: Search LLM Observability experimentation entities returns "Bad Request" response + Given operation "SearchLLMObsExperimentation" enabled + And new "SearchLLMObsExperimentation" request + And body with value {"data": {"attributes": {"content_preview": {"limit": 500}, "filter": {"include_deleted": false, "is_deleted": false, "query": "my experiment", "scope": ["experiments"], "version": null}, "include": {"user_data": false}, "page": {"limit": 100}}, "type": "experimentation"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Search LLM Observability experimentation entities returns "OK — all results returned in a single page." response + Given operation "SearchLLMObsExperimentation" enabled + And new "SearchLLMObsExperimentation" request + And body with value {"data": {"attributes": {"content_preview": {"limit": 500}, "filter": {"include_deleted": false, "is_deleted": false, "query": "my experiment", "scope": ["experiments"], "version": null}, "include": {"user_data": false}, "page": {"limit": 100}}, "type": "experimentation"}} + When the request is sent + Then the response status is 200 OK — all results returned in a single page. + + @generated @skip @team:DataDog/ml-observability + Scenario: Search LLM Observability experimentation entities returns "Partial Content — more results are available. Use `meta.after` as the next `page.cursor`." response + Given operation "SearchLLMObsExperimentation" enabled + And new "SearchLLMObsExperimentation" request + And body with value {"data": {"attributes": {"content_preview": {"limit": 500}, "filter": {"include_deleted": false, "is_deleted": false, "query": "my experiment", "scope": ["experiments"], "version": null}, "include": {"user_data": false}, "page": {"limit": 100}}, "type": "experimentation"}} + When the request is sent + Then the response status is 206 Partial Content — more results are available. Use `meta.after` as the next `page.cursor`. + + @generated @skip @team:DataDog/ml-observability + Scenario: Simple search experimentation entities returns "Bad Request" response + Given operation "SimpleSearchLLMObsExperimentation" enabled + And new "SimpleSearchLLMObsExperimentation" request + And body with value {"data": {"attributes": {"content_preview": {"limit": 500}, "filter": {"include_deleted": false, "is_deleted": false, "query": "my experiment", "scope": ["experiments"], "version": null}, "include": {"user_data": false}, "page": {"limit": 50, "number": 1}, "sort": [{"direction": "desc", "field": "created_at"}]}, "type": "experimentation"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Simple search experimentation entities returns "OK" response + Given operation "SimpleSearchLLMObsExperimentation" enabled + And new "SimpleSearchLLMObsExperimentation" request + And body with value {"data": {"attributes": {"content_preview": {"limit": 500}, "filter": {"include_deleted": false, "is_deleted": false, "query": "my experiment", "scope": ["experiments"], "version": null}, "include": {"user_data": false}, "page": {"limit": 50, "number": 1}, "sort": [{"direction": "desc", "field": "created_at"}]}, "type": "experimentation"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Update LLM Observability dataset records returns "Bad Request" response Given operation "UpdateLLMObsDatasetRecords" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index 5340dfec4c39..1b8f5ec0b974 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -790,6 +790,49 @@ "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": { @@ -809,6 +852,12 @@ "type": "unsafe" } }, + "ListUserCaseProjectFavorites": { + "tag": "Case Management", + "undo": { + "type": "safe" + } + }, "DeleteProject": { "tag": "Case Management", "undo": { @@ -827,6 +876,25 @@ "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": { @@ -862,6 +930,59 @@ "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": { @@ -886,6 +1007,12 @@ "type": "idempotent" } }, + "UpdateCaseType": { + "tag": "Case Management Type", + "undo": { + "type": "idempotent" + } + }, "GetAllCustomAttributeConfigsByCaseType": { "tag": "Case Management Attribute", "undo": { @@ -904,6 +1031,49 @@ "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": { @@ -940,6 +1110,12 @@ "type": "idempotent" } }, + "UpdateCaseComment": { + "tag": "Case Management", + "undo": { + "type": "idempotent" + } + }, "DeleteCaseCustomAttribute": { "tag": "Case Management", "undo": { @@ -958,6 +1134,24 @@ "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": { @@ -1014,12 +1208,24 @@ "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": { @@ -1038,6 +1244,35 @@ "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": { @@ -3497,6 +3732,24 @@ "type": "idempotent" } }, + "AggregateLLMObsExperimentation": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "SearchLLMObsExperimentation": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "SimpleSearchLLMObsExperimentation": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "ListLLMObsExperiments": { "tag": "LLM Observability", "undo": { @@ -3506,15 +3759,19 @@ "CreateLLMObsExperiment": { "tag": "LLM Observability", "undo": { - "operationId": "TODO", - "parameters": [], + "operationId": "DeleteLLMObsExperiments", + "parameters": [ + { + "name": "body", + "template": "{\"data\": {\"attributes\": {\"experiment_ids\": [\"{{ data.id }}\"]}, \"type\": \"experiments\"}}" + } + ], "type": "unsafe" } }, "DeleteLLMObsExperiments": { "tag": "LLM Observability", "undo": { - "operationId": "TODO", "parameters": [], "type": "unsafe" } @@ -3528,7 +3785,6 @@ "CreateLLMObsExperimentEvents": { "tag": "LLM Observability", "undo": { - "operationId": "TODO", "parameters": [], "type": "unsafe" } @@ -3626,6 +3882,12 @@ "type": "unsafe" } }, + "ListLLMObsExperimentEvents": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "SubmitLog": { "tag": "Logs", "undo": { @@ -3864,6 +4126,37 @@ "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": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index b7c1bce17894..63b14378c2a0 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -207,6 +207,7 @@ def initialize "v2.list_fleet_tracers": false, "v2.trigger_fleet_schedule": false, "v2.update_fleet_schedule": false, + "v2.aggregate_llm_obs_experimentation": false, "v2.create_llm_obs_annotation_queue": false, "v2.create_llm_obs_annotation_queue_interactions": false, "v2.create_llm_obs_dataset": false, @@ -227,8 +228,11 @@ def initialize "v2.list_llm_obs_annotation_queues": false, "v2.list_llm_obs_dataset_records": false, "v2.list_llm_obs_datasets": false, + "v2.list_llm_obs_experiment_events": false, "v2.list_llm_obs_experiments": false, "v2.list_llm_obs_projects": false, + "v2.search_llm_obs_experimentation": false, + "v2.simple_search_llm_obs_experimentation": false, "v2.update_llm_obs_annotation_queue": false, "v2.update_llm_obs_annotation_queue_label_schema": false, "v2.update_llm_obs_custom_eval_config": false, @@ -246,13 +250,49 @@ 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, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index ee18ca2e1bee..30436fd5cac9 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1388,6 +1388,22 @@ 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", @@ -1609,13 +1625,34 @@ 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", @@ -1623,7 +1660,19 @@ 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", @@ -1661,23 +1710,51 @@ 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", @@ -2263,7 +2340,12 @@ 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", @@ -3703,21 +3785,62 @@ def overrides "v2.llm_obs_display_block_interaction_response_item" => "LLMObsDisplayBlockInteractionResponseItem", "v2.llm_obs_display_block_interaction_type" => "LLMObsDisplayBlockInteractionType", "v2.llm_obs_event_type" => "LLMObsEventType", + "v2.llm_obs_experimentation_analytics_aggregate" => "LLMObsExperimentationAnalyticsAggregate", + "v2.llm_obs_experimentation_analytics_compute" => "LLMObsExperimentationAnalyticsCompute", + "v2.llm_obs_experimentation_analytics_data_attributes_request" => "LLMObsExperimentationAnalyticsDataAttributesRequest", + "v2.llm_obs_experimentation_analytics_data_attributes_response" => "LLMObsExperimentationAnalyticsDataAttributesResponse", + "v2.llm_obs_experimentation_analytics_data_request" => "LLMObsExperimentationAnalyticsDataRequest", + "v2.llm_obs_experimentation_analytics_data_response" => "LLMObsExperimentationAnalyticsDataResponse", + "v2.llm_obs_experimentation_analytics_group_by" => "LLMObsExperimentationAnalyticsGroupBy", + "v2.llm_obs_experimentation_analytics_request" => "LLMObsExperimentationAnalyticsRequest", + "v2.llm_obs_experimentation_analytics_response" => "LLMObsExperimentationAnalyticsResponse", + "v2.llm_obs_experimentation_analytics_result" => "LLMObsExperimentationAnalyticsResult", + "v2.llm_obs_experimentation_analytics_search" => "LLMObsExperimentationAnalyticsSearch", + "v2.llm_obs_experimentation_analytics_time_range" => "LLMObsExperimentationAnalyticsTimeRange", + "v2.llm_obs_experimentation_analytics_value" => "LLMObsExperimentationAnalyticsValue", + "v2.llm_obs_experimentation_content_preview" => "LLMObsExperimentationContentPreview", + "v2.llm_obs_experimentation_cursor_page" => "LLMObsExperimentationCursorPage", + "v2.llm_obs_experimentation_filter" => "LLMObsExperimentationFilter", + "v2.llm_obs_experimentation_include" => "LLMObsExperimentationInclude", + "v2.llm_obs_experimentation_number_page" => "LLMObsExperimentationNumberPage", + "v2.llm_obs_experimentation_search_data_attributes_request" => "LLMObsExperimentationSearchDataAttributesRequest", + "v2.llm_obs_experimentation_search_data_request" => "LLMObsExperimentationSearchDataRequest", + "v2.llm_obs_experimentation_search_data_response" => "LLMObsExperimentationSearchDataResponse", + "v2.llm_obs_experimentation_search_request" => "LLMObsExperimentationSearchRequest", + "v2.llm_obs_experimentation_search_response" => "LLMObsExperimentationSearchResponse", + "v2.llm_obs_experimentation_search_results" => "LLMObsExperimentationSearchResults", + "v2.llm_obs_experimentation_simple_search_data_attributes_request" => "LLMObsExperimentationSimpleSearchDataAttributesRequest", + "v2.llm_obs_experimentation_simple_search_data_request" => "LLMObsExperimentationSimpleSearchDataRequest", + "v2.llm_obs_experimentation_simple_search_data_response" => "LLMObsExperimentationSimpleSearchDataResponse", + "v2.llm_obs_experimentation_simple_search_meta" => "LLMObsExperimentationSimpleSearchMeta", + "v2.llm_obs_experimentation_simple_search_meta_page" => "LLMObsExperimentationSimpleSearchMetaPage", + "v2.llm_obs_experimentation_simple_search_request" => "LLMObsExperimentationSimpleSearchRequest", + "v2.llm_obs_experimentation_simple_search_response" => "LLMObsExperimentationSimpleSearchResponse", + "v2.llm_obs_experimentation_sort_field" => "LLMObsExperimentationSortField", + "v2.llm_obs_experimentation_sort_field_direction" => "LLMObsExperimentationSortFieldDirection", + "v2.llm_obs_experimentation_type" => "LLMObsExperimentationType", "v2.llm_obs_experiment_data_attributes_request" => "LLMObsExperimentDataAttributesRequest", "v2.llm_obs_experiment_data_attributes_response" => "LLMObsExperimentDataAttributesResponse", "v2.llm_obs_experiment_data_request" => "LLMObsExperimentDataRequest", "v2.llm_obs_experiment_data_response" => "LLMObsExperimentDataResponse", + "v2.llm_obs_experiment_eval_metric_event" => "LLMObsExperimentEvalMetricEvent", "v2.llm_obs_experiment_events_data_attributes_request" => "LLMObsExperimentEventsDataAttributesRequest", "v2.llm_obs_experiment_events_data_request" => "LLMObsExperimentEventsDataRequest", "v2.llm_obs_experiment_events_request" => "LLMObsExperimentEventsRequest", + "v2.llm_obs_experiment_events_type" => "LLMObsExperimentEventsType", + "v2.llm_obs_experiment_events_v2_data_attributes_response" => "LLMObsExperimentEventsV2DataAttributesResponse", + "v2.llm_obs_experiment_events_v2_data_response" => "LLMObsExperimentEventsV2DataResponse", + "v2.llm_obs_experiment_events_v2_response" => "LLMObsExperimentEventsV2Response", "v2.llm_obs_experiment_metric" => "LLMObsExperimentMetric", "v2.llm_obs_experiment_metric_error" => "LLMObsExperimentMetricError", "v2.llm_obs_experiment_request" => "LLMObsExperimentRequest", "v2.llm_obs_experiment_response" => "LLMObsExperimentResponse", + "v2.llm_obs_experiment_run_data_response" => "LLMObsExperimentRunDataResponse", "v2.llm_obs_experiment_span" => "LLMObsExperimentSpan", "v2.llm_obs_experiment_span_error" => "LLMObsExperimentSpanError", "v2.llm_obs_experiment_span_meta" => "LLMObsExperimentSpanMeta", "v2.llm_obs_experiment_span_status" => "LLMObsExperimentSpanStatus", + "v2.llm_obs_experiment_span_with_evals" => "LLMObsExperimentSpanWithEvals", "v2.llm_obs_experiments_response" => "LLMObsExperimentsResponse", "v2.llm_obs_experiment_type" => "LLMObsExperimentType", "v2.llm_obs_experiment_update_data_attributes_request" => "LLMObsExperimentUpdateDataAttributesRequest", @@ -3838,6 +3961,17 @@ 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", @@ -4778,6 +4912,9 @@ 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", 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 cf7cda64a2e0..a6f79e505c2c 100644 --- a/lib/datadog_api_client/v2/api/case_management_api.rb +++ b/lib/datadog_api_client/v2/api/case_management_api.rb @@ -23,37 +23,43 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end - # Archive case. + # Add insights to a 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 #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) data end - # Archive case. + # 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. # # @param case_id [String] Case's UUID or key - # @param body [CaseEmptyRequest] Archive case payload + # @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 archive_case_with_http_info(case_id, body, opts = {}) + 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 if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.archive_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.add_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.archive_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.add_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.archive_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.add_case_insights" 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}/insights'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -78,7 +84,7 @@ def archive_case_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :archive_case, + :operation => :add_case_insights, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -88,44 +94,45 @@ def archive_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::Put, 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#add_case_insights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Assign case. + # Aggregate cases. # - # @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 #aggregate_cases_with_http_info + def aggregate_cases(body, opts = {}) + data, _status_code, _headers = aggregate_cases_with_http_info(body, opts) data end - # Assign case. + # Aggregate cases. # - # Assign case to a user + # 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. # - # @param case_id [String] Case's UUID or key - # @param body [CaseAssignRequest] Assign case payload + # @param body [CaseAggregateRequest] Case aggregate request 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 = {}) + # @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 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.aggregate_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.assign_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.aggregate_cases" 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/aggregate' # query parameters query_params = opts[:query_params] || {} @@ -144,13 +151,13 @@ def assign_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] || 'CaseAggregateResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :assign_case, + :operation => :aggregate_cases, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -162,42 +169,42 @@ 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#aggregate_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Comment case. + # Archive 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) + # @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 - # Comment case. + # Archive case. # - # Comment case + # Archive case # # @param case_id [String] Case's UUID or key - # @param body [CaseCommentRequest] Case comment payload + # @param body [CaseEmptyRequest] Archive case payload # @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<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def archive_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.comment_case ...' + @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.comment_case" + 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.comment_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.archive_case" 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}/archive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -216,13 +223,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] || 'CaseResponse' # 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 => :archive_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -234,37 +241,42 @@ 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#archive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a case. + # Assign case. # - # @see #create_case_with_http_info - def create_case(body, opts = {}) - data, _status_code, _headers = create_case_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 - # Create a case. + # Assign case. # - # Create a Case + # Assign case to a user # - # @param body [CaseCreateRequest] Case payload + # @param case_id [String] Case's UUID or key + # @param body [CaseAssignRequest] Assign case 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 = {}) + def assign_case_with_http_info(case_id, 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.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.create_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.assign_case" end # resource path - local_var_path = '/api/v2/cases' + 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] || {} @@ -289,7 +301,7 @@ def create_case_with_http_info(body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case, + :operation => :assign_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -301,48 +313,43 @@ 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#assign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create Jira issue for case. + # Bulk update cases. # - # @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 #bulk_update_cases_with_http_info + def bulk_update_cases(body, opts = {}) + bulk_update_cases_with_http_info(body, opts) nil end - # Create Jira issue for case. + # Bulk update cases. # - # Create a new Jira issue and link it to a 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. # - # @param case_id [String] Case's UUID or key - # @param body [JiraIssueCreateRequest] Jira issue creation request + # @param body [CaseBulkUpdateRequest] Case bulk update request payload. # @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] + def bulk_update_cases_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.bulk_update_cases".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_jira_issue") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.bulk_update_cases") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_jira_issue")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.bulk_update_cases")) end if @api_client.config.debugging - @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" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.bulk_update_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.create_case_jira_issue" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.bulk_update_cases" 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/bulk' # query parameters query_params = opts[:query_params] || {} @@ -367,7 +374,7 @@ def create_case_jira_issue_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_jira_issue, + :operation => :bulk_update_cases, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -379,48 +386,42 @@ def create_case_jira_issue_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#create_case_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#bulk_update_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create investigation notebook for case. + # Comment case. # - # @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 + # @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 - # Create investigation notebook for case. + # Comment case. # - # Create a new investigation notebook and link it to a case + # Comment case # # @param case_id [String] Case's UUID or key - # @param body [NotebookCreateRequest] Notebook creation request + # @param body [CaseCommentRequest] Case comment payload # @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 + # @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.create_case_notebook ...' + @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.create_case_notebook" + 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.create_case_notebook" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.comment_case" 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/{case_id}/comment'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -428,7 +429,7 @@ def create_case_notebook_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(['*/*']) + 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']) @@ -439,13 +440,13 @@ def create_case_notebook_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] + 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 => :create_case_notebook, + :operation => :comment_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -457,73 +458,67 @@ def create_case_notebook_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#create_case_notebook\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 - # Create ServiceNow ticket for case. + # Count cases. # - # @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 + # @see #count_cases_with_http_info + def count_cases(opts = {}) + data, _status_code, _headers = count_cases_with_http_info(opts) + data end - # Create ServiceNow ticket for case. + # Count cases. # - # Create a new ServiceNow incident ticket and link it to a case + # Returns case counts, optionally grouped by one or more fields (for example, status, priority). Supports a query filter to narrow the scope. # - # @param case_id [String] Case's UUID or key - # @param body [ServiceNowTicketCreateRequest] ServiceNow ticket creation request # @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] + # @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] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_service_now_ticket") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.count_cases") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_service_now_ticket")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.count_cases")) end if @api_client.config.debugging - @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" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.count_cases ...' 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/count' # 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(['*/*']) - # 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] || 'CaseCountResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_service_now_ticket, + :operation => :count_cases, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -533,39 +528,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::Get, 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#count_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a project. + # Create a case. # - # @see #create_project_with_http_info - def create_project(body, opts = {}) - data, _status_code, _headers = create_project_with_http_info(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 - # Create a project. + # Create a case. # - # Create a project. + # Create a Case # - # @param body [ProjectCreateRequest] Project payload. + # @param body [CaseCreateRequest] Case 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 = {}) + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def create_case_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project ...' + @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.create_project" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case" end # resource path - local_var_path = '/api/v2/cases/projects' + local_var_path = '/api/v2/cases' # query parameters query_params = opts[:query_params] || {} @@ -584,13 +579,13 @@ def create_project_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] || 'ProjectResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_project, + :operation => :create_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -602,42 +597,48 @@ def create_project_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_project\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 - # Create a notification rule. + # Create an automation 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) + # @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) data end - # Create a notification rule. + # Create an automation rule. # - # Create a notification rule for a project. + # Creates an automation rule for a project. The rule defines a trigger event (for example, case created, status transitioned) and an action to execute. # - # @param project_id [String] Project UUID - # @param body [CaseNotificationRuleCreateRequest] Notification rule payload + # @param project_id [String] The UUID of the project that owns the automation rules. + # @param body [AutomationRuleCreateRequest] Automation 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 = {}) + # @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 if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project_notification_rule ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_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.create_project_notification_rule" + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.create_case_automation_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" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_automation_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', '/')) + 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] || {} @@ -656,13 +657,13 @@ def create_project_notification_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] || 'CaseNotificationRuleResponse' + return_type = opts[:debug_return_type] || 'AutomationRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_project_notification_rule, + :operation => :create_case_automation_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -674,42 +675,48 @@ def create_project_notification_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_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete case comment. + # Create Jira issue for case. # - # @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) + # @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 - # Delete case comment. + # Create Jira issue for case. # - # Delete case comment + # Create a new Jira issue and link it to a case # # @param case_id [String] Case's UUID or key - # @param cell_id [String] Timeline cell's UUID + # @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 delete_case_comment_with_http_info(case_id, cell_id, opts = {}) + 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 if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_comment ...' + @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.delete_case_comment" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_jira_issue" 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" + # 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" 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/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -718,21 +725,23 @@ def delete_case_comment_with_http_info(case_id, cell_id, 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] + 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] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_case_comment, + :operation => :create_case_jira_issue, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -742,44 +751,45 @@ def delete_case_comment_with_http_info(case_id, cell_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::Post, 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}" + @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 - # Delete custom attribute from case. + # Create a case link. # - # @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) + # @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) data end - # Delete custom attribute from case. + # 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. # - # @param case_id [String] Case's UUID or key - # @param custom_attribute_key [String] Case Custom attribute's key + # @param body [CaseLinkCreateRequest] Case link create request. # @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 = {}) + # @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 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" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_link ...' 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" + # 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" 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/link' # query parameters query_params = opts[:query_params] || {} @@ -788,21 +798,23 @@ def delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, o 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] + 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] || 'CaseLinkResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_case_custom_attribute, + :operation => :create_case_link, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -812,39 +824,50 @@ def delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, o :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#delete_case_custom_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Remove a project. + # Create investigation notebook for case. # - # @see #delete_project_with_http_info - def delete_project(project_id, opts = {}) - delete_project_with_http_info(project_id, opts) + # @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 - # Remove a project. + # Create investigation notebook for case. # - # Remove a project using the project's `id`. + # Create a new investigation notebook and link it to a case # - # @param project_id [String] Project UUID. + # @param case_id [String] Case's UUID or key + # @param body [NotebookCreateRequest] Notebook creation request # @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 = {}) + 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.delete_project ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_notebook ...' 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" + # 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" + 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" end # resource path - local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_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] || {} @@ -853,12 +876,14 @@ def delete_project_with_http_info(project_id, 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] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] @@ -867,7 +892,7 @@ def delete_project_with_http_info(project_id, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_project, + :operation => :create_case_notebook, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -877,44 +902,50 @@ def delete_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::Post, 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}" + @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 - # Delete a notification rule. + # Create ServiceNow ticket for case. # - # @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) + # @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 - # Delete a notification rule. + # Create ServiceNow ticket for case. # - # Delete a notification rule using the notification rule's `id`. + # Create a new ServiceNow incident ticket and link it to a case # - # @param project_id [String] Project UUID - # @param notification_rule_id [String] Notification Rule UUID + # @param case_id [String] Case's UUID or key + # @param body [ServiceNowTicketCreateRequest] ServiceNow ticket creation request # @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 = {}) + 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 if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project_notification_rule ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_service_now_ticket ...' 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" + # 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 '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" + # 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/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', '/')) + 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] || {} @@ -923,12 +954,14 @@ def delete_project_notification_rule_with_http_info(project_id, notification_rul 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] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:debug_return_type] @@ -937,7 +970,7 @@ def delete_project_notification_rule_with_http_info(project_id, notification_rul auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_project_notification_rule, + :operation => :create_case_service_now_ticket, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -947,39 +980,45 @@ def delete_project_notification_rule_with_http_info(project_id, notification_rul :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#delete_project_notification_rule\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 - # Get the details of a case. + # Create a case view. # - # @see #get_case_with_http_info - def get_case(case_id, opts = {}) - data, _status_code, _headers = get_case_with_http_info(case_id, opts) + # @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) data end - # Get the details of a case. + # Create a case view. # - # Get the details of case by `case_id` + # Creates a new saved case view with a name, filter query, and associated project. Optionally, a notification rule can be linked to the view. # - # @param case_id [String] Case's UUID or key + # @param body [CaseViewCreateRequest] Case view payload. # @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 = {}) + # @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 if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_view ...' 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" + # 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" end # resource path - local_var_path = '/api/v2/cases/{case_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/views' # query parameters query_params = opts[:query_params] || {} @@ -988,21 +1027,23 @@ def get_case_with_http_info(case_id, 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] + 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] || 'CaseViewResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_case, + :operation => :create_case_view, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1012,39 +1053,45 @@ def get_case_with_http_info(case_id, 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#get_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get the details of a project. + # Create a maintenance window. # - # @see #get_project_with_http_info - def get_project(project_id, opts = {}) - data, _status_code, _headers = get_project_with_http_info(project_id, opts) + # @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) data end - # Get the details of a project. + # Create a maintenance window. # - # Get the details of a project by `project_id`. + # Creates a maintenance window for event management cases with a name, case filter query, and time range (start and end). # - # @param project_id [String] Project UUID. + # @param body [MaintenanceWindowCreateRequest] Maintenance window payload. # @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 = {}) + # @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 if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_maintenance_window ...' 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" + # 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" end # resource path - local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/maintenance_windows' # query parameters query_params = opts[:query_params] || {} @@ -1053,21 +1100,23 @@ def get_project_with_http_info(project_id, 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] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'ProjectResponse' + return_type = opts[:debug_return_type] || 'MaintenanceWindowResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_project, + :operation => :create_maintenance_window, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1077,39 +1126,39 @@ def get_project_with_http_info(project_id, 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#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @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 - # Get notification rules. + # Create a project. # - # @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) + # @see #create_project_with_http_info + def create_project(body, opts = {}) + data, _status_code, _headers = create_project_with_http_info(body, opts) data end - # Get notification rules. + # Create a project. # - # Get all notification rules for a project. + # Create a project. # - # @param project_id [String] Project UUID + # @param body [ProjectCreateRequest] Project payload. # @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 = {}) + # @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.get_project_notification_rules ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_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_notification_rules" + # 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/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects' # query parameters query_params = opts[:query_params] || {} @@ -1118,21 +1167,23 @@ def get_project_notification_rules_with_http_info(project_id, 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] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseNotificationRulesResponse' + 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_notification_rules, + :operation => :create_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1142,34 +1193,44 @@ def get_project_notification_rules_with_http_info(project_id, 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#get_project_notification_rules\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 - # Get all projects. + # Create a notification rule. # - # @see #get_projects_with_http_info - def get_projects(opts = {}) - data, _status_code, _headers = get_projects_with_http_info(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 - # Get all projects. + # Create a notification rule. # - # Get all projects. + # 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<(ProjectsResponse, Integer, Hash)>] ProjectsResponse data, response status code and response headers - def get_projects_with_http_info(opts = {}) + # @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.get_projects ...' + @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' + 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] || {} @@ -1178,21 +1239,23 @@ def get_projects_with_http_info(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] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'ProjectsResponse' + return_type = opts[:debug_return_type] || 'CaseNotificationRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_projects, + :operation => :create_project_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1202,50 +1265,50 @@ def get_projects_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#get_projects\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 - # Link incident to case. + # Delete an automation rule. # - # @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 + # @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 - # Link incident to case. + # Delete an automation rule. # - # Link an incident to a case + # Permanently deletes an automation rule from a project. # - # @param case_id [String] Case's UUID or key - # @param body [RelationshipToIncidentRequest] Incident link request + # @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<(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] + # @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.link_incident") + @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.link_incident")) + 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.link_incident ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_automation_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.link_incident" + # 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 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.link_incident" + # 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/{case_id}/relationships/incidents'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + 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] || {} @@ -1253,24 +1316,22 @@ def link_incident_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 => :link_incident, + :operation => :delete_case_automation_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1280,50 +1341,44 @@ def link_incident_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#link_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @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 - # Link existing Jira issue to case. + # Delete case comment. # - # @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) + # @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 - # Link existing Jira issue to case. + # Delete case comment. # - # Link an existing Jira issue to a case + # Delete case comment # # @param case_id [String] Case's UUID or key - # @param body [JiraIssueLinkRequest] Jira issue link request + # @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 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 + 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.link_jira_issue_to_case ...' + @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.link_jira_issue_to_case" + 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.link_jira_issue_to_case" + # 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] || {} @@ -1332,23 +1387,21 @@ def link_jira_issue_to_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(['*/*']) - # 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 => :link_jira_issue_to_case, + :operation => :delete_case_comment, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1358,50 +1411,44 @@ def link_jira_issue_to_case_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, 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#link_jira_issue_to_case\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 - # Update case project. + # Delete custom attribute from case. # - # @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) + # @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 - # Update case project. + # Delete custom attribute from case. # - # Update the project associated with a case + # Delete custom attribute from case # # @param case_id [String] Case's UUID or key - # @param body [ProjectRelationship] Project update request + # @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 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 + 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.move_case_to_project ...' + @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.move_case_to_project" + fail ArgumentError, "Missing the required parameter 'case_id' when calling 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.move_case_to_project" + # 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}/relationships/project'.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] || {} @@ -1410,14 +1457,12 @@ def move_case_to_project_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' @@ -1426,7 +1471,7 @@ def move_case_to_project_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :move_case_to_project, + :operation => :delete_case_custom_attribute, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1436,56 +1481,53 @@ def move_case_to_project_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, 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#move_case_to_project\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 - # Search cases. + # Delete a case link. # - # @see #search_cases_with_http_info - def search_cases(opts = {}) - data, _status_code, _headers = search_cases_with_http_info(opts) - data + # @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 - # Search cases. + # Delete a case link. # - # Search cases. + # 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 - # @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 = {}) + # @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.search_cases ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_link ...' 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}" + # 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' + 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] || {} - 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']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -1494,13 +1536,13 @@ def search_cases_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CasesResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :search_cases, + :operation => :delete_case_link, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1510,66 +1552,2462 @@ def search_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::Delete, 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}" + @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 - # Search cases. + # Delete a case view. # - # Provide a paginated version of {#search_cases}, returning all items. + # @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. # - # To use it you need to use a block: search_cases_with_pagination { |item| p item } + # Permanently deletes a saved case view. # - # @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 + # @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" + end + # resource path + 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] || {} + + # 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 => :unassign_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#unassign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Unfavorite a project. + # + # @see #unfavorite_case_project_with_http_info + def unfavorite_case_project(project_id, opts = {}) + unfavorite_case_project_with_http_info(project_id, opts) + nil + end + + # Unfavorite a project. + # + # Removes a case project from the current user's favorites list. + # + # @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 + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unfavorite_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.unfavorite_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 => :unfavorite_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::Delete, 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}" + end + return data, status_code, headers + end + + # Remove Jira issue link from case. + # + # @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 + + # Remove Jira issue link from case. + # + # Remove the link between a Jira issue and a case + # + # @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 + + 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" + 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(['*/*']) + + # 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 => :unlink_jira_issue, + :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#unlink_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Unwatch a 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 + end + + # Unwatch a case. + # + # Removes a user from the watchers list of a case. The user no longer receives notifications about 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 unwatch_case_with_http_info(case_id, user_uuid, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.unwatch_case".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unwatch_case") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unwatch_case")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unwatch_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.unwatch_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.unwatch_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 => :unwatch_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::Delete, 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}" + end + return data, status_code, headers + end + + # Update case attributes. + # + # @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 attributes. + # + # Update case attributes + # + # @param case_id [String] Case's UUID or key + # @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_attributes_with_http_info(case_id, body, opts = {}) + + if @api_client.config.debugging + @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_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_attributes" + end + # resource path + 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] || {} + + # 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 => :update_attributes, + :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#update_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update an automation rule. + # + # @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) + data + end + + # Update an automation rule. + # + # Updates the trigger, action, name, or state of an existing automation rule. + # + # @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 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] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_automation_rule") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_automation_rule")) + 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" + 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" + 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" + 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']) + # 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] || 'AutomationRuleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_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::Put, 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}" + end + return data, status_code, headers + end + + # Update case comment. + # + # @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 + end + + # Update case comment. + # + # Updates the text content of an existing comment on a case timeline. The comment is identified by its cell ID. + # + # @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 + + 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" + 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" + 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(['*/*']) + # 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 => :update_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::Put, 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}" + end + return data, status_code, headers end - # Unarchive case. + # Update case custom attribute. # - # @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) + # @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 - # Unarchive case. + # Update case custom attribute. # - # Unarchive case + # Update case custom attribute # # @param case_id [String] Case's UUID or key - # @param body [CaseEmptyRequest] Unarchive case 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 unarchive_case_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.unarchive_case ...' + @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.unarchive_case" + 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.unarchive_case" + 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}/unarchive'.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] || {} @@ -1594,7 +4032,7 @@ def unarchive_case_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :unarchive_case, + :operation => :update_case_custom_attribute, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1606,42 +4044,42 @@ def unarchive_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#unarchive_case\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 - # Unassign case. + # Update case description. # - # @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) + # @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 - # Unassign case. + # Update case description. # - # Unassign case + # Update case description # # @param case_id [String] Case's UUID or key - # @param body [CaseEmptyRequest] Unassign case payload + # @param body [CaseUpdateDescriptionRequest] Case description update 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 = {}) + def update_case_description_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unassign_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_description ...' 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" + 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.unassign_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_description" 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/{case_id}/description'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1666,7 +4104,7 @@ def unassign_case_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :unassign_case, + :operation => :update_case_description, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1678,43 +4116,48 @@ def unassign_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#unassign_case\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 - # Remove Jira issue link from case. + # Update case due date. # - # @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 #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 end - # Remove Jira issue link from case. + # Update case due date. # - # Remove the link between a Jira issue and a 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. # # @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<(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] + # @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] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unlink_jira_issue") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_due_date") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unlink_jira_issue")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_due_date")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unlink_jira_issue ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_due_date ...' 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" + 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" 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}/due_date'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1722,22 +4165,24 @@ 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']) + # 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 => :unlink_jira_issue, + :operation => :update_case_due_date, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1747,44 +4192,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::Post, 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#update_case_due_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case attributes. + # Update case resolved reason. # - # @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) + # @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) data end - # Update case attributes. + # 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. # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateAttributesRequest] Case attributes update payload + # @param body [CaseUpdateResolvedReasonRequest] Case resolved reason update payload. # @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 = {}) + 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 if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_attributes ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_resolved_reason ...' 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.update_case_resolved_reason" 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.update_case_resolved_reason" 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}/resolved_reason'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1809,7 +4260,7 @@ def update_attributes_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_attributes, + :operation => :update_case_resolved_reason, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1821,47 +4272,42 @@ def update_attributes_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_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_resolved_reason\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case custom attribute. + # Update case title. # - # @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 #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 case custom attribute. + # Update case title. # - # Update case custom attribute + # Update case title # # @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 [CaseUpdateTitleRequest] Case title update 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 update_case_title_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.update_case_title ...' 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.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_case_custom_attribute" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_title" 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}/title'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1886,7 +4332,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 => :update_case_title, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1898,42 +4344,48 @@ 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#update_case_title\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case description. + # Update a case view. # - # @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 #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) data end - # Update case description. + # Update a case view. # - # Update case description + # Updates the name, query, or notification rule of an existing case view. # - # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateDescriptionRequest] Case description update payload + # @param view_id [String] The UUID of the case view. + # @param body [CaseViewUpdateRequest] Case view 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 = {}) + # @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 if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_description ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_view ...' 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" + # 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" 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.update_case_view" 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/views/{view_id}'.sub('{view_id}', CGI.escape(view_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1952,13 +4404,13 @@ def update_case_description_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] || 'CaseViewResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_description, + :operation => :update_case_view, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1968,44 +4420,50 @@ def update_case_description_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::Put, 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#update_case_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case title. + # Update a maintenance window. # - # @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_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) data end - # Update case title. + # Update a maintenance window. # - # Update case title + # Updates the name, query, start time, or end time of an existing maintenance window. # - # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateTitleRequest] Case title update payload + # @param maintenance_window_id [String] The UUID of the maintenance window. + # @param body [MaintenanceWindowUpdateRequest] Maintenance window 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 = {}) + # @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 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_maintenance_window ...' 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" + # 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" 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_maintenance_window" 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/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] || {} @@ -2024,13 +4482,13 @@ def update_case_title_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] || 'MaintenanceWindowResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_title, + :operation => :update_maintenance_window, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2040,9 +4498,9 @@ def update_case_title_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::Put, 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_maintenance_window\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -2339,5 +4797,81 @@ 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 52a7d87662a5..db843133689b 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] Case type's UUID + # @param case_type_id [String] The UUID of the case type. # @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] Case type's UUID + # @param case_type_id [String] The UUID of the case type. # @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] Case type's UUID + # @param case_type_id [String] The UUID of the case type. # @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,5 +289,88 @@ 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 51bec892cf2f..1aa1ac78a8fb 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] Case type's UUID + # @param case_type_id [String] The UUID of the case type. # @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,5 +214,83 @@ 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/llm_observability_api.rb b/lib/datadog_api_client/v2/api/llm_observability_api.rb index 5686a030aca6..e3a6d14ebece 100644 --- a/lib/datadog_api_client/v2/api/llm_observability_api.rb +++ b/lib/datadog_api_client/v2/api/llm_observability_api.rb @@ -23,6 +23,82 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end + # Aggregate LLM Observability experimentation. + # + # @see #aggregate_llm_obs_experimentation_with_http_info + def aggregate_llm_obs_experimentation(body, opts = {}) + data, _status_code, _headers = aggregate_llm_obs_experimentation_with_http_info(body, opts) + data + end + + # Aggregate LLM Observability experimentation. + # + # Execute an analytics aggregation over LLM Observability experimentation data. + # Use this endpoint to compute metrics (for example average eval scores) grouped by fields such as `span_id` or `experiment_id`. + # + # At least one `compute` definition and one `index` must be provided. + # + # @param body [LLMObsExperimentationAnalyticsRequest] Analytics payload. + # @param opts [Hash] the optional parameters + # @return [Array<(LLMObsExperimentationAnalyticsResponse, Integer, Hash)>] LLMObsExperimentationAnalyticsResponse data, response status code and response headers + def aggregate_llm_obs_experimentation_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.aggregate_llm_obs_experimentation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.aggregate_llm_obs_experimentation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.aggregate_llm_obs_experimentation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.aggregate_llm_obs_experimentation ...' + 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 LLMObservabilityAPI.aggregate_llm_obs_experimentation" + end + # resource path + local_var_path = '/api/v2/llm-obs/v1/experimentation/analytics' + + # 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] || 'LLMObsExperimentationAnalyticsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :aggregate_llm_obs_experimentation, + :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: LLMObservabilityAPI#aggregate_llm_obs_experimentation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create an LLM Observability annotation queue. # # @see #create_llm_obs_annotation_queue_with_http_info @@ -1544,6 +1620,81 @@ def list_llm_obs_datasets_with_http_info(project_id, opts = {}) return data, status_code, headers end + # List events for an LLM Observability experiment. + # + # @see #list_llm_obs_experiment_events_with_http_info + def list_llm_obs_experiment_events(experiment_id, opts = {}) + data, _status_code, _headers = list_llm_obs_experiment_events_with_http_info(experiment_id, opts) + data + end + + # List events for an LLM Observability experiment. + # + # Retrieve spans and experiment-level summary metrics for a given experiment with cursor-based pagination. + # + # @param experiment_id [String] The ID of the LLM Observability experiment. + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_limit Maximum number of spans to return per page. Defaults to 5000. + # @option opts [String] :page_cursor Opaque cursor from a previous response to fetch the next page of results. + # @return [Array<(LLMObsExperimentEventsV2Response, Integer, Hash)>] LLMObsExperimentEventsV2Response data, response status code and response headers + def list_llm_obs_experiment_events_with_http_info(experiment_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_llm_obs_experiment_events".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_llm_obs_experiment_events") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_llm_obs_experiment_events")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.list_llm_obs_experiment_events ...' + end + # verify the required parameter 'experiment_id' is set + if @api_client.config.client_side_validation && experiment_id.nil? + fail ArgumentError, "Missing the required parameter 'experiment_id' when calling LLMObservabilityAPI.list_llm_obs_experiment_events" + end + # resource path + local_var_path = '/api/v2/llm-obs/v3/experiments/{experiment_id}/events'.sub('{experiment_id}', CGI.escape(experiment_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil? + query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].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] || 'LLMObsExperimentEventsV2Response' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_llm_obs_experiment_events, + :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: LLMObservabilityAPI#list_llm_obs_experiment_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # List LLM Observability experiments. # # @see #list_llm_obs_experiments_with_http_info @@ -1694,6 +1845,159 @@ def list_llm_obs_projects_with_http_info(opts = {}) return data, status_code, headers end + # Search LLM Observability experimentation entities. + # + # @see #search_llm_obs_experimentation_with_http_info + def search_llm_obs_experimentation(body, opts = {}) + data, _status_code, _headers = search_llm_obs_experimentation_with_http_info(body, opts) + data + end + + # Search LLM Observability experimentation entities. + # + # Search across LLM Observability experimentation entities — projects, datasets, dataset records, experiments, and experiment runs — using cursor-based pagination. + # + # The `filter.scope` field controls which entity types are returned. At least one valid scope must be provided. + # + # Returns `200 OK` when all results fit in a single page. Returns `206 Partial Content` with a cursor in `meta.after` when additional pages are available. + # + # @param body [LLMObsExperimentationSearchRequest] Experimentation search payload. + # @param opts [Hash] the optional parameters + # @return [Array<(LLMObsExperimentationSearchResponse, Integer, Hash)>] LLMObsExperimentationSearchResponse data, response status code and response headers + def search_llm_obs_experimentation_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.search_llm_obs_experimentation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.search_llm_obs_experimentation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.search_llm_obs_experimentation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.search_llm_obs_experimentation ...' + 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 LLMObservabilityAPI.search_llm_obs_experimentation" + end + # resource path + local_var_path = '/api/v2/llm-obs/v1/experimentation/search' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'LLMObsExperimentationSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :search_llm_obs_experimentation, + :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: LLMObservabilityAPI#search_llm_obs_experimentation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Simple search experimentation entities. + # + # @see #simple_search_llm_obs_experimentation_with_http_info + def simple_search_llm_obs_experimentation(body, opts = {}) + data, _status_code, _headers = simple_search_llm_obs_experimentation_with_http_info(body, opts) + data + end + + # Simple search experimentation entities. + # + # Search across LLM Observability experimentation entities using offset-based (page-number) pagination. + # Use this endpoint when you need total page count or want to navigate to a specific page number. + # + # The `filter.scope` field controls which entity types are returned. At least one valid scope must be provided. + # + # @param body [LLMObsExperimentationSimpleSearchRequest] Simple search payload. + # @param opts [Hash] the optional parameters + # @return [Array<(LLMObsExperimentationSimpleSearchResponse, Integer, Hash)>] LLMObsExperimentationSimpleSearchResponse data, response status code and response headers + def simple_search_llm_obs_experimentation_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.simple_search_llm_obs_experimentation".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.simple_search_llm_obs_experimentation") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.simple_search_llm_obs_experimentation")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: LLMObservabilityAPI.simple_search_llm_obs_experimentation ...' + 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 LLMObservabilityAPI.simple_search_llm_obs_experimentation" + end + # resource path + local_var_path = '/api/v2/llm-obs/v1/experimentation/simple-search' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'LLMObsExperimentationSimpleSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :simple_search_llm_obs_experimentation, + :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: LLMObservabilityAPI#simple_search_llm_obs_experimentation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update an LLM Observability annotation queue. # # @see #update_llm_obs_annotation_queue_with_http_info diff --git a/lib/datadog_api_client/v2/models/automation_rule.rb b/lib/datadog_api_client/v2/models/automation_rule.rb new file mode 100644 index 000000000000..598533bd12f0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule.rb @@ -0,0 +1,175 @@ +=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.rb b/lib/datadog_api_client/v2/models/automation_rule_action.rb new file mode 100644 index 000000000000..848f56aba009 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_action.rb @@ -0,0 +1,144 @@ +=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 what happens when the rule triggers. Combines an action type with action-specific configuration data. + class AutomationRuleAction + include BaseGenericModel + + # Configuration for the action to execute, dependent on the action type. + 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 + + 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' => :'AutomationRuleActionData', + :'type' => :'AutomationRuleActionType' + } + 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::AutomationRuleAction` 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 @data.nil? + return false if @type.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 + + # 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_action_data.rb b/lib/datadog_api_client/v2/models/automation_rule_action_data.rb new file mode 100644 index 000000000000..bba353dd8c2a --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_action_data.rb @@ -0,0 +1,125 @@ +=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_action_type.rb b/lib/datadog_api_client/v2/models/automation_rule_action_type.rb new file mode 100644 index 000000000000..70178e9c576c --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_action_type.rb @@ -0,0 +1,27 @@ +=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 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 + include BaseEnumModel + + EXECUTE_WORKFLOW = "execute_workflow".freeze + ASSIGN_AGENT = "assign_agent".freeze + 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 new file mode 100644 index 000000000000..2eb653874d8f --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_attributes.rb @@ -0,0 +1,217 @@ +=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 new file mode 100644 index 000000000000..19a3e65f2c50 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_create.rb @@ -0,0 +1,144 @@ +=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 new file mode 100644 index 000000000000..08d982d50e8e --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_create_attributes.rb @@ -0,0 +1,175 @@ +=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_create_request.rb b/lib/datadog_api_client/v2/models/automation_rule_create_request.rb new file mode 100644 index 000000000000..2c54834c02b4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_create_request.rb @@ -0,0 +1,123 @@ +=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 an automation rule. + class AutomationRuleCreateRequest + include BaseGenericModel + + # Data object for creating an automation rule. + 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' => :'AutomationRuleCreate' + } + 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::AutomationRuleCreateRequest` 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_relationships.rb b/lib/datadog_api_client/v2/models/automation_rule_relationships.rb new file mode 100644 index 000000000000..848806825b72 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_relationships.rb @@ -0,0 +1,124 @@ +=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 new file mode 100644 index 000000000000..c7e8d1fa3104 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_response.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..bf66472cf8e4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_trigger.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 new file mode 100644 index 000000000000..275963aa19c5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_trigger_data.rb @@ -0,0 +1,145 @@ +=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 new file mode 100644 index 000000000000..f3809f5b34a8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_trigger_type.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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_rule_update.rb b/lib/datadog_api_client/v2/models/automation_rule_update.rb new file mode 100644 index 000000000000..abf5d100e404 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 an automation rule. + class AutomationRuleUpdate + include BaseGenericModel + + # Attributes required to create an automation rule. + attr_accessor :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::AutomationRuleUpdate` 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/automation_rule_update_request.rb b/lib/datadog_api_client/v2/models/automation_rule_update_request.rb new file mode 100644 index 000000000000..040a652959e7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rule_update_request.rb @@ -0,0 +1,123 @@ +=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 an automation rule. + class AutomationRuleUpdateRequest + include BaseGenericModel + + # Data object for updating an automation rule. + 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' => :'AutomationRuleUpdate' + } + 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::AutomationRuleUpdateRequest` 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_rules_response.rb b/lib/datadog_api_client/v2/models/automation_rules_response.rb new file mode 100644 index 000000000000..c6f55df6c626 --- /dev/null +++ b/lib/datadog_api_client/v2/models/automation_rules_response.rb @@ -0,0 +1,125 @@ +=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 46a5e50ea48e..957a0bcbced8 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 - # Case resource type + # JSON:API resource type for cases. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_aggregate_group.rb b/lib/datadog_api_client/v2/models/case_aggregate_group.rb new file mode 100644 index 000000000000..20c141ae2655 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_aggregate_group.rb @@ -0,0 +1,146 @@ +=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 single group within the aggregation results, containing the group key and its associated count values. + class CaseAggregateGroup + include BaseGenericModel + + # The value of the field being grouped on (for example, `OPEN` when grouping by status). + attr_reader :group + + # The count of cases in this group. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'group' => :'group', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'group' => :'String', + :'value' => :'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::CaseAggregateGroup` 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?(:'value') + if (value = attributes[:'value']).is_a?(Array) + self.value = 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 @value.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 value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + 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 && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [group, value, 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/case_aggregate_group_by.rb new file mode 100644 index 000000000000..08ed0b454bf7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_aggregate_group_by.rb @@ -0,0 +1,150 @@ +=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 grouping aggregated results by one or more case fields. + class CaseAggregateGroupBy + include BaseGenericModel + + # Fields to group by. + attr_reader :groups + + # Maximum number of groups to return. + attr_reader :limit + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'groups' => :'groups', + :'limit' => :'limit' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'groups' => :'Array', + :'limit' => :'Integer' + } + 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" + 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 + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + 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 @limit.nil? + return false if @limit > 1000 + 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 + + # Custom attribute writer method with validation + # @param limit [Object] Object to be assigned + # @!visibility private + def limit=(limit) + if limit.nil? + fail ArgumentError, 'invalid value for "limit", limit cannot be nil.' + end + if limit > 1000 + fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 1000.' + end + @limit = limit + 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 && + limit == o.limit && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [groups, limit, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_request.rb b/lib/datadog_api_client/v2/models/case_aggregate_request.rb new file mode 100644 index 000000000000..50e5d431ff6a --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_aggregate_request.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..350f1c7f4d27 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_aggregate_request_attributes.rb @@ -0,0 +1,144 @@ +=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 new file mode 100644 index 000000000000..5b2ae7549332 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_aggregate_request_data.rb @@ -0,0 +1,144 @@ +=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_resource_type.rb b/lib/datadog_api_client/v2/models/case_aggregate_resource_type.rb new file mode 100644 index 000000000000..7a6a6db2ede8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_aggregate_resource_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 + # JSON:API resource type for case aggregation requests. + class CaseAggregateResourceType + include BaseEnumModel + + AGGREGATE = "aggregate".freeze + 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 new file mode 100644 index 000000000000..95c3d07b9aab --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_aggregate_response.rb @@ -0,0 +1,123 @@ +=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_aggregate_response_attributes.rb b/lib/datadog_api_client/v2/models/case_aggregate_response_attributes.rb new file mode 100644 index 000000000000..2bf0512ab346 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_aggregate_response_attributes.rb @@ -0,0 +1,146 @@ +=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 the aggregation result, including the total count across all groups and the per-group breakdowns. + class CaseAggregateResponseAttributes + include BaseGenericModel + + # Aggregated groups. + attr_reader :groups + + # Total count of aggregated cases. + attr_reader :total + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'groups' => :'groups', + :'total' => :'total' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'groups' => :'Array', + :'total' => :'Float' + } + 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" + 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 + + if attributes.key?(:'total') + self.total = attributes[:'total'] + 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 @total.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 + + # Custom attribute writer method with validation + # @param total [Object] Object to be assigned + # @!visibility private + def total=(total) + if total.nil? + fail ArgumentError, 'invalid value for "total", total cannot be nil.' + end + @total = total + 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 && + total == o.total && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [groups, total, 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/case_aggregate_response_data.rb new file mode 100644 index 000000000000..ec1ce6ff579c --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_aggregate_response_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 + # Data object containing the aggregation results, including total count and per-group breakdowns. + class CaseAggregateResponseData + include BaseGenericModel + + # Attributes of the aggregation result, including the total count across all groups and the per-group breakdowns. + attr_reader :attributes + + # Aggregate response identifier. + attr_reader :id + + # Aggregate resource type. + 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' => :'CaseAggregateResponseAttributes', + :'id' => :'String', + :'type' => :'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::CaseAggregateResponseData` 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_assign.rb b/lib/datadog_api_client/v2/models/case_assign.rb index a7964289f036..42c77cf5125f 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 - # Case resource type + # JSON:API resource type for cases. 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 09da57a0014b..8c4f95e1ac8d 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 - # The definition of `CaseObjectAttributes` object. + # Key-value pairs of case attributes. Each key maps to an array of string values, used for flexible metadata such as labels or tags. attr_accessor :attributes # Timestamp of when the case was closed diff --git a/lib/datadog_api_client/v2/models/case_automation_rule_resource_type.rb b/lib/datadog_api_client/v2/models/case_automation_rule_resource_type.rb new file mode 100644 index 000000000000..ceecf984f734 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_automation_rule_resource_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 + # JSON:API resource type for case automation rules. + class CaseAutomationRuleResourceType + include BaseEnumModel + + RULE = "rule".freeze + end +end 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 new file mode 100644 index 000000000000..b0b9bedaf7a6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_automation_rule_state.rb @@ -0,0 +1,27 @@ +=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 new file mode 100644 index 000000000000..3aa0b530a259 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_bulk_action_type.rb @@ -0,0 +1,35 @@ +=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_resource_type.rb b/lib/datadog_api_client/v2/models/case_bulk_resource_type.rb new file mode 100644 index 000000000000..08e463635e92 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_bulk_resource_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 + # JSON:API resource type for bulk case operations. + class CaseBulkResourceType + include BaseEnumModel + + BULK = "bulk".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 new file mode 100644 index 000000000000..13da4f255c2f --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_bulk_update_request.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..ddd108b85622 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_bulk_update_request_attributes.rb @@ -0,0 +1,156 @@ +=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 new file mode 100644 index 000000000000..587da92ae88b --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_bulk_update_request_data.rb @@ -0,0 +1,144 @@ +=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 f2213389686b..8e3464942341 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 - # Case resource type + # JSON:API resource type for cases. 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 new file mode 100644 index 000000000000..c91a5b03def2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_count_group.rb @@ -0,0 +1,146 @@ +=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_group_value.rb b/lib/datadog_api_client/v2/models/case_count_group_value.rb new file mode 100644 index 000000000000..6d12b8519220 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_count_group_value.rb @@ -0,0 +1,144 @@ +=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 single value within a count group, representing the number of cases with that specific field value. + class CaseCountGroupValue + include BaseGenericModel + + # Count of cases for this value. + attr_reader :count + + # The group value. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'count' => :'count', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'count' => :'Integer', + :'value' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCountGroupValue` 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?(:'value') + self.value = attributes[:'value'] + 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 @value.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 value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + 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 && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [count, value, 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 new file mode 100644 index 000000000000..94d4b3c5e544 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_count_response.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..b7c635766781 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_count_response_attributes.rb @@ -0,0 +1,125 @@ +=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_count_response_data.rb b/lib/datadog_api_client/v2/models/case_count_response_data.rb new file mode 100644 index 000000000000..2de85b14855f --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_count_response_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 + # Data object containing the count results, including per-field group breakdowns. + class CaseCountResponseData + include BaseGenericModel + + # Attributes for the count response, including the total count and optional facet breakdowns. + attr_reader :attributes + + # Count response identifier. + attr_reader :id + + # Count resource type. + 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' => :'CaseCountResponseAttributes', + :'id' => :'String', + :'type' => :'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::CaseCountResponseData` 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_create.rb b/lib/datadog_api_client/v2/models/case_create.rb index 3e1e8eb70cd3..ae11d67a80c8 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 - # Case resource type + # JSON:API resource type for cases. 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 800e88daf1ab..b7ac9c21ead7 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 - # Case resource type + # JSON:API resource type for cases. 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 new file mode 100644 index 000000000000..f8d7be670f39 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_insight.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 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 new file mode 100644 index 000000000000..aa41b73bd18c --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_insight_type.rb @@ -0,0 +1,41 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 new file mode 100644 index 000000000000..26b8ce8d2267 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_insights_attributes.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 new file mode 100644 index 000000000000..16a2a81692aa --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_insights_data.rb @@ -0,0 +1,144 @@ +=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_insights_request.rb b/lib/datadog_api_client/v2/models/case_insights_request.rb new file mode 100644 index 000000000000..d9088d48a03d --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_insights_request.rb @@ -0,0 +1,123 @@ +=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 adding or removing case insights. + class CaseInsightsRequest + include BaseGenericModel + + # Data object containing the insights to add or remove. + 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' => :'CaseInsightsData' + } + 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::CaseInsightsRequest` 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_link.rb b/lib/datadog_api_client/v2/models/case_link.rb new file mode 100644 index 000000000000..5a1a0b9b2390 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_link.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 directional link representing a relationship between two entities. At least one entity must be a case. + class CaseLink + include BaseGenericModel + + # Attributes describing a directional relationship between two entities (cases, incidents, or pages). + attr_reader :attributes + + # The case link identifier. + attr_reader :id + + # 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', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CaseLinkAttributes', + :'id' => :'String', + :'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::CaseLink` 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_link_attributes.rb b/lib/datadog_api_client/v2/models/case_link_attributes.rb new file mode 100644 index 000000000000..538737230643 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_link_attributes.rb @@ -0,0 +1,207 @@ +=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 new file mode 100644 index 000000000000..c778b8c02184 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_link_create.rb @@ -0,0 +1,144 @@ +=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_create_request.rb b/lib/datadog_api_client/v2/models/case_link_create_request.rb new file mode 100644 index 000000000000..40c1efb4ba79 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_link_create_request.rb @@ -0,0 +1,123 @@ +=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 link between two entities. + class CaseLinkCreateRequest + include BaseGenericModel + + # Data object for creating a case link. + 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' => :'CaseLinkCreate' + } + 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::CaseLinkCreateRequest` 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_link_resource_type.rb b/lib/datadog_api_client/v2/models/case_link_resource_type.rb new file mode 100644 index 000000000000..0f78749ff688 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_link_resource_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 + # JSON:API resource type for case links. + class CaseLinkResourceType + include BaseEnumModel + + LINK = "link".freeze + 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 new file mode 100644 index 000000000000..32d0d64fc1fa --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_link_response.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..5b2ff3a4ccb2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_links_response.rb @@ -0,0 +1,125 @@ +=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 967786b108fa..e0e9c8f4201a 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 - # Case resource type + # JSON:API resource type for cases. 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 874b7c82c0c3..53df7d267273 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 - # Case type + # Data object for creating a case type. class CaseTypeCreate include BaseGenericModel - # Case Type resource attributes + # 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_reader :attributes - # Case type resource type + # JSON:API resource type for case types. 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 412a5408f25e..de73024c903c 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 - # Case type create request + # Request payload for creating a case type. class CaseTypeCreateRequest include BaseGenericModel - # Case type + # Data object for creating a 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 9b28ee4b9bb5..736c04a2495d 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 - # The definition of `CaseType` object. + # A case type that defines a classification category for cases. Each case type can have its own custom attributes, statuses, and automation rules. class CaseTypeResource include BaseGenericModel - # Case Type resource attributes + # 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 # Case type's identifier attr_accessor :id - # Case type resource type + # JSON:API resource type for case types. 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 b317858dc7b0..71a28d234182 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 - # Case Type resource attributes + # 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). class CaseTypeResourceAttributes include BaseGenericModel - # Timestamp of when the case type was deleted + # Timestamp when the case type was marked as deleted. A null value indicates the case type is active. attr_accessor :deleted_at - # Case type description. + # A detailed description explaining when this case type should be used. attr_accessor :description - # Case type emoji. + # An emoji icon representing the case type in the UI. attr_accessor :emoji - # Case type name. + # The display name of the case type, shown in the Case Management UI when creating or viewing cases. 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 d5c743dea544..57e3f78e128c 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 - # Case type resource type + # JSON:API resource type for case types. 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 a1a486804aa3..bfc0ab3e5ccf 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 - # Case type response + # Response containing a single case type. class CaseTypeResponse include BaseGenericModel - # The definition of `CaseType` object. + # A case type that defines a classification category for cases. Each case type can have its own custom attributes, statuses, and automation rules. 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 new file mode 100644 index 000000000000..50c26ff2d4c2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_type_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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_type_update_request.rb b/lib/datadog_api_client/v2/models/case_type_update_request.rb new file mode 100644 index 000000000000..67451e683a86 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_type_update_request.rb @@ -0,0 +1,123 @@ +=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 type. + class CaseTypeUpdateRequest + include BaseGenericModel + + # Data object for updating a case type. + 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' => :'CaseTypeUpdate' + } + 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::CaseTypeUpdateRequest` 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_types_response.rb b/lib/datadog_api_client/v2/models/case_types_response.rb index 697aa99c4c79..0104a30e7506 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 - # Case types response. + # Response containing a list of case types. 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 d65f0a256721..4205c6edf2cb 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 - # Case resource type + # JSON:API resource type for cases. 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 383966e519fa..94a273e87fe3 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 - # The definition of `CaseObjectAttributes` object. + # Key-value pairs of case attributes. Each key maps to an array of string values, used for flexible metadata such as labels or tags. 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 new file mode 100644 index 000000000000..d30653c7dc99 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_update_comment.rb @@ -0,0 +1,144 @@ +=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 new file mode 100644 index 000000000000..7813378c875e --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_update_comment_attributes.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..3b67f1dd66da --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_update_comment_request.rb @@ -0,0 +1,123 @@ +=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 986d0f7de606..d1f115c6d453 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 - # Custom attribute values + # A typed value for a custom attribute on a specific case. attr_reader :attributes - # Case resource type + # JSON:API resource type for cases. 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 1167c430886c..6a1f13055390 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 - # Case resource type + # JSON:API resource type for cases. 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 new file mode 100644 index 000000000000..3ca5afeefd25 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_update_due_date.rb @@ -0,0 +1,144 @@ +=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 new file mode 100644 index 000000000000..37f7a69d883c --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_update_due_date_attributes.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..db434df49cd2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_update_due_date_request.rb @@ -0,0 +1,123 @@ +=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 dfc7cd1751f3..7fce18a8c47f 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 - # Case resource type + # JSON:API resource type for cases. 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 new file mode 100644 index 000000000000..21b79e1248e7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_update_resolved_reason.rb @@ -0,0 +1,144 @@ +=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 new file mode 100644 index 000000000000..ab7d1370c503 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_update_resolved_reason_attributes.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..020957932604 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_update_resolved_reason_request.rb @@ -0,0 +1,123 @@ +=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 77d652d314c6..37ad158349ac 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 - # Case resource type + # JSON:API resource type for cases. 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 b5f41b6d4fb9..55311210b2da 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 - # Case resource type + # JSON:API resource type for cases. 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 new file mode 100644 index 000000000000..4f5fe4fa77f3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view.rb @@ -0,0 +1,175 @@ +=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_attributes.rb b/lib/datadog_api_client/v2/models/case_view_attributes.rb new file mode 100644 index 000000000000..9048ef887fcb --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view_attributes.rb @@ -0,0 +1,185 @@ +=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 case view, including the filter query and optional notification rule. + class CaseViewAttributes + include BaseGenericModel + + # Timestamp when the view was created. + attr_reader :created_at + + # Timestamp when the view was last modified. + attr_accessor :modified_at + + # A human-readable name for the view, displayed in the Case Management UI. + 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 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 + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'modified_at' => :'modified_at', + :'name' => :'name', + :'np_rule_id' => :'np_rule_id', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'modified_at' => :'Time', + :'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::CaseViewAttributes` 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_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?(:'np_rule_id') + self.np_rule_id = attributes[:'np_rule_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 @created_at.nil? + return false if @name.nil? + return false if @query.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 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 + + # 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_at == o.created_at && + modified_at == o.modified_at && + 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 + [created_at, modified_at, name, np_rule_id, query, 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 new file mode 100644 index 000000000000..e04bba9a974a --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view_create.rb @@ -0,0 +1,144 @@ +=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 new file mode 100644 index 000000000000..00d718839eaf --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view_create_attributes.rb @@ -0,0 +1,175 @@ +=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_create_request.rb b/lib/datadog_api_client/v2/models/case_view_create_request.rb new file mode 100644 index 000000000000..ba15cdf0aaa5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view_create_request.rb @@ -0,0 +1,123 @@ +=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 case view. + class CaseViewCreateRequest + include BaseGenericModel + + # Data object for creating a case view. + 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' => :'CaseViewCreate' + } + 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::CaseViewCreateRequest` 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_relationships.rb b/lib/datadog_api_client/v2/models/case_view_relationships.rb new file mode 100644 index 000000000000..a47f5b1ca337 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view_relationships.rb @@ -0,0 +1,134 @@ +=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 case view, including the creator, last modifier, and associated project. + class CaseViewRelationships + include BaseGenericModel + + # Relationship to user. + attr_accessor :created_by + + # Relationship to user. + attr_accessor :modified_by + + # Relationship to project. + attr_accessor :project + + 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', + :'project' => :'project' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_by' => :'NullableUserRelationship', + :'modified_by' => :'NullableUserRelationship', + :'project' => :'ProjectRelationship' + } + 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::CaseViewRelationships` 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 + + if attributes.key?(:'project') + self.project = attributes[:'project'] + 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 && + project == o.project && + 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, project, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_view_resource_type.rb b/lib/datadog_api_client/v2/models/case_view_resource_type.rb new file mode 100644 index 000000000000..2d851ce89a8c --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view_resource_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 + # JSON:API resource type for case views. + class CaseViewResourceType + include BaseEnumModel + + VIEW = "view".freeze + 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 new file mode 100644 index 000000000000..f5a2adab3de6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view_response.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..f35e40625995 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 new file mode 100644 index 000000000000..a3a92a02757f --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view_update_attributes.rb @@ -0,0 +1,125 @@ +=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_view_update_request.rb b/lib/datadog_api_client/v2/models/case_view_update_request.rb new file mode 100644 index 000000000000..0cdcfc79e116 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_view_update_request.rb @@ -0,0 +1,123 @@ +=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 view. + class CaseViewUpdateRequest + include BaseGenericModel + + # Data object for updating a case view. + 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' => :'CaseViewUpdate' + } + 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::CaseViewUpdateRequest` 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_views_response.rb b/lib/datadog_api_client/v2/models/case_views_response.rb new file mode 100644 index 000000000000..68c150c8dc7a --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_views_response.rb @@ -0,0 +1,125 @@ +=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 views. + class CaseViewsResponse + include BaseGenericModel + + # A list of case views. + 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::CaseViewsResponse` 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_watcher.rb b/lib/datadog_api_client/v2/models/case_watcher.rb new file mode 100644 index 000000000000..3bd4faa392f4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_watcher.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 + # 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 new file mode 100644 index 000000000000..efb530d45aa8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_watcher_relationships.rb @@ -0,0 +1,123 @@ +=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_resource_type.rb b/lib/datadog_api_client/v2/models/case_watcher_resource_type.rb new file mode 100644 index 000000000000..c65383a1d597 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_watcher_resource_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 + # JSON:API resource type for case watchers. + class CaseWatcherResourceType + include BaseEnumModel + + WATCHER = "watcher".freeze + 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 new file mode 100644 index 000000000000..5b62e26eb150 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_watcher_user_relationship.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..4eaad11ff1ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_watchers_response.rb @@ -0,0 +1,125 @@ +=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 1db82cea9155..b78efdeb6a45 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 - # The definition of `CustomAttributeConfig` object. + # 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. class CustomAttributeConfig include BaseGenericModel - # Custom attribute resource attributes + # Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type. attr_accessor :attributes # Custom attribute configs identifier attr_accessor :id - # Custom attributes config JSON:API resource type + # JSON:API resource type for custom attribute configurations. 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 11f6ca147db7..89cda11d1b36 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 - # Custom attribute config resource attributes + # Attributes required to create a custom attribute configuration. class CustomAttributeConfigAttributesCreate include BaseGenericModel - # Custom attribute description. + # A description explaining the purpose and expected values for this custom attribute. attr_accessor :description - # Custom attribute name. + # The human-readable label shown in the Case Management UI for this custom attribute. attr_reader :display_name - # Whether multiple values can be set + # If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed. attr_reader :is_multi - # Custom attribute key. This will be the value use to search on this custom attribute + # The programmatic key used to reference this custom attribute in search queries and API calls. attr_reader :key - # Custom attributes type + # The data type of the custom attribute, which determines the allowed values and UI input control. 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 1dd69d393f32..9aa9877b5f53 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 - # Custom attribute config + # Data object for creating a custom attribute configuration. class CustomAttributeConfigCreate include BaseGenericModel - # Custom attribute config resource attributes + # Attributes required to create a custom attribute configuration. attr_reader :attributes - # Custom attributes config JSON:API resource type + # JSON:API resource type for custom attribute configurations. 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 218c169ce4c9..76dfa49cbe44 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 - # Custom attribute config create request + # Request payload for creating a custom attribute configuration. class CustomAttributeConfigCreateRequest include BaseGenericModel - # Custom attribute config + # Data object for creating a custom attribute configuration. 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 ba238edb4cd1..4c7236e5f6fb 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 - # Custom attribute resource attributes + # Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type. class CustomAttributeConfigResourceAttributes include BaseGenericModel - # Custom attribute config identifier. + # The UUID of the case type this custom attribute belongs to. attr_reader :case_type_id - # Custom attribute description. + # A description explaining the purpose and expected values for this custom attribute. attr_accessor :description - # Custom attribute name. + # The human-readable label shown in the Case Management UI for this custom attribute. attr_reader :display_name - # Whether multiple values can be set + # If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed. attr_reader :is_multi - # Custom attribute key. This will be the value use to search on this custom attribute + # The programmatic key used to reference this custom attribute in search queries and API calls. attr_reader :key - # Custom attributes type + # The data type of the custom attribute, which determines the allowed values and UI input control. 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 a0d880da5375..8327df42b053 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 - # Custom attributes config JSON:API resource type + # JSON:API resource type for custom attribute configurations. 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 f9269f21d020..2619759ee411 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 - # Custom attribute config response. + # Response containing a single custom attribute configuration. class CustomAttributeConfigResponse include BaseGenericModel - # The definition of `CustomAttributeConfig` object. + # 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. 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 new file mode 100644 index 000000000000..a81741d7449d --- /dev/null +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 new file mode 100644 index 000000000000..1259abe6ab16 --- /dev/null +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_update_attributes.rb @@ -0,0 +1,145 @@ +=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 new file mode 100644 index 000000000000..f7bdec82308f --- /dev/null +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_update_request.rb @@ -0,0 +1,123 @@ +=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 04f397c542fb..ab483099ce1c 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 - # Custom attribute configs response. + # Response containing a list of custom attribute configurations. class CustomAttributeConfigsResponse include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/custom_attribute_select_option.rb b/lib/datadog_api_client/v2/models/custom_attribute_select_option.rb new file mode 100644 index 000000000000..522a02d98fb2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/custom_attribute_select_option.rb @@ -0,0 +1,123 @@ +=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 selectable option for a SELECT-type custom attribute. + class CustomAttributeSelectOption + include BaseGenericModel + + # Option value. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'value' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomAttributeSelectOption` 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?(:'value') + self.value = attributes[:'value'] + 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 @value.nil? + true + end + + # Custom attribute writer method with validation + # @param value [Object] Object to be assigned + # @!visibility private + def value=(value) + if value.nil? + fail ArgumentError, 'invalid value for "value", value cannot be nil.' + end + @value = value + 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 && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [value, additional_properties].hash + end + end +end 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 64ba08a58311..de62c0f6dcf5 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 - # Custom attributes type + # The data type of the custom attribute, which determines the allowed values and UI input control. 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 new file mode 100644 index 000000000000..f7e76514867f --- /dev/null +++ b/lib/datadog_api_client/v2/models/custom_attribute_type_data.rb @@ -0,0 +1,107 @@ +=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 d8cb9ad15a45..a9ee8c94346d 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 - # Custom attribute values + # A typed value for a custom attribute on a specific case. class CustomAttributeValue include BaseGenericModel # If true, value must be an array attr_reader :is_multi - # Custom attributes type + # The data type of the custom attribute, which determines the allowed values and UI input control. attr_reader :type - # Union of supported value for a custom attribute + # The value of a custom attribute. The accepted format depends on the attribute's type and whether it accepts multiple values. 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 b651f2309d56..31dc05f9faf0 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 - # Union of supported value for a custom attribute + # The value of a custom attribute. The accepted format depends on the attribute's type and whether it accepts multiple values. module CustomAttributeValuesUnion class << self include BaseOneOfModel diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_eval_metric_event.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_eval_metric_event.rb new file mode 100644 index 000000000000..9b7ff13830a4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_eval_metric_event.rb @@ -0,0 +1,270 @@ +=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 evaluation metric event associated with an experiment span. + class LLMObsExperimentEvalMetricEvent + include BaseGenericModel + + # Assessment result for an LLM Observability experiment metric. + attr_accessor :assessment + + # Boolean value. Present when `metric_type` is `boolean`. + attr_accessor :boolean_value + + # Categorical value. Present when `metric_type` is `categorical`. + attr_accessor :categorical_value + + # Source type of the evaluation. + attr_accessor :eval_source_type + + # Unique identifier of the evaluation metric event. + attr_accessor :id + + # JSON value. Present when `metric_type` is `json`. + attr_accessor :json_value + + # Label or name for the metric. + attr_accessor :label + + # Arbitrary metadata associated with the metric. + attr_accessor :metadata + + # Source of the metric. Either `custom` (user-submitted) or `summary` (experiment-level aggregate). + attr_accessor :metric_source + + # Type of metric recorded for an LLM Observability experiment. + attr_accessor :metric_type + + # Human-readable reasoning for the metric value. + attr_accessor :reasoning + + # Numeric score. Present when `metric_type` is `score`. + attr_accessor :score_value + + # Span ID this metric is associated with. + attr_accessor :span_id + + # Tags associated with the metric. + attr_accessor :tags + + # Timestamp when the metric was recorded, in milliseconds since Unix epoch. + attr_accessor :timestamp_ms + + # Trace ID linking this metric to a span. + attr_accessor :trace_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'assessment' => :'assessment', + :'boolean_value' => :'boolean_value', + :'categorical_value' => :'categorical_value', + :'eval_source_type' => :'eval_source_type', + :'id' => :'id', + :'json_value' => :'json_value', + :'label' => :'label', + :'metadata' => :'metadata', + :'metric_source' => :'metric_source', + :'metric_type' => :'metric_type', + :'reasoning' => :'reasoning', + :'score_value' => :'score_value', + :'span_id' => :'span_id', + :'tags' => :'tags', + :'timestamp_ms' => :'timestamp_ms', + :'trace_id' => :'trace_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'assessment' => :'LLMObsMetricAssessment', + :'boolean_value' => :'Boolean', + :'categorical_value' => :'String', + :'eval_source_type' => :'String', + :'id' => :'String', + :'json_value' => :'Hash', + :'label' => :'String', + :'metadata' => :'Hash', + :'metric_source' => :'String', + :'metric_type' => :'LLMObsMetricScoreType', + :'reasoning' => :'String', + :'score_value' => :'Float', + :'span_id' => :'String', + :'tags' => :'Array', + :'timestamp_ms' => :'Integer', + :'trace_id' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'boolean_value', + :'categorical_value', + :'json_value', + :'metadata', + :'reasoning', + :'score_value', + ]) + 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::LLMObsExperimentEvalMetricEvent` 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?(:'assessment') + self.assessment = attributes[:'assessment'] + end + + if attributes.key?(:'boolean_value') + self.boolean_value = attributes[:'boolean_value'] + end + + if attributes.key?(:'categorical_value') + self.categorical_value = attributes[:'categorical_value'] + end + + if attributes.key?(:'eval_source_type') + self.eval_source_type = attributes[:'eval_source_type'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'json_value') + self.json_value = attributes[:'json_value'] + end + + if attributes.key?(:'label') + self.label = attributes[:'label'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'metric_source') + self.metric_source = attributes[:'metric_source'] + end + + if attributes.key?(:'metric_type') + self.metric_type = attributes[:'metric_type'] + end + + if attributes.key?(:'reasoning') + self.reasoning = attributes[:'reasoning'] + end + + if attributes.key?(:'score_value') + self.score_value = attributes[:'score_value'] + end + + if attributes.key?(:'span_id') + self.span_id = attributes[:'span_id'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'timestamp_ms') + self.timestamp_ms = attributes[:'timestamp_ms'] + end + + if attributes.key?(:'trace_id') + self.trace_id = attributes[:'trace_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + assessment == o.assessment && + boolean_value == o.boolean_value && + categorical_value == o.categorical_value && + eval_source_type == o.eval_source_type && + id == o.id && + json_value == o.json_value && + label == o.label && + metadata == o.metadata && + metric_source == o.metric_source && + metric_type == o.metric_type && + reasoning == o.reasoning && + score_value == o.score_value && + span_id == o.span_id && + tags == o.tags && + timestamp_ms == o.timestamp_ms && + trace_id == o.trace_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [assessment, boolean_value, categorical_value, eval_source_type, id, json_value, label, metadata, metric_source, metric_type, reasoning, score_value, span_id, tags, timestamp_ms, trace_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_events_type.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_type.rb new file mode 100644 index 000000000000..ff6fb3802e2d --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_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 + # Resource type for an experiment events collection. + class LLMObsExperimentEventsType + include BaseEnumModel + + EXPERIMENT_EVENTS = "experiment_events".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_attributes_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_attributes_response.rb new file mode 100644 index 000000000000..07e10fb1615a --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_attributes_response.rb @@ -0,0 +1,148 @@ +=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 an experiment events response. + class LLMObsExperimentEventsV2DataAttributesResponse + include BaseGenericModel + + # Experiment spans, each enriched with their associated evaluation metrics. + attr_reader :spans + + # Experiment-level summary evaluation metrics (not tied to individual spans). + attr_reader :summary_metrics + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'spans' => :'spans', + :'summary_metrics' => :'summary_metrics' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'spans' => :'Array', + :'summary_metrics' => :'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::LLMObsExperimentEventsV2DataAttributesResponse` 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?(:'spans') + if (value = attributes[:'spans']).is_a?(Array) + self.spans = value + end + end + + if attributes.key?(:'summary_metrics') + if (value = attributes[:'summary_metrics']).is_a?(Array) + self.summary_metrics = 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 @spans.nil? + return false if @summary_metrics.nil? + true + end + + # Custom attribute writer method with validation + # @param spans [Object] Object to be assigned + # @!visibility private + def spans=(spans) + if spans.nil? + fail ArgumentError, 'invalid value for "spans", spans cannot be nil.' + end + @spans = spans + end + + # Custom attribute writer method with validation + # @param summary_metrics [Object] Object to be assigned + # @!visibility private + def summary_metrics=(summary_metrics) + if summary_metrics.nil? + fail ArgumentError, 'invalid value for "summary_metrics", summary_metrics cannot be nil.' + end + @summary_metrics = summary_metrics + 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 && + spans == o.spans && + summary_metrics == o.summary_metrics && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [spans, summary_metrics, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_response.rb new file mode 100644 index 000000000000..5c02bb0492f3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_data_response.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 + # JSON:API data object for an experiment events response. + class LLMObsExperimentEventsV2DataResponse + include BaseGenericModel + + # Attributes of an experiment events response. + attr_reader :attributes + + # Identifier for this events resource. + attr_reader :id + + # Resource type for an experiment events collection. + 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' => :'LLMObsExperimentEventsV2DataAttributesResponse', + :'id' => :'String', + :'type' => :'LLMObsExperimentEventsType' + } + 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::LLMObsExperimentEventsV2DataResponse` 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/llm_obs_experiment_events_v2_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_response.rb new file mode 100644 index 000000000000..4457dc1c42da --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_events_v2_response.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 for listing experiment events (v2/v3). Returns spans and summary metrics in a single resource. + class LLMObsExperimentEventsV2Response + include BaseGenericModel + + # JSON:API data object for an experiment events response. + attr_reader :data + + # Pagination cursor metadata. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'LLMObsExperimentEventsV2DataResponse', + :'meta' => :'LLMObsCursorMeta' + } + 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::LLMObsExperimentEventsV2Response` 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?(:'meta') + self.meta = attributes[:'meta'] + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_run_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_run_data_response.rb new file mode 100644 index 000000000000..1abea49a31d2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_run_data_response.rb @@ -0,0 +1,171 @@ +=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 an LLM Observability experiment run. + class LLMObsExperimentRunDataResponse + include BaseGenericModel + + # Aggregated metric data for this run. + attr_accessor :aggregate_data + + # Timestamp when the run was created. + attr_accessor :created_at + + # Identifier of the experiment this run belongs to. + attr_accessor :experiment_id + + # Unique identifier of the experiment run. + attr_accessor :id + + # Sequential number of this run within the experiment. + attr_reader :run_number + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregate_data' => :'aggregate_data', + :'created_at' => :'created_at', + :'experiment_id' => :'experiment_id', + :'id' => :'id', + :'run_number' => :'run_number' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregate_data' => :'Hash', + :'created_at' => :'Time', + :'experiment_id' => :'String', + :'id' => :'String', + :'run_number' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'aggregate_data', + ]) + 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::LLMObsExperimentRunDataResponse` 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?(:'aggregate_data') + self.aggregate_data = attributes[:'aggregate_data'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'experiment_id') + self.experiment_id = attributes[:'experiment_id'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'run_number') + self.run_number = attributes[:'run_number'] + 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 !@run_number.nil? && @run_number > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param run_number [Object] Object to be assigned + # @!visibility private + def run_number=(run_number) + if !run_number.nil? && run_number > 2147483647 + fail ArgumentError, 'invalid value for "run_number", must be smaller than or equal to 2147483647.' + end + @run_number = run_number + 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 && + aggregate_data == o.aggregate_data && + created_at == o.created_at && + experiment_id == o.experiment_id && + id == o.id && + run_number == o.run_number && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregate_data, created_at, experiment_id, id, run_number, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experiment_span_with_evals.rb b/lib/datadog_api_client/v2/models/llm_obs_experiment_span_with_evals.rb new file mode 100644 index 000000000000..17892fe3915a --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experiment_span_with_evals.rb @@ -0,0 +1,237 @@ +=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 experiment span enriched with its associated evaluation metrics. + class LLMObsExperimentSpanWithEvals + include BaseGenericModel + + # ID of the dataset record this span evaluated. + attr_accessor :dataset_record_id + + # Duration of the span in nanoseconds. + attr_accessor :duration + + # Evaluation metrics associated with this span. + attr_accessor :eval_metrics + + # Unique identifier of the span. + attr_accessor :id + + # Metadata associated with an experiment span. + attr_accessor :meta + + # Numeric metrics attached to the span. + attr_accessor :metrics + + # Name of the span. + attr_accessor :name + + # Parent span ID, if any. + attr_accessor :parent_id + + # Span ID. + attr_accessor :span_id + + # Start time in nanoseconds since Unix epoch. + attr_accessor :start_ns + + # Status of the span. + attr_accessor :status + + # Tags associated with the span. + attr_accessor :tags + + # Trace ID. + attr_accessor :trace_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'dataset_record_id' => :'dataset_record_id', + :'duration' => :'duration', + :'eval_metrics' => :'eval_metrics', + :'id' => :'id', + :'meta' => :'meta', + :'metrics' => :'metrics', + :'name' => :'name', + :'parent_id' => :'parent_id', + :'span_id' => :'span_id', + :'start_ns' => :'start_ns', + :'status' => :'status', + :'tags' => :'tags', + :'trace_id' => :'trace_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'dataset_record_id' => :'String', + :'duration' => :'Float', + :'eval_metrics' => :'Array', + :'id' => :'String', + :'meta' => :'LLMObsExperimentSpanMeta', + :'metrics' => :'Hash', + :'name' => :'String', + :'parent_id' => :'String', + :'span_id' => :'String', + :'start_ns' => :'Integer', + :'status' => :'LLMObsExperimentSpanStatus', + :'tags' => :'Array', + :'trace_id' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'dataset_record_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::LLMObsExperimentSpanWithEvals` 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?(:'dataset_record_id') + self.dataset_record_id = attributes[:'dataset_record_id'] + end + + if attributes.key?(:'duration') + self.duration = attributes[:'duration'] + end + + if attributes.key?(:'eval_metrics') + if (value = attributes[:'eval_metrics']).is_a?(Array) + self.eval_metrics = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'metrics') + self.metrics = attributes[:'metrics'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'parent_id') + self.parent_id = attributes[:'parent_id'] + end + + if attributes.key?(:'span_id') + self.span_id = attributes[:'span_id'] + end + + if attributes.key?(:'start_ns') + self.start_ns = attributes[:'start_ns'] + 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?(:'trace_id') + self.trace_id = attributes[:'trace_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + dataset_record_id == o.dataset_record_id && + duration == o.duration && + eval_metrics == o.eval_metrics && + id == o.id && + meta == o.meta && + metrics == o.metrics && + name == o.name && + parent_id == o.parent_id && + span_id == o.span_id && + start_ns == o.start_ns && + status == o.status && + tags == o.tags && + trace_id == o.trace_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [dataset_record_id, duration, eval_metrics, id, meta, metrics, name, parent_id, span_id, start_ns, status, tags, trace_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_aggregate.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_aggregate.rb new file mode 100644 index 000000000000..9ad1e85cf0df --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_aggregate.rb @@ -0,0 +1,239 @@ +=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 + # Analytics aggregation parameters. + class LLMObsExperimentationAnalyticsAggregate + include BaseGenericModel + + # List of metric computations to perform. + attr_reader :compute + + # Filter to a specific dataset version. + attr_accessor :dataset_version + + # Fields to group results by. + attr_accessor :group_by + + # Data indexes to query. At least one is required. + attr_reader :indexes + + # Maximum number of results to return. + attr_reader :limit + + # Search query for filtering analytics data. + attr_reader :search + + # Unix-millisecond time range for filtering analytics data. + attr_accessor :time + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'compute' => :'compute', + :'dataset_version' => :'dataset_version', + :'group_by' => :'group_by', + :'indexes' => :'indexes', + :'limit' => :'limit', + :'search' => :'search', + :'time' => :'time' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'compute' => :'Array', + :'dataset_version' => :'Integer', + :'group_by' => :'Array', + :'indexes' => :'Array', + :'limit' => :'Integer', + :'search' => :'LLMObsExperimentationAnalyticsSearch', + :'time' => :'LLMObsExperimentationAnalyticsTimeRange' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'dataset_version', + :'limit', + ]) + 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::LLMObsExperimentationAnalyticsAggregate` 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?(:'compute') + if (value = attributes[:'compute']).is_a?(Array) + self.compute = value + end + end + + if attributes.key?(:'dataset_version') + self.dataset_version = attributes[:'dataset_version'] + end + + if attributes.key?(:'group_by') + if (value = attributes[:'group_by']).is_a?(Array) + self.group_by = value + end + end + + if attributes.key?(:'indexes') + if (value = attributes[:'indexes']).is_a?(Array) + self.indexes = value + end + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'search') + self.search = attributes[:'search'] + end + + if attributes.key?(:'time') + self.time = attributes[:'time'] + 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 @compute.nil? + return false if @compute.length < 1 + return false if @indexes.nil? + return false if @indexes.length < 1 + return false if !@limit.nil? && @limit > 2147483647 + return false if @search.nil? + true + end + + # Custom attribute writer method with validation + # @param compute [Object] Object to be assigned + # @!visibility private + def compute=(compute) + if compute.nil? + fail ArgumentError, 'invalid value for "compute", compute cannot be nil.' + end + if compute.length < 1 + fail ArgumentError, 'invalid value for "compute", number of items must be greater than or equal to 1.' + end + @compute = compute + end + + # Custom attribute writer method with validation + # @param indexes [Object] Object to be assigned + # @!visibility private + def indexes=(indexes) + if indexes.nil? + fail ArgumentError, 'invalid value for "indexes", indexes cannot be nil.' + end + if indexes.length < 1 + fail ArgumentError, 'invalid value for "indexes", number of items must be greater than or equal to 1.' + end + @indexes = indexes + end + + # Custom attribute writer method with validation + # @param limit [Object] Object to be assigned + # @!visibility private + def limit=(limit) + if !limit.nil? && limit > 2147483647 + fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 2147483647.' + end + @limit = limit + end + + # Custom attribute writer method with validation + # @param search [Object] Object to be assigned + # @!visibility private + def search=(search) + if search.nil? + fail ArgumentError, 'invalid value for "search", search cannot be nil.' + end + @search = search + 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 && + compute == o.compute && + dataset_version == o.dataset_version && + group_by == o.group_by && + indexes == o.indexes && + limit == o.limit && + search == o.search && + time == o.time && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [compute, dataset_version, group_by, indexes, limit, search, time, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_compute.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_compute.rb new file mode 100644 index 000000000000..d0c48b4599cf --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_compute.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 single metric computation definition. + class LLMObsExperimentationAnalyticsCompute + include BaseGenericModel + + # Name of the metric to compute. + attr_reader :metric + + # Optional alias for this computation in the response. + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'metric' => :'metric', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'metric' => :'String', + :'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::LLMObsExperimentationAnalyticsCompute` 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?(:'metric') + self.metric = attributes[:'metric'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 @metric.nil? + true + end + + # Custom attribute writer method with validation + # @param metric [Object] Object to be assigned + # @!visibility private + def metric=(metric) + if metric.nil? + fail ArgumentError, 'invalid value for "metric", metric cannot be nil.' + end + @metric = metric + end + + # 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 && + metric == o.metric && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [metric, name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_request.rb new file mode 100644 index 000000000000..5a1795213adf --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_request.rb @@ -0,0 +1,123 @@ +=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 an analytics request. + class LLMObsExperimentationAnalyticsDataAttributesRequest + include BaseGenericModel + + # Analytics aggregation parameters. + attr_reader :aggregate + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'aggregate' => :'aggregate' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'aggregate' => :'LLMObsExperimentationAnalyticsAggregate' + } + 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::LLMObsExperimentationAnalyticsDataAttributesRequest` 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?(:'aggregate') + self.aggregate = attributes[:'aggregate'] + 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 @aggregate.nil? + true + end + + # Custom attribute writer method with validation + # @param aggregate [Object] Object to be assigned + # @!visibility private + def aggregate=(aggregate) + if aggregate.nil? + fail ArgumentError, 'invalid value for "aggregate", aggregate cannot be nil.' + end + @aggregate = aggregate + 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 && + aggregate == o.aggregate && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [aggregate, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_response.rb new file mode 100644 index 000000000000..a4b74a4eccb6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_attributes_response.rb @@ -0,0 +1,144 @@ +=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 an analytics response. + class LLMObsExperimentationAnalyticsDataAttributesResponse + include BaseGenericModel + + # Total number of events matched by the query before grouping. + attr_reader :hit_count + + # Analytics query result containing all buckets. + attr_reader :result + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'hit_count' => :'hit_count', + :'result' => :'result' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'hit_count' => :'Integer', + :'result' => :'LLMObsExperimentationAnalyticsResult' + } + 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::LLMObsExperimentationAnalyticsDataAttributesResponse` 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?(:'hit_count') + self.hit_count = attributes[:'hit_count'] + end + + if attributes.key?(:'result') + self.result = attributes[:'result'] + 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 @hit_count.nil? + return false if @result.nil? + true + end + + # Custom attribute writer method with validation + # @param hit_count [Object] Object to be assigned + # @!visibility private + def hit_count=(hit_count) + if hit_count.nil? + fail ArgumentError, 'invalid value for "hit_count", hit_count cannot be nil.' + end + @hit_count = hit_count + end + + # Custom attribute writer method with validation + # @param result [Object] Object to be assigned + # @!visibility private + def result=(result) + if result.nil? + fail ArgumentError, 'invalid value for "result", result cannot be nil.' + end + @result = result + 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 && + hit_count == o.hit_count && + result == o.result && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [hit_count, result, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_request.rb new file mode 100644 index 000000000000..0813ff01cc97 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_request.rb @@ -0,0 +1,144 @@ +=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 an analytics request. + class LLMObsExperimentationAnalyticsDataRequest + include BaseGenericModel + + # Attributes for an analytics request. + attr_reader :attributes + + # Resource type for experimentation search and analytics 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' => :'LLMObsExperimentationAnalyticsDataAttributesRequest', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationAnalyticsDataRequest` 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/llm_obs_experimentation_analytics_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_response.rb new file mode 100644 index 000000000000..0e7ad1158462 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_data_response.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 + # JSON:API data object for an analytics response. + class LLMObsExperimentationAnalyticsDataResponse + include BaseGenericModel + + # Attributes of an analytics response. + attr_reader :attributes + + # Server-generated identifier for this analytics result. + attr_reader :id + + # Resource type for experimentation search and analytics 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', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'LLMObsExperimentationAnalyticsDataAttributesResponse', + :'id' => :'String', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationAnalyticsDataResponse` 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/llm_obs_experimentation_analytics_group_by.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_group_by.rb new file mode 100644 index 000000000000..a045290a76e4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_group_by.rb @@ -0,0 +1,123 @@ +=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 field to group analytics results by. + class LLMObsExperimentationAnalyticsGroupBy + include BaseGenericModel + + # Field name to group by. + attr_reader :field + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'field' => :'field' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'field' => :'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::LLMObsExperimentationAnalyticsGroupBy` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'field') + self.field = attributes[:'field'] + end + 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 @field.nil? + true + end + + # Custom attribute writer method with validation + # @param field [Object] Object to be assigned + # @!visibility private + def field=(field) + if field.nil? + fail ArgumentError, 'invalid value for "field", field cannot be nil.' + end + @field = field + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + field == o.field && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [field, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_request.rb new file mode 100644 index 000000000000..a804ad63c95a --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_request.rb @@ -0,0 +1,123 @@ +=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 to run an analytics aggregation over LLM Observability experimentation data. + class LLMObsExperimentationAnalyticsRequest + include BaseGenericModel + + # Data object for an analytics request. + 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' => :'LLMObsExperimentationAnalyticsDataRequest' + } + 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::LLMObsExperimentationAnalyticsRequest` 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/llm_obs_experimentation_analytics_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_response.rb new file mode 100644 index 000000000000..b29c66ef32fb --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_response.rb @@ -0,0 +1,123 @@ +=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 to an analytics query. + class LLMObsExperimentationAnalyticsResponse + include BaseGenericModel + + # JSON:API data object for an analytics response. + 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' => :'LLMObsExperimentationAnalyticsDataResponse' + } + 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::LLMObsExperimentationAnalyticsResponse` 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/llm_obs_experimentation_analytics_result.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_result.rb new file mode 100644 index 000000000000..1baf781fffda --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_result.rb @@ -0,0 +1,125 @@ +=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 + # Analytics query result containing all buckets. + class LLMObsExperimentationAnalyticsResult + include BaseGenericModel + + # List of result buckets. + attr_reader :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'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::LLMObsExperimentationAnalyticsResult` 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?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.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 @values.nil? + true + end + + # Custom attribute writer method with validation + # @param values [Object] Object to be assigned + # @!visibility private + def values=(values) + if values.nil? + fail ArgumentError, 'invalid value for "values", values cannot be nil.' + end + @values = 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 && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_search.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_search.rb new file mode 100644 index 000000000000..2b580413d84f --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_search.rb @@ -0,0 +1,123 @@ +=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 + # Search query for filtering analytics data. + class LLMObsExperimentationAnalyticsSearch + include BaseGenericModel + + # Filter expression. + attr_reader :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'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::LLMObsExperimentationAnalyticsSearch` 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?(:'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 @query.nil? + true + end + + # Custom attribute writer method with validation + # @param query [Object] Object to be assigned + # @!visibility private + def query=(query) + if query.nil? + fail ArgumentError, 'invalid value for "query", query cannot be nil.' + end + @query = query + end + + # 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 && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_time_range.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_time_range.rb new file mode 100644 index 000000000000..fd7fc3cb67cf --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_time_range.rb @@ -0,0 +1,144 @@ +=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 + # Unix-millisecond time range for filtering analytics data. + class LLMObsExperimentationAnalyticsTimeRange + include BaseGenericModel + + # Start of the time range in milliseconds since Unix epoch. + attr_reader :from + + # End of the time range in milliseconds since Unix epoch. + attr_reader :to + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'from' => :'from', + :'to' => :'to' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'from' => :'Integer', + :'to' => :'Integer' + } + 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::LLMObsExperimentationAnalyticsTimeRange` 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?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + 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 @from.nil? + return false if @to.nil? + true + end + + # Custom attribute writer method with validation + # @param from [Object] Object to be assigned + # @!visibility private + def from=(from) + if from.nil? + fail ArgumentError, 'invalid value for "from", from cannot be nil.' + end + @from = from + end + + # Custom attribute writer method with validation + # @param to [Object] Object to be assigned + # @!visibility private + def to=(to) + if to.nil? + fail ArgumentError, 'invalid value for "to", to cannot be nil.' + end + @to = to + 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 && + from == o.from && + to == o.to && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [from, to, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_value.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_value.rb new file mode 100644 index 000000000000..79090a1ef3a9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_analytics_value.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 single analytics result bucket. + class LLMObsExperimentationAnalyticsValue + include BaseGenericModel + + # The group-by field values for this bucket. + attr_accessor :by + + # Computed metric values for this bucket. + attr_reader :metrics + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'by' => :'by', + :'metrics' => :'metrics' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'by' => :'Hash', + :'metrics' => :'Hash' + } + 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::LLMObsExperimentationAnalyticsValue` 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?(:'by') + self.by = attributes[:'by'] + end + + if attributes.key?(:'metrics') + self.metrics = attributes[:'metrics'] + 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 @metrics.nil? + true + end + + # Custom attribute writer method with validation + # @param metrics [Object] Object to be assigned + # @!visibility private + def metrics=(metrics) + if metrics.nil? + fail ArgumentError, 'invalid value for "metrics", metrics cannot be nil.' + end + @metrics = metrics + 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 && + by == o.by && + metrics == o.metrics && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [by, metrics, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_content_preview.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_content_preview.rb new file mode 100644 index 000000000000..636aa02d3892 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_content_preview.rb @@ -0,0 +1,105 @@ +=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 + # Options to control content preview truncation. + class LLMObsExperimentationContentPreview + include BaseGenericModel + + # Maximum number of characters to include in content previews. + attr_accessor :limit + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'limit' => :'limit' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'limit' => :'Integer' + } + 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::LLMObsExperimentationContentPreview` 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?(:'limit') + self.limit = attributes[:'limit'] + 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 && + limit == o.limit && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [limit, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_cursor_page.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_cursor_page.rb new file mode 100644 index 000000000000..bc8ad05914bc --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_cursor_page.rb @@ -0,0 +1,115 @@ +=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 + # Cursor-based pagination parameters. + class LLMObsExperimentationCursorPage + include BaseGenericModel + + # Opaque cursor returned from a previous response to fetch the next page. + attr_accessor :cursor + + # Maximum number of results per page. + attr_accessor :limit + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cursor' => :'cursor', + :'limit' => :'limit' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cursor' => :'String', + :'limit' => :'Integer' + } + 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::LLMObsExperimentationCursorPage` 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?(:'cursor') + self.cursor = attributes[:'cursor'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + 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 && + cursor == o.cursor && + limit == o.limit && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cursor, limit, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_filter.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_filter.rb new file mode 100644 index 000000000000..aa10dd4324f6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_filter.rb @@ -0,0 +1,173 @@ +=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 + # Filter criteria for an experimentation search request. + class LLMObsExperimentationFilter + include BaseGenericModel + + # When `true`, include soft-deleted entities alongside active ones. + attr_accessor :include_deleted + + # When `true`, return only soft-deleted entities. + attr_accessor :is_deleted + + # Free-text search query. + attr_accessor :query + + # Entity types to search. Valid values are `projects`, `datasets`, `dataset_records`, `experiments`, and `experiment_runs`. + attr_reader :scope + + # Filter dataset records by a specific dataset version. + attr_accessor :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'include_deleted' => :'include_deleted', + :'is_deleted' => :'is_deleted', + :'query' => :'query', + :'scope' => :'scope', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'include_deleted' => :'Boolean', + :'is_deleted' => :'Boolean', + :'query' => :'String', + :'scope' => :'Array', + :'version' => :'Integer' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'version', + ]) + 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::LLMObsExperimentationFilter` 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?(:'include_deleted') + self.include_deleted = attributes[:'include_deleted'] + end + + if attributes.key?(:'is_deleted') + self.is_deleted = attributes[:'is_deleted'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'scope') + if (value = attributes[:'scope']).is_a?(Array) + self.scope = value + end + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + 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 @scope.nil? + true + end + + # Custom attribute writer method with validation + # @param scope [Object] Object to be assigned + # @!visibility private + def scope=(scope) + if scope.nil? + fail ArgumentError, 'invalid value for "scope", scope cannot be nil.' + end + @scope = scope + 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 && + include_deleted == o.include_deleted && + is_deleted == o.is_deleted && + query == o.query && + scope == o.scope && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [include_deleted, is_deleted, query, scope, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_include.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_include.rb new file mode 100644 index 000000000000..43ffee46bcd9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_include.rb @@ -0,0 +1,105 @@ +=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 data to include in the response. + class LLMObsExperimentationInclude + include BaseGenericModel + + # When `true`, enrich results with author user data (name and email). + attr_accessor :user_data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'user_data' => :'user_data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'user_data' => :'Boolean' + } + 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::LLMObsExperimentationInclude` 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_data') + self.user_data = attributes[:'user_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 && + user_data == o.user_data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [user_data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_number_page.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_number_page.rb new file mode 100644 index 000000000000..3156bc48a9ba --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_number_page.rb @@ -0,0 +1,148 @@ +=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 + # Offset-based pagination parameters for simple search. + class LLMObsExperimentationNumberPage + include BaseGenericModel + + # Maximum number of results per page. + attr_reader :limit + + # Page number to retrieve (1-indexed). + attr_reader :number + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'limit' => :'limit', + :'number' => :'number' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'limit' => :'Integer', + :'number' => :'Integer' + } + 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::LLMObsExperimentationNumberPage` 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?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'number') + self.number = attributes[:'number'] + 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 !@limit.nil? && @limit > 2147483647 + return false if !@number.nil? && @number > 2147483647 + return false if !@number.nil? && @number < 1 + true + end + + # Custom attribute writer method with validation + # @param limit [Object] Object to be assigned + # @!visibility private + def limit=(limit) + if !limit.nil? && limit > 2147483647 + fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 2147483647.' + end + @limit = limit + end + + # Custom attribute writer method with validation + # @param number [Object] Object to be assigned + # @!visibility private + def number=(number) + if !number.nil? && number > 2147483647 + fail ArgumentError, 'invalid value for "number", must be smaller than or equal to 2147483647.' + end + if !number.nil? && number < 1 + fail ArgumentError, 'invalid value for "number", must be greater than or equal to 1.' + end + @number = number + 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 && + limit == o.limit && + number == o.number && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [limit, number, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_attributes_request.rb new file mode 100644 index 000000000000..f75a01216bdb --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_attributes_request.rb @@ -0,0 +1,153 @@ +=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 an experimentation search request. + class LLMObsExperimentationSearchDataAttributesRequest + include BaseGenericModel + + # Options to control content preview truncation. + attr_accessor :content_preview + + # Filter criteria for an experimentation search request. + attr_reader :filter + + # Additional data to include in the response. + attr_accessor :include + + # Cursor-based pagination parameters. + attr_accessor :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'content_preview' => :'content_preview', + :'filter' => :'filter', + :'include' => :'include', + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'content_preview' => :'LLMObsExperimentationContentPreview', + :'filter' => :'LLMObsExperimentationFilter', + :'include' => :'LLMObsExperimentationInclude', + :'page' => :'LLMObsExperimentationCursorPage' + } + 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::LLMObsExperimentationSearchDataAttributesRequest` 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?(:'content_preview') + self.content_preview = attributes[:'content_preview'] + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'page') + self.page = attributes[:'page'] + 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 @filter.nil? + true + end + + # Custom attribute writer method with validation + # @param filter [Object] Object to be assigned + # @!visibility private + def filter=(filter) + if filter.nil? + fail ArgumentError, 'invalid value for "filter", filter cannot be nil.' + end + @filter = 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 && + content_preview == o.content_preview && + filter == o.filter && + include == o.include && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [content_preview, filter, include, page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_request.rb new file mode 100644 index 000000000000..68e9cddd9d97 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_request.rb @@ -0,0 +1,144 @@ +=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 an experimentation search request. + class LLMObsExperimentationSearchDataRequest + include BaseGenericModel + + # Attributes for an experimentation search request. + attr_reader :attributes + + # Resource type for experimentation search and analytics 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' => :'LLMObsExperimentationSearchDataAttributesRequest', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationSearchDataRequest` 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/llm_obs_experimentation_search_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_response.rb new file mode 100644 index 000000000000..d6452983aeb1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_data_response.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 + # JSON:API data object for an experimentation search response. + class LLMObsExperimentationSearchDataResponse + include BaseGenericModel + + # The matching experimentation entities grouped by type. + attr_reader :attributes + + # Server-generated identifier for this search result. + attr_reader :id + + # Resource type for experimentation search and analytics 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', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'LLMObsExperimentationSearchResults', + :'id' => :'String', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationSearchDataResponse` 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/llm_obs_experimentation_search_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_request.rb new file mode 100644 index 000000000000..4b0a4f91c585 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_request.rb @@ -0,0 +1,123 @@ +=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 to search across LLM Observability experimentation entities using cursor-based pagination. + class LLMObsExperimentationSearchRequest + include BaseGenericModel + + # Data object for an experimentation search request. + 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' => :'LLMObsExperimentationSearchDataRequest' + } + 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::LLMObsExperimentationSearchRequest` 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/llm_obs_experimentation_search_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_response.rb new file mode 100644 index 000000000000..e4818e213c41 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_response.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 to a cursor-based experimentation search. Returns `200 OK` when all results fit in one page; `206 Partial Content` when a next-page cursor is available. + class LLMObsExperimentationSearchResponse + include BaseGenericModel + + # JSON:API data object for an experimentation search response. + attr_reader :data + + # Pagination cursor metadata. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'LLMObsExperimentationSearchDataResponse', + :'meta' => :'LLMObsCursorMeta' + } + 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::LLMObsExperimentationSearchResponse` 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?(:'meta') + self.meta = attributes[:'meta'] + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_results.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_results.rb new file mode 100644 index 000000000000..92a46a0b90ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_search_results.rb @@ -0,0 +1,167 @@ +=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 matching experimentation entities grouped by type. + class LLMObsExperimentationSearchResults + include BaseGenericModel + + # Matching dataset records. Present when `dataset_records` is included in `filter.scope`. + attr_accessor :dataset_records + + # Matching datasets. Present when `datasets` is included in `filter.scope`. + attr_accessor :datasets + + # Matching experiment runs. Present when `experiment_runs` is included in `filter.scope`. + attr_accessor :experiment_runs + + # Matching experiments. Present when `experiments` is included in `filter.scope`. + attr_accessor :experiments + + # Matching projects. Present when `projects` is included in `filter.scope`. + attr_accessor :projects + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'dataset_records' => :'dataset_records', + :'datasets' => :'datasets', + :'experiment_runs' => :'experiment_runs', + :'experiments' => :'experiments', + :'projects' => :'projects' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'dataset_records' => :'Array', + :'datasets' => :'Array', + :'experiment_runs' => :'Array', + :'experiments' => :'Array', + :'projects' => :'Array' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'dataset_records', + :'datasets', + :'experiment_runs', + :'experiments', + :'projects', + ]) + 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::LLMObsExperimentationSearchResults` 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?(:'dataset_records') + if (value = attributes[:'dataset_records']).is_a?(Array) + self.dataset_records = value + end + end + + if attributes.key?(:'datasets') + if (value = attributes[:'datasets']).is_a?(Array) + self.datasets = value + end + end + + if attributes.key?(:'experiment_runs') + if (value = attributes[:'experiment_runs']).is_a?(Array) + self.experiment_runs = value + end + end + + if attributes.key?(:'experiments') + if (value = attributes[:'experiments']).is_a?(Array) + self.experiments = value + end + end + + if attributes.key?(:'projects') + if (value = attributes[:'projects']).is_a?(Array) + self.projects = 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 && + dataset_records == o.dataset_records && + datasets == o.datasets && + experiment_runs == o.experiment_runs && + experiments == o.experiments && + projects == o.projects && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [dataset_records, datasets, experiment_runs, experiments, projects, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_attributes_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_attributes_request.rb new file mode 100644 index 000000000000..319a7a5ae4f8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_attributes_request.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 + # Attributes for an experimentation simple search request. + class LLMObsExperimentationSimpleSearchDataAttributesRequest + include BaseGenericModel + + # Options to control content preview truncation. + attr_accessor :content_preview + + # Filter criteria for an experimentation search request. + attr_reader :filter + + # Additional data to include in the response. + attr_accessor :include + + # Offset-based pagination parameters for simple search. + attr_accessor :page + + # Sort order for results. + attr_accessor :sort + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'content_preview' => :'content_preview', + :'filter' => :'filter', + :'include' => :'include', + :'page' => :'page', + :'sort' => :'sort' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'content_preview' => :'LLMObsExperimentationContentPreview', + :'filter' => :'LLMObsExperimentationFilter', + :'include' => :'LLMObsExperimentationInclude', + :'page' => :'LLMObsExperimentationNumberPage', + :'sort' => :'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::LLMObsExperimentationSimpleSearchDataAttributesRequest` 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?(:'content_preview') + self.content_preview = attributes[:'content_preview'] + end + + if attributes.key?(:'filter') + self.filter = attributes[:'filter'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'page') + self.page = attributes[:'page'] + end + + if attributes.key?(:'sort') + if (value = attributes[:'sort']).is_a?(Array) + self.sort = 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 @filter.nil? + true + end + + # Custom attribute writer method with validation + # @param filter [Object] Object to be assigned + # @!visibility private + def filter=(filter) + if filter.nil? + fail ArgumentError, 'invalid value for "filter", filter cannot be nil.' + end + @filter = 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 && + content_preview == o.content_preview && + filter == o.filter && + include == o.include && + page == o.page && + sort == o.sort && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [content_preview, filter, include, page, sort, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_request.rb new file mode 100644 index 000000000000..6b4b8a5ae4ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_request.rb @@ -0,0 +1,144 @@ +=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 an experimentation simple search request. + class LLMObsExperimentationSimpleSearchDataRequest + include BaseGenericModel + + # Attributes for an experimentation simple search request. + attr_reader :attributes + + # Resource type for experimentation search and analytics 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' => :'LLMObsExperimentationSimpleSearchDataAttributesRequest', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationSimpleSearchDataRequest` 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/llm_obs_experimentation_simple_search_data_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_response.rb new file mode 100644 index 000000000000..36c21387868d --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_data_response.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 + # JSON:API data object for a simple search response. + class LLMObsExperimentationSimpleSearchDataResponse + include BaseGenericModel + + # The matching experimentation entities grouped by type. + attr_reader :attributes + + # Server-generated identifier for this search result. + attr_reader :id + + # Resource type for experimentation search and analytics 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', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'LLMObsExperimentationSearchResults', + :'id' => :'String', + :'type' => :'LLMObsExperimentationType' + } + 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::LLMObsExperimentationSimpleSearchDataResponse` 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/llm_obs_experimentation_simple_search_meta.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta.rb new file mode 100644 index 000000000000..67514030a2ce --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta.rb @@ -0,0 +1,105 @@ +=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 + # Pagination metadata for a simple search response. + class LLMObsExperimentationSimpleSearchMeta + include BaseGenericModel + + # Page metadata. + attr_accessor :page + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'page' => :'page' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'page' => :'LLMObsExperimentationSimpleSearchMetaPage' + } + 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::LLMObsExperimentationSimpleSearchMeta` 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?(:'page') + self.page = attributes[:'page'] + 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 && + page == o.page && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [page, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta_page.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta_page.rb new file mode 100644 index 000000000000..e5c276b314d7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_meta_page.rb @@ -0,0 +1,186 @@ +=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 + # Page metadata. + class LLMObsExperimentationSimpleSearchMetaPage + include BaseGenericModel + + # Current page number. + attr_reader :current + + # Page size used for this response. + attr_reader :limit + + # Total number of matching results (capped at the maximum search limit). + attr_reader :total_count + + # Total number of pages available. + attr_reader :total_pages + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'current' => :'current', + :'limit' => :'limit', + :'total_count' => :'total_count', + :'total_pages' => :'total_pages' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'current' => :'Integer', + :'limit' => :'Integer', + :'total_count' => :'Integer', + :'total_pages' => :'Integer' + } + 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::LLMObsExperimentationSimpleSearchMetaPage` 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?(:'current') + self.current = attributes[:'current'] + end + + if attributes.key?(:'limit') + self.limit = attributes[:'limit'] + end + + if attributes.key?(:'total_count') + self.total_count = attributes[:'total_count'] + end + + if attributes.key?(:'total_pages') + self.total_pages = attributes[:'total_pages'] + 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 !@current.nil? && @current > 2147483647 + return false if !@limit.nil? && @limit > 2147483647 + return false if !@total_count.nil? && @total_count > 2147483647 + return false if !@total_pages.nil? && @total_pages > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param current [Object] Object to be assigned + # @!visibility private + def current=(current) + if !current.nil? && current > 2147483647 + fail ArgumentError, 'invalid value for "current", must be smaller than or equal to 2147483647.' + end + @current = current + end + + # Custom attribute writer method with validation + # @param limit [Object] Object to be assigned + # @!visibility private + def limit=(limit) + if !limit.nil? && limit > 2147483647 + fail ArgumentError, 'invalid value for "limit", must be smaller than or equal to 2147483647.' + end + @limit = limit + end + + # Custom attribute writer method with validation + # @param total_count [Object] Object to be assigned + # @!visibility private + def total_count=(total_count) + if !total_count.nil? && total_count > 2147483647 + fail ArgumentError, 'invalid value for "total_count", must be smaller than or equal to 2147483647.' + end + @total_count = total_count + end + + # Custom attribute writer method with validation + # @param total_pages [Object] Object to be assigned + # @!visibility private + def total_pages=(total_pages) + if !total_pages.nil? && total_pages > 2147483647 + fail ArgumentError, 'invalid value for "total_pages", must be smaller than or equal to 2147483647.' + end + @total_pages = total_pages + 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 && + current == o.current && + limit == o.limit && + total_count == o.total_count && + total_pages == o.total_pages && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [current, limit, total_count, total_pages, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_request.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_request.rb new file mode 100644 index 000000000000..cd3c849000aa --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_request.rb @@ -0,0 +1,123 @@ +=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 to search across LLM Observability experimentation entities using offset-based pagination. + class LLMObsExperimentationSimpleSearchRequest + include BaseGenericModel + + # Data object for an experimentation simple search request. + 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' => :'LLMObsExperimentationSimpleSearchDataRequest' + } + 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::LLMObsExperimentationSimpleSearchRequest` 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/llm_obs_experimentation_simple_search_response.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_response.rb new file mode 100644 index 000000000000..f7f418ad0154 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_simple_search_response.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 to an offset-based experimentation simple search. + class LLMObsExperimentationSimpleSearchResponse + include BaseGenericModel + + # JSON:API data object for a simple search response. + attr_reader :data + + # Pagination metadata for a simple search response. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'LLMObsExperimentationSimpleSearchDataResponse', + :'meta' => :'LLMObsExperimentationSimpleSearchMeta' + } + 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::LLMObsExperimentationSimpleSearchResponse` 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?(:'meta') + self.meta = attributes[:'meta'] + 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 && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field.rb new file mode 100644 index 000000000000..860e02c3ebfa --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 field and direction to sort results by. + class LLMObsExperimentationSortField + include BaseGenericModel + + # Sort direction. + attr_accessor :direction + + # The field name to sort on. + attr_reader :field + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'direction' => :'direction', + :'field' => :'field' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'direction' => :'LLMObsExperimentationSortFieldDirection', + :'field' => :'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::LLMObsExperimentationSortField` 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?(:'direction') + self.direction = attributes[:'direction'] + end + + if attributes.key?(:'field') + self.field = attributes[:'field'] + 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 @field.nil? + true + end + + # Custom attribute writer method with validation + # @param field [Object] Object to be assigned + # @!visibility private + def field=(field) + if field.nil? + fail ArgumentError, 'invalid value for "field", field cannot be nil.' + end + @field = field + 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 && + direction == o.direction && + field == o.field && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [direction, field, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field_direction.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field_direction.rb new file mode 100644 index 000000000000..fb15dbcc5edd --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_sort_field_direction.rb @@ -0,0 +1,27 @@ +=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 + # Sort direction. + class LLMObsExperimentationSortFieldDirection + include BaseEnumModel + + ASC = "asc".freeze + DESC = "desc".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/llm_obs_experimentation_type.rb b/lib/datadog_api_client/v2/models/llm_obs_experimentation_type.rb new file mode 100644 index 000000000000..3992035781f7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/llm_obs_experimentation_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 + # Resource type for experimentation search and analytics operations. + class LLMObsExperimentationType + include BaseEnumModel + + EXPERIMENTATION = "experimentation".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/maintenance_window.rb b/lib/datadog_api_client/v2/models/maintenance_window.rb new file mode 100644 index 000000000000..ee8d4dddd52b --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_window.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 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 + include BaseGenericModel + + # Attributes of a maintenance window, including its schedule and the query that determines which cases are affected. + attr_reader :attributes + + # The maintenance window's identifier. + attr_reader :id + + # 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', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'MaintenanceWindowAttributes', + :'id' => :'String', + :'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::MaintenanceWindow` 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/maintenance_window_attributes.rb b/lib/datadog_api_client/v2/models/maintenance_window_attributes.rb new file mode 100644 index 000000000000..089144a81dd6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_window_attributes.rb @@ -0,0 +1,206 @@ +=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.rb b/lib/datadog_api_client/v2/models/maintenance_window_create.rb new file mode 100644 index 000000000000..870f1227a484 --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_window_create.rb @@ -0,0 +1,144 @@ +=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 maintenance window. + class MaintenanceWindowCreate + include BaseGenericModel + + # Attributes required to create a maintenance window. + attr_reader :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' => :'MaintenanceWindowCreateAttributes', + :'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::MaintenanceWindowCreate` 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/maintenance_window_create_attributes.rb b/lib/datadog_api_client/v2/models/maintenance_window_create_attributes.rb new file mode 100644 index 000000000000..c610b816599c --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_window_create_attributes.rb @@ -0,0 +1,186 @@ +=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 maintenance window. + class MaintenanceWindowCreateAttributes + include BaseGenericModel + + # The end time of the maintenance window. + attr_reader :end_at + + # The name of the maintenance window. + attr_reader :name + + # The query to filter event management cases for this maintenance window. + attr_reader :query + + # The start time of the maintenance window. + attr_reader :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::MaintenanceWindowCreateAttributes` 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 + + # 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 && + 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_create_request.rb b/lib/datadog_api_client/v2/models/maintenance_window_create_request.rb new file mode 100644 index 000000000000..6aa6f78782d3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_window_create_request.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..681018c99926 --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_window_resource_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 + # 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 new file mode 100644 index 000000000000..b572e9918ecf --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_window_response.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..60639773c83d --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_window_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://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 new file mode 100644 index 000000000000..b7b517c3abce --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_window_update_attributes.rb @@ -0,0 +1,135 @@ +=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 new file mode 100644 index 000000000000..561d305a34de --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_window_update_request.rb @@ -0,0 +1,123 @@ +=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 new file mode 100644 index 000000000000..29f16c8a9bc9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/maintenance_windows_response.rb @@ -0,0 +1,125 @@ +=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/project_favorite.rb b/lib/datadog_api_client/v2/models/project_favorite.rb new file mode 100644 index 000000000000..6fe48d468dd3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_favorite.rb @@ -0,0 +1,144 @@ +=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 new file mode 100644 index 000000000000..1e1c71deb9ea --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_favorite_resource_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 + # 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/project_favorites_response.rb b/lib/datadog_api_client/v2/models/project_favorites_response.rb new file mode 100644 index 000000000000..a634b2760ecc --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_favorites_response.rb @@ -0,0 +1,125 @@ +=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 projects the current user has favorited. + class ProjectFavoritesResponse + include BaseGenericModel + + # List of project favorites. + 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::ProjectFavoritesResponse` 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/timeline_cell.rb b/lib/datadog_api_client/v2/models/timeline_cell.rb index eff1de922436..8c8463155e73 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 - # timeline cell + # 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). class TimelineCell include BaseGenericModel - # author of the timeline cell + # The author of the timeline cell. Currently only user authors are supported. attr_accessor :author - # timeline cell content + # The content payload of a timeline cell, varying by cell type. 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 - # Timeline cell content type + # The type of content in the timeline cell. Currently only `COMMENT` is supported in this endpoint. 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 d4b7c4acfb45..260335808816 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 - # author of the timeline cell + # The author of the timeline cell. Currently only user authors are supported. 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 274ddf6a559d..66ec8eb22531 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 - # timeline cell user author + # A user who authored a timeline cell. class TimelineCellAuthorUser include BaseGenericModel - # user author content. + # Profile information for the user who authored the timeline cell. attr_accessor :content - # user author type. + # The type of timeline cell author. Currently only `USER` is supported. 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 8bd93d4d0412..d66a3f18b25d 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 - # user author content. + # Profile information for the user who authored the timeline cell. class TimelineCellAuthorUserContent include BaseGenericModel - # user email + # The email address of the user. attr_accessor :email - # user handle + # The Datadog handle of the user. attr_accessor :handle - # user UUID + # The UUID of the user. attr_accessor :id - # user name + # The display name of the user. 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 76643ee1dd86..21527600064d 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 - # user author type. + # The type of timeline cell author. Currently only `USER` is supported. 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 8a3f4ed465ac..9166df6f85e9 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 - # timeline cell content + # The content payload of a timeline cell, varying by cell type. 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 ad7fb072114c..dbcd86330a55 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 - # comment content + # The content of a comment timeline cell. class TimelineCellContentComment include BaseGenericModel - # comment message + # The text content of the comment. Supports Markdown formatting. 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 35e988e7b8d8..5c1e21b5733c 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 - # Timeline cell JSON:API resource + # A timeline cell resource representing a single entry in a case's activity timeline. class TimelineCellResource include BaseGenericModel - # timeline cell + # 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). attr_reader :attributes # Timeline cell's identifier attr_reader :id - # Timeline cell JSON:API resource type + # JSON:API resource type for timeline cells. 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 0e1dddb79835..4d22d0b60d24 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 - # Timeline cell JSON:API resource type + # JSON:API resource type for timeline cells. 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 25b6ea18b771..1afc72a7e8cc 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 - # Timeline cell content type + # The type of content in the timeline cell. Currently only `COMMENT` is supported in this endpoint. 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 a1413a23fb04..81061ff5bc27 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 - # Timeline response + # Response containing the chronological list of timeline cells for a case. class TimelineResponse include BaseGenericModel