From 88e428fc65cb8a3c92bad2c01b6cbae352157cf6 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 19 May 2026 16:17:52 +0000 Subject: [PATCH] Regenerate client from commit 0600da1 of spec repo --- .generator/schemas/v2/openapi.yaml | 3763 ++--------------- .../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 - features/scenarios_model_mapping.rb | 129 - features/v2/case_management.feature | 852 ---- features/v2/case_management_attribute.feature | 30 - features/v2/case_management_type.feature | 27 - features/v2/undo.json | 266 -- lib/datadog_api_client/configuration.rb | 36 - lib/datadog_api_client/inflector.rb | 111 +- .../v2/api/case_management_api.rb | 3688 +++------------- .../v2/api/case_management_attribute_api.rb | 89 +- .../v2/api/case_management_type_api.rb | 80 +- .../v2/models/automation_rule_action.rb | 144 - .../v2/models/automation_rule_action_data.rb | 125 - .../v2/models/automation_rule_attributes.rb | 217 - .../v2/models/automation_rule_create.rb | 144 - .../automation_rule_create_attributes.rb | 175 - .../models/automation_rule_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_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 +- .../v2/models/case_bulk_action_type.rb | 35 - .../v2/models/case_bulk_update_request.rb | 123 - .../case_bulk_update_request_attributes.rb | 156 - .../models/case_bulk_update_request_data.rb | 144 - .../v2/models/case_comment.rb | 2 +- .../v2/models/case_count_group.rb | 146 - .../v2/models/case_count_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_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 +- .../v2/models/case_view_attributes.rb | 185 - .../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 +- .../v2/models/maintenance_window.rb | 165 - .../models/maintenance_window_attributes.rb | 206 - .../v2/models/maintenance_window_create.rb | 144 - .../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 - ...ity_pipeline_add_metric_tags_processor.rb} | 104 +- ...ipeline_add_metric_tags_processor_type.rb} | 6 +- ...ervability_pipeline_aggregate_processor.rb | 248 ++ ...ility_pipeline_aggregate_processor_mode.rb | 32 + ...lity_pipeline_aggregate_processor_type.rb} | 4 +- ...vability_pipeline_config_processor_item.rb | 6 +- ..._pipeline_rename_metric_tags_processor.rb} | 104 +- ...eline_rename_metric_tags_processor_tag.rb} | 60 +- ...line_rename_metric_tags_processor_type.rb} | 6 +- ...ipeline_tag_cardinality_limit_processor.rb | 271 ++ ..._tag_cardinality_limit_processor_action.rb | 27 + ...nality_limit_processor_per_metric_limit.rb | 217 + ...nality_limit_processor_per_metric_mode.rb} | 8 +- ...dinality_limit_processor_per_tag_limit.rb} | 113 +- ...rdinality_limit_processor_per_tag_mode.rb} | 8 +- ...e_tag_cardinality_limit_processor_type.rb} | 6 +- .../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 +- 192 files changed, 2172 insertions(+), 19933 deletions(-) delete mode 100644 examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb delete mode 100644 examples/v2/case-management-type/UpdateCaseType.rb delete mode 100644 examples/v2/case-management/AddCaseInsights.rb delete mode 100644 examples/v2/case-management/AggregateCases.rb delete mode 100644 examples/v2/case-management/BulkUpdateCases.rb delete mode 100644 examples/v2/case-management/CountCases.rb delete mode 100644 examples/v2/case-management/CreateCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/CreateCaseLink.rb delete mode 100644 examples/v2/case-management/CreateCaseView.rb delete mode 100644 examples/v2/case-management/CreateMaintenanceWindow.rb delete mode 100644 examples/v2/case-management/DeleteCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/DeleteCaseLink.rb delete mode 100644 examples/v2/case-management/DeleteCaseView.rb delete mode 100644 examples/v2/case-management/DeleteMaintenanceWindow.rb delete mode 100644 examples/v2/case-management/DisableCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/EnableCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/FavoriteCaseProject.rb delete mode 100644 examples/v2/case-management/GetCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/GetCaseView.rb delete mode 100644 examples/v2/case-management/ListCaseAutomationRules.rb delete mode 100644 examples/v2/case-management/ListCaseLinks.rb delete mode 100644 examples/v2/case-management/ListCaseTimeline.rb delete mode 100644 examples/v2/case-management/ListCaseViews.rb delete mode 100644 examples/v2/case-management/ListCaseWatchers.rb delete mode 100644 examples/v2/case-management/ListMaintenanceWindows.rb delete mode 100644 examples/v2/case-management/ListUserCaseProjectFavorites.rb delete mode 100644 examples/v2/case-management/RemoveCaseInsights.rb delete mode 100644 examples/v2/case-management/UnfavoriteCaseProject.rb delete mode 100644 examples/v2/case-management/UnwatchCase.rb delete mode 100644 examples/v2/case-management/UpdateCaseAutomationRule.rb delete mode 100644 examples/v2/case-management/UpdateCaseComment.rb delete mode 100644 examples/v2/case-management/UpdateCaseDueDate.rb delete mode 100644 examples/v2/case-management/UpdateCaseResolvedReason.rb delete mode 100644 examples/v2/case-management/UpdateCaseView.rb delete mode 100644 examples/v2/case-management/UpdateMaintenanceWindow.rb delete mode 100644 examples/v2/case-management/WatchCase.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_action.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_action_data.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_create.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_create_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_create_request.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_relationships.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_response.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_trigger.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_trigger_data.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_trigger_type.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_update.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rule_update_request.rb delete mode 100644 lib/datadog_api_client/v2/models/automation_rules_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_group.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_group_by.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_request_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_request_data.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_response_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_aggregate_response_data.rb delete mode 100644 lib/datadog_api_client/v2/models/case_bulk_action_type.rb delete mode 100644 lib/datadog_api_client/v2/models/case_bulk_update_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_bulk_update_request_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_bulk_update_request_data.rb delete mode 100644 lib/datadog_api_client/v2/models/case_count_group.rb delete mode 100644 lib/datadog_api_client/v2/models/case_count_group_value.rb delete mode 100644 lib/datadog_api_client/v2/models/case_count_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_count_response_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_count_response_data.rb delete mode 100644 lib/datadog_api_client/v2/models/case_insight.rb delete mode 100644 lib/datadog_api_client/v2/models/case_insight_type.rb delete mode 100644 lib/datadog_api_client/v2/models/case_insights_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_insights_data.rb delete mode 100644 lib/datadog_api_client/v2/models/case_insights_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_link.rb delete mode 100644 lib/datadog_api_client/v2/models/case_link_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_link_create.rb delete mode 100644 lib/datadog_api_client/v2/models/case_link_create_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_link_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_links_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_type_update.rb delete mode 100644 lib/datadog_api_client/v2/models/case_type_update_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_comment.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_comment_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_comment_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_due_date.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_due_date_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_due_date_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_resolved_reason.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_resolved_reason_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_update_resolved_reason_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_create_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_create_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_relationships.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_resource_type.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_update.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_update_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/case_view_update_request.rb delete mode 100644 lib/datadog_api_client/v2/models/case_views_response.rb delete mode 100644 lib/datadog_api_client/v2/models/case_watcher.rb delete mode 100644 lib/datadog_api_client/v2/models/case_watcher_relationships.rb delete mode 100644 lib/datadog_api_client/v2/models/case_watcher_resource_type.rb delete mode 100644 lib/datadog_api_client/v2/models/case_watcher_user_relationship.rb delete mode 100644 lib/datadog_api_client/v2/models/case_watchers_response.rb delete mode 100644 lib/datadog_api_client/v2/models/custom_attribute_config_update.rb delete mode 100644 lib/datadog_api_client/v2/models/custom_attribute_config_update_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/custom_attribute_config_update_request.rb delete mode 100644 lib/datadog_api_client/v2/models/custom_attribute_select_option.rb delete mode 100644 lib/datadog_api_client/v2/models/custom_attribute_type_data.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_create.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_create_request.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_resource_type.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_response.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_update.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_update_attributes.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_window_update_request.rb delete mode 100644 lib/datadog_api_client/v2/models/maintenance_windows_response.rb rename lib/datadog_api_client/v2/models/{automation_rule.rb => observability_pipeline_add_metric_tags_processor.rb} (56%) rename lib/datadog_api_client/v2/models/{case_bulk_resource_type.rb => observability_pipeline_add_metric_tags_processor_type.rb} (77%) create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor.rb create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor_mode.rb rename lib/datadog_api_client/v2/models/{case_aggregate_resource_type.rb => observability_pipeline_aggregate_processor_type.rb} (85%) rename lib/datadog_api_client/v2/models/{case_view.rb => observability_pipeline_rename_metric_tags_processor.rb} (55%) rename lib/datadog_api_client/v2/models/{case_view_create.rb => observability_pipeline_rename_metric_tags_processor_tag.rb} (70%) rename lib/datadog_api_client/v2/models/{case_link_resource_type.rb => observability_pipeline_rename_metric_tags_processor_type.rb} (76%) create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor.rb create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_action.rb create mode 100644 lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_metric_limit.rb rename lib/datadog_api_client/v2/models/{case_automation_rule_state.rb => observability_pipeline_tag_cardinality_limit_processor_per_metric_mode.rb} (69%) rename lib/datadog_api_client/v2/models/{maintenance_window_create_attributes.rb => observability_pipeline_tag_cardinality_limit_processor_per_tag_limit.rb} (56%) rename lib/datadog_api_client/v2/models/{automation_rule_action_type.rb => observability_pipeline_tag_cardinality_limit_processor_per_tag_mode.rb} (66%) rename lib/datadog_api_client/v2/models/{case_automation_rule_resource_type.rb => observability_pipeline_tag_cardinality_limit_processor_type.rb} (75%) delete mode 100644 lib/datadog_api_client/v2/models/project_favorite.rb delete mode 100644 lib/datadog_api_client/v2/models/project_favorite_resource_type.rb delete 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 6def5f93679e..cca9ac53bfd2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -249,7 +249,7 @@ components: schema: $ref: "#/components/schemas/CaseSortableField" CaseTypeIDPathParameter: - description: The UUID of the case type. + description: Case type's UUID example: "f98a5a5b-e0ff-45d4-b2f5-afe6e74de505" in: path name: case_type_id @@ -257,7 +257,7 @@ components: schema: type: string CellIDPathParameter: - description: The UUID of the timeline cell (comment) to update. + description: Timeline cell's UUID example: "f98a5a5b-e0ff-45d4-b2f5-afe6e74de504" in: path name: cell_id @@ -853,22 +853,6 @@ components: required: true schema: type: string - LinkIDPathParameter: - description: "The UUID of the case link." - in: path - name: link_id - required: true - schema: - example: "804cd682-55f6-4541-ab00-b608b282ea7d" - type: string - MaintenanceWindowIDPathParameter: - description: The UUID of the maintenance window. - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - in: path - name: maintenance_window_id - required: true - schema: - type: string MembershipSort: description: >- Field to sort memberships by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`. @@ -1439,14 +1423,6 @@ components: schema: example: "1" type: string - RuleIDPathParameter: - description: The UUID of the automation rule. - example: "e6773723-fe58-49ff-9975-dff00f14e28d" - in: path - name: rule_id - required: true - schema: - type: string RuleId: description: The ID of the rule. in: path @@ -1625,22 +1601,6 @@ components: schema: example: "00000000-0000-9999-0000-000000000000" type: string - UserUUIDPathParameter: - description: The UUID of the user to add or remove as a watcher. - example: "8146583c-0b5f-11ec-abf8-da7ad0900001" - in: path - name: user_uuid - required: true - schema: - type: string - ViewIDPathParameter: - description: The UUID of the case view. - example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - in: path - name: view_id - required: true - schema: - type: string WorkflowId: description: The ID of the workflow. in: path @@ -7648,219 +7608,6 @@ components: description: Whether to auto-transition cases when self-assigned. type: boolean type: object - AutomationRule: - description: An automation rule that executes an action (such as running a Datadog workflow or assigning an AI agent) when a specified case event occurs within a project. - properties: - attributes: - $ref: "#/components/schemas/AutomationRuleAttributes" - id: - description: Automation rule identifier. - example: "e6773723-fe58-49ff-9975-dff00f14e28d" - type: string - relationships: - $ref: "#/components/schemas/AutomationRuleRelationships" - type: - $ref: "#/components/schemas/CaseAutomationRuleResourceType" - required: - - id - - type - - attributes - type: object - AutomationRuleAction: - description: Defines what happens when the rule triggers. Combines an action type with action-specific configuration data. - properties: - data: - $ref: "#/components/schemas/AutomationRuleActionData" - type: - $ref: "#/components/schemas/AutomationRuleActionType" - required: - - type - - data - type: object - AutomationRuleActionData: - description: Configuration for the action to execute, dependent on the action type. - properties: - agent_type: - description: The type of AI agent to assign. Required when the action type is `assign_agent`. - type: string - assigned_agent_id: - description: The identifier of the AI agent to assign to the case. Required when the action type is `assign_agent`. - type: string - handle: - description: The handle of the Datadog workflow to execute. Required when the action type is `execute_workflow`. - example: "workflow-handle-123" - type: string - type: object - AutomationRuleActionType: - description: The type of automated action to perform when the rule triggers. `execute_workflow` runs a Datadog workflow; `assign_agent` assigns an AI agent to the case. - enum: - - execute_workflow - - assign_agent - example: execute_workflow - type: string - x-enum-varnames: - - EXECUTE_WORKFLOW - - ASSIGN_AGENT - AutomationRuleAttributes: - description: Core attributes of an automation rule, including its name, trigger condition, action to execute, and current state. - properties: - action: - $ref: "#/components/schemas/AutomationRuleAction" - created_at: - description: Timestamp when the automation rule was created. - example: "2024-01-01T00:00:00.000Z" - format: date-time - readOnly: true - type: string - modified_at: - description: Timestamp when the automation rule was last modified. - format: date-time - readOnly: true - type: string - name: - description: A human-readable name for the automation rule, used to identify the rule in the UI and API responses. - example: "Auto-assign workflow" - type: string - state: - $ref: "#/components/schemas/CaseAutomationRuleState" - trigger: - $ref: "#/components/schemas/AutomationRuleTrigger" - required: - - name - - trigger - - action - - state - - created_at - type: object - AutomationRuleCreate: - description: Data object for creating an automation rule. - properties: - attributes: - $ref: "#/components/schemas/AutomationRuleCreateAttributes" - type: - $ref: "#/components/schemas/CaseAutomationRuleResourceType" - required: - - type - - attributes - type: object - AutomationRuleCreateAttributes: - description: Attributes required to create an automation rule. - properties: - action: - $ref: "#/components/schemas/AutomationRuleAction" - name: - description: Name of the automation rule. - example: "Auto-assign workflow" - type: string - state: - $ref: "#/components/schemas/CaseAutomationRuleState" - trigger: - $ref: "#/components/schemas/AutomationRuleTrigger" - required: - - name - - trigger - - action - type: object - AutomationRuleCreateRequest: - description: Request payload for creating an automation rule. - properties: - data: - $ref: "#/components/schemas/AutomationRuleCreate" - required: - - data - type: object - AutomationRuleRelationships: - description: Related resources for the automation rule, including the users who created and last modified it. - properties: - created_by: - $ref: "#/components/schemas/NullableUserRelationship" - modified_by: - $ref: "#/components/schemas/NullableUserRelationship" - type: object - AutomationRuleResponse: - description: Response containing a single automation rule. - properties: - data: - $ref: "#/components/schemas/AutomationRule" - required: - - data - type: object - AutomationRuleTrigger: - description: Defines when the rule activates. Combines a trigger type (the case event to listen for) with optional trigger data (conditions that narrow when the trigger fires). - properties: - data: - $ref: "#/components/schemas/AutomationRuleTriggerData" - type: - $ref: "#/components/schemas/AutomationRuleTriggerType" - required: - - type - type: object - AutomationRuleTriggerData: - description: Additional configuration for the trigger, dependent on the trigger type. For `status_transitioned` triggers, specify `from_status_name` and `to_status_name`. For `attribute_value_changed` triggers, specify `field` and `change_type`. - properties: - approval_type: - description: The approval outcome to match. Used with `case_review_approved` triggers. - type: string - change_type: - description: "The kind of attribute change to match. Allowed values: `VALUE_ADDED`, `VALUE_DELETED`, `ANY_CHANGES`. Used with `attribute_value_changed` triggers." - type: string - field: - description: The case attribute field name to monitor for changes. Used with `attribute_value_changed` triggers. - type: string - from_status_name: - description: The originating status name. Used with `status_transitioned` triggers to match transitions from this status. - type: string - to_status_name: - description: The destination status name. Used with `status_transitioned` triggers to match transitions to this status. - type: string - type: object - AutomationRuleTriggerType: - description: The case event that activates the automation rule. - enum: - - case_created - - status_transitioned - - attribute_value_changed - - event_correlation_signal_correlated - - case_review_approved - - comment_added - example: case_created - type: string - x-enum-varnames: - - CASE_CREATED - - STATUS_TRANSITIONED - - ATTRIBUTE_VALUE_CHANGED - - EVENT_CORRELATION_SIGNAL_CORRELATED - - CASE_REVIEW_APPROVED - - COMMENT_ADDED - AutomationRuleUpdate: - description: Data object for updating an automation rule. - properties: - attributes: - $ref: "#/components/schemas/AutomationRuleCreateAttributes" - type: - $ref: "#/components/schemas/CaseAutomationRuleResourceType" - required: - - type - type: object - AutomationRuleUpdateRequest: - description: Request payload for updating an automation rule. - properties: - data: - $ref: "#/components/schemas/AutomationRuleUpdate" - required: - - data - type: object - AutomationRulesResponse: - description: Response containing a list of automation rules for a project. - properties: - data: - description: List of automation rules. - items: - $ref: "#/components/schemas/AutomationRule" - type: array - required: - - data - type: object AwsAccountId: description: The ID of the AWS account. example: "123456789012" @@ -11125,128 +10872,6 @@ components: - IN_PROGRESS - COMPLETED - FAILED - CaseAggregateGroup: - description: A single group within the aggregation results, containing the group key and its associated count values. - properties: - group: - description: "The value of the field being grouped on (for example, `OPEN` when grouping by status)." - example: "OPEN" - type: string - value: - description: The count of cases in this group. - example: - - 42.0 - items: - format: double - type: number - type: array - required: - - group - - value - type: object - CaseAggregateGroupBy: - description: Configuration for grouping aggregated results by one or more case fields. - properties: - groups: - description: Fields to group by. - example: - - "status" - items: - type: string - type: array - limit: - description: Maximum number of groups to return. - example: 14 - format: int32 - maximum: 1000 - type: integer - required: - - groups - - limit - type: object - CaseAggregateRequest: - description: Request payload for aggregating case counts with grouping. Use this to get faceted breakdowns of cases (for example, count of cases grouped by priority and status). - properties: - data: - $ref: "#/components/schemas/CaseAggregateRequestData" - required: - - data - type: object - CaseAggregateRequestAttributes: - description: Attributes for the aggregation request, including the search query and grouping configuration. - properties: - group_by: - $ref: "#/components/schemas/CaseAggregateGroupBy" - query_filter: - description: "A search query to filter which cases are included in the aggregation. Uses the same syntax as the Case Management search bar." - example: "service:case-api" - type: string - required: - - query_filter - - group_by - type: object - CaseAggregateRequestData: - description: Data object wrapping the aggregation query type and attributes. - properties: - attributes: - $ref: "#/components/schemas/CaseAggregateRequestAttributes" - type: - $ref: "#/components/schemas/CaseAggregateResourceType" - required: - - attributes - - type - type: object - CaseAggregateResourceType: - description: JSON:API resource type for case aggregation requests. - enum: - - aggregate - example: aggregate - type: string - x-enum-varnames: - - AGGREGATE - CaseAggregateResponse: - description: Response containing aggregated case counts grouped by the requested fields. - properties: - data: - $ref: "#/components/schemas/CaseAggregateResponseData" - required: - - data - type: object - CaseAggregateResponseAttributes: - description: Attributes of the aggregation result, including the total count across all groups and the per-group breakdowns. - properties: - groups: - description: Aggregated groups. - items: - $ref: "#/components/schemas/CaseAggregateGroup" - type: array - total: - description: Total count of aggregated cases. - example: 100.0 - format: double - type: number - required: - - total - - groups - type: object - CaseAggregateResponseData: - description: Data object containing the aggregation results, including total count and per-group breakdowns. - properties: - attributes: - $ref: "#/components/schemas/CaseAggregateResponseAttributes" - id: - description: Aggregate response identifier. - example: "agg-result-001" - type: string - type: - description: Aggregate resource type. - example: "aggregate" - type: string - required: - - type - - id - - attributes - type: object CaseAssign: description: Case assign properties: @@ -11339,102 +10964,6 @@ components: example: "3b010bde-09ce-4449-b745-71dd5f861963" type: string type: object - CaseAutomationRuleResourceType: - default: rule - description: JSON:API resource type for case automation rules. - enum: - - rule - example: rule - type: string - x-enum-varnames: - - RULE - CaseAutomationRuleState: - description: Whether the automation rule is active. Enabled rules trigger on matching case events; disabled rules are inactive but preserve their configuration. - enum: - - ENABLED - - DISABLED - example: ENABLED - type: string - x-enum-varnames: - - ENABLED - - DISABLED - CaseBulkActionType: - description: "The type of action to apply in a bulk update. Allowed values are `priority`, `status`, `assign`, `unassign`, `archive`, `unarchive`, `jira`, `servicenow`, `linear`, `update_project`." - enum: - - priority - - status - - assign - - unassign - - archive - - unarchive - - jira - - servicenow - - linear - - update_project - example: priority - type: string - x-enum-varnames: - - PRIORITY - - STATUS - - ASSIGN - - UNASSIGN - - ARCHIVE - - UNARCHIVE - - JIRA - - SERVICENOW - - LINEAR - - UPDATE_PROJECT - CaseBulkResourceType: - description: JSON:API resource type for bulk case operations. - enum: - - bulk - example: bulk - type: string - x-enum-varnames: - - BULK - CaseBulkUpdateRequest: - description: Request payload for applying a single action (such as changing priority, status, or assignment) to multiple cases at once. - properties: - data: - $ref: "#/components/schemas/CaseBulkUpdateRequestData" - required: - - data - type: object - CaseBulkUpdateRequestAttributes: - description: Attributes for the bulk update, specifying which cases to update and the action to apply. - properties: - case_ids: - description: An array of case identifiers to apply the bulk action to. - example: - - "case-id-1" - - "case-id-2" - items: - type: string - type: array - payload: - additionalProperties: - type: string - description: A key-value map of action-specific parameters. The required keys depend on the action type (for example, `priority` for the priority action, `assignee_id` for assign). - example: - priority: "P1" - type: object - type: - $ref: "#/components/schemas/CaseBulkActionType" - required: - - case_ids - - type - type: object - CaseBulkUpdateRequestData: - description: Data object wrapping the bulk update type and attributes. - properties: - attributes: - $ref: "#/components/schemas/CaseBulkUpdateRequestAttributes" - type: - $ref: "#/components/schemas/CaseBulkResourceType" - required: - - attributes - - type - type: object CaseComment: description: Case comment properties: @@ -11464,75 +10993,6 @@ components: required: - data type: object - CaseCountGroup: - description: A facet group containing counts broken down by the distinct values of a case field (for example, status or priority). - properties: - group: - description: "The name of the field being grouped on (for example, `status` or `priority`)." - example: "status" - type: string - group_values: - description: Values within this group. - items: - $ref: "#/components/schemas/CaseCountGroupValue" - type: array - required: - - group - - group_values - type: object - CaseCountGroupValue: - description: A single value within a count group, representing the number of cases with that specific field value. - properties: - count: - description: Count of cases for this value. - example: 42 - format: int64 - type: integer - value: - description: The group value. - example: "OPEN" - type: string - required: - - value - - count - type: object - CaseCountResponse: - description: Response containing the total number of cases matching a query, optionally grouped by specified fields. - properties: - data: - $ref: "#/components/schemas/CaseCountResponseData" - required: - - data - type: object - CaseCountResponseAttributes: - description: Attributes for the count response, including the total count and optional facet breakdowns. - properties: - groups: - description: List of facet groups, one per field specified in `group_bys`. - items: - $ref: "#/components/schemas/CaseCountGroup" - type: array - required: - - groups - type: object - CaseCountResponseData: - description: Data object containing the count results, including per-field group breakdowns. - properties: - attributes: - $ref: "#/components/schemas/CaseCountResponseAttributes" - id: - description: Count response identifier. - example: "count-result-001" - type: string - type: - description: Count resource type. - example: "count" - type: string - required: - - type - - id - - attributes - type: object CaseCreate: description: Case creation data properties: @@ -11616,86 +11076,6 @@ components: required: - data type: object - CaseInsight: - description: A reference to an external Datadog resource that provides investigative context for a case, such as a security signal, monitor alert, error tracking issue, or incident. - properties: - ref: - description: "The URL path or deep link to the insight resource within Datadog (for example, `/monitors/12345?q=total`)." - example: "/monitors/12345?q=total" - type: string - resource_id: - description: The unique identifier of the referenced Datadog resource (for example, a monitor ID, incident ID, or signal ID). - example: "12345" - type: string - type: - $ref: "#/components/schemas/CaseInsightType" - required: - - type - - ref - - resource_id - type: object - CaseInsightType: - description: The type of Datadog resource linked to the case as contextual evidence. Each type corresponds to a different Datadog product signal (for example, a security finding, a monitor alert, or an incident). - enum: - - SECURITY_SIGNAL - - MONITOR - - EVENT_CORRELATION - - ERROR_TRACKING - - CLOUD_COST_RECOMMENDATION - - INCIDENT - - SENSITIVE_DATA_SCANNER_ISSUE - - EVENT - - WATCHDOG_STORY - - WIDGET - - SECURITY_FINDING - - INSIGHT_SCORECARD_CAMPAIGN - - RESOURCE_POLICY - - APM_RECOMMENDATION - - SCM_URL - - PROFILING_DOWNSIZING_EXPERIMENT - example: SECURITY_SIGNAL - type: string - x-enum-varnames: - - SECURITY_SIGNAL - - MONITOR - - EVENT_CORRELATION - - ERROR_TRACKING - - CLOUD_COST_RECOMMENDATION - - INCIDENT - - SENSITIVE_DATA_SCANNER_ISSUE - - EVENT - - WATCHDOG_STORY - - WIDGET - - SECURITY_FINDING - - INSIGHT_SCORECARD_CAMPAIGN - - RESOURCE_POLICY - - APM_RECOMMENDATION - - SCM_URL - - PROFILING_DOWNSIZING_EXPERIMENT - CaseInsightsAttributes: - description: Attributes for adding or removing insights from a case. - properties: - insights: - description: Array of insights to add to or remove from a case. - items: - $ref: "#/components/schemas/CaseInsight" - maxItems: 100 - minItems: 1 - type: array - required: - - insights - type: object - CaseInsightsData: - description: Data object containing the insights to add or remove. - properties: - attributes: - $ref: "#/components/schemas/CaseInsightsAttributes" - type: - $ref: "#/components/schemas/CaseResourceType" - required: - - type - - attributes - type: object CaseInsightsItems: description: An insight of the case. properties: @@ -11712,106 +11092,6 @@ components: example: "SECURITY_FINDING" type: string type: object - CaseInsightsRequest: - description: Request payload for adding or removing case insights. - properties: - data: - $ref: "#/components/schemas/CaseInsightsData" - required: - - data - type: object - CaseLink: - description: "A directional link representing a relationship between two entities. At least one entity must be a case." - properties: - attributes: - $ref: "#/components/schemas/CaseLinkAttributes" - id: - description: "The case link identifier." - example: "804cd682-55f6-4541-ab00-b608b282ea7d" - type: string - type: - $ref: "#/components/schemas/CaseLinkResourceType" - required: - - id - - type - - attributes - type: object - CaseLinkAttributes: - description: "Attributes describing a directional relationship between two entities (cases, incidents, or pages)." - properties: - child_entity_id: - description: "The UUID of the child (target) entity in the relationship." - example: "4417921d-0866-4a38-822c-6f2a0f65f77d" - type: string - child_entity_type: - description: "The type of the child entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`." - example: "CASE" - type: string - parent_entity_id: - description: "The UUID of the parent (source) entity in the relationship." - example: "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f" - type: string - parent_entity_type: - description: "The type of the parent entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`." - example: "CASE" - type: string - relationship: - description: "The type of directional relationship. Allowed values: `RELATES_TO` (bidirectional association), `CAUSES` (parent causes child), `BLOCKS` (parent blocks child), `DUPLICATES` (parent duplicates child), `PARENT_OF` (hierarchical), `SUCCESSOR_OF` (sequence), `ESCALATES_TO` (priority escalation)." - example: "BLOCKS" - type: string - required: - - relationship - - parent_entity_id - - parent_entity_type - - child_entity_id - - child_entity_type - type: object - CaseLinkCreate: - description: "Data object for creating a case link." - properties: - attributes: - $ref: "#/components/schemas/CaseLinkAttributes" - type: - $ref: "#/components/schemas/CaseLinkResourceType" - required: - - type - - attributes - type: object - CaseLinkCreateRequest: - description: "Request payload for creating a link between two entities." - properties: - data: - $ref: "#/components/schemas/CaseLinkCreate" - required: - - data - type: object - CaseLinkResourceType: - description: "JSON:API resource type for case links." - enum: - - link - example: link - type: string - x-enum-varnames: - - LINK - CaseLinkResponse: - description: "Response containing a single case link." - properties: - data: - $ref: "#/components/schemas/CaseLink" - required: - - data - type: object - CaseLinksResponse: - description: "Response containing a list of case links." - properties: - data: - description: "A list of case links." - items: - $ref: "#/components/schemas/CaseLink" - type: array - required: - - data - type: object CaseManagementProject: description: Case management project. properties: @@ -12054,7 +11334,7 @@ components: description: An attribute value. type: string type: array - description: Key-value pairs of case attributes. Each key maps to an array of string values, used for flexible metadata such as labels or tags. + description: The definition of `CaseObjectAttributes` object. type: object CasePriority: default: NOT_DEFINED @@ -12089,7 +11369,7 @@ components: type: object CaseResourceType: default: case - description: JSON:API resource type for cases. + description: Case resource type enum: - case example: case @@ -12169,7 +11449,7 @@ components: x-enum-varnames: - STANDARD CaseTypeCreate: - description: Data object for creating a case type. + description: Case type properties: attributes: $ref: "#/components/schemas/CaseTypeResourceAttributes" @@ -12180,7 +11460,7 @@ components: - type type: object CaseTypeCreateRequest: - description: Request payload for creating a case type. + description: Case type create request properties: data: $ref: "#/components/schemas/CaseTypeCreate" @@ -12188,7 +11468,7 @@ components: - data type: object CaseTypeResource: - description: A case type that defines a classification category for cases. Each case type can have its own custom attributes, statuses, and automation rules. + description: The definition of `CaseType` object. properties: attributes: $ref: "#/components/schemas/CaseTypeResourceAttributes" @@ -12200,24 +11480,24 @@ components: $ref: "#/components/schemas/CaseTypeResourceType" type: object CaseTypeResourceAttributes: - description: "Attributes of a case type, which define a classification category for cases. Organizations use case types to model different workflows (for example, Security Incident, Bug Report, Change Request)." + description: Case Type resource attributes properties: deleted_at: - description: Timestamp when the case type was marked as deleted. A null value indicates the case type is active. + description: Timestamp of when the case type was deleted format: date-time nullable: true readOnly: true type: string description: - description: A detailed description explaining when this case type should be used. + description: Case type description. example: "Investigations done in case management" type: string emoji: - description: An emoji icon representing the case type in the UI. + description: Case type emoji. example: "🕵🏻‍♂️" type: string name: - description: The display name of the case type, shown in the Case Management UI when creating or viewing cases. + description: Case type name. example: "Investigation" type: string required: @@ -12225,7 +11505,7 @@ components: type: object CaseTypeResourceType: default: case_type - description: JSON:API resource type for case types. + description: Case type resource type enum: - case_type example: case_type @@ -12233,31 +11513,13 @@ components: x-enum-varnames: - CASE_TYPE CaseTypeResponse: - description: Response containing a single case type. + description: Case type response properties: data: $ref: "#/components/schemas/CaseTypeResource" type: object - CaseTypeUpdate: - description: Data object for updating a case type. - properties: - attributes: - $ref: "#/components/schemas/CaseTypeResourceAttributes" - type: - $ref: "#/components/schemas/CaseTypeResourceType" - required: - - type - type: object - CaseTypeUpdateRequest: - description: Request payload for updating a case type. - properties: - data: - $ref: "#/components/schemas/CaseTypeUpdate" - required: - - data - type: object CaseTypesResponse: - description: Response containing a list of case types. + description: Case types response. properties: data: description: List of case types @@ -12292,35 +11554,6 @@ components: required: - data type: object - CaseUpdateComment: - description: Data object for updating a case comment. - properties: - attributes: - $ref: "#/components/schemas/CaseUpdateCommentAttributes" - type: - $ref: "#/components/schemas/CaseResourceType" - required: - - type - - attributes - type: object - CaseUpdateCommentAttributes: - description: Attributes for updating a comment. - properties: - comment: - description: The updated comment message. - example: "Updated comment text" - type: string - required: - - comment - type: object - CaseUpdateCommentRequest: - description: Request payload for updating a comment on a case timeline. - properties: - data: - $ref: "#/components/schemas/CaseUpdateComment" - required: - - data - type: object CaseUpdateCustomAttribute: description: Case update custom attribute properties: @@ -12369,35 +11602,6 @@ components: required: - data type: object - CaseUpdateDueDate: - description: Data object for updating a case's due date. - properties: - attributes: - $ref: "#/components/schemas/CaseUpdateDueDateAttributes" - type: - $ref: "#/components/schemas/CaseResourceType" - required: - - attributes - - type - type: object - CaseUpdateDueDateAttributes: - description: Attributes for setting or clearing a case's due date. - properties: - due_date: - description: "The target resolution date for the case, in `YYYY-MM-DD` format. Set to `null` to clear the due date." - example: "2026-12-31" - type: string - required: - - due_date - type: object - CaseUpdateDueDateRequest: - description: Request payload for updating a case's due date. - properties: - data: - $ref: "#/components/schemas/CaseUpdateDueDate" - required: - - data - type: object CaseUpdatePriority: description: Case priority status properties: @@ -12425,35 +11629,6 @@ components: required: - data type: object - CaseUpdateResolvedReason: - description: Data object for updating a case's resolved reason. - properties: - attributes: - $ref: "#/components/schemas/CaseUpdateResolvedReasonAttributes" - type: - $ref: "#/components/schemas/CaseResourceType" - required: - - attributes - - type - type: object - CaseUpdateResolvedReasonAttributes: - description: Attributes for setting the resolution reason on a security case. - properties: - security_resolved_reason: - description: "The reason the security case was resolved (for example, `FALSE_POSITIVE`, `TRUE_POSITIVE`, `BENIGN_POSITIVE`)." - example: "FALSE_POSITIVE" - type: string - required: - - security_resolved_reason - type: object - CaseUpdateResolvedReasonRequest: - description: Request payload for updating the resolution reason on a closed security case. - properties: - data: - $ref: "#/components/schemas/CaseUpdateResolvedReason" - required: - - data - type: object CaseUpdateStatus: description: Case update status properties: @@ -12511,217 +11686,6 @@ components: required: - data type: object - CaseView: - description: A saved case view that provides a filtered, reusable list of cases matching a specific query. Views act as persistent dashboards for monitoring case subsets. - properties: - attributes: - $ref: "#/components/schemas/CaseViewAttributes" - id: - description: The view's identifier. - example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: string - relationships: - $ref: "#/components/schemas/CaseViewRelationships" - type: - $ref: "#/components/schemas/CaseViewResourceType" - required: - - id - - type - - attributes - type: object - CaseViewAttributes: - description: Attributes of a case view, including the filter query and optional notification rule. - properties: - created_at: - description: Timestamp when the view was created. - example: "2024-01-01T00:00:00.000Z" - format: date-time - readOnly: true - type: string - modified_at: - description: Timestamp when the view was last modified. - format: date-time - readOnly: true - type: string - name: - description: A human-readable name for the view, displayed in the Case Management UI. - example: Open bugs - type: string - np_rule_id: - description: The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - type: string - query: - description: "The search query that determines which cases appear in this view. Uses the same syntax as the Case Management search bar (for example, `status:open priority:P1`)." - example: "status:open type:bug" - type: string - required: - - name - - query - - created_at - type: object - CaseViewCreate: - description: Data object for creating a case view. - properties: - attributes: - $ref: "#/components/schemas/CaseViewCreateAttributes" - type: - $ref: "#/components/schemas/CaseViewResourceType" - required: - - type - - attributes - type: object - CaseViewCreateAttributes: - description: Attributes required to create a case view. - properties: - name: - description: The name of the view. - example: Open bugs - type: string - np_rule_id: - description: The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - type: string - project_id: - description: The UUID of the project this view belongs to. Views are scoped to a single project. - example: e555e290-ed65-49bd-ae18-8acbfcf18db7 - type: string - query: - description: The query used to filter cases in this view. - example: "status:open type:bug" - type: string - required: - - name - - query - - project_id - type: object - CaseViewCreateRequest: - description: Request payload for creating a case view. - properties: - data: - $ref: "#/components/schemas/CaseViewCreate" - required: - - data - type: object - CaseViewRelationships: - description: Related resources for the case view, including the creator, last modifier, and associated project. - properties: - created_by: - $ref: "#/components/schemas/NullableUserRelationship" - modified_by: - $ref: "#/components/schemas/NullableUserRelationship" - project: - $ref: "#/components/schemas/ProjectRelationship" - type: object - CaseViewResourceType: - default: view - description: "JSON:API resource type for case views." - enum: - - view - example: view - type: string - x-enum-varnames: - - VIEW - CaseViewResponse: - description: Response containing a single case view. - properties: - data: - $ref: "#/components/schemas/CaseView" - required: - - data - type: object - CaseViewUpdate: - description: Data object for updating a case view. - properties: - attributes: - $ref: "#/components/schemas/CaseViewUpdateAttributes" - type: - $ref: "#/components/schemas/CaseViewResourceType" - required: - - type - type: object - CaseViewUpdateAttributes: - description: Attributes that can be updated on a case view. All fields are optional; only provided fields are changed. - properties: - name: - description: The name of the view. - type: string - np_rule_id: - description: The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - type: string - query: - description: The query used to filter cases in this view. - type: string - type: object - CaseViewUpdateRequest: - description: Request payload for updating a case view. - properties: - data: - $ref: "#/components/schemas/CaseViewUpdate" - required: - - data - type: object - CaseViewsResponse: - description: Response containing a list of case views. - properties: - data: - description: A list of case views. - items: - $ref: "#/components/schemas/CaseView" - type: array - required: - - data - type: object - CaseWatcher: - description: Represents a user who is subscribed to notifications for a case. Watchers receive updates when the case's status, priority, assignee, or comments change. - properties: - id: - description: The primary identifier of the case watcher. - example: "8146583c-0b5f-11ec-abf8-da7ad0900001" - type: string - relationships: - $ref: "#/components/schemas/CaseWatcherRelationships" - type: - $ref: "#/components/schemas/CaseWatcherResourceType" - required: - - id - - type - - relationships - type: object - CaseWatcherRelationships: - description: Relationships for a case watcher, linking to the underlying user resource. - properties: - user: - $ref: "#/components/schemas/CaseWatcherUserRelationship" - required: - - user - type: object - CaseWatcherResourceType: - default: watcher - description: JSON:API resource type for case watchers. - enum: - - watcher - example: watcher - type: string - x-enum-varnames: - - WATCHER - CaseWatcherUserRelationship: - description: The user relationship for a case watcher. - properties: - data: - $ref: "#/components/schemas/UserRelationshipData" - required: - - data - type: object - CaseWatchersResponse: - description: Response containing the list of users watching a case. - properties: - data: - description: List of case watchers. - items: - $ref: "#/components/schemas/CaseWatcher" - type: array - required: - - data - type: object CasesResponse: description: Response with cases properties: @@ -21375,7 +20339,7 @@ components: $ref: "#/components/schemas/CsmServerlessCoverageAnalysisData" type: object CustomAttributeConfig: - description: "A custom attribute configuration that defines an organization-specific metadata field on cases. Custom attributes are scoped to a case type and can hold text, URLs, numbers, or predefined select options." + description: The definition of `CustomAttributeConfig` object. properties: attributes: $ref: "#/components/schemas/CustomAttributeConfigResourceAttributes" @@ -21387,22 +20351,22 @@ components: $ref: "#/components/schemas/CustomAttributeConfigResourceType" type: object CustomAttributeConfigAttributesCreate: - description: Attributes required to create a custom attribute configuration. + description: Custom attribute config resource attributes properties: description: - description: A description explaining the purpose and expected values for this custom attribute. + description: Custom attribute description. example: "AWS Region, must be a valid region supported by AWS" type: string display_name: - description: The human-readable label shown in the Case Management UI for this custom attribute. + description: Custom attribute name. example: "AWS Region" type: string is_multi: - description: "If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed." + description: Whether multiple values can be set example: true type: boolean key: - description: The programmatic key used to reference this custom attribute in search queries and API calls. + description: Custom attribute key. This will be the value use to search on this custom attribute example: "aws_region" type: string type: @@ -21414,7 +20378,7 @@ components: - is_multi type: object CustomAttributeConfigCreate: - description: Data object for creating a custom attribute configuration. + description: Custom attribute config properties: attributes: $ref: "#/components/schemas/CustomAttributeConfigAttributesCreate" @@ -21425,7 +20389,7 @@ components: - type type: object CustomAttributeConfigCreateRequest: - description: Request payload for creating a custom attribute configuration. + description: Custom attribute config create request properties: data: $ref: "#/components/schemas/CustomAttributeConfigCreate" @@ -21433,26 +20397,26 @@ components: - data type: object CustomAttributeConfigResourceAttributes: - description: "Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type." + description: Custom attribute resource attributes properties: case_type_id: - description: The UUID of the case type this custom attribute belongs to. + description: Custom attribute config identifier. example: "aeadc05e-98a8-11ec-ac2c-da7ad0900001" type: string description: - description: A description explaining the purpose and expected values for this custom attribute. + description: Custom attribute description. example: "AWS Region, must be a valid region supported by AWS" type: string display_name: - description: The human-readable label shown in the Case Management UI for this custom attribute. + description: Custom attribute name. example: "AWS Region" type: string is_multi: - description: "If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed." + description: Whether multiple values can be set example: true type: boolean key: - description: The programmatic key used to reference this custom attribute in search queries and API calls. + description: Custom attribute key. This will be the value use to search on this custom attribute example: "aws_region" type: string type: @@ -21466,7 +20430,7 @@ components: type: object CustomAttributeConfigResourceType: default: custom_attribute - description: JSON:API resource type for custom attribute configurations. + description: Custom attributes config JSON:API resource type enum: - custom_attribute example: custom_attribute @@ -21474,50 +20438,13 @@ components: x-enum-varnames: - CUSTOM_ATTRIBUTE CustomAttributeConfigResponse: - description: Response containing a single custom attribute configuration. + description: Custom attribute config response. properties: data: $ref: "#/components/schemas/CustomAttributeConfig" type: object - CustomAttributeConfigUpdate: - description: Data object for updating a custom attribute configuration. - properties: - attributes: - $ref: "#/components/schemas/CustomAttributeConfigUpdateAttributes" - type: - $ref: "#/components/schemas/CustomAttributeConfigResourceType" - required: - - type - type: object - CustomAttributeConfigUpdateAttributes: - description: Attributes that can be updated on a custom attribute configuration. All fields are optional; only provided fields are changed. - properties: - description: - description: A description explaining the purpose and expected values for this custom attribute. - example: "Updated description." - type: string - display_name: - description: The human-readable label shown in the Case Management UI for this custom attribute. - example: "AWS Region" - type: string - map_from: - description: An external field identifier to auto-populate this attribute from (used for integrations with external systems). - type: string - type: - $ref: "#/components/schemas/CustomAttributeType" - type_data: - $ref: "#/components/schemas/CustomAttributeTypeData" - type: object - CustomAttributeConfigUpdateRequest: - description: Request payload for updating a custom attribute configuration. - properties: - data: - $ref: "#/components/schemas/CustomAttributeConfigUpdate" - required: - - data - type: object CustomAttributeConfigsResponse: - description: Response containing a list of custom attribute configurations. + description: Custom attribute configs response. properties: data: description: List of custom attribute configs of case type @@ -21526,37 +20453,27 @@ components: type: array type: object CustomAttributeMultiNumberValue: - description: An array of numeric values for a multi-value NUMBER-type custom attribute. + description: Values of multi NUMBER custom attribute items: description: NUMBER value format: double type: number type: array CustomAttributeMultiStringValue: - description: An array of string values for a multi-value TEXT, URL, or SELECT-type custom attribute. + description: Value of multi TEXT/URL/NUMBER/SELECT custom attribute items: description: TEXT/URL/NUMBER/SELECT Value type: string type: array CustomAttributeNumberValue: - description: A numeric value for a NUMBER-type custom attribute. + description: Value of NUMBER custom attribute format: double type: number - CustomAttributeSelectOption: - description: A selectable option for a SELECT-type custom attribute. - properties: - value: - description: Option value. - example: "us-east-1" - type: string - required: - - value - type: object CustomAttributeStringValue: - description: A string value for a TEXT, URL, or SELECT-type custom attribute. + description: Value of TEXT/URL/NUMBER/SELECT custom attribute type: string CustomAttributeType: - description: "The data type of the custom attribute, which determines the allowed values and UI input control." + description: Custom attributes type enum: - URL - TEXT @@ -21569,17 +20486,8 @@ components: - TEXT - NUMBER - SELECT - CustomAttributeTypeData: - description: "Type-specific configuration for the custom attribute. For SELECT-type attributes, this contains the list of allowed options." - properties: - options: - description: Options for SELECT type custom attributes. - items: - $ref: "#/components/schemas/CustomAttributeSelectOption" - type: array - type: object CustomAttributeValue: - description: A typed value for a custom attribute on a specific case. + description: Custom attribute values properties: is_multi: description: If true, value must be an array @@ -21595,7 +20503,7 @@ components: - value type: object CustomAttributeValuesUnion: - description: The value of a custom attribute. The accepted format depends on the attribute's type and whether it accepts multiple values. + description: Union of supported value for a custom attribute example: "" oneOf: - $ref: "#/components/schemas/CustomAttributeStringValue" @@ -46366,167 +45274,6 @@ components: - type - id type: object - MaintenanceWindow: - description: A maintenance window that defines a scheduled time period during which case-related notifications and automation rules are suppressed. Each maintenance window applies to cases matching a specified query. - properties: - attributes: - $ref: "#/components/schemas/MaintenanceWindowAttributes" - id: - description: The maintenance window's identifier. - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - type: string - type: - $ref: "#/components/schemas/MaintenanceWindowResourceType" - required: - - id - - type - - attributes - type: object - MaintenanceWindowAttributes: - description: Attributes of a maintenance window, including its schedule and the query that determines which cases are affected. - properties: - created_by: - description: The UUID of the user who created this maintenance window. Read-only. - readOnly: true - type: string - end_at: - description: The ISO 8601 timestamp when the maintenance window ends and normal notification behavior resumes. - example: "2026-06-01T06:00:00Z" - format: date-time - type: string - name: - description: "A human-readable name for the maintenance window (for example, `Database migration - Dec 15`)." - example: "Weekly maintenance" - type: string - query: - description: A case search query that determines which cases are affected during the maintenance window. Uses the same syntax as the Case Management search bar. - example: "project:SEC" - type: string - start_at: - description: The ISO 8601 timestamp when the maintenance window begins and notifications start being suppressed. - example: "2026-06-01T00:00:00Z" - format: date-time - type: string - updated_by: - description: The UUID of the user who last modified this maintenance window. Read-only. - readOnly: true - type: string - required: - - name - - query - - start_at - - end_at - type: object - MaintenanceWindowCreate: - description: Data object for creating a maintenance window. - properties: - attributes: - $ref: "#/components/schemas/MaintenanceWindowCreateAttributes" - type: - $ref: "#/components/schemas/MaintenanceWindowResourceType" - required: - - type - - attributes - type: object - MaintenanceWindowCreateAttributes: - description: Attributes required to create a maintenance window. - properties: - end_at: - description: The end time of the maintenance window. - example: "2026-06-01T06:00:00Z" - format: date-time - type: string - name: - description: The name of the maintenance window. - example: "Weekly maintenance" - type: string - query: - description: The query to filter event management cases for this maintenance window. - example: "project:SEC" - type: string - start_at: - description: The start time of the maintenance window. - example: "2026-06-01T00:00:00Z" - format: date-time - type: string - required: - - name - - query - - start_at - - end_at - type: object - MaintenanceWindowCreateRequest: - description: Request payload for creating a maintenance window. - properties: - data: - $ref: "#/components/schemas/MaintenanceWindowCreate" - required: - - data - type: object - MaintenanceWindowResourceType: - default: maintenance_window - description: JSON:API resource type for maintenance windows. - enum: - - maintenance_window - example: maintenance_window - type: string - x-enum-varnames: - - MAINTENANCE_WINDOW - MaintenanceWindowResponse: - description: Response containing a single maintenance window. - properties: - data: - $ref: "#/components/schemas/MaintenanceWindow" - required: - - data - type: object - MaintenanceWindowUpdate: - description: Data object for updating a maintenance window. - properties: - attributes: - $ref: "#/components/schemas/MaintenanceWindowUpdateAttributes" - type: - $ref: "#/components/schemas/MaintenanceWindowResourceType" - required: - - type - type: object - MaintenanceWindowUpdateAttributes: - description: Attributes that can be updated on a maintenance window. All fields are optional; only provided fields are changed. - properties: - end_at: - description: The end time of the maintenance window. - format: date-time - type: string - name: - description: The name of the maintenance window. - type: string - query: - description: The query to filter event management cases for this maintenance window. - type: string - start_at: - description: The start time of the maintenance window. - format: date-time - type: string - type: object - MaintenanceWindowUpdateRequest: - description: Request payload for updating a maintenance window. - properties: - data: - $ref: "#/components/schemas/MaintenanceWindowUpdate" - required: - - data - type: object - MaintenanceWindowsResponse: - description: Response containing a list of maintenance windows. - properties: - data: - description: List of maintenance windows. - items: - $ref: "#/components/schemas/MaintenanceWindow" - type: array - required: - - data - type: object ManagedOrgsData: description: The managed organizations resource. properties: @@ -49952,6 +48699,118 @@ components: type: string x-enum-varnames: - ADD_HOSTNAME + ObservabilityPipelineAddMetricTagsProcessor: + description: |- + The `add_metric_tags` processor adds static tags to metrics. + + **Supported pipeline types:** metrics + properties: + display_name: + $ref: "#/components/schemas/ObservabilityPipelineComponentDisplayName" + enabled: + description: Indicates whether the processor is enabled. + example: true + type: boolean + id: + description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). + example: "add-metric-tags-processor" + type: string + include: + description: A Datadog search query used to determine which metrics this processor targets. + example: "*" + type: string + tags: + description: A list of static tags (key-value pairs) added to each metric processed by this component. + items: + $ref: "#/components/schemas/ObservabilityPipelineFieldValue" + maxItems: 15 + type: array + type: + $ref: "#/components/schemas/ObservabilityPipelineAddMetricTagsProcessorType" + required: + - id + - type + - include + - tags + - enabled + type: object + x-pipeline-types: [metrics] + ObservabilityPipelineAddMetricTagsProcessorType: + default: add_metric_tags + description: The processor type. The value must be `add_metric_tags`. + enum: [add_metric_tags] + example: add_metric_tags + type: string + x-enum-varnames: + - ADD_METRIC_TAGS + ObservabilityPipelineAggregateProcessor: + description: |- + The `aggregate` processor combines metrics that share the same name and tags into a single metric over a configurable interval. + + **Supported pipeline types:** metrics + properties: + display_name: + $ref: "#/components/schemas/ObservabilityPipelineComponentDisplayName" + enabled: + description: Indicates whether the processor is enabled. + example: true + type: boolean + id: + description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). + example: "aggregate-processor" + type: string + include: + description: A Datadog search query used to determine which metrics this processor targets. + example: "*" + type: string + interval_secs: + description: The interval, in seconds, over which metrics are aggregated. + example: 10 + format: int64 + maximum: 60 + minimum: 1 + type: integer + mode: + $ref: "#/components/schemas/ObservabilityPipelineAggregateProcessorMode" + type: + $ref: "#/components/schemas/ObservabilityPipelineAggregateProcessorType" + required: + - id + - type + - include + - interval_secs + - mode + - enabled + type: object + x-pipeline-types: [metrics] + ObservabilityPipelineAggregateProcessorMode: + description: The aggregation mode applied to metrics that share the same name and tags within the interval. + enum: + - auto + - sum + - latest + - count + - max + - min + - mean + example: auto + type: string + x-enum-varnames: + - AUTO + - SUM + - LATEST + - COUNT + - MAX + - MIN + - MEAN + ObservabilityPipelineAggregateProcessorType: + default: aggregate + description: The processor type. The value must be `aggregate`. + enum: [aggregate] + example: aggregate + type: string + x-enum-varnames: + - AGGREGATE ObservabilityPipelineAmazonDataFirehoseSource: description: |- The `amazon_data_firehose` source ingests logs from AWS Data Firehose. @@ -50663,7 +49522,11 @@ components: - $ref: "#/components/schemas/ObservabilityPipelineSensitiveDataScannerProcessor" - $ref: "#/components/schemas/ObservabilityPipelineSplitArrayProcessor" - $ref: "#/components/schemas/ObservabilityPipelineThrottleProcessor" + - $ref: "#/components/schemas/ObservabilityPipelineAddMetricTagsProcessor" + - $ref: "#/components/schemas/ObservabilityPipelineAggregateProcessor" - $ref: "#/components/schemas/ObservabilityPipelineMetricTagsProcessor" + - $ref: "#/components/schemas/ObservabilityPipelineRenameMetricTagsProcessor" + - $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessor" ObservabilityPipelineConfigSourceItem: description: "A data source for the pipeline." oneOf: @@ -53625,6 +52488,65 @@ components: type: string x-enum-varnames: - RENAME_FIELDS + ObservabilityPipelineRenameMetricTagsProcessor: + description: |- + The `rename_metric_tags` processor changes the keys of tags on metrics. + + **Supported pipeline types:** metrics + properties: + display_name: + $ref: "#/components/schemas/ObservabilityPipelineComponentDisplayName" + enabled: + description: Indicates whether the processor is enabled. + example: true + type: boolean + id: + description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). + example: "rename-metric-tags-processor" + type: string + include: + description: A Datadog search query used to determine which metrics this processor targets. + example: "*" + type: string + tags: + description: A list of rename rules specifying which tag keys to rename on each metric. + items: + $ref: "#/components/schemas/ObservabilityPipelineRenameMetricTagsProcessorTag" + maxItems: 15 + type: array + type: + $ref: "#/components/schemas/ObservabilityPipelineRenameMetricTagsProcessorType" + required: + - id + - type + - include + - tags + - enabled + type: object + x-pipeline-types: [metrics] + ObservabilityPipelineRenameMetricTagsProcessorTag: + description: Defines how to rename a tag on metric events. + properties: + rename_to: + description: The new tag key to assign in place of the original. + example: "destination_tag" + type: string + tag: + description: The original tag key on the metric event. + example: "source_tag" + type: string + required: + - tag + - rename_to + type: object + ObservabilityPipelineRenameMetricTagsProcessorType: + default: rename_metric_tags + description: The processor type. The value must be `rename_metric_tags`. + enum: [rename_metric_tags] + example: rename_metric_tags + type: string + x-enum-varnames: + - RENAME_METRIC_TAGS ObservabilityPipelineRsyslogDestination: description: |- The `rsyslog` destination forwards logs to an external `rsyslog` server over TCP or UDP using the syslog protocol. @@ -54816,6 +53738,141 @@ components: x-enum-varnames: - TCP - UDP + ObservabilityPipelineTagCardinalityLimitProcessor: + description: |- + The `tag_cardinality_limit` processor caps the number of distinct tag value combinations on metrics, dropping tags or events once the limit is exceeded. + + **Supported pipeline types:** metrics + properties: + display_name: + $ref: "#/components/schemas/ObservabilityPipelineComponentDisplayName" + enabled: + description: Indicates whether the processor is enabled. + example: true + type: boolean + id: + description: The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). + example: "tag-cardinality-limit-processor" + type: string + include: + description: A Datadog search query used to determine which metrics this processor targets. + example: "*" + type: string + limit_exceeded_action: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorAction" + per_metric_limits: + description: A list of per-metric cardinality overrides that take precedence over the default `value_limit`. + items: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit" + maxItems: 100 + type: array + type: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorType" + value_limit: + description: The default maximum number of distinct tag value combinations allowed per metric. + example: 10000 + format: int64 + maximum: 1000000 + minimum: 0 + type: integer + required: + - id + - type + - include + - limit_exceeded_action + - value_limit + - enabled + type: object + x-pipeline-types: [metrics] + ObservabilityPipelineTagCardinalityLimitProcessorAction: + description: The action to take when the cardinality limit is exceeded. + enum: + - drop_tag + - drop_event + example: drop_tag + type: string + x-enum-varnames: + - DROP_TAG + - DROP_EVENT + ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit: + description: A cardinality override applied to a specific metric. + properties: + limit_exceeded_action: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorAction" + metric_name: + description: The name of the metric this override applies to. + example: "system.cpu.user" + type: string + mode: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode" + per_tag_limits: + description: A list of per-tag cardinality overrides that apply within this metric. + items: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit" + maxItems: 50 + type: array + value_limit: + description: The maximum number of distinct tag value combinations allowed for this metric. + example: 10000 + format: int64 + maximum: 1000000 + minimum: 0 + type: integer + required: + - metric_name + - mode + - limit_exceeded_action + - value_limit + type: object + ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode: + description: How the per-metric override is applied. `tracked` enforces a custom limit; `excluded` skips the metric entirely. + enum: + - tracked + - excluded + example: tracked + type: string + x-enum-varnames: + - TRACKED + - EXCLUDED + ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit: + description: A cardinality override for a specific tag key within a per-metric limit. + properties: + mode: + $ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode" + tag_key: + description: The tag key this override applies to. + example: "host" + type: string + value_limit: + description: The maximum number of distinct values allowed for this tag. + example: 5000 + format: int64 + maximum: 1000000 + minimum: 0 + type: integer + required: + - tag_key + - mode + - value_limit + type: object + ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode: + description: How the per-tag override is applied. `limit_override` enforces a custom limit on the tag; `excluded` skips the tag from cardinality tracking. + enum: + - limit_override + - excluded + example: limit_override + type: string + x-enum-varnames: + - LIMIT_OVERRIDE + - EXCLUDED + ObservabilityPipelineTagCardinalityLimitProcessorType: + default: tag_cardinality_limit + description: The processor type. The value must be `tag_cardinality_limit`. + enum: [tag_cardinality_limit] + example: tag_cardinality_limit + type: string + x-enum-varnames: + - TAG_CARDINALITY_LIMIT ObservabilityPipelineThrottleProcessor: description: |- The `throttle` processor limits the number of events that pass through over a given time window. @@ -59900,39 +58957,6 @@ components: required: - data type: object - ProjectFavorite: - description: Represents a case project that the current user has bookmarked for quick access. Favorited projects appear prominently in the Case Management UI. - properties: - id: - description: The UUID of the favorited project. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - type: string - type: - $ref: "#/components/schemas/ProjectFavoriteResourceType" - required: - - id - - type - type: object - ProjectFavoriteResourceType: - default: project_favorite - description: "JSON:API resource type for project favorites." - enum: - - project_favorite - example: project_favorite - type: string - x-enum-varnames: - - PROJECT_FAVORITE - ProjectFavoritesResponse: - description: Response containing the list of projects the current user has favorited. - properties: - data: - description: List of project favorites. - items: - $ref: "#/components/schemas/ProjectFavorite" - type: array - required: - - data - type: object ProjectNotificationSettings: description: Project notification settings. properties: @@ -83066,7 +82090,7 @@ components: - restrictions type: object TimelineCell: - description: "Attributes of a timeline cell, representing a single event in a case's chronological activity log (for example, a comment, status change, or assignment update)." + description: timeline cell properties: author: $ref: "#/components/schemas/TimelineCellAuthor" @@ -83091,11 +82115,11 @@ components: $ref: "#/components/schemas/TimelineCellType" type: object TimelineCellAuthor: - description: The author of the timeline cell. Currently only user authors are supported. + description: author of the timeline cell oneOf: - $ref: "#/components/schemas/TimelineCellAuthorUser" TimelineCellAuthorUser: - description: A user who authored a timeline cell. + description: timeline cell user author properties: content: $ref: "#/components/schemas/TimelineCellAuthorUserContent" @@ -83103,23 +82127,23 @@ components: $ref: "#/components/schemas/TimelineCellAuthorUserType" type: object TimelineCellAuthorUserContent: - description: Profile information for the user who authored the timeline cell. + description: user author content. properties: email: - description: The email address of the user. + description: user email type: string handle: - description: The Datadog handle of the user. + description: user handle type: string id: - description: The UUID of the user. + description: user UUID type: string name: - description: The display name of the user. + description: user name type: string type: object TimelineCellAuthorUserType: - description: The type of timeline cell author. Currently only `USER` is supported. + description: user author type. enum: - USER example: USER @@ -83127,18 +82151,18 @@ components: x-enum-varnames: - USER TimelineCellContent: - description: The content payload of a timeline cell, varying by cell type. + description: timeline cell content oneOf: - $ref: "#/components/schemas/TimelineCellContentComment" TimelineCellContentComment: - description: The content of a comment timeline cell. + description: comment content properties: message: - description: The text content of the comment. Supports Markdown formatting. + description: comment message type: string type: object TimelineCellResource: - description: A timeline cell resource representing a single entry in a case's activity timeline. + description: Timeline cell JSON:API resource properties: attributes: $ref: "#/components/schemas/TimelineCell" @@ -83155,7 +82179,7 @@ components: type: object TimelineCellResourceType: default: timeline_cell - description: JSON:API resource type for timeline cells. + description: Timeline cell JSON:API resource type enum: - timeline_cell example: timeline_cell @@ -83163,7 +82187,7 @@ components: x-enum-varnames: - TIMELINE_CELL TimelineCellType: - description: The type of content in the timeline cell. Currently only `COMMENT` is supported in this endpoint. + description: Timeline cell content type enum: - COMMENT example: COMMENT @@ -83171,7 +82195,7 @@ components: x-enum-varnames: - COMMENT TimelineResponse: - description: Response containing the chronological list of timeline cells for a case. + description: Timeline response properties: data: description: The `TimelineResponse` `data`. @@ -87808,7 +86832,6 @@ components: bits_investigations_read: View Bits AI investigations. bits_investigations_write: Create and manage Bits AI investigations. cases_read: View Cases. - cases_shared_settings_write: Update shared case management settings. cases_write: Create and update cases. ci_visibility_pipelines_write: Create CI Visibility pipeline spans using the API. ci_visibility_read: View CI Visibility. @@ -87830,8 +86853,6 @@ components: embeddable_graphs_share: Generate public links to share embeddable graphs externally. error_tracking_read: Read Error Tracking data. error_tracking_write: Edit Error Tracking issues. - event_correlation_config_read: View event correlation configurations. - event_correlation_config_write: Create and update event correlation configurations. events_read: Read Events data. hosts_read: List hosts and their attributes. incident_notification_settings_read: View Incident Notification Rule Settings. @@ -94660,336 +93681,6 @@ paths: summary: Create a case tags: - Case Management - /api/v2/cases/aggregate: - post: - description: Performs an aggregation query over cases, grouping results by specified fields and returning counts per group along with a total. Useful for dashboards and analytics. - operationId: AggregateCases - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - group_by: - groups: - - "status" - limit: 14 - query_filter: "service:case-api" - type: aggregate - schema: - $ref: "#/components/schemas/CaseAggregateRequest" - description: Case aggregate request payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - groups: - - group: OPEN - value: - - 42.0 - total: 100.0 - id: agg-result-001 - type: aggregate - schema: - $ref: "#/components/schemas/CaseAggregateResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: Aggregate cases - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/bulk: - post: - description: Applies a single action (such as changing priority, status, assignment, or archiving) to multiple cases at once. The list of case IDs and the action type with its payload are specified in the request body. - operationId: BulkUpdateCases - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - case_ids: - - "case-id-1" - - "case-id-2" - payload: - priority: "P1" - type: priority - type: bulk - schema: - $ref: "#/components/schemas/CaseBulkUpdateRequest" - description: Case bulk update request payload. - required: true - responses: - "200": - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Bulk update cases - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/count: - get: - description: Returns case counts, optionally grouped by one or more fields (for example, status, priority). Supports a query filter to narrow the scope. - operationId: CountCases - parameters: - - description: Filter query for cases. - in: query - name: query_filter - required: false - schema: - type: string - - description: Comma-separated fields to group by. - example: "status,priority" - in: query - name: group_bys - required: false - schema: - type: string - - description: Maximum facet values to return. - in: query - name: limit - required: false - schema: - type: integer - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - groups: - - group: status - group_values: - - count: 42 - value: OPEN - id: count-result-001 - type: count - schema: - $ref: "#/components/schemas/CaseCountResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: Count cases - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/link: - get: - description: Returns all links associated with a case. Links define relationships (for example, BLOCKS) between cases. Requires entity_type and entity_id query parameters. - operationId: ListCaseLinks - parameters: - - description: "The entity type to look up links for. Use `CASE` to find links for a specific case." - in: query - name: entity_type - required: true - schema: - example: "CASE" - type: string - - description: "The UUID of the entity to look up links for." - in: query - name: entity_id - required: true - schema: - example: "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f" - type: string - - description: "Optional filter to only return links of a specific relationship type (for example, `BLOCKS` or `CAUSES`)." - in: query - name: relationship - required: false - schema: - example: "BLOCKS" - type: string - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - child_entity_id: 4417921d-0866-4a38-822c-6f2a0f65f77d - child_entity_type: CASE - parent_entity_id: bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f - parent_entity_type: CASE - relationship: BLOCKS - id: 804cd682-55f6-4541-ab00-b608b282ea7d - type: link - schema: - $ref: "#/components/schemas/CaseLinksResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: List case links - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Creates a directional link between two cases (for example, case A blocks case B). The parent and child cases and their relationship type must be specified. - operationId: CreateCaseLink - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - child_entity_id: 4417921d-0866-4a38-822c-6f2a0f65f77d - child_entity_type: CASE - parent_entity_id: bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f - parent_entity_type: CASE - relationship: BLOCKS - type: link - schema: - $ref: "#/components/schemas/CaseLinkCreateRequest" - description: "Case link create request." - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - child_entity_id: 4417921d-0866-4a38-822c-6f2a0f65f77d - child_entity_type: CASE - parent_entity_id: bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f - parent_entity_type: CASE - relationship: BLOCKS - id: 804cd682-55f6-4541-ab00-b608b282ea7d - type: link - schema: - $ref: "#/components/schemas/CaseLinkResponse" - description: Created - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Create a case link - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/link/{link_id}: - delete: - description: Deletes an existing link between cases by link ID. - operationId: DeleteCaseLink - parameters: - - $ref: "#/components/parameters/LinkIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Delete a case link - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/projects: get: description: >- @@ -95081,44 +93772,6 @@ paths: summary: Create a project tags: - Case Management - /api/v2/cases/projects/favorites: - get: - description: Returns the list of case projects that the current authenticated user has marked as favorites. - operationId: ListUserCaseProjectFavorites - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - id: e555e290-ed65-49bd-ae18-8acbfcf18db7 - type: project_favorite - schema: - $ref: "#/components/schemas/ProjectFavoritesResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: List project favorites - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/projects/{project_id}: delete: description: Remove a project using the project's `id`. @@ -95238,65 +93891,6 @@ paths: summary: Update a project tags: - Case Management - /api/v2/cases/projects/{project_id}/favorites: - delete: - description: Removes a case project from the current user's favorites list. - operationId: UnfavoriteCaseProject - parameters: - - $ref: "#/components/parameters/ProjectIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Unfavorite a project - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Marks a case project as a favorite for the current authenticated user. - operationId: FavoriteCaseProject - parameters: - - $ref: "#/components/parameters/ProjectIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Favorite a project - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/projects/{project_id}/notification_rules: get: description: >- @@ -95505,418 +94099,6 @@ paths: summary: Update a notification rule tags: - Case Management - /api/v2/cases/projects/{project_id}/rules: - get: - description: Returns all automation rules configured for a project. Automation rules allow automatic actions to be triggered by case events like creation, status transitions, or attribute changes. - operationId: ListCaseAutomationRules - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRulesResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: List automation rules - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Creates an automation rule for a project. The rule defines a trigger event (for example, case created, status transitioned) and an action to execute. - operationId: CreateCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleCreateRequest" - description: Automation rule payload. - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleResponse" - description: Created - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Create an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/projects/{project_id}/rules/{rule_id}: - delete: - description: Permanently deletes an automation rule from a project. - operationId: DeleteCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - - $ref: "#/components/parameters/RuleIDPathParameter" - responses: - "204": - description: No Content - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Delete an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - get: - description: Returns a single automation rule identified by its UUID, including its trigger, action, and current state (enabled/disabled). - operationId: GetCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - - $ref: "#/components/parameters/RuleIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: Get an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - put: - description: Updates the trigger, action, name, or state of an existing automation rule. - operationId: UpdateCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - - $ref: "#/components/parameters/RuleIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleUpdateRequest" - description: Automation rule payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/projects/{project_id}/rules/{rule_id}/disable: - post: - description: Disables an automation rule so it no longer triggers on case events. The rule configuration is preserved. - operationId: DisableCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - - $ref: "#/components/parameters/RuleIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: DISABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Disable an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/projects/{project_id}/rules/{rule_id}/enable: - post: - description: Enables a previously disabled automation rule so it triggers on matching case events. - operationId: EnableCaseAutomationRule - parameters: - - description: The UUID of the project that owns the automation rules. - example: "e555e290-ed65-49bd-ae18-8acbfcf18db7" - in: path - name: project_id - required: true - schema: - type: string - - $ref: "#/components/parameters/RuleIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - action: - data: - handle: workflow-handle-123 - type: execute_workflow - created_at: "2024-01-01T00:00:00.000Z" - name: Auto-assign workflow - state: ENABLED - trigger: - type: case_created - id: e6773723-fe58-49ff-9975-dff00f14e28d - type: rule - schema: - $ref: "#/components/schemas/AutomationRuleResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Enable an automation rule - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/types: get: description: Get all case types @@ -96045,65 +94227,6 @@ paths: summary: Delete a case type tags: - Case Management Type - put: - description: Updates the name, emoji, or description of an existing case type. - operationId: UpdateCaseType - parameters: - - $ref: "#/components/parameters/CaseTypeIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - description: Investigations done in case management - emoji: "🕵🏻‍♂️" - name: Investigation - type: case_type - schema: - $ref: "#/components/schemas/CaseTypeUpdateRequest" - description: Case type payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - description: Investigations done in case management - emoji: "🕵🏻‍♂️" - name: Investigation - id: 00000000-0000-0000-0000-000000000001 - type: case_type - schema: - $ref: "#/components/schemas/CaseTypeResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_shared_settings_write - summary: Update a case type - tags: - - Case Management Type - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/types/{case_type_id}/custom_attributes: get: description: Get all custom attribute config of case type @@ -96218,305 +94341,6 @@ paths: summary: Delete custom attributes config tags: - Case Management Attribute - put: - description: Updates the display name, description, type, or options of an existing custom attribute configuration for a case type. - operationId: UpdateCustomAttributeConfig - parameters: - - $ref: "#/components/parameters/CaseTypeIDPathParameter" - - $ref: "#/components/parameters/CaseCustomAttributeIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - description: Updated description. - display_name: AWS Region - type: custom_attribute - schema: - $ref: "#/components/schemas/CustomAttributeConfigUpdateRequest" - description: Custom attribute config payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - case_type_id: 00000000-0000-0000-0000-000000000006 - description: Updated description. - display_name: AWS Region - is_multi: true - key: aws_region - type: TEXT - id: 00000000-0000-0000-0000-000000000005 - type: custom_attribute - schema: - $ref: "#/components/schemas/CustomAttributeConfigResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_shared_settings_write - summary: Update custom attribute config - tags: - - Case Management Attribute - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/views: - get: - description: Returns all saved case views for a given project. Views are saved search queries that allow quick access to filtered lists of cases. - operationId: ListCaseViews - parameters: - - description: Filter views by project identifier. - example: e555e290-ed65-49bd-ae18-8acbfcf18db7 - in: query - name: project_id - required: true - schema: - type: string - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - created_at: "2024-01-01T00:00:00.000Z" - name: Open bugs - query: "status:open type:bug" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: view - schema: - $ref: "#/components/schemas/CaseViewsResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: List case views - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Creates a new saved case view with a name, filter query, and associated project. Optionally, a notification rule can be linked to the view. - operationId: CreateCaseView - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: Open bugs - project_id: e555e290-ed65-49bd-ae18-8acbfcf18db7 - query: "status:open type:bug" - type: view - schema: - $ref: "#/components/schemas/CaseViewCreateRequest" - description: Case view payload. - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00.000Z" - name: Open bugs - query: "status:open type:bug" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: view - schema: - $ref: "#/components/schemas/CaseViewResponse" - description: Created - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Create a case view - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/views/{view_id}: - delete: - description: Permanently deletes a saved case view. - operationId: DeleteCaseView - parameters: - - $ref: "#/components/parameters/ViewIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Delete a case view - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - get: - description: Returns a single saved case view identified by its UUID, including its query, associated project, and timestamps. - operationId: GetCaseView - parameters: - - $ref: "#/components/parameters/ViewIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00.000Z" - name: Open bugs - query: "status:open type:bug" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: view - schema: - $ref: "#/components/schemas/CaseViewResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_read - summary: Get a case view - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - put: - description: Updates the name, query, or notification rule of an existing case view. - operationId: UpdateCaseView - parameters: - - $ref: "#/components/parameters/ViewIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - name: Updated view name - type: view - schema: - $ref: "#/components/schemas/CaseViewUpdateRequest" - description: Case view payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00.000Z" - name: Updated view name - query: "status:open type:bug" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: view - schema: - $ref: "#/components/schemas/CaseViewResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update a case view - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/{case_id}: get: description: >- @@ -96835,50 +94659,6 @@ paths: summary: Delete case comment tags: - Case Management - put: - description: Updates the text content of an existing comment on a case timeline. The comment is identified by its cell ID. - operationId: UpdateCaseComment - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - - $ref: "#/components/parameters/CellIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - comment: Updated comment text - type: case - schema: - $ref: "#/components/schemas/CaseUpdateCommentRequest" - description: Case update comment payload. - required: true - responses: - "200": - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update case comment - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}: delete: description: Delete custom attribute from case @@ -96924,209 +94704,15 @@ paths: appKeyAuth: [] - AuthZ: - cases_write - summary: Delete custom attribute from case - tags: - - Case Management - post: - description: Update case custom attribute - operationId: UpdateCaseCustomAttribute - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - - $ref: "#/components/parameters/CaseCustomAttributeKeyPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - is_multi: false - type: NUMBER - value: 42 - type: case - schema: - $ref: "#/components/schemas/CaseUpdateCustomAttributeRequest" - description: Update case custom attribute 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 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 + summary: Delete custom attribute from 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}/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 + post: + description: Update case custom attribute + operationId: UpdateCaseCustomAttribute parameters: - $ref: "#/components/parameters/CaseIDPathParameter" + - $ref: "#/components/parameters/CaseCustomAttributeKeyPathParameter" requestBody: content: application/json: @@ -97135,14 +94721,13 @@ paths: value: data: attributes: - insights: - - ref: "/monitors/12345?q=total" - resource_id: "12345" - type: SECURITY_SIGNAL + is_multi: false + type: NUMBER + value: 42 type: case schema: - $ref: "#/components/schemas/CaseInsightsRequest" - description: Case insights request. + $ref: "#/components/schemas/CaseUpdateCustomAttributeRequest" + description: Update case custom attribute payload required: true responses: "200": @@ -97170,29 +94755,13 @@ paths: $ref: "#/components/schemas/CaseResponse" description: OK "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request + $ref: "#/components/responses/BadRequestResponse" "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized + $ref: "#/components/responses/UnauthorizedResponse" "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden + $ref: "#/components/responses/ForbiddenResponse" "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: @@ -97200,16 +94769,13 @@ paths: appKeyAuth: [] - AuthZ: - cases_write - summary: Remove insights from a case + summary: Update case custom attribute tags: - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - put: - description: >- - Adds one or more insights to a case. Insights are references to related Datadog resources (such as monitors, security signals, incidents, or error tracking issues) that provide investigative context. Up to 100 insights can be added per request. Each insight requires a type (see `CaseInsightType` for allowed values), a ref (URL path to the resource), and a resource_id. - operationId: AddCaseInsights + /api/v2/cases/{case_id}/description: + post: + description: Update case description + operationId: UpdateCaseDescription parameters: - $ref: "#/components/parameters/CaseIDPathParameter" requestBody: @@ -97220,14 +94786,11 @@ paths: value: data: attributes: - insights: - - ref: "/monitors/12345?q=total" - resource_id: "12345" - type: SECURITY_SIGNAL + description: Seeing some weird memory increase... We shouldn't ignore this type: case schema: - $ref: "#/components/schemas/CaseInsightsRequest" - description: Case insights request. + $ref: "#/components/schemas/CaseUpdateDescriptionRequest" + description: Case description update payload required: true responses: "200": @@ -97255,29 +94818,13 @@ paths: $ref: "#/components/schemas/CaseResponse" description: OK "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request + $ref: "#/components/responses/BadRequestResponse" "401": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Unauthorized + $ref: "#/components/responses/UnauthorizedResponse" "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden + $ref: "#/components/responses/ForbiddenResponse" "404": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Not Found + $ref: "#/components/responses/NotFoundResponse" "429": $ref: "#/components/responses/TooManyRequestsResponse" security: @@ -97285,12 +94832,9 @@ paths: appKeyAuth: [] - AuthZ: - cases_write - summary: Add insights to a case + summary: Update case description tags: - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/{case_id}/priority: post: description: Update case priority @@ -97794,72 +95338,6 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/cases/{case_id}/resolved_reason: - post: - description: Sets the resolved reason for a security case (for example, FALSE_POSITIVE, TRUE_POSITIVE). Applicable to security-type cases. - operationId: UpdateCaseResolvedReason - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - security_resolved_reason: "FALSE_POSITIVE" - type: case - schema: - $ref: "#/components/schemas/CaseUpdateResolvedReasonRequest" - description: Case resolved reason update payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00+00:00" - key: CASEM-1234 - priority: NOT_DEFINED - status: OPEN - status_name: Open - title: Memory leak investigation on API - id: 00000000-0000-0000-0000-000000000001 - relationships: - project: - data: - id: 00000000-0000-0000-0000-000000000002 - type: project - type: case - schema: - $ref: "#/components/schemas/CaseResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update case resolved reason - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/cases/{case_id}/status: post: description: Update case status @@ -97921,142 +95399,13 @@ paths: appKeyAuth: [] - AuthZ: - cases_write - 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 - operationId: UpdateCaseTitle - parameters: - - $ref: "#/components/parameters/CaseIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - title: Memory leak investigation on API - type: case - schema: - $ref: "#/components/schemas/CaseUpdateTitleRequest" - description: Case title 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 title + summary: Update case status tags: - Case Management - /api/v2/cases/{case_id}/unarchive: + /api/v2/cases/{case_id}/title: post: - description: Unarchive case - operationId: UnarchiveCase + description: Update case title + operationId: UpdateCaseTitle parameters: - $ref: "#/components/parameters/CaseIDPathParameter" requestBody: @@ -98066,10 +95415,12 @@ paths: default: value: data: + attributes: + title: Memory leak investigation on API type: case schema: - $ref: "#/components/schemas/CaseEmptyRequest" - description: Unarchive case payload + $ref: "#/components/schemas/CaseUpdateTitleRequest" + description: Case title update payload required: true responses: "200": @@ -98111,13 +95462,13 @@ paths: appKeyAuth: [] - AuthZ: - cases_write - summary: Unarchive case + summary: Update case title tags: - Case Management - /api/v2/cases/{case_id}/unassign: + /api/v2/cases/{case_id}/unarchive: post: - description: Unassign case - operationId: UnassignCase + description: Unarchive case + operationId: UnarchiveCase parameters: - $ref: "#/components/parameters/CaseIDPathParameter" requestBody: @@ -98130,7 +95481,7 @@ paths: type: case schema: $ref: "#/components/schemas/CaseEmptyRequest" - description: Unassign case payload + description: Unarchive case payload required: true responses: "200": @@ -98172,15 +95523,27 @@ paths: appKeyAuth: [] - AuthZ: - cases_write - summary: Unassign case + summary: Unarchive 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 + /api/v2/cases/{case_id}/unassign: + post: + description: Unassign case + operationId: UnassignCase parameters: - $ref: "#/components/parameters/CaseIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + type: case + schema: + $ref: "#/components/schemas/CaseEmptyRequest" + description: Unassign case payload + required: true responses: "200": content: @@ -98189,15 +95552,22 @@ paths: default: value: data: - - id: 8146583c-0b5f-11ec-abf8-da7ad0900001 - relationships: - user: - data: - id: 8146583c-0b5f-11ec-abf8-da7ad0900001 - type: user - type: watcher + 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/CaseWatchersResponse" + $ref: "#/components/schemas/CaseResponse" description: OK "400": $ref: "#/components/responses/BadRequestResponse" @@ -98209,78 +95579,14 @@ paths: $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 + summary: Unassign case tags: - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/catalog/entity: get: description: Get a list of entities from Software Catalog. @@ -121924,199 +119230,6 @@ paths: operator: OR permissions: - logs_read_data - /api/v2/maintenance_windows: - get: - description: Returns all configured maintenance windows for event management cases. Maintenance windows define time periods during which case notifications and automation rules are suppressed for cases matching a given query. - operationId: ListMaintenanceWindows - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - - attributes: - end_at: "2026-06-01T06:00:00Z" - name: Weekly maintenance - query: "project:SEC" - start_at: "2026-06-01T00:00:00Z" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: maintenance_window - schema: - $ref: "#/components/schemas/MaintenanceWindowsResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - event_correlation_config_read - summary: List maintenance windows - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - post: - description: Creates a maintenance window for event management cases with a name, case filter query, and time range (start and end). - operationId: CreateMaintenanceWindow - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - end_at: "2026-06-01T06:00:00Z" - name: Weekly maintenance - query: "project:SEC" - start_at: "2026-06-01T00:00:00Z" - type: maintenance_window - schema: - $ref: "#/components/schemas/MaintenanceWindowCreateRequest" - description: Maintenance window payload. - required: true - responses: - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - end_at: "2026-06-01T06:00:00Z" - name: Weekly maintenance - query: "project:SEC" - start_at: "2026-06-01T00:00:00Z" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: maintenance_window - schema: - $ref: "#/components/schemas/MaintenanceWindowResponse" - description: Created - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - event_correlation_config_write - summary: Create a maintenance window - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - /api/v2/maintenance_windows/{maintenance_window_id}: - delete: - description: Permanently deletes a maintenance window. - operationId: DeleteMaintenanceWindow - parameters: - - $ref: "#/components/parameters/MaintenanceWindowIDPathParameter" - responses: - "204": - description: No Content - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - event_correlation_config_write - summary: Delete a maintenance window - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). - put: - description: Updates the name, query, start time, or end time of an existing maintenance window. - operationId: UpdateMaintenanceWindow - parameters: - - $ref: "#/components/parameters/MaintenanceWindowIDPathParameter" - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - end_at: "2026-06-01T06:00:00Z" - name: Weekly maintenance - query: "project:SEC" - start_at: "2026-06-01T00:00:00Z" - type: maintenance_window - schema: - $ref: "#/components/schemas/MaintenanceWindowUpdateRequest" - description: Maintenance window payload. - required: true - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - end_at: "2026-06-01T06:00:00Z" - name: Weekly maintenance - query: "project:SEC" - start_at: "2026-06-01T00:00:00Z" - id: a1b2c3d4-e5f6-7890-abcd-ef1234567890 - type: maintenance_window - schema: - $ref: "#/components/schemas/MaintenanceWindowResponse" - description: OK - "400": - $ref: "#/components/responses/BadRequestResponse" - "401": - $ref: "#/components/responses/UnauthorizedResponse" - "403": - $ref: "#/components/responses/ForbiddenResponse" - "404": - $ref: "#/components/responses/NotFoundResponse" - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - event_correlation_config_write - summary: Update a maintenance window - tags: - - Case Management - x-unstable: |- - **Note**: This endpoint is in preview and is subject to change. - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/metrics: get: description: |- diff --git a/examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb b/examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb deleted file mode 100644 index 641b70d9362c..000000000000 --- a/examples/v2/case-management-attribute/UpdateCustomAttributeConfig.rb +++ /dev/null @@ -1,26 +0,0 @@ -# Update custom attribute config returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_custom_attribute_config".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAttributeAPI.new - -body = DatadogAPIClient::V2::CustomAttributeConfigUpdateRequest.new({ - data: DatadogAPIClient::V2::CustomAttributeConfigUpdate.new({ - attributes: DatadogAPIClient::V2::CustomAttributeConfigUpdateAttributes.new({ - description: "Updated description.", - display_name: "AWS Region", - type: DatadogAPIClient::V2::CustomAttributeType::NUMBER, - type_data: DatadogAPIClient::V2::CustomAttributeTypeData.new({ - options: [ - DatadogAPIClient::V2::CustomAttributeSelectOption.new({ - value: "us-east-1", - }), - ], - }), - }), - type: DatadogAPIClient::V2::CustomAttributeConfigResourceType::CUSTOM_ATTRIBUTE, - }), -}) -p api_instance.update_custom_attribute_config("case_type_id", "custom_attribute_id", body) diff --git a/examples/v2/case-management-type/UpdateCaseType.rb b/examples/v2/case-management-type/UpdateCaseType.rb deleted file mode 100644 index 0a63cc3bc2da..000000000000 --- a/examples/v2/case-management-type/UpdateCaseType.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Update a case type returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_type".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementTypeAPI.new - -body = DatadogAPIClient::V2::CaseTypeUpdateRequest.new({ - data: DatadogAPIClient::V2::CaseTypeUpdate.new({ - attributes: DatadogAPIClient::V2::CaseTypeResourceAttributes.new({ - description: "Investigations done in case management", - emoji: '🕵🏻\u200d♂️', - name: "Investigation", - }), - type: DatadogAPIClient::V2::CaseTypeResourceType::CASE_TYPE, - }), -}) -p api_instance.update_case_type("case_type_id", body) diff --git a/examples/v2/case-management/AddCaseInsights.rb b/examples/v2/case-management/AddCaseInsights.rb deleted file mode 100644 index eaaec5bf0760..000000000000 --- a/examples/v2/case-management/AddCaseInsights.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Add insights to a case returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.add_case_insights".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseInsightsRequest.new({ - data: DatadogAPIClient::V2::CaseInsightsData.new({ - attributes: DatadogAPIClient::V2::CaseInsightsAttributes.new({ - insights: [ - DatadogAPIClient::V2::CaseInsight.new({ - ref: "/monitors/12345?q=total", - resource_id: "12345", - type: DatadogAPIClient::V2::CaseInsightType::SECURITY_SIGNAL, - }), - ], - }), - type: DatadogAPIClient::V2::CaseResourceType::CASE, - }), -}) -p api_instance.add_case_insights("case_id", body) diff --git a/examples/v2/case-management/AggregateCases.rb b/examples/v2/case-management/AggregateCases.rb deleted file mode 100644 index 937cb68545e0..000000000000 --- a/examples/v2/case-management/AggregateCases.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Aggregate cases returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.aggregate_cases".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseAggregateRequest.new({ - data: DatadogAPIClient::V2::CaseAggregateRequestData.new({ - attributes: DatadogAPIClient::V2::CaseAggregateRequestAttributes.new({ - group_by: DatadogAPIClient::V2::CaseAggregateGroupBy.new({ - groups: [ - "status", - ], - limit: 14, - }), - query_filter: "service:case-api", - }), - type: DatadogAPIClient::V2::CaseAggregateResourceType::AGGREGATE, - }), -}) -p api_instance.aggregate_cases(body) diff --git a/examples/v2/case-management/BulkUpdateCases.rb b/examples/v2/case-management/BulkUpdateCases.rb deleted file mode 100644 index 47775076dbab..000000000000 --- a/examples/v2/case-management/BulkUpdateCases.rb +++ /dev/null @@ -1,24 +0,0 @@ -# Bulk update cases returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.bulk_update_cases".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseBulkUpdateRequest.new({ - data: DatadogAPIClient::V2::CaseBulkUpdateRequestData.new({ - attributes: DatadogAPIClient::V2::CaseBulkUpdateRequestAttributes.new({ - case_ids: [ - "case-id-1", - "case-id-2", - ], - payload: { - priority: "P1", - }, - type: DatadogAPIClient::V2::CaseBulkActionType::PRIORITY, - }), - type: DatadogAPIClient::V2::CaseBulkResourceType::BULK, - }), -}) -p api_instance.bulk_update_cases(body) diff --git a/examples/v2/case-management/CountCases.rb b/examples/v2/case-management/CountCases.rb deleted file mode 100644 index 2a93c7f202ea..000000000000 --- a/examples/v2/case-management/CountCases.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Count cases returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.count_cases".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.count_cases() diff --git a/examples/v2/case-management/CreateCaseAutomationRule.rb b/examples/v2/case-management/CreateCaseAutomationRule.rb deleted file mode 100644 index 4df20a9a6199..000000000000 --- a/examples/v2/case-management/CreateCaseAutomationRule.rb +++ /dev/null @@ -1,28 +0,0 @@ -# Create an automation rule returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::AutomationRuleCreateRequest.new({ - data: DatadogAPIClient::V2::AutomationRuleCreate.new({ - attributes: DatadogAPIClient::V2::AutomationRuleCreateAttributes.new({ - action: DatadogAPIClient::V2::AutomationRuleAction.new({ - data: DatadogAPIClient::V2::AutomationRuleActionData.new({ - handle: "workflow-handle-123", - }), - type: DatadogAPIClient::V2::AutomationRuleActionType::EXECUTE_WORKFLOW, - }), - name: "Auto-assign workflow", - state: DatadogAPIClient::V2::CaseAutomationRuleState::ENABLED, - trigger: DatadogAPIClient::V2::AutomationRuleTrigger.new({ - data: DatadogAPIClient::V2::AutomationRuleTriggerData.new({}), - type: DatadogAPIClient::V2::AutomationRuleTriggerType::CASE_CREATED, - }), - }), - type: DatadogAPIClient::V2::CaseAutomationRuleResourceType::RULE, - }), -}) -p api_instance.create_case_automation_rule("project_id", body) diff --git a/examples/v2/case-management/CreateCaseLink.rb b/examples/v2/case-management/CreateCaseLink.rb deleted file mode 100644 index 63dad423c442..000000000000 --- a/examples/v2/case-management/CreateCaseLink.rb +++ /dev/null @@ -1,21 +0,0 @@ -# Create a case link returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_case_link".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseLinkCreateRequest.new({ - data: DatadogAPIClient::V2::CaseLinkCreate.new({ - attributes: DatadogAPIClient::V2::CaseLinkAttributes.new({ - child_entity_id: "4417921d-0866-4a38-822c-6f2a0f65f77d", - child_entity_type: "CASE", - parent_entity_id: "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f", - parent_entity_type: "CASE", - relationship: "BLOCKS", - }), - type: DatadogAPIClient::V2::CaseLinkResourceType::LINK, - }), -}) -p api_instance.create_case_link(body) diff --git a/examples/v2/case-management/CreateCaseView.rb b/examples/v2/case-management/CreateCaseView.rb deleted file mode 100644 index d1c90d2e529b..000000000000 --- a/examples/v2/case-management/CreateCaseView.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Create a case view returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_case_view".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseViewCreateRequest.new({ - data: DatadogAPIClient::V2::CaseViewCreate.new({ - attributes: DatadogAPIClient::V2::CaseViewCreateAttributes.new({ - name: "Open bugs", - project_id: "e555e290-ed65-49bd-ae18-8acbfcf18db7", - query: "status:open type:bug", - }), - type: DatadogAPIClient::V2::CaseViewResourceType::VIEW, - }), -}) -p api_instance.create_case_view(body) diff --git a/examples/v2/case-management/CreateMaintenanceWindow.rb b/examples/v2/case-management/CreateMaintenanceWindow.rb deleted file mode 100644 index 95846eda3df9..000000000000 --- a/examples/v2/case-management/CreateMaintenanceWindow.rb +++ /dev/null @@ -1,20 +0,0 @@ -# Create a maintenance window returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.create_maintenance_window".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::MaintenanceWindowCreateRequest.new({ - data: DatadogAPIClient::V2::MaintenanceWindowCreate.new({ - attributes: DatadogAPIClient::V2::MaintenanceWindowCreateAttributes.new({ - end_at: "2026-06-01T06:00:00Z", - name: "Weekly maintenance", - query: "project:SEC", - start_at: "2026-06-01T00:00:00Z", - }), - type: DatadogAPIClient::V2::MaintenanceWindowResourceType::MAINTENANCE_WINDOW, - }), -}) -p api_instance.create_maintenance_window(body) diff --git a/examples/v2/case-management/DeleteCaseAutomationRule.rb b/examples/v2/case-management/DeleteCaseAutomationRule.rb deleted file mode 100644 index 363031e58ca3..000000000000 --- a/examples/v2/case-management/DeleteCaseAutomationRule.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete an automation rule returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.delete_case_automation_rule("project_id", "rule_id") diff --git a/examples/v2/case-management/DeleteCaseLink.rb b/examples/v2/case-management/DeleteCaseLink.rb deleted file mode 100644 index f140dd39a298..000000000000 --- a/examples/v2/case-management/DeleteCaseLink.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a case link returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_case_link".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.delete_case_link("804cd682-55f6-4541-ab00-b608b282ea7d") diff --git a/examples/v2/case-management/DeleteCaseView.rb b/examples/v2/case-management/DeleteCaseView.rb deleted file mode 100644 index 4bf89a91cc67..000000000000 --- a/examples/v2/case-management/DeleteCaseView.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a case view returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_case_view".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.delete_case_view("view_id") diff --git a/examples/v2/case-management/DeleteMaintenanceWindow.rb b/examples/v2/case-management/DeleteMaintenanceWindow.rb deleted file mode 100644 index 85cb4fbbaa11..000000000000 --- a/examples/v2/case-management/DeleteMaintenanceWindow.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Delete a maintenance window returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.delete_maintenance_window".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.delete_maintenance_window("maintenance_window_id") diff --git a/examples/v2/case-management/DisableCaseAutomationRule.rb b/examples/v2/case-management/DisableCaseAutomationRule.rb deleted file mode 100644 index 160008e29c46..000000000000 --- a/examples/v2/case-management/DisableCaseAutomationRule.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Disable an automation rule returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.disable_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.disable_case_automation_rule("project_id", "rule_id") diff --git a/examples/v2/case-management/EnableCaseAutomationRule.rb b/examples/v2/case-management/EnableCaseAutomationRule.rb deleted file mode 100644 index 342ea386d886..000000000000 --- a/examples/v2/case-management/EnableCaseAutomationRule.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Enable an automation rule returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.enable_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.enable_case_automation_rule("project_id", "rule_id") diff --git a/examples/v2/case-management/FavoriteCaseProject.rb b/examples/v2/case-management/FavoriteCaseProject.rb deleted file mode 100644 index f534273accf0..000000000000 --- a/examples/v2/case-management/FavoriteCaseProject.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Favorite a project returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.favorite_case_project".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.favorite_case_project("project_id") diff --git a/examples/v2/case-management/GetCaseAutomationRule.rb b/examples/v2/case-management/GetCaseAutomationRule.rb deleted file mode 100644 index e66cf32e78d1..000000000000 --- a/examples/v2/case-management/GetCaseAutomationRule.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get an automation rule returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.get_case_automation_rule("project_id", "rule_id") diff --git a/examples/v2/case-management/GetCaseView.rb b/examples/v2/case-management/GetCaseView.rb deleted file mode 100644 index 632c21fd9511..000000000000 --- a/examples/v2/case-management/GetCaseView.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get a case view returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.get_case_view".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.get_case_view("view_id") diff --git a/examples/v2/case-management/ListCaseAutomationRules.rb b/examples/v2/case-management/ListCaseAutomationRules.rb deleted file mode 100644 index 648da95f8f4c..000000000000 --- a/examples/v2/case-management/ListCaseAutomationRules.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List automation rules returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_case_automation_rules".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_case_automation_rules("project_id") diff --git a/examples/v2/case-management/ListCaseLinks.rb b/examples/v2/case-management/ListCaseLinks.rb deleted file mode 100644 index 0d74c08e6ed0..000000000000 --- a/examples/v2/case-management/ListCaseLinks.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List case links returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_case_links".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_case_links("CASE", "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f") diff --git a/examples/v2/case-management/ListCaseTimeline.rb b/examples/v2/case-management/ListCaseTimeline.rb deleted file mode 100644 index 00881e28694c..000000000000 --- a/examples/v2/case-management/ListCaseTimeline.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Get case timeline returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_case_timeline".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_case_timeline("case_id") diff --git a/examples/v2/case-management/ListCaseViews.rb b/examples/v2/case-management/ListCaseViews.rb deleted file mode 100644 index 83c0d0c6acc3..000000000000 --- a/examples/v2/case-management/ListCaseViews.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List case views returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_case_views".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_case_views("project_id") diff --git a/examples/v2/case-management/ListCaseWatchers.rb b/examples/v2/case-management/ListCaseWatchers.rb deleted file mode 100644 index 31f0f27ec425..000000000000 --- a/examples/v2/case-management/ListCaseWatchers.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List case watchers returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_case_watchers".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_case_watchers("case_id") diff --git a/examples/v2/case-management/ListMaintenanceWindows.rb b/examples/v2/case-management/ListMaintenanceWindows.rb deleted file mode 100644 index 6aa842e0d150..000000000000 --- a/examples/v2/case-management/ListMaintenanceWindows.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List maintenance windows returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_maintenance_windows".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_maintenance_windows() diff --git a/examples/v2/case-management/ListUserCaseProjectFavorites.rb b/examples/v2/case-management/ListUserCaseProjectFavorites.rb deleted file mode 100644 index 0c3b8372a7d5..000000000000 --- a/examples/v2/case-management/ListUserCaseProjectFavorites.rb +++ /dev/null @@ -1,8 +0,0 @@ -# List project favorites returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.list_user_case_project_favorites".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.list_user_case_project_favorites() diff --git a/examples/v2/case-management/RemoveCaseInsights.rb b/examples/v2/case-management/RemoveCaseInsights.rb deleted file mode 100644 index 2707ebb93d53..000000000000 --- a/examples/v2/case-management/RemoveCaseInsights.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Remove insights from a case returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.remove_case_insights".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseInsightsRequest.new({ - data: DatadogAPIClient::V2::CaseInsightsData.new({ - attributes: DatadogAPIClient::V2::CaseInsightsAttributes.new({ - insights: [ - DatadogAPIClient::V2::CaseInsight.new({ - ref: "/monitors/12345?q=total", - resource_id: "12345", - type: DatadogAPIClient::V2::CaseInsightType::SECURITY_SIGNAL, - }), - ], - }), - type: DatadogAPIClient::V2::CaseResourceType::CASE, - }), -}) -p api_instance.remove_case_insights("case_id", body) diff --git a/examples/v2/case-management/UnfavoriteCaseProject.rb b/examples/v2/case-management/UnfavoriteCaseProject.rb deleted file mode 100644 index 3403a0b5ddaf..000000000000 --- a/examples/v2/case-management/UnfavoriteCaseProject.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Unfavorite a project returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.unfavorite_case_project".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.unfavorite_case_project("project_id") diff --git a/examples/v2/case-management/UnwatchCase.rb b/examples/v2/case-management/UnwatchCase.rb deleted file mode 100644 index 905b370ac5f8..000000000000 --- a/examples/v2/case-management/UnwatchCase.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Unwatch a case returns "No Content" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.unwatch_case".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -api_instance.unwatch_case("case_id", "user_uuid") diff --git a/examples/v2/case-management/UpdateCaseAutomationRule.rb b/examples/v2/case-management/UpdateCaseAutomationRule.rb deleted file mode 100644 index b02f5b182e33..000000000000 --- a/examples/v2/case-management/UpdateCaseAutomationRule.rb +++ /dev/null @@ -1,28 +0,0 @@ -# Update an automation rule returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_automation_rule".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::AutomationRuleUpdateRequest.new({ - data: DatadogAPIClient::V2::AutomationRuleUpdate.new({ - attributes: DatadogAPIClient::V2::AutomationRuleCreateAttributes.new({ - action: DatadogAPIClient::V2::AutomationRuleAction.new({ - data: DatadogAPIClient::V2::AutomationRuleActionData.new({ - handle: "workflow-handle-123", - }), - type: DatadogAPIClient::V2::AutomationRuleActionType::EXECUTE_WORKFLOW, - }), - name: "Auto-assign workflow", - state: DatadogAPIClient::V2::CaseAutomationRuleState::ENABLED, - trigger: DatadogAPIClient::V2::AutomationRuleTrigger.new({ - data: DatadogAPIClient::V2::AutomationRuleTriggerData.new({}), - type: DatadogAPIClient::V2::AutomationRuleTriggerType::CASE_CREATED, - }), - }), - type: DatadogAPIClient::V2::CaseAutomationRuleResourceType::RULE, - }), -}) -p api_instance.update_case_automation_rule("project_id", "rule_id", body) diff --git a/examples/v2/case-management/UpdateCaseComment.rb b/examples/v2/case-management/UpdateCaseComment.rb deleted file mode 100644 index b3509c72d093..000000000000 --- a/examples/v2/case-management/UpdateCaseComment.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Update case comment returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_comment".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseUpdateCommentRequest.new({ - data: DatadogAPIClient::V2::CaseUpdateComment.new({ - attributes: DatadogAPIClient::V2::CaseUpdateCommentAttributes.new({ - comment: "Updated comment text", - }), - type: DatadogAPIClient::V2::CaseResourceType::CASE, - }), -}) -p api_instance.update_case_comment("case_id", "cell_id", body) diff --git a/examples/v2/case-management/UpdateCaseDueDate.rb b/examples/v2/case-management/UpdateCaseDueDate.rb deleted file mode 100644 index c1dce3c5fc21..000000000000 --- a/examples/v2/case-management/UpdateCaseDueDate.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Update case due date returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_due_date".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseUpdateDueDateRequest.new({ - data: DatadogAPIClient::V2::CaseUpdateDueDate.new({ - attributes: DatadogAPIClient::V2::CaseUpdateDueDateAttributes.new({ - due_date: "2026-12-31", - }), - type: DatadogAPIClient::V2::CaseResourceType::CASE, - }), -}) -p api_instance.update_case_due_date("case_id", body) diff --git a/examples/v2/case-management/UpdateCaseResolvedReason.rb b/examples/v2/case-management/UpdateCaseResolvedReason.rb deleted file mode 100644 index ef98037a2d57..000000000000 --- a/examples/v2/case-management/UpdateCaseResolvedReason.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Update case resolved reason returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_resolved_reason".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseUpdateResolvedReasonRequest.new({ - data: DatadogAPIClient::V2::CaseUpdateResolvedReason.new({ - attributes: DatadogAPIClient::V2::CaseUpdateResolvedReasonAttributes.new({ - security_resolved_reason: "FALSE_POSITIVE", - }), - type: DatadogAPIClient::V2::CaseResourceType::CASE, - }), -}) -p api_instance.update_case_resolved_reason("case_id", body) diff --git a/examples/v2/case-management/UpdateCaseView.rb b/examples/v2/case-management/UpdateCaseView.rb deleted file mode 100644 index 2395b959f12a..000000000000 --- a/examples/v2/case-management/UpdateCaseView.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Update a case view returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_case_view".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::CaseViewUpdateRequest.new({ - data: DatadogAPIClient::V2::CaseViewUpdate.new({ - attributes: DatadogAPIClient::V2::CaseViewUpdateAttributes.new({}), - type: DatadogAPIClient::V2::CaseViewResourceType::VIEW, - }), -}) -p api_instance.update_case_view("view_id", body) diff --git a/examples/v2/case-management/UpdateMaintenanceWindow.rb b/examples/v2/case-management/UpdateMaintenanceWindow.rb deleted file mode 100644 index e0b6049d5051..000000000000 --- a/examples/v2/case-management/UpdateMaintenanceWindow.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Update a maintenance window returns "OK" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.update_maintenance_window".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new - -body = DatadogAPIClient::V2::MaintenanceWindowUpdateRequest.new({ - data: DatadogAPIClient::V2::MaintenanceWindowUpdate.new({ - attributes: DatadogAPIClient::V2::MaintenanceWindowUpdateAttributes.new({}), - type: DatadogAPIClient::V2::MaintenanceWindowResourceType::MAINTENANCE_WINDOW, - }), -}) -p api_instance.update_maintenance_window("maintenance_window_id", body) diff --git a/examples/v2/case-management/WatchCase.rb b/examples/v2/case-management/WatchCase.rb deleted file mode 100644 index 39f8e2f33793..000000000000 --- a/examples/v2/case-management/WatchCase.rb +++ /dev/null @@ -1,8 +0,0 @@ -# Watch a case returns "Created" response - -require "datadog_api_client" -DatadogAPIClient.configure do |config| - config.unstable_operations["v2.watch_case".to_sym] = true -end -api_instance = DatadogAPIClient::V2::CaseManagementAPI.new -p api_instance.watch_case("case_id", "user_uuid") diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 1204149d4aab..326b1e8ab2ed 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1441,28 +1441,6 @@ "v2.CreateCase" => { "body" => "CaseCreateRequest", }, - "v2.AggregateCases" => { - "body" => "CaseAggregateRequest", - }, - "v2.BulkUpdateCases" => { - "body" => "CaseBulkUpdateRequest", - }, - "v2.CountCases" => { - "query_filter" => "String", - "group_bys" => "String", - "limit" => "Integer", - }, - "v2.ListCaseLinks" => { - "entity_type" => "String", - "entity_id" => "String", - "relationship" => "String", - }, - "v2.CreateCaseLink" => { - "body" => "CaseLinkCreateRequest", - }, - "v2.DeleteCaseLink" => { - "link_id" => "String", - }, "v2.CreateProject" => { "body" => "ProjectCreateRequest", }, @@ -1476,12 +1454,6 @@ "project_id" => "String", "body" => "ProjectUpdateRequest", }, - "v2.UnfavoriteCaseProject" => { - "project_id" => "String", - }, - "v2.FavoriteCaseProject" => { - "project_id" => "String", - }, "v2.GetProjectNotificationRules" => { "project_id" => "String", }, @@ -1498,50 +1470,6 @@ "notification_rule_id" => "String", "body" => "CaseNotificationRuleUpdateRequest", }, - "v2.ListCaseAutomationRules" => { - "project_id" => "String", - }, - "v2.CreateCaseAutomationRule" => { - "project_id" => "String", - "body" => "AutomationRuleCreateRequest", - }, - "v2.DeleteCaseAutomationRule" => { - "project_id" => "String", - "rule_id" => "String", - }, - "v2.GetCaseAutomationRule" => { - "project_id" => "String", - "rule_id" => "String", - }, - "v2.UpdateCaseAutomationRule" => { - "project_id" => "String", - "rule_id" => "String", - "body" => "AutomationRuleUpdateRequest", - }, - "v2.DisableCaseAutomationRule" => { - "project_id" => "String", - "rule_id" => "String", - }, - "v2.EnableCaseAutomationRule" => { - "project_id" => "String", - "rule_id" => "String", - }, - "v2.ListCaseViews" => { - "project_id" => "String", - }, - "v2.CreateCaseView" => { - "body" => "CaseViewCreateRequest", - }, - "v2.DeleteCaseView" => { - "view_id" => "String", - }, - "v2.GetCaseView" => { - "view_id" => "String", - }, - "v2.UpdateCaseView" => { - "view_id" => "String", - "body" => "CaseViewUpdateRequest", - }, "v2.GetCase" => { "case_id" => "String", }, @@ -1565,11 +1493,6 @@ "case_id" => "String", "cell_id" => "String", }, - "v2.UpdateCaseComment" => { - "case_id" => "String", - "cell_id" => "String", - "body" => "CaseUpdateCommentRequest", - }, "v2.DeleteCaseCustomAttribute" => { "case_id" => "String", "custom_attribute_key" => "String", @@ -1583,18 +1506,6 @@ "case_id" => "String", "body" => "CaseUpdateDescriptionRequest", }, - "v2.UpdateCaseDueDate" => { - "case_id" => "String", - "body" => "CaseUpdateDueDateRequest", - }, - "v2.RemoveCaseInsights" => { - "case_id" => "String", - "body" => "CaseInsightsRequest", - }, - "v2.AddCaseInsights" => { - "case_id" => "String", - "body" => "CaseInsightsRequest", - }, "v2.UpdatePriority" => { "case_id" => "String", "body" => "CaseUpdatePriorityRequest", @@ -1626,20 +1537,10 @@ "case_id" => "String", "body" => "ServiceNowTicketCreateRequest", }, - "v2.UpdateCaseResolvedReason" => { - "case_id" => "String", - "body" => "CaseUpdateResolvedReasonRequest", - }, "v2.UpdateStatus" => { "case_id" => "String", "body" => "CaseUpdateStatusRequest", }, - "v2.ListCaseTimeline" => { - "case_id" => "String", - "page_size" => "Integer", - "page_number" => "Integer", - "sort_ascending" => "Boolean", - }, "v2.UpdateCaseTitle" => { "case_id" => "String", "body" => "CaseUpdateTitleRequest", @@ -1652,37 +1553,12 @@ "case_id" => "String", "body" => "CaseEmptyRequest", }, - "v2.ListCaseWatchers" => { - "case_id" => "String", - }, - "v2.UnwatchCase" => { - "case_id" => "String", - "user_uuid" => "String", - }, - "v2.WatchCase" => { - "case_id" => "String", - "user_uuid" => "String", - }, - "v2.CreateMaintenanceWindow" => { - "body" => "MaintenanceWindowCreateRequest", - }, - "v2.DeleteMaintenanceWindow" => { - "maintenance_window_id" => "String", - }, - "v2.UpdateMaintenanceWindow" => { - "maintenance_window_id" => "String", - "body" => "MaintenanceWindowUpdateRequest", - }, "v2.CreateCaseType" => { "body" => "CaseTypeCreateRequest", }, "v2.DeleteCaseType" => { "case_type_id" => "String", }, - "v2.UpdateCaseType" => { - "case_type_id" => "String", - "body" => "CaseTypeUpdateRequest", - }, "v2.GetAllCustomAttributeConfigsByCaseType" => { "case_type_id" => "String", }, @@ -1694,11 +1570,6 @@ "case_type_id" => "String", "custom_attribute_id" => "String", }, - "v2.UpdateCustomAttributeConfig" => { - "case_type_id" => "String", - "custom_attribute_id" => "String", - "body" => "CustomAttributeConfigUpdateRequest", - }, "v2.ListCatalogEntity" => { "page_offset" => "Integer", "page_limit" => "Integer", diff --git a/features/v2/case_management.feature b/features/v2/case_management.feature index 04f9d8e0698d..bd67a8ddf2cc 100644 --- a/features/v2/case_management.feature +++ b/features/v2/case_management.feature @@ -10,57 +10,6 @@ Feature: Case Management And a valid "appKeyAuth" key in the system And an instance of "CaseManagement" API - @generated @skip @team:DataDog/case-management - Scenario: Add insights to a case returns "Bad Request" response - Given operation "AddCaseInsights" enabled - And new "AddCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Add insights to a case returns "Not Found" response - Given operation "AddCaseInsights" enabled - And new "AddCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Add insights to a case returns "OK" response - Given operation "AddCaseInsights" enabled - And new "AddCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Aggregate cases returns "Bad Request" response - Given operation "AggregateCases" enabled - And new "AggregateCases" request - And body with value {"data": {"attributes": {"group_by": {"groups": ["status"], "limit": 14}, "query_filter": "service:case-api"}, "type": "aggregate"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Aggregate cases returns "Not Found" response - Given operation "AggregateCases" enabled - And new "AggregateCases" request - And body with value {"data": {"attributes": {"group_by": {"groups": ["status"], "limit": 14}, "query_filter": "service:case-api"}, "type": "aggregate"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Aggregate cases returns "OK" response - Given operation "AggregateCases" enabled - And new "AggregateCases" request - And body with value {"data": {"attributes": {"group_by": {"groups": ["status"], "limit": 14}, "query_filter": "service:case-api"}, "type": "aggregate"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/case-management Scenario: Archive case returns "Bad Request" response Given new "ArchiveCase" request @@ -115,30 +64,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Bulk update cases returns "Bad Request" response - Given operation "BulkUpdateCases" enabled - And new "BulkUpdateCases" request - And body with value {"data": {"attributes": {"case_ids": ["case-id-1", "case-id-2"], "payload": {"priority": "P1"}, "type": "priority"}, "type": "bulk"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Bulk update cases returns "Not Found" response - Given operation "BulkUpdateCases" enabled - And new "BulkUpdateCases" request - And body with value {"data": {"attributes": {"case_ids": ["case-id-1", "case-id-2"], "payload": {"priority": "P1"}, "type": "priority"}, "type": "bulk"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Bulk update cases returns "OK" response - Given operation "BulkUpdateCases" enabled - And new "BulkUpdateCases" request - And body with value {"data": {"attributes": {"case_ids": ["case-id-1", "case-id-2"], "payload": {"priority": "P1"}, "type": "priority"}, "type": "bulk"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/case-management Scenario: Comment case returns "Bad Request" response Given new "CommentCase" request @@ -165,27 +90,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Count cases returns "Bad Request" response - Given operation "CountCases" enabled - And new "CountCases" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Count cases returns "Not Found" response - Given operation "CountCases" enabled - And new "CountCases" request - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Count cases returns "OK" response - Given operation "CountCases" enabled - And new "CountCases" request - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Create Jira issue for case returns "Accepted" response Given operation "CreateCaseJiraIssue" enabled @@ -240,30 +144,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: Create a case link returns "Bad Request" response - Given operation "CreateCaseLink" enabled - And new "CreateCaseLink" request - And body with value {"data": {"attributes": {"child_entity_id": "4417921d-0866-4a38-822c-6f2a0f65f77d", "child_entity_type": "CASE", "parent_entity_id": "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f", "parent_entity_type": "CASE", "relationship": "BLOCKS"}, "type": "link"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create a case link returns "Created" response - Given operation "CreateCaseLink" enabled - And new "CreateCaseLink" request - And body with value {"data": {"attributes": {"child_entity_id": "4417921d-0866-4a38-822c-6f2a0f65f77d", "child_entity_type": "CASE", "parent_entity_id": "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f", "parent_entity_type": "CASE", "relationship": "BLOCKS"}, "type": "link"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Create a case link returns "Not Found" response - Given operation "CreateCaseLink" enabled - And new "CreateCaseLink" request - And body with value {"data": {"attributes": {"child_entity_id": "4417921d-0866-4a38-822c-6f2a0f65f77d", "child_entity_type": "CASE", "parent_entity_id": "bf0cbac6-4c16-4cfb-b6bf-ca5e0ec37a4f", "parent_entity_type": "CASE", "relationship": "BLOCKS"}, "type": "link"}} - When the request is sent - Then the response status is 404 Not Found - @team:DataDog/case-management Scenario: Create a case returns "Bad Request" response Given new "CreateCase" request @@ -290,54 +170,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: Create a case view returns "Bad Request" response - Given operation "CreateCaseView" enabled - And new "CreateCaseView" request - And body with value {"data": {"attributes": {"name": "Open bugs", "project_id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "query": "status:open type:bug"}, "type": "view"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create a case view returns "Created" response - Given operation "CreateCaseView" enabled - And new "CreateCaseView" request - And body with value {"data": {"attributes": {"name": "Open bugs", "project_id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "query": "status:open type:bug"}, "type": "view"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Create a case view returns "Not Found" response - Given operation "CreateCaseView" enabled - And new "CreateCaseView" request - And body with value {"data": {"attributes": {"name": "Open bugs", "project_id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "query": "status:open type:bug"}, "type": "view"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Create a maintenance window returns "Bad Request" response - Given operation "CreateMaintenanceWindow" enabled - And new "CreateMaintenanceWindow" request - And body with value {"data": {"attributes": {"end_at": "2026-06-01T06:00:00Z", "name": "Weekly maintenance", "query": "project:SEC", "start_at": "2026-06-01T00:00:00Z"}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create a maintenance window returns "Created" response - Given operation "CreateMaintenanceWindow" enabled - And new "CreateMaintenanceWindow" request - And body with value {"data": {"attributes": {"end_at": "2026-06-01T06:00:00Z", "name": "Weekly maintenance", "query": "project:SEC", "start_at": "2026-06-01T00:00:00Z"}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Create a maintenance window returns "Not Found" response - Given operation "CreateMaintenanceWindow" enabled - And new "CreateMaintenanceWindow" request - And body with value {"data": {"attributes": {"end_at": "2026-06-01T06:00:00Z", "name": "Weekly maintenance", "query": "project:SEC", "start_at": "2026-06-01T00:00:00Z"}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management Scenario: Create a notification rule returns "Bad Request" response Given new "CreateProjectNotificationRule" request @@ -383,33 +215,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: Create an automation rule returns "Bad Request" response - Given operation "CreateCaseAutomationRule" enabled - And new "CreateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create an automation rule returns "Created" response - Given operation "CreateCaseAutomationRule" enabled - And new "CreateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Create an automation rule returns "Not Found" response - Given operation "CreateCaseAutomationRule" enabled - And new "CreateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management Scenario: Create investigation notebook for case returns "Bad Request" response Given operation "CreateCaseNotebook" enabled @@ -437,78 +242,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: Delete a case link returns "Bad Request" response - Given operation "DeleteCaseLink" enabled - And new "DeleteCaseLink" request - And request contains "link_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Delete a case link returns "No Content" response - Given operation "DeleteCaseLink" enabled - And new "DeleteCaseLink" request - And request contains "link_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Delete a case link returns "Not Found" response - Given operation "DeleteCaseLink" enabled - And new "DeleteCaseLink" request - And request contains "link_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Delete a case view returns "Bad Request" response - Given operation "DeleteCaseView" enabled - And new "DeleteCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Delete a case view returns "No Content" response - Given operation "DeleteCaseView" enabled - And new "DeleteCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Delete a case view returns "Not Found" response - Given operation "DeleteCaseView" enabled - And new "DeleteCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Delete a maintenance window returns "Bad Request" response - Given operation "DeleteMaintenanceWindow" enabled - And new "DeleteMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Delete a maintenance window returns "No Content" response - Given operation "DeleteMaintenanceWindow" enabled - And new "DeleteMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Delete a maintenance window returns "Not Found" response - Given operation "DeleteMaintenanceWindow" enabled - And new "DeleteMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management Scenario: Delete a notification rule returns "API error response" response Given new "DeleteProjectNotificationRule" request @@ -525,24 +258,6 @@ Feature: Case Management When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/case-management - Scenario: Delete an automation rule returns "No Content" response - Given operation "DeleteCaseAutomationRule" enabled - And new "DeleteCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Delete an automation rule returns "Not Found" response - Given operation "DeleteCaseAutomationRule" enabled - And new "DeleteCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - @skip @team:DataDog/case-management Scenario: Delete case comment returns "Bad Request" response Given new "DeleteCaseComment" request @@ -591,108 +306,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Disable an automation rule returns "Bad Request" response - Given operation "DisableCaseAutomationRule" enabled - And new "DisableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Disable an automation rule returns "Not Found" response - Given operation "DisableCaseAutomationRule" enabled - And new "DisableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Disable an automation rule returns "OK" response - Given operation "DisableCaseAutomationRule" enabled - And new "DisableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Enable an automation rule returns "Bad Request" response - Given operation "EnableCaseAutomationRule" enabled - And new "EnableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Enable an automation rule returns "Not Found" response - Given operation "EnableCaseAutomationRule" enabled - And new "EnableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Enable an automation rule returns "OK" response - Given operation "EnableCaseAutomationRule" enabled - And new "EnableCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Favorite a project returns "Bad Request" response - Given operation "FavoriteCaseProject" enabled - And new "FavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Favorite a project returns "No Content" response - Given operation "FavoriteCaseProject" enabled - And new "FavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Favorite a project returns "Not Found" response - Given operation "FavoriteCaseProject" enabled - And new "FavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Get a case view returns "Bad Request" response - Given operation "GetCaseView" enabled - And new "GetCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Get a case view returns "Not Found" response - Given operation "GetCaseView" enabled - And new "GetCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Get a case view returns "OK" response - Given operation "GetCaseView" enabled - And new "GetCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Get all projects returns "Bad Request" response Given new "GetProjects" request @@ -711,57 +324,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Get an automation rule returns "Bad Request" response - Given operation "GetCaseAutomationRule" enabled - And new "GetCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Get an automation rule returns "Not Found" response - Given operation "GetCaseAutomationRule" enabled - And new "GetCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Get an automation rule returns "OK" response - Given operation "GetCaseAutomationRule" enabled - And new "GetCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Get case timeline returns "Bad Request" response - Given operation "ListCaseTimeline" enabled - And new "ListCaseTimeline" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Get case timeline returns "Not Found" response - Given operation "ListCaseTimeline" enabled - And new "ListCaseTimeline" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Get case timeline returns "OK" response - Given operation "ListCaseTimeline" enabled - And new "ListCaseTimeline" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Get notification rules returns "Bad Request" response Given new "GetProjectNotificationRules" request @@ -890,147 +452,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: List automation rules returns "Bad Request" response - Given operation "ListCaseAutomationRules" enabled - And new "ListCaseAutomationRules" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List automation rules returns "Not Found" response - Given operation "ListCaseAutomationRules" enabled - And new "ListCaseAutomationRules" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List automation rules returns "OK" response - Given operation "ListCaseAutomationRules" enabled - And new "ListCaseAutomationRules" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: List case links returns "Bad Request" response - Given operation "ListCaseLinks" enabled - And new "ListCaseLinks" request - And request contains "entity_type" parameter from "REPLACE.ME" - And request contains "entity_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List case links returns "Not Found" response - Given operation "ListCaseLinks" enabled - And new "ListCaseLinks" request - And request contains "entity_type" parameter from "REPLACE.ME" - And request contains "entity_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List case links returns "OK" response - Given operation "ListCaseLinks" enabled - And new "ListCaseLinks" request - And request contains "entity_type" parameter from "REPLACE.ME" - And request contains "entity_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: List case views returns "Bad Request" response - Given operation "ListCaseViews" enabled - And new "ListCaseViews" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List case views returns "Not Found" response - Given operation "ListCaseViews" enabled - And new "ListCaseViews" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List case views returns "OK" response - Given operation "ListCaseViews" enabled - And new "ListCaseViews" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: List case watchers returns "Bad Request" response - Given operation "ListCaseWatchers" enabled - And new "ListCaseWatchers" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List case watchers returns "Not Found" response - Given operation "ListCaseWatchers" enabled - And new "ListCaseWatchers" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List case watchers returns "OK" response - Given operation "ListCaseWatchers" enabled - And new "ListCaseWatchers" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: List maintenance windows returns "Bad Request" response - Given operation "ListMaintenanceWindows" enabled - And new "ListMaintenanceWindows" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List maintenance windows returns "Not Found" response - Given operation "ListMaintenanceWindows" enabled - And new "ListMaintenanceWindows" request - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List maintenance windows returns "OK" response - Given operation "ListMaintenanceWindows" enabled - And new "ListMaintenanceWindows" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: List project favorites returns "Bad Request" response - Given operation "ListUserCaseProjectFavorites" enabled - And new "ListUserCaseProjectFavorites" request - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: List project favorites returns "Not Found" response - Given operation "ListUserCaseProjectFavorites" enabled - And new "ListUserCaseProjectFavorites" request - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: List project favorites returns "OK" response - Given operation "ListUserCaseProjectFavorites" enabled - And new "ListUserCaseProjectFavorites" request - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Remove Jira issue link from case returns "Bad Request" response Given operation "UnlinkJiraIssue" enabled @@ -1069,33 +490,6 @@ Feature: Case Management When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/case-management - Scenario: Remove insights from a case returns "Bad Request" response - Given operation "RemoveCaseInsights" enabled - And new "RemoveCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Remove insights from a case returns "Not Found" response - Given operation "RemoveCaseInsights" enabled - And new "RemoveCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Remove insights from a case returns "OK" response - Given operation "RemoveCaseInsights" enabled - And new "RemoveCaseInsights" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"insights": [{"ref": "/monitors/12345?q=total", "resource_id": "12345", "type": "SECURITY_SIGNAL"}]}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Search cases returns "Bad Request" response Given new "SearchCases" request @@ -1175,111 +569,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Unfavorite a project returns "Bad Request" response - Given operation "UnfavoriteCaseProject" enabled - And new "UnfavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Unfavorite a project returns "No Content" response - Given operation "UnfavoriteCaseProject" enabled - And new "UnfavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Unfavorite a project returns "Not Found" response - Given operation "UnfavoriteCaseProject" enabled - And new "UnfavoriteCaseProject" request - And request contains "project_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Unwatch a case returns "Bad Request" response - Given operation "UnwatchCase" enabled - And new "UnwatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Unwatch a case returns "No Content" response - Given operation "UnwatchCase" enabled - And new "UnwatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Unwatch a case returns "Not Found" response - Given operation "UnwatchCase" enabled - And new "UnwatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update a case view returns "Bad Request" response - Given operation "UpdateCaseView" enabled - And new "UpdateCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "view"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update a case view returns "Not Found" response - Given operation "UpdateCaseView" enabled - And new "UpdateCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "view"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update a case view returns "OK" response - Given operation "UpdateCaseView" enabled - And new "UpdateCaseView" request - And request contains "view_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "view"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Update a maintenance window returns "Bad Request" response - Given operation "UpdateMaintenanceWindow" enabled - And new "UpdateMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update a maintenance window returns "Not Found" response - Given operation "UpdateMaintenanceWindow" enabled - And new "UpdateMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update a maintenance window returns "OK" response - Given operation "UpdateMaintenanceWindow" enabled - And new "UpdateMaintenanceWindow" request - And request contains "maintenance_window_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {}, "type": "maintenance_window"}} - When the request is sent - Then the response status is 200 OK - @generated @skip @team:DataDog/case-management Scenario: Update a notification rule returns "Bad Request" response Given new "UpdateProjectNotificationRule" request @@ -1333,36 +622,6 @@ Feature: Case Management And the response "data" has field "id" And the response "data.attributes.name" is equal to "Updated Project Name {{ unique }}" - @generated @skip @team:DataDog/case-management - Scenario: Update an automation rule returns "Bad Request" response - Given operation "UpdateCaseAutomationRule" enabled - And new "UpdateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update an automation rule returns "Not Found" response - Given operation "UpdateCaseAutomationRule" enabled - And new "UpdateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update an automation rule returns "OK" response - Given operation "UpdateCaseAutomationRule" enabled - And new "UpdateCaseAutomationRule" request - And request contains "project_id" parameter from "REPLACE.ME" - And request contains "rule_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}} - When the request is sent - Then the response status is 200 OK - @skip @team:DataDog/case-management Scenario: Update case attributes returns "Bad Request" response Given new "UpdateAttributes" request @@ -1389,36 +648,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Update case comment returns "Bad Request" response - Given operation "UpdateCaseComment" enabled - And new "UpdateCaseComment" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "cell_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"comment": "Updated comment text"}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update case comment returns "Not Found" response - Given operation "UpdateCaseComment" enabled - And new "UpdateCaseComment" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "cell_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"comment": "Updated comment text"}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update case comment returns "OK" response - Given operation "UpdateCaseComment" enabled - And new "UpdateCaseComment" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "cell_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"comment": "Updated comment text"}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - @skip @team:DataDog/case-management Scenario: Update case custom attribute returns "Bad Request" response Given new "UpdateCaseCustomAttribute" request @@ -1479,33 +708,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Update case due date returns "Bad Request" response - Given operation "UpdateCaseDueDate" enabled - And new "UpdateCaseDueDate" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"due_date": "2026-12-31"}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update case due date returns "Not Found" response - Given operation "UpdateCaseDueDate" enabled - And new "UpdateCaseDueDate" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"due_date": "2026-12-31"}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update case due date returns "OK" response - Given operation "UpdateCaseDueDate" enabled - And new "UpdateCaseDueDate" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"due_date": "2026-12-31"}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/case-management Scenario: Update case priority returns "Bad Request" response Given new "UpdatePriority" request @@ -1560,33 +762,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Update case resolved reason returns "Bad Request" response - Given operation "UpdateCaseResolvedReason" enabled - And new "UpdateCaseResolvedReason" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"security_resolved_reason": "FALSE_POSITIVE"}, "type": "case"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update case resolved reason returns "Not Found" response - Given operation "UpdateCaseResolvedReason" enabled - And new "UpdateCaseResolvedReason" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"security_resolved_reason": "FALSE_POSITIVE"}, "type": "case"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update case resolved reason returns "OK" response - Given operation "UpdateCaseResolvedReason" enabled - And new "UpdateCaseResolvedReason" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"security_resolved_reason": "FALSE_POSITIVE"}, "type": "case"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/case-management Scenario: Update case status returns "Bad Request" response Given new "UpdateStatus" request @@ -1639,30 +814,3 @@ Feature: Case Management And body with value {"data": {"attributes": {"title": "[UPDATED] Memory leak investigation on API"}, "type": "case"}} When the request is sent Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Watch a case returns "Bad Request" response - Given operation "WatchCase" enabled - And new "WatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Watch a case returns "Created" response - Given operation "WatchCase" enabled - And new "WatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Watch a case returns "Not Found" response - Given operation "WatchCase" enabled - And new "WatchCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And request contains "user_uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found diff --git a/features/v2/case_management_attribute.feature b/features/v2/case_management_attribute.feature index 47806e809c06..3ac06e724b79 100644 --- a/features/v2/case_management_attribute.feature +++ b/features/v2/case_management_attribute.feature @@ -75,33 +75,3 @@ Feature: Case Management Attribute Given new "GetAllCustomAttributes" request When the request is sent Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Update custom attribute config returns "Bad Request" response - Given operation "UpdateCustomAttributeConfig" enabled - And new "UpdateCustomAttributeConfig" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And request contains "custom_attribute_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Updated description.", "display_name": "AWS Region", "type": "NUMBER", "type_data": {"options": [{"value": "us-east-1"}]}}, "type": "custom_attribute"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update custom attribute config returns "Not Found" response - Given operation "UpdateCustomAttributeConfig" enabled - And new "UpdateCustomAttributeConfig" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And request contains "custom_attribute_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Updated description.", "display_name": "AWS Region", "type": "NUMBER", "type_data": {"options": [{"value": "us-east-1"}]}}, "type": "custom_attribute"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update custom attribute config returns "OK" response - Given operation "UpdateCustomAttributeConfig" enabled - And new "UpdateCustomAttributeConfig" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And request contains "custom_attribute_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Updated description.", "display_name": "AWS Region", "type": "NUMBER", "type_data": {"options": [{"value": "us-east-1"}]}}, "type": "custom_attribute"}} - When the request is sent - Then the response status is 200 OK diff --git a/features/v2/case_management_type.feature b/features/v2/case_management_type.feature index 260ac3d3c42b..0773d7d241b5 100644 --- a/features/v2/case_management_type.feature +++ b/features/v2/case_management_type.feature @@ -44,30 +44,3 @@ Feature: Case Management Type Given new "GetAllCaseTypes" request When the request is sent Then the response status is 200 OK - - @generated @skip @team:DataDog/case-management - Scenario: Update a case type returns "Bad Request" response - Given operation "UpdateCaseType" enabled - And new "UpdateCaseType" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Investigations done in case management", "emoji": "\ud83d\udd75\ud83c\udffb\u200d\u2642\ufe0f", "name": "Investigation"}, "type": "case_type"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update a case type returns "Not Found" response - Given operation "UpdateCaseType" enabled - And new "UpdateCaseType" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Investigations done in case management", "emoji": "\ud83d\udd75\ud83c\udffb\u200d\u2642\ufe0f", "name": "Investigation"}, "type": "case_type"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update a case type returns "OK" response - Given operation "UpdateCaseType" enabled - And new "UpdateCaseType" request - And request contains "case_type_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"description": "Investigations done in case management", "emoji": "\ud83d\udd75\ud83c\udffb\u200d\u2642\ufe0f", "name": "Investigation"}, "type": "case_type"}} - When the request is sent - Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 2abb97ee5cc9..3e4535f255b5 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -790,49 +790,6 @@ "type": "safe" } }, - "AggregateCases": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "BulkUpdateCases": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "CountCases": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "ListCaseLinks": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "CreateCaseLink": { - "tag": "Case Management", - "undo": { - "operationId": "DeleteCaseLink", - "parameters": [ - { - "name": "link_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteCaseLink": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "GetProjects": { "tag": "Case Management", "undo": { @@ -852,12 +809,6 @@ "type": "unsafe" } }, - "ListUserCaseProjectFavorites": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, "DeleteProject": { "tag": "Case Management", "undo": { @@ -876,25 +827,6 @@ "type": "idempotent" } }, - "UnfavoriteCaseProject": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "FavoriteCaseProject": { - "tag": "Case Management", - "undo": { - "operationId": "UnfavoriteCaseProject", - "parameters": [ - { - "name": "project_id", - "source": "path.project_id" - } - ], - "type": "unsafe" - } - }, "GetProjectNotificationRules": { "tag": "Case Management", "undo": { @@ -930,59 +862,6 @@ "type": "idempotent" } }, - "ListCaseAutomationRules": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "CreateCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "operationId": "DeleteCaseAutomationRule", - "parameters": [ - { - "name": "project_id", - "source": "path.project_id" - }, - { - "name": "rule_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "GetCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "UpdateCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "DisableCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "EnableCaseAutomationRule": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "GetAllCaseTypes": { "tag": "Case Management Type", "undo": { @@ -1007,12 +886,6 @@ "type": "idempotent" } }, - "UpdateCaseType": { - "tag": "Case Management Type", - "undo": { - "type": "idempotent" - } - }, "GetAllCustomAttributeConfigsByCaseType": { "tag": "Case Management Attribute", "undo": { @@ -1031,49 +904,6 @@ "type": "idempotent" } }, - "UpdateCustomAttributeConfig": { - "tag": "Case Management Attribute", - "undo": { - "type": "idempotent" - } - }, - "ListCaseViews": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "CreateCaseView": { - "tag": "Case Management", - "undo": { - "operationId": "DeleteCaseView", - "parameters": [ - { - "name": "view_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteCaseView": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "GetCaseView": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "UpdateCaseView": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "GetCase": { "tag": "Case Management", "undo": { @@ -1110,12 +940,6 @@ "type": "idempotent" } }, - "UpdateCaseComment": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "DeleteCaseCustomAttribute": { "tag": "Case Management", "undo": { @@ -1134,24 +958,6 @@ "type": "idempotent" } }, - "UpdateCaseDueDate": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "RemoveCaseInsights": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "AddCaseInsights": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, "UpdatePriority": { "tag": "Case Management", "undo": { @@ -1208,24 +1014,12 @@ "type": "unsafe" } }, - "UpdateCaseResolvedReason": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "UpdateStatus": { "tag": "Case Management", "undo": { "type": "idempotent" } }, - "ListCaseTimeline": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, "UpdateCaseTitle": { "tag": "Case Management", "undo": { @@ -1244,35 +1038,6 @@ "type": "idempotent" } }, - "ListCaseWatchers": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "UnwatchCase": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "WatchCase": { - "tag": "Case Management", - "undo": { - "operationId": "UnwatchCase", - "parameters": [ - { - "name": "case_id", - "source": "path.case_id" - }, - { - "name": "user_uuid", - "source": "path.user_uuid" - } - ], - "type": "unsafe" - } - }, "ListCatalogEntity": { "tag": "Software Catalog", "undo": { @@ -4099,37 +3864,6 @@ "type": "safe" } }, - "ListMaintenanceWindows": { - "tag": "Case Management", - "undo": { - "type": "safe" - } - }, - "CreateMaintenanceWindow": { - "tag": "Case Management", - "undo": { - "operationId": "DeleteMaintenanceWindow", - "parameters": [ - { - "name": "maintenance_window_id", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteMaintenanceWindow": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "UpdateMaintenanceWindow": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, "ListTagConfigurations": { "tag": "Metrics", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 6e22aee19a43..0164a884ad16 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -246,49 +246,13 @@ def initialize "v2.get_investigation": false, "v2.list_investigations": false, "v2.trigger_investigation": false, - "v2.add_case_insights": false, - "v2.aggregate_cases": false, - "v2.bulk_update_cases": false, - "v2.count_cases": false, - "v2.create_case_automation_rule": false, "v2.create_case_jira_issue": false, - "v2.create_case_link": false, "v2.create_case_notebook": false, "v2.create_case_service_now_ticket": false, - "v2.create_case_view": false, - "v2.create_maintenance_window": false, - "v2.delete_case_automation_rule": false, - "v2.delete_case_link": false, - "v2.delete_case_view": false, - "v2.delete_maintenance_window": false, - "v2.disable_case_automation_rule": false, - "v2.enable_case_automation_rule": false, - "v2.favorite_case_project": false, - "v2.get_case_automation_rule": false, - "v2.get_case_view": false, "v2.link_incident": false, "v2.link_jira_issue_to_case": false, - "v2.list_case_automation_rules": false, - "v2.list_case_links": false, - "v2.list_case_timeline": false, - "v2.list_case_views": false, - "v2.list_case_watchers": false, - "v2.list_maintenance_windows": false, - "v2.list_user_case_project_favorites": false, "v2.move_case_to_project": false, - "v2.remove_case_insights": false, - "v2.unfavorite_case_project": false, "v2.unlink_jira_issue": false, - "v2.unwatch_case": false, - "v2.update_case_automation_rule": false, - "v2.update_case_comment": false, - "v2.update_case_due_date": false, - "v2.update_case_resolved_reason": false, - "v2.update_case_view": false, - "v2.update_maintenance_window": false, - "v2.watch_case": false, - "v2.update_case_type": false, - "v2.update_custom_attribute_config": false, "v2.create_change_request": false, "v2.create_change_request_branch": false, "v2.delete_change_request_decision": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index eab499090a8d..57feb04c6291 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1388,22 +1388,6 @@ def overrides "v2.authn_mapping_update_relationships" => "AuthNMappingUpdateRelationships", "v2.authn_mapping_update_request" => "AuthNMappingUpdateRequest", "v2.auto_close_inactive_cases" => "AutoCloseInactiveCases", - "v2.automation_rule" => "AutomationRule", - "v2.automation_rule_action" => "AutomationRuleAction", - "v2.automation_rule_action_data" => "AutomationRuleActionData", - "v2.automation_rule_action_type" => "AutomationRuleActionType", - "v2.automation_rule_attributes" => "AutomationRuleAttributes", - "v2.automation_rule_create" => "AutomationRuleCreate", - "v2.automation_rule_create_attributes" => "AutomationRuleCreateAttributes", - "v2.automation_rule_create_request" => "AutomationRuleCreateRequest", - "v2.automation_rule_relationships" => "AutomationRuleRelationships", - "v2.automation_rule_response" => "AutomationRuleResponse", - "v2.automation_rules_response" => "AutomationRulesResponse", - "v2.automation_rule_trigger" => "AutomationRuleTrigger", - "v2.automation_rule_trigger_data" => "AutomationRuleTriggerData", - "v2.automation_rule_trigger_type" => "AutomationRuleTriggerType", - "v2.automation_rule_update" => "AutomationRuleUpdate", - "v2.automation_rule_update_request" => "AutomationRuleUpdateRequest", "v2.auto_transition_assigned_cases" => "AutoTransitionAssignedCases", "v2.aws_account_create_request" => "AWSAccountCreateRequest", "v2.aws_account_create_request_attributes" => "AWSAccountCreateRequestAttributes", @@ -1625,34 +1609,13 @@ def overrides "v2.cancel_data_deletion_response_body" => "CancelDataDeletionResponseBody", "v2.case" => "Case", "v2.case3rd_party_ticket_status" => "Case3rdPartyTicketStatus", - "v2.case_aggregate_group" => "CaseAggregateGroup", - "v2.case_aggregate_group_by" => "CaseAggregateGroupBy", - "v2.case_aggregate_request" => "CaseAggregateRequest", - "v2.case_aggregate_request_attributes" => "CaseAggregateRequestAttributes", - "v2.case_aggregate_request_data" => "CaseAggregateRequestData", - "v2.case_aggregate_resource_type" => "CaseAggregateResourceType", - "v2.case_aggregate_response" => "CaseAggregateResponse", - "v2.case_aggregate_response_attributes" => "CaseAggregateResponseAttributes", - "v2.case_aggregate_response_data" => "CaseAggregateResponseData", "v2.case_assign" => "CaseAssign", "v2.case_assign_attributes" => "CaseAssignAttributes", "v2.case_assign_request" => "CaseAssignRequest", "v2.case_attributes" => "CaseAttributes", - "v2.case_automation_rule_resource_type" => "CaseAutomationRuleResourceType", - "v2.case_automation_rule_state" => "CaseAutomationRuleState", - "v2.case_bulk_action_type" => "CaseBulkActionType", - "v2.case_bulk_resource_type" => "CaseBulkResourceType", - "v2.case_bulk_update_request" => "CaseBulkUpdateRequest", - "v2.case_bulk_update_request_attributes" => "CaseBulkUpdateRequestAttributes", - "v2.case_bulk_update_request_data" => "CaseBulkUpdateRequestData", "v2.case_comment" => "CaseComment", "v2.case_comment_attributes" => "CaseCommentAttributes", "v2.case_comment_request" => "CaseCommentRequest", - "v2.case_count_group" => "CaseCountGroup", - "v2.case_count_group_value" => "CaseCountGroupValue", - "v2.case_count_response" => "CaseCountResponse", - "v2.case_count_response_attributes" => "CaseCountResponseAttributes", - "v2.case_count_response_data" => "CaseCountResponseData", "v2.case_create" => "CaseCreate", "v2.case_create_attributes" => "CaseCreateAttributes", "v2.case_create_relationships" => "CaseCreateRelationships", @@ -1660,19 +1623,7 @@ def overrides "v2.case_data_type" => "CaseDataType", "v2.case_empty" => "CaseEmpty", "v2.case_empty_request" => "CaseEmptyRequest", - "v2.case_insight" => "CaseInsight", - "v2.case_insights_attributes" => "CaseInsightsAttributes", - "v2.case_insights_data" => "CaseInsightsData", "v2.case_insights_items" => "CaseInsightsItems", - "v2.case_insights_request" => "CaseInsightsRequest", - "v2.case_insight_type" => "CaseInsightType", - "v2.case_link" => "CaseLink", - "v2.case_link_attributes" => "CaseLinkAttributes", - "v2.case_link_create" => "CaseLinkCreate", - "v2.case_link_create_request" => "CaseLinkCreateRequest", - "v2.case_link_resource_type" => "CaseLinkResourceType", - "v2.case_link_response" => "CaseLinkResponse", - "v2.case_links_response" => "CaseLinksResponse", "v2.case_management_project" => "CaseManagementProject", "v2.case_management_project_data" => "CaseManagementProjectData", "v2.case_management_project_data_type" => "CaseManagementProjectDataType", @@ -1710,51 +1661,23 @@ def overrides "v2.case_type_resource_type" => "CaseTypeResourceType", "v2.case_type_response" => "CaseTypeResponse", "v2.case_types_response" => "CaseTypesResponse", - "v2.case_type_update" => "CaseTypeUpdate", - "v2.case_type_update_request" => "CaseTypeUpdateRequest", "v2.case_update_attributes" => "CaseUpdateAttributes", "v2.case_update_attributes_attributes" => "CaseUpdateAttributesAttributes", "v2.case_update_attributes_request" => "CaseUpdateAttributesRequest", - "v2.case_update_comment" => "CaseUpdateComment", - "v2.case_update_comment_attributes" => "CaseUpdateCommentAttributes", - "v2.case_update_comment_request" => "CaseUpdateCommentRequest", "v2.case_update_custom_attribute" => "CaseUpdateCustomAttribute", "v2.case_update_custom_attribute_request" => "CaseUpdateCustomAttributeRequest", "v2.case_update_description" => "CaseUpdateDescription", "v2.case_update_description_attributes" => "CaseUpdateDescriptionAttributes", "v2.case_update_description_request" => "CaseUpdateDescriptionRequest", - "v2.case_update_due_date" => "CaseUpdateDueDate", - "v2.case_update_due_date_attributes" => "CaseUpdateDueDateAttributes", - "v2.case_update_due_date_request" => "CaseUpdateDueDateRequest", "v2.case_update_priority" => "CaseUpdatePriority", "v2.case_update_priority_attributes" => "CaseUpdatePriorityAttributes", "v2.case_update_priority_request" => "CaseUpdatePriorityRequest", - "v2.case_update_resolved_reason" => "CaseUpdateResolvedReason", - "v2.case_update_resolved_reason_attributes" => "CaseUpdateResolvedReasonAttributes", - "v2.case_update_resolved_reason_request" => "CaseUpdateResolvedReasonRequest", "v2.case_update_status" => "CaseUpdateStatus", "v2.case_update_status_attributes" => "CaseUpdateStatusAttributes", "v2.case_update_status_request" => "CaseUpdateStatusRequest", "v2.case_update_title" => "CaseUpdateTitle", "v2.case_update_title_attributes" => "CaseUpdateTitleAttributes", "v2.case_update_title_request" => "CaseUpdateTitleRequest", - "v2.case_view" => "CaseView", - "v2.case_view_attributes" => "CaseViewAttributes", - "v2.case_view_create" => "CaseViewCreate", - "v2.case_view_create_attributes" => "CaseViewCreateAttributes", - "v2.case_view_create_request" => "CaseViewCreateRequest", - "v2.case_view_relationships" => "CaseViewRelationships", - "v2.case_view_resource_type" => "CaseViewResourceType", - "v2.case_view_response" => "CaseViewResponse", - "v2.case_views_response" => "CaseViewsResponse", - "v2.case_view_update" => "CaseViewUpdate", - "v2.case_view_update_attributes" => "CaseViewUpdateAttributes", - "v2.case_view_update_request" => "CaseViewUpdateRequest", - "v2.case_watcher" => "CaseWatcher", - "v2.case_watcher_relationships" => "CaseWatcherRelationships", - "v2.case_watcher_resource_type" => "CaseWatcherResourceType", - "v2.case_watchers_response" => "CaseWatchersResponse", - "v2.case_watcher_user_relationship" => "CaseWatcherUserRelationship", "v2.change_event_attributes" => "ChangeEventAttributes", "v2.change_event_attributes_author" => "ChangeEventAttributesAuthor", "v2.change_event_attributes_author_type" => "ChangeEventAttributesAuthorType", @@ -2340,12 +2263,7 @@ def overrides "v2.custom_attribute_config_resource_type" => "CustomAttributeConfigResourceType", "v2.custom_attribute_config_response" => "CustomAttributeConfigResponse", "v2.custom_attribute_configs_response" => "CustomAttributeConfigsResponse", - "v2.custom_attribute_config_update" => "CustomAttributeConfigUpdate", - "v2.custom_attribute_config_update_attributes" => "CustomAttributeConfigUpdateAttributes", - "v2.custom_attribute_config_update_request" => "CustomAttributeConfigUpdateRequest", - "v2.custom_attribute_select_option" => "CustomAttributeSelectOption", "v2.custom_attribute_type" => "CustomAttributeType", - "v2.custom_attribute_type_data" => "CustomAttributeTypeData", "v2.custom_attribute_value" => "CustomAttributeValue", "v2.custom_attribute_values_union" => "CustomAttributeValuesUnion", "v2.custom_connection" => "CustomConnection", @@ -3918,17 +3836,6 @@ def overrides "v2.maintenance_data_relationships_last_modified_by_user_data" => "MaintenanceDataRelationshipsLastModifiedByUserData", "v2.maintenance_data_relationships_status_page" => "MaintenanceDataRelationshipsStatusPage", "v2.maintenance_data_relationships_status_page_data" => "MaintenanceDataRelationshipsStatusPageData", - "v2.maintenance_window" => "MaintenanceWindow", - "v2.maintenance_window_attributes" => "MaintenanceWindowAttributes", - "v2.maintenance_window_create" => "MaintenanceWindowCreate", - "v2.maintenance_window_create_attributes" => "MaintenanceWindowCreateAttributes", - "v2.maintenance_window_create_request" => "MaintenanceWindowCreateRequest", - "v2.maintenance_window_resource_type" => "MaintenanceWindowResourceType", - "v2.maintenance_window_response" => "MaintenanceWindowResponse", - "v2.maintenance_windows_response" => "MaintenanceWindowsResponse", - "v2.maintenance_window_update" => "MaintenanceWindowUpdate", - "v2.maintenance_window_update_attributes" => "MaintenanceWindowUpdateAttributes", - "v2.maintenance_window_update_request" => "MaintenanceWindowUpdateRequest", "v2.managed_orgs_data" => "ManagedOrgsData", "v2.managed_orgs_relationships" => "ManagedOrgsRelationships", "v2.managed_orgs_relationship_to_org" => "ManagedOrgsRelationshipToOrg", @@ -4174,6 +4081,11 @@ def overrides "v2.observability_pipeline_add_fields_processor_type" => "ObservabilityPipelineAddFieldsProcessorType", "v2.observability_pipeline_add_hostname_processor" => "ObservabilityPipelineAddHostnameProcessor", "v2.observability_pipeline_add_hostname_processor_type" => "ObservabilityPipelineAddHostnameProcessorType", + "v2.observability_pipeline_add_metric_tags_processor" => "ObservabilityPipelineAddMetricTagsProcessor", + "v2.observability_pipeline_add_metric_tags_processor_type" => "ObservabilityPipelineAddMetricTagsProcessorType", + "v2.observability_pipeline_aggregate_processor" => "ObservabilityPipelineAggregateProcessor", + "v2.observability_pipeline_aggregate_processor_mode" => "ObservabilityPipelineAggregateProcessorMode", + "v2.observability_pipeline_aggregate_processor_type" => "ObservabilityPipelineAggregateProcessorType", "v2.observability_pipeline_amazon_data_firehose_source" => "ObservabilityPipelineAmazonDataFirehoseSource", "v2.observability_pipeline_amazon_data_firehose_source_type" => "ObservabilityPipelineAmazonDataFirehoseSourceType", "v2.observability_pipeline_amazon_open_search_destination" => "ObservabilityPipelineAmazonOpenSearchDestination", @@ -4370,6 +4282,9 @@ def overrides "v2.observability_pipeline_rename_fields_processor" => "ObservabilityPipelineRenameFieldsProcessor", "v2.observability_pipeline_rename_fields_processor_field" => "ObservabilityPipelineRenameFieldsProcessorField", "v2.observability_pipeline_rename_fields_processor_type" => "ObservabilityPipelineRenameFieldsProcessorType", + "v2.observability_pipeline_rename_metric_tags_processor" => "ObservabilityPipelineRenameMetricTagsProcessor", + "v2.observability_pipeline_rename_metric_tags_processor_tag" => "ObservabilityPipelineRenameMetricTagsProcessorTag", + "v2.observability_pipeline_rename_metric_tags_processor_type" => "ObservabilityPipelineRenameMetricTagsProcessorType", "v2.observability_pipeline_rsyslog_destination" => "ObservabilityPipelineRsyslogDestination", "v2.observability_pipeline_rsyslog_destination_type" => "ObservabilityPipelineRsyslogDestinationType", "v2.observability_pipeline_rsyslog_source" => "ObservabilityPipelineRsyslogSource", @@ -4457,6 +4372,13 @@ def overrides "v2.observability_pipeline_syslog_ng_source" => "ObservabilityPipelineSyslogNgSource", "v2.observability_pipeline_syslog_ng_source_type" => "ObservabilityPipelineSyslogNgSourceType", "v2.observability_pipeline_syslog_source_mode" => "ObservabilityPipelineSyslogSourceMode", + "v2.observability_pipeline_tag_cardinality_limit_processor" => "ObservabilityPipelineTagCardinalityLimitProcessor", + "v2.observability_pipeline_tag_cardinality_limit_processor_action" => "ObservabilityPipelineTagCardinalityLimitProcessorAction", + "v2.observability_pipeline_tag_cardinality_limit_processor_per_metric_limit" => "ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit", + "v2.observability_pipeline_tag_cardinality_limit_processor_per_metric_mode" => "ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode", + "v2.observability_pipeline_tag_cardinality_limit_processor_per_tag_limit" => "ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit", + "v2.observability_pipeline_tag_cardinality_limit_processor_per_tag_mode" => "ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode", + "v2.observability_pipeline_tag_cardinality_limit_processor_type" => "ObservabilityPipelineTagCardinalityLimitProcessorType", "v2.observability_pipeline_throttle_processor" => "ObservabilityPipelineThrottleProcessor", "v2.observability_pipeline_throttle_processor_type" => "ObservabilityPipelineThrottleProcessorType", "v2.observability_pipeline_tls" => "ObservabilityPipelineTls", @@ -4830,9 +4752,6 @@ def overrides "v2.projected_cost_attributes" => "ProjectedCostAttributes", "v2.projected_cost_response" => "ProjectedCostResponse", "v2.projected_cost_type" => "ProjectedCostType", - "v2.project_favorite" => "ProjectFavorite", - "v2.project_favorite_resource_type" => "ProjectFavoriteResourceType", - "v2.project_favorites_response" => "ProjectFavoritesResponse", "v2.project_notification_settings" => "ProjectNotificationSettings", "v2.project_relationship" => "ProjectRelationship", "v2.project_relationship_data" => "ProjectRelationshipData", diff --git a/lib/datadog_api_client/v2/api/case_management_api.rb b/lib/datadog_api_client/v2/api/case_management_api.rb index a6f79e505c2c..cf7cda64a2e0 100644 --- a/lib/datadog_api_client/v2/api/case_management_api.rb +++ b/lib/datadog_api_client/v2/api/case_management_api.rb @@ -23,43 +23,37 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end - # Add insights to a case. + # Archive case. # - # @see #add_case_insights_with_http_info - def add_case_insights(case_id, body, opts = {}) - data, _status_code, _headers = add_case_insights_with_http_info(case_id, body, opts) + # @see #archive_case_with_http_info + def archive_case(case_id, body, opts = {}) + data, _status_code, _headers = archive_case_with_http_info(case_id, body, opts) data end - # Add insights to a case. + # Archive case. # - # Adds one or more insights to a case. Insights are references to related Datadog resources (such as monitors, security signals, incidents, or error tracking issues) that provide investigative context. Up to 100 insights can be added per request. Each insight requires a type (see `CaseInsightType` for allowed values), a ref (URL path to the resource), and a resource_id. + # Archive case # # @param case_id [String] Case's UUID or key - # @param body [CaseInsightsRequest] Case insights request. + # @param body [CaseEmptyRequest] Archive case payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def add_case_insights_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.add_case_insights".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.add_case_insights") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.add_case_insights")) - end + def archive_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.add_case_insights ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.archive_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.add_case_insights" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.archive_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.add_case_insights" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.archive_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/insights'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/archive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -84,7 +78,7 @@ def add_case_insights_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :add_case_insights, + :operation => :archive_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -94,45 +88,44 @@ def add_case_insights_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#add_case_insights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#archive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Aggregate cases. + # Assign case. # - # @see #aggregate_cases_with_http_info - def aggregate_cases(body, opts = {}) - data, _status_code, _headers = aggregate_cases_with_http_info(body, opts) + # @see #assign_case_with_http_info + def assign_case(case_id, body, opts = {}) + data, _status_code, _headers = assign_case_with_http_info(case_id, body, opts) data end - # Aggregate cases. + # Assign case. # - # Performs an aggregation query over cases, grouping results by specified fields and returning counts per group along with a total. Useful for dashboards and analytics. + # Assign case to a user # - # @param body [CaseAggregateRequest] Case aggregate request payload. + # @param case_id [String] Case's UUID or key + # @param body [CaseAssignRequest] Assign case payload # @param opts [Hash] the optional parameters - # @return [Array<(CaseAggregateResponse, Integer, Hash)>] CaseAggregateResponse data, response status code and response headers - def aggregate_cases_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.aggregate_cases".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.aggregate_cases") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.aggregate_cases")) - end + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def assign_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.aggregate_cases ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.assign_case ...' + end + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.assign_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.aggregate_cases" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.assign_case" end # resource path - local_var_path = '/api/v2/cases/aggregate' + local_var_path = '/api/v2/cases/{case_id}/assign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -151,13 +144,13 @@ def aggregate_cases_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseAggregateResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :aggregate_cases, + :operation => :assign_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -169,42 +162,42 @@ def aggregate_cases_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#aggregate_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#assign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Archive case. + # Comment case. # - # @see #archive_case_with_http_info - def archive_case(case_id, body, opts = {}) - data, _status_code, _headers = archive_case_with_http_info(case_id, body, opts) + # @see #comment_case_with_http_info + def comment_case(case_id, body, opts = {}) + data, _status_code, _headers = comment_case_with_http_info(case_id, body, opts) data end - # Archive case. + # Comment case. # - # Archive case + # Comment case # # @param case_id [String] Case's UUID or key - # @param body [CaseEmptyRequest] Archive case payload + # @param body [CaseCommentRequest] Case comment payload # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def archive_case_with_http_info(case_id, body, opts = {}) + # @return [Array<(TimelineResponse, Integer, Hash)>] TimelineResponse data, response status code and response headers + def comment_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.archive_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.comment_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.archive_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.comment_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.archive_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.comment_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/archive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/comment'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -223,13 +216,13 @@ def archive_case_with_http_info(case_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' + return_type = opts[:debug_return_type] || 'TimelineResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :archive_case, + :operation => :comment_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -241,42 +234,37 @@ def archive_case_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#archive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#comment_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Assign case. + # Create a case. # - # @see #assign_case_with_http_info - def assign_case(case_id, body, opts = {}) - data, _status_code, _headers = assign_case_with_http_info(case_id, body, opts) + # @see #create_case_with_http_info + def create_case(body, opts = {}) + data, _status_code, _headers = create_case_with_http_info(body, opts) data end - # Assign case. + # Create a case. # - # Assign case to a user + # Create a Case # - # @param case_id [String] Case's UUID or key - # @param body [CaseAssignRequest] Assign case payload + # @param body [CaseCreateRequest] Case payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def assign_case_with_http_info(case_id, body, opts = {}) + def create_case_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.assign_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.assign_case" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.assign_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/assign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases' # query parameters query_params = opts[:query_params] || {} @@ -301,7 +289,7 @@ def assign_case_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :assign_case, + :operation => :create_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -313,43 +301,48 @@ def assign_case_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#assign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Bulk update cases. + # Create Jira issue for case. # - # @see #bulk_update_cases_with_http_info - def bulk_update_cases(body, opts = {}) - bulk_update_cases_with_http_info(body, opts) + # @see #create_case_jira_issue_with_http_info + def create_case_jira_issue(case_id, body, opts = {}) + create_case_jira_issue_with_http_info(case_id, body, opts) nil end - # Bulk update cases. + # Create Jira issue for case. # - # Applies a single action (such as changing priority, status, assignment, or archiving) to multiple cases at once. The list of case IDs and the action type with its payload are specified in the request body. + # Create a new Jira issue and link it to a case # - # @param body [CaseBulkUpdateRequest] Case bulk update request payload. + # @param case_id [String] Case's UUID or key + # @param body [JiraIssueCreateRequest] Jira issue creation request # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def bulk_update_cases_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.bulk_update_cases".to_sym] + def create_case_jira_issue_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_case_jira_issue".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.bulk_update_cases") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_jira_issue") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.bulk_update_cases")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_jira_issue")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.bulk_update_cases ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_jira_issue ...' + end + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_jira_issue" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.bulk_update_cases" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_jira_issue" end # resource path - local_var_path = '/api/v2/cases/bulk' + local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -374,7 +367,7 @@ def bulk_update_cases_with_http_info(body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :bulk_update_cases, + :operation => :create_case_jira_issue, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -386,42 +379,48 @@ def bulk_update_cases_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#bulk_update_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Comment case. + # Create investigation notebook for case. # - # @see #comment_case_with_http_info - def comment_case(case_id, body, opts = {}) - data, _status_code, _headers = comment_case_with_http_info(case_id, body, opts) - data + # @see #create_case_notebook_with_http_info + def create_case_notebook(case_id, body, opts = {}) + create_case_notebook_with_http_info(case_id, body, opts) + nil end - # Comment case. + # Create investigation notebook for case. # - # Comment case + # Create a new investigation notebook and link it to a case # # @param case_id [String] Case's UUID or key - # @param body [CaseCommentRequest] Case comment payload + # @param body [NotebookCreateRequest] Notebook creation request # @param opts [Hash] the optional parameters - # @return [Array<(TimelineResponse, Integer, Hash)>] TimelineResponse data, response status code and response headers - def comment_case_with_http_info(case_id, body, opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def create_case_notebook_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_case_notebook".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_notebook") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_notebook")) + end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.comment_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_notebook ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.comment_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_notebook" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.comment_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_notebook" end # resource path - local_var_path = '/api/v2/cases/{case_id}/comment'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/relationships/notebook'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -429,7 +428,7 @@ def comment_case_with_http_info(case_id, body, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -440,13 +439,13 @@ def comment_case_with_http_info(case_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'TimelineResponse' + return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :comment_case, + :operation => :create_case_notebook, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -458,67 +457,73 @@ def comment_case_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#comment_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_notebook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Count cases. + # Create ServiceNow ticket for case. # - # @see #count_cases_with_http_info - def count_cases(opts = {}) - data, _status_code, _headers = count_cases_with_http_info(opts) - data + # @see #create_case_service_now_ticket_with_http_info + def create_case_service_now_ticket(case_id, body, opts = {}) + create_case_service_now_ticket_with_http_info(case_id, body, opts) + nil end - # Count cases. + # Create ServiceNow ticket for case. # - # Returns case counts, optionally grouped by one or more fields (for example, status, priority). Supports a query filter to narrow the scope. + # Create a new ServiceNow incident ticket and link it to a case # + # @param case_id [String] Case's UUID or key + # @param body [ServiceNowTicketCreateRequest] ServiceNow ticket creation request # @param opts [Hash] the optional parameters - # @option opts [String] :query_filter Filter query for cases. - # @option opts [String] :group_bys Comma-separated fields to group by. - # @option opts [Integer] :limit Maximum facet values to return. - # @return [Array<(CaseCountResponse, Integer, Hash)>] CaseCountResponse data, response status code and response headers - def count_cases_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.count_cases".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def create_case_service_now_ticket_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_case_service_now_ticket".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.count_cases") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_service_now_ticket") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.count_cases")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_service_now_ticket")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.count_cases ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_service_now_ticket ...' + end + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_service_now_ticket" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_service_now_ticket" end # resource path - local_var_path = '/api/v2/cases/count' + local_var_path = '/api/v2/cases/{case_id}/relationships/servicenow_tickets'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'query_filter'] = opts[:'query_filter'] if !opts[:'query_filter'].nil? - query_params[:'group_bys'] = opts[:'group_bys'] if !opts[:'group_bys'].nil? - query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseCountResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :count_cases, + :operation => :create_case_service_now_ticket, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -528,39 +533,39 @@ def count_cases_with_http_info(opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#count_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_service_now_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a case. + # Create a project. # - # @see #create_case_with_http_info - def create_case(body, opts = {}) - data, _status_code, _headers = create_case_with_http_info(body, opts) + # @see #create_project_with_http_info + def create_project(body, opts = {}) + data, _status_code, _headers = create_project_with_http_info(body, opts) data end - # Create a case. + # Create a project. # - # Create a Case + # Create a project. # - # @param body [CaseCreateRequest] Case payload + # @param body [ProjectCreateRequest] Project payload. # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def create_case_with_http_info(body, opts = {}) + # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers + def create_project_with_http_info(body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_project" end # resource path - local_var_path = '/api/v2/cases' + local_var_path = '/api/v2/cases/projects' # query parameters query_params = opts[:query_params] || {} @@ -579,13 +584,13 @@ def create_case_with_http_info(body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' + return_type = opts[:debug_return_type] || 'ProjectResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case, + :operation => :create_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -597,48 +602,42 @@ def create_case_with_http_info(body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create an automation rule. + # Create a notification rule. # - # @see #create_case_automation_rule_with_http_info - def create_case_automation_rule(project_id, body, opts = {}) - data, _status_code, _headers = create_case_automation_rule_with_http_info(project_id, body, opts) + # @see #create_project_notification_rule_with_http_info + def create_project_notification_rule(project_id, body, opts = {}) + data, _status_code, _headers = create_project_notification_rule_with_http_info(project_id, body, opts) data end - # Create an automation rule. + # Create a notification rule. # - # Creates an automation rule for a project. The rule defines a trigger event (for example, case created, status transitioned) and an action to execute. + # Create a notification rule for a project. # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param body [AutomationRuleCreateRequest] Automation rule payload. + # @param project_id [String] Project UUID + # @param body [CaseNotificationRuleCreateRequest] Notification rule payload # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRuleResponse, Integer, Hash)>] AutomationRuleResponse data, response status code and response headers - def create_case_automation_rule_with_http_info(project_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_automation_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_automation_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_automation_rule")) - end + # @return [Array<(CaseNotificationRuleResponse, Integer, Hash)>] CaseNotificationRuleResponse data, response status code and response headers + def create_project_notification_rule_with_http_info(project_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_automation_rule ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project_notification_rule ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.create_case_automation_rule" + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.create_project_notification_rule" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_automation_rule" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_project_notification_rule" end # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -657,13 +656,13 @@ def create_case_automation_rule_with_http_info(project_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'AutomationRuleResponse' + return_type = opts[:debug_return_type] || 'CaseNotificationRuleResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_automation_rule, + :operation => :create_project_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -675,48 +674,42 @@ def create_case_automation_rule_with_http_info(project_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#create_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create Jira issue for case. + # Delete case comment. # - # @see #create_case_jira_issue_with_http_info - def create_case_jira_issue(case_id, body, opts = {}) - create_case_jira_issue_with_http_info(case_id, body, opts) + # @see #delete_case_comment_with_http_info + def delete_case_comment(case_id, cell_id, opts = {}) + delete_case_comment_with_http_info(case_id, cell_id, opts) nil end - # Create Jira issue for case. + # Delete case comment. # - # Create a new Jira issue and link it to a case + # Delete case comment # # @param case_id [String] Case's UUID or key - # @param body [JiraIssueCreateRequest] Jira issue creation request + # @param cell_id [String] Timeline cell's UUID # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def create_case_jira_issue_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_jira_issue".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_jira_issue") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_jira_issue")) - end + def delete_case_comment_with_http_info(case_id, cell_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_jira_issue ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_comment ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_jira_issue" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.delete_case_comment" end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_jira_issue" + # verify the required parameter 'cell_id' is set + if @api_client.config.client_side_validation && cell_id.nil? + fail ArgumentError, "Missing the required parameter 'cell_id' when calling CaseManagementAPI.delete_case_comment" end # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/comment/{cell_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{cell_id}', CGI.escape(cell_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -725,23 +718,21 @@ def create_case_jira_issue_with_http_info(case_id, body, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :create_case_jira_issue, + :operation => :delete_case_comment, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -751,45 +742,44 @@ def create_case_jira_issue_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a case link. + # Delete custom attribute from case. # - # @see #create_case_link_with_http_info - def create_case_link(body, opts = {}) - data, _status_code, _headers = create_case_link_with_http_info(body, opts) + # @see #delete_case_custom_attribute_with_http_info + def delete_case_custom_attribute(case_id, custom_attribute_key, opts = {}) + data, _status_code, _headers = delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts) data end - # Create a case link. + # Delete custom attribute from case. # - # Creates a directional link between two cases (for example, case A blocks case B). The parent and child cases and their relationship type must be specified. + # Delete custom attribute from case # - # @param body [CaseLinkCreateRequest] Case link create request. + # @param case_id [String] Case's UUID or key + # @param custom_attribute_key [String] Case Custom attribute's key # @param opts [Hash] the optional parameters - # @return [Array<(CaseLinkResponse, Integer, Hash)>] CaseLinkResponse data, response status code and response headers - def create_case_link_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_link".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_link") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_link")) - end + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_link ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_custom_attribute ...' end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_link" + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.delete_case_custom_attribute" + end + # verify the required parameter 'custom_attribute_key' is set + if @api_client.config.client_side_validation && custom_attribute_key.nil? + fail ArgumentError, "Missing the required parameter 'custom_attribute_key' when calling CaseManagementAPI.delete_case_custom_attribute" end # resource path - local_var_path = '/api/v2/cases/link' + local_var_path = '/api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_key}', CGI.escape(custom_attribute_key.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -798,23 +788,21 @@ def create_case_link_with_http_info(body, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CaseLinkResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_link, + :operation => :delete_case_custom_attribute, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -824,50 +812,39 @@ def create_case_link_with_http_info(body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_custom_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create investigation notebook for case. + # Remove a project. # - # @see #create_case_notebook_with_http_info - def create_case_notebook(case_id, body, opts = {}) - create_case_notebook_with_http_info(case_id, body, opts) + # @see #delete_project_with_http_info + def delete_project(project_id, opts = {}) + delete_project_with_http_info(project_id, opts) nil end - # Create investigation notebook for case. + # Remove a project. # - # Create a new investigation notebook and link it to a case + # Remove a project using the project's `id`. # - # @param case_id [String] Case's UUID or key - # @param body [NotebookCreateRequest] Notebook creation request + # @param project_id [String] Project UUID. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def create_case_notebook_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_notebook".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_notebook") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_notebook")) - end + def delete_project_with_http_info(project_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_notebook ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_notebook" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project ...' end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_notebook" + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project" end # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/notebook'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -876,14 +853,12 @@ def create_case_notebook_with_http_info(case_id, body, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] @@ -892,7 +867,7 @@ def create_case_notebook_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_notebook, + :operation => :delete_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -902,50 +877,44 @@ def create_case_notebook_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_notebook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create ServiceNow ticket for case. + # Delete a notification rule. # - # @see #create_case_service_now_ticket_with_http_info - def create_case_service_now_ticket(case_id, body, opts = {}) - create_case_service_now_ticket_with_http_info(case_id, body, opts) + # @see #delete_project_notification_rule_with_http_info + def delete_project_notification_rule(project_id, notification_rule_id, opts = {}) + delete_project_notification_rule_with_http_info(project_id, notification_rule_id, opts) nil end - # Create ServiceNow ticket for case. + # Delete a notification rule. # - # Create a new ServiceNow incident ticket and link it to a case + # Delete a notification rule using the notification rule's `id`. # - # @param case_id [String] Case's UUID or key - # @param body [ServiceNowTicketCreateRequest] ServiceNow ticket creation request + # @param project_id [String] Project UUID + # @param notification_rule_id [String] Notification Rule UUID # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def create_case_service_now_ticket_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_service_now_ticket".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_service_now_ticket") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_service_now_ticket")) - end + def delete_project_notification_rule_with_http_info(project_id, notification_rule_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_service_now_ticket ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project_notification_rule ...' end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.create_case_service_now_ticket" + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project_notification_rule" end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_service_now_ticket" + # verify the required parameter 'notification_rule_id' is set + if @api_client.config.client_side_validation && notification_rule_id.nil? + fail ArgumentError, "Missing the required parameter 'notification_rule_id' when calling CaseManagementAPI.delete_project_notification_rule" end # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/servicenow_tickets'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules/{notification_rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{notification_rule_id}', CGI.escape(notification_rule_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -954,14 +923,12 @@ def create_case_service_now_ticket_with_http_info(case_id, body, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] @@ -970,7 +937,7 @@ def create_case_service_now_ticket_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_service_now_ticket, + :operation => :delete_project_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -980,45 +947,39 @@ def create_case_service_now_ticket_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_service_now_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a case view. + # Get the details of a case. # - # @see #create_case_view_with_http_info - def create_case_view(body, opts = {}) - data, _status_code, _headers = create_case_view_with_http_info(body, opts) + # @see #get_case_with_http_info + def get_case(case_id, opts = {}) + data, _status_code, _headers = get_case_with_http_info(case_id, opts) data end - # Create a case view. + # Get the details of a case. # - # Creates a new saved case view with a name, filter query, and associated project. Optionally, a notification rule can be linked to the view. + # Get the details of case by `case_id` # - # @param body [CaseViewCreateRequest] Case view payload. + # @param case_id [String] Case's UUID or key # @param opts [Hash] the optional parameters - # @return [Array<(CaseViewResponse, Integer, Hash)>] CaseViewResponse data, response status code and response headers - def create_case_view_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_case_view".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_case_view") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_case_view")) - end + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def get_case_with_http_info(case_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case_view ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case ...' end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case_view" + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.get_case" end # resource path - local_var_path = '/api/v2/cases/views' + local_var_path = '/api/v2/cases/{case_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1027,23 +988,21 @@ def create_case_view_with_http_info(body, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CaseViewResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_case_view, + :operation => :get_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1053,2428 +1012,39 @@ def create_case_view_with_http_info(body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_case_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#get_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a maintenance window. + # Get the details of a project. # - # @see #create_maintenance_window_with_http_info - def create_maintenance_window(body, opts = {}) - data, _status_code, _headers = create_maintenance_window_with_http_info(body, opts) + # @see #get_project_with_http_info + def get_project(project_id, opts = {}) + data, _status_code, _headers = get_project_with_http_info(project_id, opts) data end - # Create a maintenance window. + # Get the details of a project. # - # Creates a maintenance window for event management cases with a name, case filter query, and time range (start and end). + # Get the details of a project by `project_id`. # - # @param body [MaintenanceWindowCreateRequest] Maintenance window payload. + # @param project_id [String] Project UUID. # @param opts [Hash] the optional parameters - # @return [Array<(MaintenanceWindowResponse, Integer, Hash)>] MaintenanceWindowResponse data, response status code and response headers - def create_maintenance_window_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_maintenance_window".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_maintenance_window") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_maintenance_window")) - end + # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers + def get_project_with_http_info(project_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_maintenance_window ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_maintenance_window" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project ...' end - # resource path - local_var_path = '/api/v2/maintenance_windows' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'MaintenanceWindowResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_maintenance_window, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_maintenance_window\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Create a project. - # - # @see #create_project_with_http_info - def create_project(body, opts = {}) - data, _status_code, _headers = create_project_with_http_info(body, opts) - data - end - - # Create a project. - # - # Create a project. - # - # @param body [ProjectCreateRequest] Project payload. - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers - def create_project_with_http_info(body, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project ...' - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_project" - end - # resource path - local_var_path = '/api/v2/cases/projects' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'ProjectResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Create a notification rule. - # - # @see #create_project_notification_rule_with_http_info - def create_project_notification_rule(project_id, body, opts = {}) - data, _status_code, _headers = create_project_notification_rule_with_http_info(project_id, body, opts) - data - end - - # Create a notification rule. - # - # Create a notification rule for a project. - # - # @param project_id [String] Project UUID - # @param body [CaseNotificationRuleCreateRequest] Notification rule payload - # @param opts [Hash] the optional parameters - # @return [Array<(CaseNotificationRuleResponse, Integer, Hash)>] CaseNotificationRuleResponse data, response status code and response headers - def create_project_notification_rule_with_http_info(project_id, body, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project_notification_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.create_project_notification_rule" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_project_notification_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'CaseNotificationRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :create_project_notification_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#create_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete an automation rule. - # - # @see #delete_case_automation_rule_with_http_info - def delete_case_automation_rule(project_id, rule_id, opts = {}) - delete_case_automation_rule_with_http_info(project_id, rule_id, opts) - nil - end - - # Delete an automation rule. - # - # Permanently deletes an automation rule from a project. - # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param rule_id [String] The UUID of the automation rule. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_case_automation_rule_with_http_info(project_id, rule_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_case_automation_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_case_automation_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_case_automation_rule")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_automation_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_case_automation_rule" - end - # verify the required parameter 'rule_id' is set - if @api_client.config.client_side_validation && rule_id.nil? - fail ArgumentError, "Missing the required parameter 'rule_id' when calling CaseManagementAPI.delete_case_automation_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules/{rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_case_automation_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete case comment. - # - # @see #delete_case_comment_with_http_info - def delete_case_comment(case_id, cell_id, opts = {}) - delete_case_comment_with_http_info(case_id, cell_id, opts) - nil - end - - # Delete case comment. - # - # Delete case comment - # - # @param case_id [String] Case's UUID or key - # @param cell_id [String] The UUID of the timeline cell (comment) to update. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_case_comment_with_http_info(case_id, cell_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_comment ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.delete_case_comment" - end - # verify the required parameter 'cell_id' is set - if @api_client.config.client_side_validation && cell_id.nil? - fail ArgumentError, "Missing the required parameter 'cell_id' when calling CaseManagementAPI.delete_case_comment" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/comment/{cell_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{cell_id}', CGI.escape(cell_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] - - new_options = opts.merge( - :operation => :delete_case_comment, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete custom attribute from case. - # - # @see #delete_case_custom_attribute_with_http_info - def delete_case_custom_attribute(case_id, custom_attribute_key, opts = {}) - data, _status_code, _headers = delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts) - data - end - - # Delete custom attribute from case. - # - # Delete custom attribute from case - # - # @param case_id [String] Case's UUID or key - # @param custom_attribute_key [String] Case Custom attribute's key - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def delete_case_custom_attribute_with_http_info(case_id, custom_attribute_key, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_custom_attribute ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.delete_case_custom_attribute" - end - # verify the required parameter 'custom_attribute_key' is set - if @api_client.config.client_side_validation && custom_attribute_key.nil? - fail ArgumentError, "Missing the required parameter 'custom_attribute_key' when calling CaseManagementAPI.delete_case_custom_attribute" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_key}', CGI.escape(custom_attribute_key.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_case_custom_attribute, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_custom_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a case link. - # - # @see #delete_case_link_with_http_info - def delete_case_link(link_id, opts = {}) - delete_case_link_with_http_info(link_id, opts) - nil - end - - # Delete a case link. - # - # Deletes an existing link between cases by link ID. - # - # @param link_id [String] The UUID of the case link. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_case_link_with_http_info(link_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_case_link".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_case_link") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_case_link")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_link ...' - end - # verify the required parameter 'link_id' is set - if @api_client.config.client_side_validation && link_id.nil? - fail ArgumentError, "Missing the required parameter 'link_id' when calling CaseManagementAPI.delete_case_link" - end - # resource path - local_var_path = '/api/v2/cases/link/{link_id}'.sub('{link_id}', CGI.escape(link_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_case_link, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a case view. - # - # @see #delete_case_view_with_http_info - def delete_case_view(view_id, opts = {}) - delete_case_view_with_http_info(view_id, opts) - nil - end - - # Delete a case view. - # - # Permanently deletes a saved case view. - # - # @param view_id [String] The UUID of the case view. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_case_view_with_http_info(view_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_case_view".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_case_view") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_case_view")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_case_view ...' - end - # verify the required parameter 'view_id' is set - if @api_client.config.client_side_validation && view_id.nil? - fail ArgumentError, "Missing the required parameter 'view_id' when calling CaseManagementAPI.delete_case_view" - end - # resource path - local_var_path = '/api/v2/cases/views/{view_id}'.sub('{view_id}', CGI.escape(view_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_case_view, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_case_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a maintenance window. - # - # @see #delete_maintenance_window_with_http_info - def delete_maintenance_window(maintenance_window_id, opts = {}) - delete_maintenance_window_with_http_info(maintenance_window_id, opts) - nil - end - - # Delete a maintenance window. - # - # Permanently deletes a maintenance window. - # - # @param maintenance_window_id [String] The UUID of the maintenance window. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_maintenance_window_with_http_info(maintenance_window_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_maintenance_window".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_maintenance_window") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_maintenance_window")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_maintenance_window ...' - end - # verify the required parameter 'maintenance_window_id' is set - if @api_client.config.client_side_validation && maintenance_window_id.nil? - fail ArgumentError, "Missing the required parameter 'maintenance_window_id' when calling CaseManagementAPI.delete_maintenance_window" - end - # resource path - local_var_path = '/api/v2/maintenance_windows/{maintenance_window_id}'.sub('{maintenance_window_id}', CGI.escape(maintenance_window_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_maintenance_window, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_maintenance_window\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Remove a project. - # - # @see #delete_project_with_http_info - def delete_project(project_id, opts = {}) - delete_project_with_http_info(project_id, opts) - nil - end - - # Remove a project. - # - # Remove a project using the project's `id`. - # - # @param project_id [String] Project UUID. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_project_with_http_info(project_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Delete a notification rule. - # - # @see #delete_project_notification_rule_with_http_info - def delete_project_notification_rule(project_id, notification_rule_id, opts = {}) - delete_project_notification_rule_with_http_info(project_id, notification_rule_id, opts) - nil - end - - # Delete a notification rule. - # - # Delete a notification rule using the notification rule's `id`. - # - # @param project_id [String] Project UUID - # @param notification_rule_id [String] Notification Rule UUID - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_project_notification_rule_with_http_info(project_id, notification_rule_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project_notification_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project_notification_rule" - end - # verify the required parameter 'notification_rule_id' is set - if @api_client.config.client_side_validation && notification_rule_id.nil? - fail ArgumentError, "Missing the required parameter 'notification_rule_id' when calling CaseManagementAPI.delete_project_notification_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules/{notification_rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{notification_rule_id}', CGI.escape(notification_rule_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :delete_project_notification_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Disable an automation rule. - # - # @see #disable_case_automation_rule_with_http_info - def disable_case_automation_rule(project_id, rule_id, opts = {}) - data, _status_code, _headers = disable_case_automation_rule_with_http_info(project_id, rule_id, opts) - data - end - - # Disable an automation rule. - # - # Disables an automation rule so it no longer triggers on case events. The rule configuration is preserved. - # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param rule_id [String] The UUID of the automation rule. - # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRuleResponse, Integer, Hash)>] AutomationRuleResponse data, response status code and response headers - def disable_case_automation_rule_with_http_info(project_id, rule_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.disable_case_automation_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.disable_case_automation_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.disable_case_automation_rule")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.disable_case_automation_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.disable_case_automation_rule" - end - # verify the required parameter 'rule_id' is set - if @api_client.config.client_side_validation && rule_id.nil? - fail ArgumentError, "Missing the required parameter 'rule_id' when calling CaseManagementAPI.disable_case_automation_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules/{rule_id}/disable'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'AutomationRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :disable_case_automation_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#disable_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Enable an automation rule. - # - # @see #enable_case_automation_rule_with_http_info - def enable_case_automation_rule(project_id, rule_id, opts = {}) - data, _status_code, _headers = enable_case_automation_rule_with_http_info(project_id, rule_id, opts) - data - end - - # Enable an automation rule. - # - # Enables a previously disabled automation rule so it triggers on matching case events. - # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param rule_id [String] The UUID of the automation rule. - # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRuleResponse, Integer, Hash)>] AutomationRuleResponse data, response status code and response headers - def enable_case_automation_rule_with_http_info(project_id, rule_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.enable_case_automation_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.enable_case_automation_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.enable_case_automation_rule")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.enable_case_automation_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.enable_case_automation_rule" - end - # verify the required parameter 'rule_id' is set - if @api_client.config.client_side_validation && rule_id.nil? - fail ArgumentError, "Missing the required parameter 'rule_id' when calling CaseManagementAPI.enable_case_automation_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules/{rule_id}/enable'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'AutomationRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :enable_case_automation_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#enable_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Favorite a project. - # - # @see #favorite_case_project_with_http_info - def favorite_case_project(project_id, opts = {}) - favorite_case_project_with_http_info(project_id, opts) - nil - end - - # Favorite a project. - # - # Marks a case project as a favorite for the current authenticated user. - # - # @param project_id [String] Project UUID. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def favorite_case_project_with_http_info(project_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.favorite_case_project".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.favorite_case_project") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.favorite_case_project")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.favorite_case_project ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.favorite_case_project" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/favorites'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :favorite_case_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#favorite_case_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get the details of a case. - # - # @see #get_case_with_http_info - def get_case(case_id, opts = {}) - data, _status_code, _headers = get_case_with_http_info(case_id, opts) - data - end - - # Get the details of a case. - # - # Get the details of case by `case_id` - # - # @param case_id [String] Case's UUID or key - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def get_case_with_http_info(case_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.get_case" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_case, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get an automation rule. - # - # @see #get_case_automation_rule_with_http_info - def get_case_automation_rule(project_id, rule_id, opts = {}) - data, _status_code, _headers = get_case_automation_rule_with_http_info(project_id, rule_id, opts) - data - end - - # Get an automation rule. - # - # Returns a single automation rule identified by its UUID, including its trigger, action, and current state (enabled/disabled). - # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param rule_id [String] The UUID of the automation rule. - # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRuleResponse, Integer, Hash)>] AutomationRuleResponse data, response status code and response headers - def get_case_automation_rule_with_http_info(project_id, rule_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_case_automation_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_case_automation_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_case_automation_rule")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case_automation_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_case_automation_rule" - end - # verify the required parameter 'rule_id' is set - if @api_client.config.client_side_validation && rule_id.nil? - fail ArgumentError, "Missing the required parameter 'rule_id' when calling CaseManagementAPI.get_case_automation_rule" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules/{rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'AutomationRuleResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_case_automation_rule, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get a case view. - # - # @see #get_case_view_with_http_info - def get_case_view(view_id, opts = {}) - data, _status_code, _headers = get_case_view_with_http_info(view_id, opts) - data - end - - # Get a case view. - # - # Returns a single saved case view identified by its UUID, including its query, associated project, and timestamps. - # - # @param view_id [String] The UUID of the case view. - # @param opts [Hash] the optional parameters - # @return [Array<(CaseViewResponse, Integer, Hash)>] CaseViewResponse data, response status code and response headers - def get_case_view_with_http_info(view_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_case_view".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_case_view") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_case_view")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case_view ...' - end - # verify the required parameter 'view_id' is set - if @api_client.config.client_side_validation && view_id.nil? - fail ArgumentError, "Missing the required parameter 'view_id' when calling CaseManagementAPI.get_case_view" - end - # resource path - local_var_path = '/api/v2/cases/views/{view_id}'.sub('{view_id}', CGI.escape(view_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'CaseViewResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_case_view, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_case_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get the details of a project. - # - # @see #get_project_with_http_info - def get_project(project_id, opts = {}) - data, _status_code, _headers = get_project_with_http_info(project_id, opts) - data - end - - # Get the details of a project. - # - # Get the details of a project by `project_id`. - # - # @param project_id [String] Project UUID. - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers - def get_project_with_http_info(project_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'ProjectResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get notification rules. - # - # @see #get_project_notification_rules_with_http_info - def get_project_notification_rules(project_id, opts = {}) - data, _status_code, _headers = get_project_notification_rules_with_http_info(project_id, opts) - data - end - - # Get notification rules. - # - # Get all notification rules for a project. - # - # @param project_id [String] Project UUID - # @param opts [Hash] the optional parameters - # @return [Array<(CaseNotificationRulesResponse, Integer, Hash)>] CaseNotificationRulesResponse data, response status code and response headers - def get_project_notification_rules_with_http_info(project_id, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project_notification_rules ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project_notification_rules" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'CaseNotificationRulesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_project_notification_rules, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_project_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get all projects. - # - # @see #get_projects_with_http_info - def get_projects(opts = {}) - data, _status_code, _headers = get_projects_with_http_info(opts) - data - end - - # Get all projects. - # - # Get all projects. - # - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectsResponse, Integer, Hash)>] ProjectsResponse data, response status code and response headers - def get_projects_with_http_info(opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_projects ...' - end - # resource path - local_var_path = '/api/v2/cases/projects' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'ProjectsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :get_projects, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Link incident to case. - # - # @see #link_incident_with_http_info - def link_incident(case_id, body, opts = {}) - data, _status_code, _headers = link_incident_with_http_info(case_id, body, opts) - data - end - - # Link incident to case. - # - # Link an incident to a case - # - # @param case_id [String] Case's UUID or key - # @param body [RelationshipToIncidentRequest] Incident link request - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def link_incident_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.link_incident".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.link_incident") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.link_incident")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.link_incident ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.link_incident" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.link_incident" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/incidents'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :link_incident, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#link_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Link existing Jira issue to case. - # - # @see #link_jira_issue_to_case_with_http_info - def link_jira_issue_to_case(case_id, body, opts = {}) - link_jira_issue_to_case_with_http_info(case_id, body, opts) - nil - end - - # Link existing Jira issue to case. - # - # Link an existing Jira issue to a case - # - # @param case_id [String] Case's UUID or key - # @param body [JiraIssueLinkRequest] Jira issue link request - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def link_jira_issue_to_case_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.link_jira_issue_to_case".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.link_jira_issue_to_case") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.link_jira_issue_to_case")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.link_jira_issue_to_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.link_jira_issue_to_case" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.link_jira_issue_to_case" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :link_jira_issue_to_case, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#link_jira_issue_to_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List automation rules. - # - # @see #list_case_automation_rules_with_http_info - def list_case_automation_rules(project_id, opts = {}) - data, _status_code, _headers = list_case_automation_rules_with_http_info(project_id, opts) - data - end - - # List automation rules. - # - # Returns all automation rules configured for a project. Automation rules allow automatic actions to be triggered by case events like creation, status transitions, or attribute changes. - # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRulesResponse, Integer, Hash)>] AutomationRulesResponse data, response status code and response headers - def list_case_automation_rules_with_http_info(project_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_case_automation_rules".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_case_automation_rules") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_case_automation_rules")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_case_automation_rules ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.list_case_automation_rules" - end - # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'AutomationRulesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_case_automation_rules, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_case_automation_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List case links. - # - # @see #list_case_links_with_http_info - def list_case_links(entity_type, entity_id, opts = {}) - data, _status_code, _headers = list_case_links_with_http_info(entity_type, entity_id, opts) - data - end - - # List case links. - # - # Returns all links associated with a case. Links define relationships (for example, BLOCKS) between cases. Requires entity_type and entity_id query parameters. - # - # @param entity_type [String] The entity type to look up links for. Use `CASE` to find links for a specific case. - # @param entity_id [String] The UUID of the entity to look up links for. - # @param opts [Hash] the optional parameters - # @option opts [String] :relationship Optional filter to only return links of a specific relationship type (for example, `BLOCKS` or `CAUSES`). - # @return [Array<(CaseLinksResponse, Integer, Hash)>] CaseLinksResponse data, response status code and response headers - def list_case_links_with_http_info(entity_type, entity_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_case_links".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_case_links") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_case_links")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_case_links ...' - end - # verify the required parameter 'entity_type' is set - if @api_client.config.client_side_validation && entity_type.nil? - fail ArgumentError, "Missing the required parameter 'entity_type' when calling CaseManagementAPI.list_case_links" - end - # verify the required parameter 'entity_id' is set - if @api_client.config.client_side_validation && entity_id.nil? - fail ArgumentError, "Missing the required parameter 'entity_id' when calling CaseManagementAPI.list_case_links" - end - # resource path - local_var_path = '/api/v2/cases/link' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'entity_type'] = entity_type - query_params[:'entity_id'] = entity_id - query_params[:'relationship'] = opts[:'relationship'] if !opts[:'relationship'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'CaseLinksResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_case_links, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_case_links\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Get case timeline. - # - # @see #list_case_timeline_with_http_info - def list_case_timeline(case_id, opts = {}) - data, _status_code, _headers = list_case_timeline_with_http_info(case_id, opts) - data - end - - # Get case timeline. - # - # Returns the timeline of events for a case, including comments, status changes, and other activity. Supports pagination and sort order. - # - # @param case_id [String] Case's UUID or key - # @param opts [Hash] the optional parameters - # @option opts [Integer] :page_size Number of timeline cells to return per page. - # @option opts [Integer] :page_number Zero-based page number for pagination. - # @option opts [Boolean] :sort_ascending If `true`, returns timeline cells in chronological order (oldest first). Defaults to `false` (newest first). - # @return [Array<(TimelineResponse, Integer, Hash)>] TimelineResponse data, response status code and response headers - def list_case_timeline_with_http_info(case_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_case_timeline".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_case_timeline") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_case_timeline")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_case_timeline ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.list_case_timeline" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/timelines'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? - query_params[:'sort[ascending]'] = opts[:'sort_ascending'] if !opts[:'sort_ascending'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'TimelineResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_case_timeline, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_case_timeline\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List case views. - # - # @see #list_case_views_with_http_info - def list_case_views(project_id, opts = {}) - data, _status_code, _headers = list_case_views_with_http_info(project_id, opts) - data - end - - # List case views. - # - # Returns all saved case views for a given project. Views are saved search queries that allow quick access to filtered lists of cases. - # - # @param project_id [String] Filter views by project identifier. - # @param opts [Hash] the optional parameters - # @return [Array<(CaseViewsResponse, Integer, Hash)>] CaseViewsResponse data, response status code and response headers - def list_case_views_with_http_info(project_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_case_views".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_case_views") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_case_views")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_case_views ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.list_case_views" - end - # resource path - local_var_path = '/api/v2/cases/views' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'project_id'] = project_id - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'CaseViewsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_case_views, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_case_views\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List case watchers. - # - # @see #list_case_watchers_with_http_info - def list_case_watchers(case_id, opts = {}) - data, _status_code, _headers = list_case_watchers_with_http_info(case_id, opts) - data - end - - # List case watchers. - # - # Returns the list of users who are watching a case. Watchers receive notifications about updates to the case. - # - # @param case_id [String] Case's UUID or key - # @param opts [Hash] the optional parameters - # @return [Array<(CaseWatchersResponse, Integer, Hash)>] CaseWatchersResponse data, response status code and response headers - def list_case_watchers_with_http_info(case_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_case_watchers".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_case_watchers") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_case_watchers")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_case_watchers ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.list_case_watchers" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/watchers'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'CaseWatchersResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_case_watchers, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_case_watchers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List maintenance windows. - # - # @see #list_maintenance_windows_with_http_info - def list_maintenance_windows(opts = {}) - data, _status_code, _headers = list_maintenance_windows_with_http_info(opts) - data - end - - # List maintenance windows. - # - # Returns all configured maintenance windows for event management cases. Maintenance windows define time periods during which case notifications and automation rules are suppressed for cases matching a given query. - # - # @param opts [Hash] the optional parameters - # @return [Array<(MaintenanceWindowsResponse, Integer, Hash)>] MaintenanceWindowsResponse data, response status code and response headers - def list_maintenance_windows_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_maintenance_windows".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_maintenance_windows") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_maintenance_windows")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_maintenance_windows ...' - end - # resource path - local_var_path = '/api/v2/maintenance_windows' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'MaintenanceWindowsResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_maintenance_windows, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_maintenance_windows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # List project favorites. - # - # @see #list_user_case_project_favorites_with_http_info - def list_user_case_project_favorites(opts = {}) - data, _status_code, _headers = list_user_case_project_favorites_with_http_info(opts) - data - end - - # List project favorites. - # - # Returns the list of case projects that the current authenticated user has marked as favorites. - # - # @param opts [Hash] the optional parameters - # @return [Array<(ProjectFavoritesResponse, Integer, Hash)>] ProjectFavoritesResponse data, response status code and response headers - def list_user_case_project_favorites_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_user_case_project_favorites".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_user_case_project_favorites") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_user_case_project_favorites")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.list_user_case_project_favorites ...' - end - # resource path - local_var_path = '/api/v2/cases/projects/favorites' - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'ProjectFavoritesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :list_user_case_project_favorites, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#list_user_case_project_favorites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Update case project. - # - # @see #move_case_to_project_with_http_info - def move_case_to_project(case_id, body, opts = {}) - data, _status_code, _headers = move_case_to_project_with_http_info(case_id, body, opts) - data - end - - # Update case project. - # - # Update the project associated with a case - # - # @param case_id [String] Case's UUID or key - # @param body [ProjectRelationship] Project update request - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def move_case_to_project_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.move_case_to_project".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.move_case_to_project") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.move_case_to_project")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.move_case_to_project ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.move_case_to_project" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.move_case_to_project" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/project'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :move_case_to_project, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#move_case_to_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Remove insights from a case. - # - # @see #remove_case_insights_with_http_info - def remove_case_insights(case_id, body, opts = {}) - data, _status_code, _headers = remove_case_insights_with_http_info(case_id, body, opts) - data - end - - # Remove insights from a case. - # - # Removes one or more previously added insights from a case by specifying their type and resource identifier in the request body. - # - # @param case_id [String] Case's UUID or key - # @param body [CaseInsightsRequest] Case insights request. - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def remove_case_insights_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.remove_case_insights".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.remove_case_insights") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.remove_case_insights")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.remove_case_insights ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.remove_case_insights" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.remove_case_insights" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/insights'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :remove_case_insights, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#remove_case_insights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Search cases. - # - # @see #search_cases_with_http_info - def search_cases(opts = {}) - data, _status_code, _headers = search_cases_with_http_info(opts) - data - end - - # Search cases. - # - # Search cases. - # - # @param opts [Hash] the optional parameters - # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. - # @option opts [Integer] :page_number Specific page number to return. - # @option opts [CaseSortableField] :sort_field Specify which field to sort - # @option opts [String] :filter Search query - # @option opts [Boolean] :sort_asc Specify if order is ascending or not - # @return [Array<(CasesResponse, Integer, Hash)>] CasesResponse data, response status code and response headers - def search_cases_with_http_info(opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.search_cases ...' - end - allowable_values = ['created_at', 'priority', 'status'] - if @api_client.config.client_side_validation && opts[:'sort_field'] && !allowable_values.include?(opts[:'sort_field']) - fail ArgumentError, "invalid value for \"sort_field\", must be one of #{allowable_values}" - end - # resource path - local_var_path = '/api/v2/cases' - - # query parameters - query_params = opts[:query_params] || {} - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? - query_params[:'sort[field]'] = opts[:'sort_field'] if !opts[:'sort_field'].nil? - query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? - query_params[:'sort[asc]'] = opts[:'sort_asc'] if !opts[:'sort_asc'].nil? - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] || 'CasesResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :search_cases, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#search_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Search cases. - # - # Provide a paginated version of {#search_cases}, returning all items. - # - # To use it you need to use a block: search_cases_with_pagination { |item| p item } - # - # @yield [Case] Paginated items - def search_cases_with_pagination(opts = {}) - api_version = "V2" - page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) - @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) - @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 1) - while true do - response = search_cases(opts) - @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } - if @api_client.get_attribute_from_path(response, "data").length < page_size - break - end - @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 1) + 1) - end - end - - # Unarchive case. - # - # @see #unarchive_case_with_http_info - def unarchive_case(case_id, body, opts = {}) - data, _status_code, _headers = unarchive_case_with_http_info(case_id, body, opts) - data - end - - # Unarchive case. - # - # Unarchive case - # - # @param case_id [String] Case's UUID or key - # @param body [CaseEmptyRequest] Unarchive case payload - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def unarchive_case_with_http_info(case_id, body, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unarchive_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unarchive_case" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unarchive_case" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/unarchive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :unarchive_case, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#unarchive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end - - # Unassign case. - # - # @see #unassign_case_with_http_info - def unassign_case(case_id, body, opts = {}) - data, _status_code, _headers = unassign_case_with_http_info(case_id, body, opts) - data - end - - # Unassign case. - # - # Unassign case - # - # @param case_id [String] Case's UUID or key - # @param body [CaseEmptyRequest] Unassign case payload - # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def unassign_case_with_http_info(case_id, body, opts = {}) - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unassign_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unassign_case" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unassign_case" + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project" end # resource path - local_var_path = '/api/v2/cases/{case_id}/unassign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3483,23 +1053,21 @@ def unassign_case_with_http_info(case_id, body, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' + return_type = opts[:debug_return_type] || 'ProjectResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :unassign_case, + :operation => :get_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3509,45 +1077,39 @@ def unassign_case_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#unassign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Unfavorite a project. + # Get notification rules. # - # @see #unfavorite_case_project_with_http_info - def unfavorite_case_project(project_id, opts = {}) - unfavorite_case_project_with_http_info(project_id, opts) - nil + # @see #get_project_notification_rules_with_http_info + def get_project_notification_rules(project_id, opts = {}) + data, _status_code, _headers = get_project_notification_rules_with_http_info(project_id, opts) + data end - # Unfavorite a project. + # Get notification rules. # - # Removes a case project from the current user's favorites list. + # Get all notification rules for a project. # - # @param project_id [String] Project UUID. + # @param project_id [String] Project UUID # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def unfavorite_case_project_with_http_info(project_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.unfavorite_case_project".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unfavorite_case_project") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unfavorite_case_project")) - end + # @return [Array<(CaseNotificationRulesResponse, Integer, Hash)>] CaseNotificationRulesResponse data, response status code and response headers + def get_project_notification_rules_with_http_info(project_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unfavorite_case_project ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project_notification_rules ...' end # verify the required parameter 'project_id' is set if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.unfavorite_case_project" + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project_notification_rules" end # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/favorites'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3555,7 +1117,7 @@ def unfavorite_case_project_with_http_info(project_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} @@ -3564,13 +1126,13 @@ def unfavorite_case_project_with_http_info(project_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'CaseNotificationRulesResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :unfavorite_case_project, + :operation => :get_project_notification_rules, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3580,45 +1142,34 @@ def unfavorite_case_project_with_http_info(project_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#unfavorite_case_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#get_project_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Remove Jira issue link from case. + # Get all projects. # - # @see #unlink_jira_issue_with_http_info - def unlink_jira_issue(case_id, opts = {}) - unlink_jira_issue_with_http_info(case_id, opts) - nil + # @see #get_projects_with_http_info + def get_projects(opts = {}) + data, _status_code, _headers = get_projects_with_http_info(opts) + data end - # Remove Jira issue link from case. + # Get all projects. # - # Remove the link between a Jira issue and a case + # Get all projects. # - # @param case_id [String] Case's UUID or key # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def unlink_jira_issue_with_http_info(case_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.unlink_jira_issue".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unlink_jira_issue") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unlink_jira_issue")) - end + # @return [Array<(ProjectsResponse, Integer, Hash)>] ProjectsResponse data, response status code and response headers + def get_projects_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unlink_jira_issue ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unlink_jira_issue" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_projects ...' end # resource path - local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/projects' # query parameters query_params = opts[:query_params] || {} @@ -3626,7 +1177,7 @@ def unlink_jira_issue_with_http_info(case_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} @@ -3635,13 +1186,13 @@ def unlink_jira_issue_with_http_info(case_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'ProjectsResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :unlink_jira_issue, + :operation => :get_projects, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3651,50 +1202,50 @@ def unlink_jira_issue_with_http_info(case_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#unlink_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Unwatch a case. + # Link incident to case. # - # @see #unwatch_case_with_http_info - def unwatch_case(case_id, user_uuid, opts = {}) - unwatch_case_with_http_info(case_id, user_uuid, opts) - nil + # @see #link_incident_with_http_info + def link_incident(case_id, body, opts = {}) + data, _status_code, _headers = link_incident_with_http_info(case_id, body, opts) + data end - # Unwatch a case. + # Link incident to case. # - # Removes a user from the watchers list of a case. The user no longer receives notifications about updates to the case. + # Link an incident to a case # # @param case_id [String] Case's UUID or key - # @param user_uuid [String] The UUID of the user to add or remove as a watcher. + # @param body [RelationshipToIncidentRequest] Incident link request # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def unwatch_case_with_http_info(case_id, user_uuid, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.unwatch_case".to_sym] + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def link_incident_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.link_incident".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unwatch_case") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.link_incident") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unwatch_case")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.link_incident")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unwatch_case ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.link_incident ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unwatch_case" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.link_incident" end - # verify the required parameter 'user_uuid' is set - if @api_client.config.client_side_validation && user_uuid.nil? - fail ArgumentError, "Missing the required parameter 'user_uuid' when calling CaseManagementAPI.unwatch_case" + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.link_incident" end # resource path - local_var_path = '/api/v2/cases/{case_id}/watchers/{user_uuid}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{user_uuid}', CGI.escape(user_uuid.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/relationships/incidents'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3702,22 +1253,24 @@ def unwatch_case_with_http_info(case_id, user_uuid, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :unwatch_case, + :operation => :link_incident, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3727,44 +1280,50 @@ def unwatch_case_with_http_info(case_id, user_uuid, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#unwatch_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#link_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case attributes. + # Link existing Jira issue to case. # - # @see #update_attributes_with_http_info - def update_attributes(case_id, body, opts = {}) - data, _status_code, _headers = update_attributes_with_http_info(case_id, body, opts) - data + # @see #link_jira_issue_to_case_with_http_info + def link_jira_issue_to_case(case_id, body, opts = {}) + link_jira_issue_to_case_with_http_info(case_id, body, opts) + nil end - # Update case attributes. + # Link existing Jira issue to case. # - # Update case attributes + # Link an existing Jira issue to a case # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateAttributesRequest] Case attributes update payload + # @param body [JiraIssueLinkRequest] Jira issue link request # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_attributes_with_http_info(case_id, body, opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def link_jira_issue_to_case_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.link_jira_issue_to_case".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.link_jira_issue_to_case") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.link_jira_issue_to_case")) + end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_attributes ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.link_jira_issue_to_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_attributes" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.link_jira_issue_to_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_attributes" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.link_jira_issue_to_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/attributes'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3772,7 +1331,7 @@ def update_attributes_with_http_info(case_id, body, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) @@ -3783,13 +1342,13 @@ def update_attributes_with_http_info(case_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_attributes, + :operation => :link_jira_issue_to_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3799,55 +1358,50 @@ def update_attributes_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#link_jira_issue_to_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update an automation rule. + # Update case project. # - # @see #update_case_automation_rule_with_http_info - def update_case_automation_rule(project_id, rule_id, body, opts = {}) - data, _status_code, _headers = update_case_automation_rule_with_http_info(project_id, rule_id, body, opts) + # @see #move_case_to_project_with_http_info + def move_case_to_project(case_id, body, opts = {}) + data, _status_code, _headers = move_case_to_project_with_http_info(case_id, body, opts) data end - # Update an automation rule. + # Update case project. # - # Updates the trigger, action, name, or state of an existing automation rule. + # Update the project associated with a case # - # @param project_id [String] The UUID of the project that owns the automation rules. - # @param rule_id [String] The UUID of the automation rule. - # @param body [AutomationRuleUpdateRequest] Automation rule payload. + # @param case_id [String] Case's UUID or key + # @param body [ProjectRelationship] Project update request # @param opts [Hash] the optional parameters - # @return [Array<(AutomationRuleResponse, Integer, Hash)>] AutomationRuleResponse data, response status code and response headers - def update_case_automation_rule_with_http_info(project_id, rule_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_automation_rule".to_sym] + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def move_case_to_project_with_http_info(case_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.move_case_to_project".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_automation_rule") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.move_case_to_project") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_automation_rule")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.move_case_to_project")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_automation_rule ...' - end - # verify the required parameter 'project_id' is set - if @api_client.config.client_side_validation && project_id.nil? - fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.update_case_automation_rule" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.move_case_to_project ...' end - # verify the required parameter 'rule_id' is set - if @api_client.config.client_side_validation && rule_id.nil? - fail ArgumentError, "Missing the required parameter 'rule_id' when calling CaseManagementAPI.update_case_automation_rule" + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.move_case_to_project" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_automation_rule" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.move_case_to_project" end # resource path - local_var_path = '/api/v2/cases/projects/{project_id}/rules/{rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{rule_id}', CGI.escape(rule_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/relationships/project'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3866,13 +1420,13 @@ def update_case_automation_rule_with_http_info(project_id, rule_id, body, opts = post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'AutomationRuleResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_automation_rule, + :operation => :move_case_to_project, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3882,80 +1436,71 @@ def update_case_automation_rule_with_http_info(project_id, rule_id, body, opts = :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_automation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#move_case_to_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case comment. + # Search cases. # - # @see #update_case_comment_with_http_info - def update_case_comment(case_id, cell_id, body, opts = {}) - update_case_comment_with_http_info(case_id, cell_id, body, opts) - nil + # @see #search_cases_with_http_info + def search_cases(opts = {}) + data, _status_code, _headers = search_cases_with_http_info(opts) + data end - # Update case comment. + # Search cases. # - # Updates the text content of an existing comment on a case timeline. The comment is identified by its cell ID. + # Search cases. # - # @param case_id [String] Case's UUID or key - # @param cell_id [String] The UUID of the timeline cell (comment) to update. - # @param body [CaseUpdateCommentRequest] Case update comment payload. # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def update_case_comment_with_http_info(case_id, cell_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_comment".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_comment") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_comment")) - end + # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. + # @option opts [Integer] :page_number Specific page number to return. + # @option opts [CaseSortableField] :sort_field Specify which field to sort + # @option opts [String] :filter Search query + # @option opts [Boolean] :sort_asc Specify if order is ascending or not + # @return [Array<(CasesResponse, Integer, Hash)>] CasesResponse data, response status code and response headers + def search_cases_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_comment ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_comment" - end - # verify the required parameter 'cell_id' is set - if @api_client.config.client_side_validation && cell_id.nil? - fail ArgumentError, "Missing the required parameter 'cell_id' when calling CaseManagementAPI.update_case_comment" + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.search_cases ...' end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_comment" + allowable_values = ['created_at', 'priority', 'status'] + if @api_client.config.client_side_validation && opts[:'sort_field'] && !allowable_values.include?(opts[:'sort_field']) + fail ArgumentError, "invalid value for \"sort_field\", must be one of #{allowable_values}" end # resource path - local_var_path = '/api/v2/cases/{case_id}/comment/{cell_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{cell_id}', CGI.escape(cell_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases' # query parameters query_params = opts[:query_params] || {} + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'sort[field]'] = opts[:'sort_field'] if !opts[:'sort_field'].nil? + query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? + query_params[:'sort[asc]'] = opts[:'sort_asc'] if !opts[:'sort_asc'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'CasesResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_comment, + :operation => :search_cases, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3965,49 +1510,66 @@ def update_case_comment_with_http_info(case_id, cell_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#search_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case custom attribute. + # Search cases. + # + # Provide a paginated version of {#search_cases}, returning all items. + # + # To use it you need to use a block: search_cases_with_pagination { |item| p item } + # + # @yield [Case] Paginated items + def search_cases_with_pagination(opts = {}) + api_version = "V2" + page_size = @api_client.get_attribute_from_path(opts, "page_size", 10) + @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) + @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 1) + while true do + response = search_cases(opts) + @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } + if @api_client.get_attribute_from_path(response, "data").length < page_size + break + end + @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 1) + 1) + end + end + + # Unarchive case. # - # @see #update_case_custom_attribute_with_http_info - def update_case_custom_attribute(case_id, custom_attribute_key, body, opts = {}) - data, _status_code, _headers = update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts) + # @see #unarchive_case_with_http_info + def unarchive_case(case_id, body, opts = {}) + data, _status_code, _headers = unarchive_case_with_http_info(case_id, body, opts) data end - # Update case custom attribute. + # Unarchive case. # - # Update case custom attribute + # Unarchive case # # @param case_id [String] Case's UUID or key - # @param custom_attribute_key [String] Case Custom attribute's key - # @param body [CaseUpdateCustomAttributeRequest] Update case custom attribute payload + # @param body [CaseEmptyRequest] Unarchive case payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts = {}) + def unarchive_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_custom_attribute ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unarchive_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_custom_attribute" - end - # verify the required parameter 'custom_attribute_key' is set - if @api_client.config.client_side_validation && custom_attribute_key.nil? - fail ArgumentError, "Missing the required parameter 'custom_attribute_key' when calling CaseManagementAPI.update_case_custom_attribute" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unarchive_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_custom_attribute" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unarchive_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_key}', CGI.escape(custom_attribute_key.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/unarchive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4032,7 +1594,7 @@ def update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, b auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_custom_attribute, + :operation => :unarchive_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4044,42 +1606,42 @@ def update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, b data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_custom_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#unarchive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case description. + # Unassign case. # - # @see #update_case_description_with_http_info - def update_case_description(case_id, body, opts = {}) - data, _status_code, _headers = update_case_description_with_http_info(case_id, body, opts) + # @see #unassign_case_with_http_info + def unassign_case(case_id, body, opts = {}) + data, _status_code, _headers = unassign_case_with_http_info(case_id, body, opts) data end - # Update case description. + # Unassign case. # - # Update case description + # Unassign case # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateDescriptionRequest] Case description update payload + # @param body [CaseEmptyRequest] Unassign case payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_case_description_with_http_info(case_id, body, opts = {}) + def unassign_case_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_description ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unassign_case ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_description" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unassign_case" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_description" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unassign_case" end # resource path - local_var_path = '/api/v2/cases/{case_id}/description'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/unassign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4104,7 +1666,7 @@ def update_case_description_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_description, + :operation => :unassign_case, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4116,48 +1678,43 @@ def update_case_description_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_description\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#unassign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case due date. + # Remove Jira issue link from case. # - # @see #update_case_due_date_with_http_info - def update_case_due_date(case_id, body, opts = {}) - data, _status_code, _headers = update_case_due_date_with_http_info(case_id, body, opts) - data + # @see #unlink_jira_issue_with_http_info + def unlink_jira_issue(case_id, opts = {}) + unlink_jira_issue_with_http_info(case_id, opts) + nil end - # Update case due date. + # Remove Jira issue link from case. # - # Sets or updates the due date for a case. The due date is a calendar date (without a time component) indicating when the case should be resolved. + # Remove the link between a Jira issue and a case # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateDueDateRequest] Case due date update payload. # @param opts [Hash] the optional parameters - # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_case_due_date_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_due_date".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def unlink_jira_issue_with_http_info(case_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.unlink_jira_issue".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_due_date") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.unlink_jira_issue") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_due_date")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.unlink_jira_issue")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_due_date ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unlink_jira_issue ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_due_date" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_due_date" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unlink_jira_issue" end # resource path - local_var_path = '/api/v2/cases/{case_id}/due_date'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/relationships/jira_issues'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4165,24 +1722,22 @@ def update_case_due_date_with_http_info(case_id, body, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'CaseResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_due_date, + :operation => :unlink_jira_issue, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4192,50 +1747,44 @@ def update_case_due_date_with_http_info(case_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_due_date\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#unlink_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case resolved reason. + # Update case attributes. # - # @see #update_case_resolved_reason_with_http_info - def update_case_resolved_reason(case_id, body, opts = {}) - data, _status_code, _headers = update_case_resolved_reason_with_http_info(case_id, body, opts) + # @see #update_attributes_with_http_info + def update_attributes(case_id, body, opts = {}) + data, _status_code, _headers = update_attributes_with_http_info(case_id, body, opts) data end - # Update case resolved reason. + # Update case attributes. # - # Sets the resolved reason for a security case (for example, FALSE_POSITIVE, TRUE_POSITIVE). Applicable to security-type cases. + # Update case attributes # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateResolvedReasonRequest] Case resolved reason update payload. + # @param body [CaseUpdateAttributesRequest] Case attributes update payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_case_resolved_reason_with_http_info(case_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_resolved_reason".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_resolved_reason") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_resolved_reason")) - end + def update_attributes_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_resolved_reason ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_attributes ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_resolved_reason" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_attributes" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_resolved_reason" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_attributes" end # resource path - local_var_path = '/api/v2/cases/{case_id}/resolved_reason'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/attributes'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4260,7 +1809,7 @@ def update_case_resolved_reason_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_resolved_reason, + :operation => :update_attributes, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4272,42 +1821,47 @@ def update_case_resolved_reason_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_resolved_reason\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update case title. + # Update case custom attribute. # - # @see #update_case_title_with_http_info - def update_case_title(case_id, body, opts = {}) - data, _status_code, _headers = update_case_title_with_http_info(case_id, body, opts) + # @see #update_case_custom_attribute_with_http_info + def update_case_custom_attribute(case_id, custom_attribute_key, body, opts = {}) + data, _status_code, _headers = update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts) data end - # Update case title. + # Update case custom attribute. # - # Update case title + # Update case custom attribute # # @param case_id [String] Case's UUID or key - # @param body [CaseUpdateTitleRequest] Case title update payload + # @param custom_attribute_key [String] Case Custom attribute's key + # @param body [CaseUpdateCustomAttributeRequest] Update case custom attribute payload # @param opts [Hash] the optional parameters # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers - def update_case_title_with_http_info(case_id, body, opts = {}) + def update_case_custom_attribute_with_http_info(case_id, custom_attribute_key, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_title ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_custom_attribute ...' end # verify the required parameter 'case_id' is set if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_title" + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_custom_attribute" + end + # verify the required parameter 'custom_attribute_key' is set + if @api_client.config.client_side_validation && custom_attribute_key.nil? + fail ArgumentError, "Missing the required parameter 'custom_attribute_key' when calling CaseManagementAPI.update_case_custom_attribute" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_title" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_custom_attribute" end # resource path - local_var_path = '/api/v2/cases/{case_id}/title'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/custom_attributes/{custom_attribute_key}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_key}', CGI.escape(custom_attribute_key.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4332,7 +1886,7 @@ def update_case_title_with_http_info(case_id, body, opts = {}) auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_title, + :operation => :update_case_custom_attribute, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4344,48 +1898,42 @@ def update_case_title_with_http_info(case_id, body, opts = {}) data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_title\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_custom_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a case view. + # Update case description. # - # @see #update_case_view_with_http_info - def update_case_view(view_id, body, opts = {}) - data, _status_code, _headers = update_case_view_with_http_info(view_id, body, opts) + # @see #update_case_description_with_http_info + def update_case_description(case_id, body, opts = {}) + data, _status_code, _headers = update_case_description_with_http_info(case_id, body, opts) data end - # Update a case view. + # Update case description. # - # Updates the name, query, or notification rule of an existing case view. + # Update case description # - # @param view_id [String] The UUID of the case view. - # @param body [CaseViewUpdateRequest] Case view payload. + # @param case_id [String] Case's UUID or key + # @param body [CaseUpdateDescriptionRequest] Case description update payload # @param opts [Hash] the optional parameters - # @return [Array<(CaseViewResponse, Integer, Hash)>] CaseViewResponse data, response status code and response headers - def update_case_view_with_http_info(view_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_view".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_view") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_view")) - end + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def update_case_description_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_view ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_description ...' end - # verify the required parameter 'view_id' is set - if @api_client.config.client_side_validation && view_id.nil? - fail ArgumentError, "Missing the required parameter 'view_id' when calling CaseManagementAPI.update_case_view" + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_description" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_view" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_description" end # resource path - local_var_path = '/api/v2/cases/views/{view_id}'.sub('{view_id}', CGI.escape(view_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/description'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4404,13 +1952,13 @@ def update_case_view_with_http_info(view_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'CaseViewResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_case_view, + :operation => :update_case_description, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4420,50 +1968,44 @@ def update_case_view_with_http_info(view_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_view\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_description\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a maintenance window. + # Update case title. # - # @see #update_maintenance_window_with_http_info - def update_maintenance_window(maintenance_window_id, body, opts = {}) - data, _status_code, _headers = update_maintenance_window_with_http_info(maintenance_window_id, body, opts) + # @see #update_case_title_with_http_info + def update_case_title(case_id, body, opts = {}) + data, _status_code, _headers = update_case_title_with_http_info(case_id, body, opts) data end - # Update a maintenance window. + # Update case title. # - # Updates the name, query, start time, or end time of an existing maintenance window. + # Update case title # - # @param maintenance_window_id [String] The UUID of the maintenance window. - # @param body [MaintenanceWindowUpdateRequest] Maintenance window payload. + # @param case_id [String] Case's UUID or key + # @param body [CaseUpdateTitleRequest] Case title update payload # @param opts [Hash] the optional parameters - # @return [Array<(MaintenanceWindowResponse, Integer, Hash)>] MaintenanceWindowResponse data, response status code and response headers - def update_maintenance_window_with_http_info(maintenance_window_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_maintenance_window".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_maintenance_window") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_maintenance_window")) - end + # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers + def update_case_title_with_http_info(case_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_maintenance_window ...' + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_case_title ...' end - # verify the required parameter 'maintenance_window_id' is set - if @api_client.config.client_side_validation && maintenance_window_id.nil? - fail ArgumentError, "Missing the required parameter 'maintenance_window_id' when calling CaseManagementAPI.update_maintenance_window" + # verify the required parameter 'case_id' is set + if @api_client.config.client_side_validation && case_id.nil? + fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_case_title" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_maintenance_window" + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_case_title" end # resource path - local_var_path = '/api/v2/maintenance_windows/{maintenance_window_id}'.sub('{maintenance_window_id}', CGI.escape(maintenance_window_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/cases/{case_id}/title'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -4482,13 +2024,13 @@ def update_maintenance_window_with_http_info(maintenance_window_id, body, opts = post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'MaintenanceWindowResponse' + return_type = opts[:debug_return_type] || 'CaseResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_maintenance_window, + :operation => :update_case_title, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -4498,9 +2040,9 @@ def update_maintenance_window_with_http_info(maintenance_window_id, body, opts = :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#update_maintenance_window\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: CaseManagementAPI#update_case_title\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -4797,81 +2339,5 @@ def update_status_with_http_info(case_id, body, opts = {}) end return data, status_code, headers end - - # Watch a case. - # - # @see #watch_case_with_http_info - def watch_case(case_id, user_uuid, opts = {}) - watch_case_with_http_info(case_id, user_uuid, opts) - nil - end - - # Watch a case. - # - # Adds a user (identified by their UUID) as a watcher of a case. The user receives notifications about subsequent updates to the case. - # - # @param case_id [String] Case's UUID or key - # @param user_uuid [String] The UUID of the user to add or remove as a watcher. - # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def watch_case_with_http_info(case_id, user_uuid, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.watch_case".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.watch_case") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.watch_case")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAPI.watch_case ...' - end - # verify the required parameter 'case_id' is set - if @api_client.config.client_side_validation && case_id.nil? - fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.watch_case" - end - # verify the required parameter 'user_uuid' is set - if @api_client.config.client_side_validation && user_uuid.nil? - fail ArgumentError, "Missing the required parameter 'user_uuid' when calling CaseManagementAPI.watch_case" - end - # resource path - local_var_path = '/api/v2/cases/{case_id}/watchers/{user_uuid}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/')).sub('{user_uuid}', CGI.escape(user_uuid.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] - - # return_type - return_type = opts[:debug_return_type] - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :watch_case, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAPI#watch_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end end end diff --git a/lib/datadog_api_client/v2/api/case_management_attribute_api.rb b/lib/datadog_api_client/v2/api/case_management_attribute_api.rb index db843133689b..52a7d87662a5 100644 --- a/lib/datadog_api_client/v2/api/case_management_attribute_api.rb +++ b/lib/datadog_api_client/v2/api/case_management_attribute_api.rb @@ -35,7 +35,7 @@ def create_custom_attribute_config(case_type_id, body, opts = {}) # # Create custom attribute config for a case type # - # @param case_type_id [String] The UUID of the case type. + # @param case_type_id [String] Case type's UUID # @param body [CustomAttributeConfigCreateRequest] Custom attribute config payload # @param opts [Hash] the optional parameters # @return [Array<(CustomAttributeConfigResponse, Integer, Hash)>] CustomAttributeConfigResponse data, response status code and response headers @@ -107,7 +107,7 @@ def delete_custom_attribute_config(case_type_id, custom_attribute_id, opts = {}) # # Delete custom attribute config # - # @param case_type_id [String] The UUID of the case type. + # @param case_type_id [String] Case type's UUID # @param custom_attribute_id [String] Case Custom attribute's UUID # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers @@ -177,7 +177,7 @@ def get_all_custom_attribute_configs_by_case_type(case_type_id, opts = {}) # # Get all custom attribute config of case type # - # @param case_type_id [String] The UUID of the case type. + # @param case_type_id [String] Case type's UUID # @param opts [Hash] the optional parameters # @return [Array<(CustomAttributeConfigsResponse, Integer, Hash)>] CustomAttributeConfigsResponse data, response status code and response headers def get_all_custom_attribute_configs_by_case_type_with_http_info(case_type_id, opts = {}) @@ -289,88 +289,5 @@ def get_all_custom_attributes_with_http_info(opts = {}) end return data, status_code, headers end - - # Update custom attribute config. - # - # @see #update_custom_attribute_config_with_http_info - def update_custom_attribute_config(case_type_id, custom_attribute_id, body, opts = {}) - data, _status_code, _headers = update_custom_attribute_config_with_http_info(case_type_id, custom_attribute_id, body, opts) - data - end - - # Update custom attribute config. - # - # Updates the display name, description, type, or options of an existing custom attribute configuration for a case type. - # - # @param case_type_id [String] The UUID of the case type. - # @param custom_attribute_id [String] Case Custom attribute's UUID - # @param body [CustomAttributeConfigUpdateRequest] Custom attribute config payload. - # @param opts [Hash] the optional parameters - # @return [Array<(CustomAttributeConfigResponse, Integer, Hash)>] CustomAttributeConfigResponse data, response status code and response headers - def update_custom_attribute_config_with_http_info(case_type_id, custom_attribute_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_custom_attribute_config".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_custom_attribute_config") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_custom_attribute_config")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementAttributeAPI.update_custom_attribute_config ...' - end - # verify the required parameter 'case_type_id' is set - if @api_client.config.client_side_validation && case_type_id.nil? - fail ArgumentError, "Missing the required parameter 'case_type_id' when calling CaseManagementAttributeAPI.update_custom_attribute_config" - end - # verify the required parameter 'custom_attribute_id' is set - if @api_client.config.client_side_validation && custom_attribute_id.nil? - fail ArgumentError, "Missing the required parameter 'custom_attribute_id' when calling CaseManagementAttributeAPI.update_custom_attribute_config" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAttributeAPI.update_custom_attribute_config" - end - # resource path - local_var_path = '/api/v2/cases/types/{case_type_id}/custom_attributes/{custom_attribute_id}'.sub('{case_type_id}', CGI.escape(case_type_id.to_s).gsub('%2F', '/')).sub('{custom_attribute_id}', CGI.escape(custom_attribute_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'CustomAttributeConfigResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :update_custom_attribute_config, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementAttributeAPI#update_custom_attribute_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end end end diff --git a/lib/datadog_api_client/v2/api/case_management_type_api.rb b/lib/datadog_api_client/v2/api/case_management_type_api.rb index 1aa1ac78a8fb..51bec892cf2f 100644 --- a/lib/datadog_api_client/v2/api/case_management_type_api.rb +++ b/lib/datadog_api_client/v2/api/case_management_type_api.rb @@ -102,7 +102,7 @@ def delete_case_type(case_type_id, opts = {}) # # Delete a case type # - # @param case_type_id [String] The UUID of the case type. + # @param case_type_id [String] Case type's UUID # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def delete_case_type_with_http_info(case_type_id, opts = {}) @@ -214,83 +214,5 @@ def get_all_case_types_with_http_info(opts = {}) end return data, status_code, headers end - - # Update a case type. - # - # @see #update_case_type_with_http_info - def update_case_type(case_type_id, body, opts = {}) - data, _status_code, _headers = update_case_type_with_http_info(case_type_id, body, opts) - data - end - - # Update a case type. - # - # Updates the name, emoji, or description of an existing case type. - # - # @param case_type_id [String] The UUID of the case type. - # @param body [CaseTypeUpdateRequest] Case type payload. - # @param opts [Hash] the optional parameters - # @return [Array<(CaseTypeResponse, Integer, Hash)>] CaseTypeResponse data, response status code and response headers - def update_case_type_with_http_info(case_type_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_case_type".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_case_type") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_case_type")) - end - - if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: CaseManagementTypeAPI.update_case_type ...' - end - # verify the required parameter 'case_type_id' is set - if @api_client.config.client_side_validation && case_type_id.nil? - fail ArgumentError, "Missing the required parameter 'case_type_id' when calling CaseManagementTypeAPI.update_case_type" - end - # verify the required parameter 'body' is set - if @api_client.config.client_side_validation && body.nil? - fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementTypeAPI.update_case_type" - end - # resource path - local_var_path = '/api/v2/cases/types/{case_type_id}'.sub('{case_type_id}', CGI.escape(case_type_id.to_s).gsub('%2F', '/')) - - # query parameters - query_params = opts[:query_params] || {} - - # header parameters - header_params = opts[:header_params] || {} - # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) - # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) - - # form parameters - form_params = opts[:form_params] || {} - - # http body (model) - post_body = opts[:debug_body] || @api_client.object_to_http_body(body) - - # return_type - return_type = opts[:debug_return_type] || 'CaseTypeResponse' - - # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] - - new_options = opts.merge( - :operation => :update_case_type, - :header_params => header_params, - :query_params => query_params, - :form_params => form_params, - :body => post_body, - :auth_names => auth_names, - :return_type => return_type, - :api_version => "V2" - ) - - data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) - if @api_client.config.debugging - @api_client.config.logger.debug "API called: CaseManagementTypeAPI#update_case_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" - end - return data, status_code, headers - end end end diff --git a/lib/datadog_api_client/v2/models/automation_rule_action.rb b/lib/datadog_api_client/v2/models/automation_rule_action.rb deleted file mode 100644 index 848f56aba009..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_action.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # 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 deleted file mode 100644 index bba353dd8c2a..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_action_data.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Configuration for the action to execute, dependent on the action type. - class AutomationRuleActionData - include BaseGenericModel - - # The type of AI agent to assign. Required when the action type is `assign_agent`. - attr_accessor :agent_type - - # The identifier of the AI agent to assign to the case. Required when the action type is `assign_agent`. - attr_accessor :assigned_agent_id - - # The handle of the Datadog workflow to execute. Required when the action type is `execute_workflow`. - attr_accessor :handle - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'agent_type' => :'agent_type', - :'assigned_agent_id' => :'assigned_agent_id', - :'handle' => :'handle' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'agent_type' => :'String', - :'assigned_agent_id' => :'String', - :'handle' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleActionData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'agent_type') - self.agent_type = attributes[:'agent_type'] - end - - if attributes.key?(:'assigned_agent_id') - self.assigned_agent_id = attributes[:'assigned_agent_id'] - end - - if attributes.key?(:'handle') - self.handle = attributes[:'handle'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - agent_type == o.agent_type && - assigned_agent_id == o.assigned_agent_id && - handle == o.handle && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [agent_type, assigned_agent_id, handle, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_attributes.rb b/lib/datadog_api_client/v2/models/automation_rule_attributes.rb deleted file mode 100644 index 2eb653874d8f..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_attributes.rb +++ /dev/null @@ -1,217 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Core attributes of an automation rule, including its name, trigger condition, action to execute, and current state. - class AutomationRuleAttributes - include BaseGenericModel - - # Defines what happens when the rule triggers. Combines an action type with action-specific configuration data. - attr_reader :action - - # Timestamp when the automation rule was created. - attr_reader :created_at - - # Timestamp when the automation rule was last modified. - attr_accessor :modified_at - - # A human-readable name for the automation rule, used to identify the rule in the UI and API responses. - attr_reader :name - - # Whether the automation rule is active. Enabled rules trigger on matching case events; disabled rules are inactive but preserve their configuration. - attr_reader :state - - # Defines when the rule activates. Combines a trigger type (the case event to listen for) with optional trigger data (conditions that narrow when the trigger fires). - attr_reader :trigger - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'action' => :'action', - :'created_at' => :'created_at', - :'modified_at' => :'modified_at', - :'name' => :'name', - :'state' => :'state', - :'trigger' => :'trigger' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'action' => :'AutomationRuleAction', - :'created_at' => :'Time', - :'modified_at' => :'Time', - :'name' => :'String', - :'state' => :'CaseAutomationRuleState', - :'trigger' => :'AutomationRuleTrigger' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'action') - self.action = attributes[:'action'] - end - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'modified_at') - self.modified_at = attributes[:'modified_at'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'state') - self.state = attributes[:'state'] - end - - if attributes.key?(:'trigger') - self.trigger = attributes[:'trigger'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @action.nil? - return false if @created_at.nil? - return false if @name.nil? - return false if @state.nil? - return false if @trigger.nil? - true - end - - # Custom attribute writer method with validation - # @param action [Object] Object to be assigned - # @!visibility private - def action=(action) - if action.nil? - fail ArgumentError, 'invalid value for "action", action cannot be nil.' - end - @action = action - end - - # Custom attribute writer method with validation - # @param created_at [Object] Object to be assigned - # @!visibility private - def created_at=(created_at) - if created_at.nil? - fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' - end - @created_at = created_at - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Custom attribute writer method with validation - # @param state [Object] Object to be assigned - # @!visibility private - def state=(state) - if state.nil? - fail ArgumentError, 'invalid value for "state", state cannot be nil.' - end - @state = state - end - - # Custom attribute writer method with validation - # @param trigger [Object] Object to be assigned - # @!visibility private - def trigger=(trigger) - if trigger.nil? - fail ArgumentError, 'invalid value for "trigger", trigger cannot be nil.' - end - @trigger = trigger - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action == o.action && - created_at == o.created_at && - modified_at == o.modified_at && - name == o.name && - state == o.state && - trigger == o.trigger && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [action, created_at, modified_at, name, state, trigger, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_create.rb b/lib/datadog_api_client/v2/models/automation_rule_create.rb deleted file mode 100644 index 19a3e65f2c50..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_create.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for creating an automation rule. - class AutomationRuleCreate - include BaseGenericModel - - # Attributes required to create an automation rule. - attr_reader :attributes - - # JSON:API resource type for case automation rules. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'AutomationRuleCreateAttributes', - :'type' => :'CaseAutomationRuleResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleCreate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_create_attributes.rb b/lib/datadog_api_client/v2/models/automation_rule_create_attributes.rb deleted file mode 100644 index 08d982d50e8e..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_create_attributes.rb +++ /dev/null @@ -1,175 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes required to create an automation rule. - class AutomationRuleCreateAttributes - include BaseGenericModel - - # Defines what happens when the rule triggers. Combines an action type with action-specific configuration data. - attr_reader :action - - # Name of the automation rule. - attr_reader :name - - # Whether the automation rule is active. Enabled rules trigger on matching case events; disabled rules are inactive but preserve their configuration. - attr_accessor :state - - # Defines when the rule activates. Combines a trigger type (the case event to listen for) with optional trigger data (conditions that narrow when the trigger fires). - attr_reader :trigger - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'action' => :'action', - :'name' => :'name', - :'state' => :'state', - :'trigger' => :'trigger' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'action' => :'AutomationRuleAction', - :'name' => :'String', - :'state' => :'CaseAutomationRuleState', - :'trigger' => :'AutomationRuleTrigger' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleCreateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'action') - self.action = attributes[:'action'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'state') - self.state = attributes[:'state'] - end - - if attributes.key?(:'trigger') - self.trigger = attributes[:'trigger'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @action.nil? - return false if @name.nil? - return false if @trigger.nil? - true - end - - # Custom attribute writer method with validation - # @param action [Object] Object to be assigned - # @!visibility private - def action=(action) - if action.nil? - fail ArgumentError, 'invalid value for "action", action cannot be nil.' - end - @action = action - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Custom attribute writer method with validation - # @param trigger [Object] Object to be assigned - # @!visibility private - def trigger=(trigger) - if trigger.nil? - fail ArgumentError, 'invalid value for "trigger", trigger cannot be nil.' - end - @trigger = trigger - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - action == o.action && - name == o.name && - state == o.state && - trigger == o.trigger && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [action, name, state, trigger, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_create_request.rb b/lib/datadog_api_client/v2/models/automation_rule_create_request.rb deleted file mode 100644 index 2c54834c02b4..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_create_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for creating 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 deleted file mode 100644 index 848806825b72..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_relationships.rb +++ /dev/null @@ -1,124 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Related resources for the automation rule, including the users who created and last modified it. - class AutomationRuleRelationships - include BaseGenericModel - - # Relationship to user. - attr_accessor :created_by - - # Relationship to user. - attr_accessor :modified_by - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_by' => :'created_by', - :'modified_by' => :'modified_by' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_by' => :'NullableUserRelationship', - :'modified_by' => :'NullableUserRelationship' - } - end - - # List of attributes with nullable: true - # @!visibility private - def self.openapi_nullable - Set.new([ - :'created_by', - :'modified_by', - ]) - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleRelationships` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created_by') - self.created_by = attributes[:'created_by'] - end - - if attributes.key?(:'modified_by') - self.modified_by = attributes[:'modified_by'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_by == o.created_by && - modified_by == o.modified_by && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_by, modified_by, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_response.rb b/lib/datadog_api_client/v2/models/automation_rule_response.rb deleted file mode 100644 index c7e8d1fa3104..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_response.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a single automation rule. - class AutomationRuleResponse - include BaseGenericModel - - # An automation rule that executes an action (such as running a Datadog workflow or assigning an AI agent) when a specified case event occurs within a project. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'AutomationRule' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_trigger.rb b/lib/datadog_api_client/v2/models/automation_rule_trigger.rb deleted file mode 100644 index bf66472cf8e4..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_trigger.rb +++ /dev/null @@ -1,133 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Defines when the rule activates. Combines a trigger type (the case event to listen for) with optional trigger data (conditions that narrow when the trigger fires). - class AutomationRuleTrigger - include BaseGenericModel - - # Additional configuration for the trigger, dependent on the trigger type. For `status_transitioned` triggers, specify `from_status_name` and `to_status_name`. For `attribute_value_changed` triggers, specify `field` and `change_type`. - attr_accessor :data - - # The case event that activates the automation rule. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'AutomationRuleTriggerData', - :'type' => :'AutomationRuleTriggerType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleTrigger` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_trigger_data.rb b/lib/datadog_api_client/v2/models/automation_rule_trigger_data.rb deleted file mode 100644 index 275963aa19c5..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_trigger_data.rb +++ /dev/null @@ -1,145 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Additional configuration for the trigger, dependent on the trigger type. For `status_transitioned` triggers, specify `from_status_name` and `to_status_name`. For `attribute_value_changed` triggers, specify `field` and `change_type`. - class AutomationRuleTriggerData - include BaseGenericModel - - # The approval outcome to match. Used with `case_review_approved` triggers. - attr_accessor :approval_type - - # The kind of attribute change to match. Allowed values: `VALUE_ADDED`, `VALUE_DELETED`, `ANY_CHANGES`. Used with `attribute_value_changed` triggers. - attr_accessor :change_type - - # The case attribute field name to monitor for changes. Used with `attribute_value_changed` triggers. - attr_accessor :field - - # The originating status name. Used with `status_transitioned` triggers to match transitions from this status. - attr_accessor :from_status_name - - # The destination status name. Used with `status_transitioned` triggers to match transitions to this status. - attr_accessor :to_status_name - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'approval_type' => :'approval_type', - :'change_type' => :'change_type', - :'field' => :'field', - :'from_status_name' => :'from_status_name', - :'to_status_name' => :'to_status_name' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'approval_type' => :'String', - :'change_type' => :'String', - :'field' => :'String', - :'from_status_name' => :'String', - :'to_status_name' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRuleTriggerData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'approval_type') - self.approval_type = attributes[:'approval_type'] - end - - if attributes.key?(:'change_type') - self.change_type = attributes[:'change_type'] - end - - if attributes.key?(:'field') - self.field = attributes[:'field'] - end - - if attributes.key?(:'from_status_name') - self.from_status_name = attributes[:'from_status_name'] - end - - if attributes.key?(:'to_status_name') - self.to_status_name = attributes[:'to_status_name'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - approval_type == o.approval_type && - change_type == o.change_type && - field == o.field && - from_status_name == o.from_status_name && - to_status_name == o.to_status_name && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [approval_type, change_type, field, from_status_name, to_status_name, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_trigger_type.rb b/lib/datadog_api_client/v2/models/automation_rule_trigger_type.rb deleted file mode 100644 index f3809f5b34a8..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_trigger_type.rb +++ /dev/null @@ -1,31 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The case event that activates the automation rule. - class AutomationRuleTriggerType - include BaseEnumModel - - CASE_CREATED = "case_created".freeze - STATUS_TRANSITIONED = "status_transitioned".freeze - ATTRIBUTE_VALUE_CHANGED = "attribute_value_changed".freeze - EVENT_CORRELATION_SIGNAL_CORRELATED = "event_correlation_signal_correlated".freeze - CASE_REVIEW_APPROVED = "case_review_approved".freeze - COMMENT_ADDED = "comment_added".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule_update.rb b/lib/datadog_api_client/v2/models/automation_rule_update.rb deleted file mode 100644 index abf5d100e404..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_update.rb +++ /dev/null @@ -1,133 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating 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 deleted file mode 100644 index 040a652959e7..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rule_update_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating 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 deleted file mode 100644 index c6f55df6c626..000000000000 --- a/lib/datadog_api_client/v2/models/automation_rules_response.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a list of automation rules for a project. - class AutomationRulesResponse - include BaseGenericModel - - # List of automation rules. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRulesResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case.rb b/lib/datadog_api_client/v2/models/case.rb index 957a0bcbced8..46a5e50ea48e 100644 --- a/lib/datadog_api_client/v2/models/case.rb +++ b/lib/datadog_api_client/v2/models/case.rb @@ -30,7 +30,7 @@ class Case # Resources related to a case attr_accessor :relationships - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_aggregate_group.rb b/lib/datadog_api_client/v2/models/case_aggregate_group.rb deleted file mode 100644 index 20c141ae2655..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_group.rb +++ /dev/null @@ -1,146 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A 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 deleted file mode 100644 index 08ed0b454bf7..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_group_by.rb +++ /dev/null @@ -1,150 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Configuration for 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 deleted file mode 100644 index 50e5d431ff6a..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for aggregating case counts with grouping. Use this to get faceted breakdowns of cases (for example, count of cases grouped by priority and status). - class CaseAggregateRequest - include BaseGenericModel - - # Data object wrapping the aggregation query type and attributes. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseAggregateRequestData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_request_attributes.rb b/lib/datadog_api_client/v2/models/case_aggregate_request_attributes.rb deleted file mode 100644 index 350f1c7f4d27..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_request_attributes.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for the aggregation request, including the search query and grouping configuration. - class CaseAggregateRequestAttributes - include BaseGenericModel - - # Configuration for grouping aggregated results by one or more case fields. - attr_reader :group_by - - # A search query to filter which cases are included in the aggregation. Uses the same syntax as the Case Management search bar. - attr_reader :query_filter - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'group_by' => :'group_by', - :'query_filter' => :'query_filter' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'group_by' => :'CaseAggregateGroupBy', - :'query_filter' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateRequestAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'group_by') - self.group_by = attributes[:'group_by'] - end - - if attributes.key?(:'query_filter') - self.query_filter = attributes[:'query_filter'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @group_by.nil? - return false if @query_filter.nil? - true - end - - # Custom attribute writer method with validation - # @param group_by [Object] Object to be assigned - # @!visibility private - def group_by=(group_by) - if group_by.nil? - fail ArgumentError, 'invalid value for "group_by", group_by cannot be nil.' - end - @group_by = group_by - end - - # Custom attribute writer method with validation - # @param query_filter [Object] Object to be assigned - # @!visibility private - def query_filter=(query_filter) - if query_filter.nil? - fail ArgumentError, 'invalid value for "query_filter", query_filter cannot be nil.' - end - @query_filter = query_filter - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - group_by == o.group_by && - query_filter == o.query_filter && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [group_by, query_filter, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_request_data.rb b/lib/datadog_api_client/v2/models/case_aggregate_request_data.rb deleted file mode 100644 index 5b2ae7549332..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_request_data.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object wrapping the aggregation query type and attributes. - class CaseAggregateRequestData - include BaseGenericModel - - # Attributes for the aggregation request, including the search query and grouping configuration. - attr_reader :attributes - - # JSON:API resource type for case aggregation requests. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseAggregateRequestAttributes', - :'type' => :'CaseAggregateResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateRequestData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_response.rb b/lib/datadog_api_client/v2/models/case_aggregate_response.rb deleted file mode 100644 index 95c3d07b9aab..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_response.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing aggregated case counts grouped by the requested fields. - class CaseAggregateResponse - include BaseGenericModel - - # Data object containing the aggregation results, including total count and per-group breakdowns. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseAggregateResponseData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseAggregateResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_response_attributes.rb b/lib/datadog_api_client/v2/models/case_aggregate_response_attributes.rb deleted file mode 100644 index 2bf0512ab346..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_response_attributes.rb +++ /dev/null @@ -1,146 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # 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 deleted file mode 100644 index ec1ce6ff579c..000000000000 --- a/lib/datadog_api_client/v2/models/case_aggregate_response_data.rb +++ /dev/null @@ -1,165 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # 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 42c77cf5125f..a7964289f036 100644 --- a/lib/datadog_api_client/v2/models/case_assign.rb +++ b/lib/datadog_api_client/v2/models/case_assign.rb @@ -24,7 +24,7 @@ class CaseAssign # Case assign attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_attributes.rb b/lib/datadog_api_client/v2/models/case_attributes.rb index 8c4f95e1ac8d..09da57a0014b 100644 --- a/lib/datadog_api_client/v2/models/case_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_attributes.rb @@ -24,7 +24,7 @@ class CaseAttributes # Timestamp of when the case was archived attr_accessor :archived_at - # Key-value pairs of case attributes. Each key maps to an array of string values, used for flexible metadata such as labels or tags. + # The definition of `CaseObjectAttributes` object. attr_accessor :attributes # Timestamp of when the case was closed diff --git a/lib/datadog_api_client/v2/models/case_bulk_action_type.rb b/lib/datadog_api_client/v2/models/case_bulk_action_type.rb deleted file mode 100644 index 3aa0b530a259..000000000000 --- a/lib/datadog_api_client/v2/models/case_bulk_action_type.rb +++ /dev/null @@ -1,35 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The type of action to apply in a bulk update. Allowed values are `priority`, `status`, `assign`, `unassign`, `archive`, `unarchive`, `jira`, `servicenow`, `linear`, `update_project`. - class CaseBulkActionType - include BaseEnumModel - - PRIORITY = "priority".freeze - STATUS = "status".freeze - ASSIGN = "assign".freeze - UNASSIGN = "unassign".freeze - ARCHIVE = "archive".freeze - UNARCHIVE = "unarchive".freeze - JIRA = "jira".freeze - SERVICENOW = "servicenow".freeze - LINEAR = "linear".freeze - UPDATE_PROJECT = "update_project".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/case_bulk_update_request.rb b/lib/datadog_api_client/v2/models/case_bulk_update_request.rb deleted file mode 100644 index 13da4f255c2f..000000000000 --- a/lib/datadog_api_client/v2/models/case_bulk_update_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for applying a single action (such as changing priority, status, or assignment) to multiple cases at once. - class CaseBulkUpdateRequest - include BaseGenericModel - - # Data object wrapping the bulk update type and attributes. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseBulkUpdateRequestData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseBulkUpdateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_bulk_update_request_attributes.rb b/lib/datadog_api_client/v2/models/case_bulk_update_request_attributes.rb deleted file mode 100644 index ddd108b85622..000000000000 --- a/lib/datadog_api_client/v2/models/case_bulk_update_request_attributes.rb +++ /dev/null @@ -1,156 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for the bulk update, specifying which cases to update and the action to apply. - class CaseBulkUpdateRequestAttributes - include BaseGenericModel - - # An array of case identifiers to apply the bulk action to. - attr_reader :case_ids - - # A key-value map of action-specific parameters. The required keys depend on the action type (for example, `priority` for the priority action, `assignee_id` for assign). - attr_accessor :payload - - # The type of action to apply in a bulk update. Allowed values are `priority`, `status`, `assign`, `unassign`, `archive`, `unarchive`, `jira`, `servicenow`, `linear`, `update_project`. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'case_ids' => :'case_ids', - :'payload' => :'payload', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'case_ids' => :'Array', - :'payload' => :'Hash', - :'type' => :'CaseBulkActionType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseBulkUpdateRequestAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'case_ids') - if (value = attributes[:'case_ids']).is_a?(Array) - self.case_ids = value - end - end - - if attributes.key?(:'payload') - self.payload = attributes[:'payload'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @case_ids.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param case_ids [Object] Object to be assigned - # @!visibility private - def case_ids=(case_ids) - if case_ids.nil? - fail ArgumentError, 'invalid value for "case_ids", case_ids cannot be nil.' - end - @case_ids = case_ids - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - case_ids == o.case_ids && - payload == o.payload && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [case_ids, payload, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_bulk_update_request_data.rb b/lib/datadog_api_client/v2/models/case_bulk_update_request_data.rb deleted file mode 100644 index 587da92ae88b..000000000000 --- a/lib/datadog_api_client/v2/models/case_bulk_update_request_data.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object wrapping the bulk update type and attributes. - class CaseBulkUpdateRequestData - include BaseGenericModel - - # Attributes for the bulk update, specifying which cases to update and the action to apply. - attr_reader :attributes - - # JSON:API resource type for bulk case operations. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseBulkUpdateRequestAttributes', - :'type' => :'CaseBulkResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseBulkUpdateRequestData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_comment.rb b/lib/datadog_api_client/v2/models/case_comment.rb index 8e3464942341..f2213389686b 100644 --- a/lib/datadog_api_client/v2/models/case_comment.rb +++ b/lib/datadog_api_client/v2/models/case_comment.rb @@ -24,7 +24,7 @@ class CaseComment # Case comment attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_count_group.rb b/lib/datadog_api_client/v2/models/case_count_group.rb deleted file mode 100644 index c91a5b03def2..000000000000 --- a/lib/datadog_api_client/v2/models/case_count_group.rb +++ /dev/null @@ -1,146 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A facet group containing counts broken down by the distinct values of a case field (for example, status or priority). - class CaseCountGroup - include BaseGenericModel - - # The name of the field being grouped on (for example, `status` or `priority`). - attr_reader :group - - # Values within this group. - attr_reader :group_values - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'group' => :'group', - :'group_values' => :'group_values' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'group' => :'String', - :'group_values' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCountGroup` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'group') - self.group = attributes[:'group'] - end - - if attributes.key?(:'group_values') - if (value = attributes[:'group_values']).is_a?(Array) - self.group_values = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @group.nil? - return false if @group_values.nil? - true - end - - # Custom attribute writer method with validation - # @param group [Object] Object to be assigned - # @!visibility private - def group=(group) - if group.nil? - fail ArgumentError, 'invalid value for "group", group cannot be nil.' - end - @group = group - end - - # Custom attribute writer method with validation - # @param group_values [Object] Object to be assigned - # @!visibility private - def group_values=(group_values) - if group_values.nil? - fail ArgumentError, 'invalid value for "group_values", group_values cannot be nil.' - end - @group_values = group_values - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - group == o.group && - group_values == o.group_values && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [group, group_values, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_count_group_value.rb b/lib/datadog_api_client/v2/models/case_count_group_value.rb deleted file mode 100644 index 6d12b8519220..000000000000 --- a/lib/datadog_api_client/v2/models/case_count_group_value.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # 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 deleted file mode 100644 index 94d4b3c5e544..000000000000 --- a/lib/datadog_api_client/v2/models/case_count_response.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing the total number of cases matching a query, optionally grouped by specified fields. - class CaseCountResponse - include BaseGenericModel - - # Data object containing the count results, including per-field group breakdowns. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseCountResponseData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCountResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_count_response_attributes.rb b/lib/datadog_api_client/v2/models/case_count_response_attributes.rb deleted file mode 100644 index b7c635766781..000000000000 --- a/lib/datadog_api_client/v2/models/case_count_response_attributes.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for the count response, including the total count and optional facet breakdowns. - class CaseCountResponseAttributes - include BaseGenericModel - - # List of facet groups, one per field specified in `group_bys`. - attr_reader :groups - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'groups' => :'groups' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'groups' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseCountResponseAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'groups') - if (value = attributes[:'groups']).is_a?(Array) - self.groups = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @groups.nil? - true - end - - # Custom attribute writer method with validation - # @param groups [Object] Object to be assigned - # @!visibility private - def groups=(groups) - if groups.nil? - fail ArgumentError, 'invalid value for "groups", groups cannot be nil.' - end - @groups = groups - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - groups == o.groups && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [groups, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_count_response_data.rb b/lib/datadog_api_client/v2/models/case_count_response_data.rb deleted file mode 100644 index 2de85b14855f..000000000000 --- a/lib/datadog_api_client/v2/models/case_count_response_data.rb +++ /dev/null @@ -1,165 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # 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 ae11d67a80c8..3e1e8eb70cd3 100644 --- a/lib/datadog_api_client/v2/models/case_create.rb +++ b/lib/datadog_api_client/v2/models/case_create.rb @@ -27,7 +27,7 @@ class CaseCreate # Relationships formed with the case on creation attr_accessor :relationships - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_empty.rb b/lib/datadog_api_client/v2/models/case_empty.rb index b7ac9c21ead7..800e88daf1ab 100644 --- a/lib/datadog_api_client/v2/models/case_empty.rb +++ b/lib/datadog_api_client/v2/models/case_empty.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class CaseEmpty include BaseGenericModel - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_insight.rb b/lib/datadog_api_client/v2/models/case_insight.rb deleted file mode 100644 index f8d7be670f39..000000000000 --- a/lib/datadog_api_client/v2/models/case_insight.rb +++ /dev/null @@ -1,165 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A reference to an external Datadog resource that provides investigative context for a case, such as a security signal, monitor alert, error tracking issue, or incident. - class CaseInsight - include BaseGenericModel - - # The URL path or deep link to the insight resource within Datadog (for example, `/monitors/12345?q=total`). - attr_reader :ref - - # The unique identifier of the referenced Datadog resource (for example, a monitor ID, incident ID, or signal ID). - attr_reader :resource_id - - # The type of Datadog resource linked to the case as contextual evidence. Each type corresponds to a different Datadog product signal (for example, a security finding, a monitor alert, or an incident). - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'ref' => :'ref', - :'resource_id' => :'resource_id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'ref' => :'String', - :'resource_id' => :'String', - :'type' => :'CaseInsightType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseInsight` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'ref') - self.ref = attributes[:'ref'] - end - - if attributes.key?(:'resource_id') - self.resource_id = attributes[:'resource_id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @ref.nil? - return false if @resource_id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param ref [Object] Object to be assigned - # @!visibility private - def ref=(ref) - if ref.nil? - fail ArgumentError, 'invalid value for "ref", ref cannot be nil.' - end - @ref = ref - end - - # Custom attribute writer method with validation - # @param resource_id [Object] Object to be assigned - # @!visibility private - def resource_id=(resource_id) - if resource_id.nil? - fail ArgumentError, 'invalid value for "resource_id", resource_id cannot be nil.' - end - @resource_id = resource_id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - ref == o.ref && - resource_id == o.resource_id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [ref, resource_id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_insight_type.rb b/lib/datadog_api_client/v2/models/case_insight_type.rb deleted file mode 100644 index aa41b73bd18c..000000000000 --- a/lib/datadog_api_client/v2/models/case_insight_type.rb +++ /dev/null @@ -1,41 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The type of Datadog resource linked to the case as contextual evidence. Each type corresponds to a different Datadog product signal (for example, a security finding, a monitor alert, or an incident). - class CaseInsightType - include BaseEnumModel - - SECURITY_SIGNAL = "SECURITY_SIGNAL".freeze - MONITOR = "MONITOR".freeze - EVENT_CORRELATION = "EVENT_CORRELATION".freeze - ERROR_TRACKING = "ERROR_TRACKING".freeze - CLOUD_COST_RECOMMENDATION = "CLOUD_COST_RECOMMENDATION".freeze - INCIDENT = "INCIDENT".freeze - SENSITIVE_DATA_SCANNER_ISSUE = "SENSITIVE_DATA_SCANNER_ISSUE".freeze - EVENT = "EVENT".freeze - WATCHDOG_STORY = "WATCHDOG_STORY".freeze - WIDGET = "WIDGET".freeze - SECURITY_FINDING = "SECURITY_FINDING".freeze - INSIGHT_SCORECARD_CAMPAIGN = "INSIGHT_SCORECARD_CAMPAIGN".freeze - RESOURCE_POLICY = "RESOURCE_POLICY".freeze - APM_RECOMMENDATION = "APM_RECOMMENDATION".freeze - SCM_URL = "SCM_URL".freeze - PROFILING_DOWNSIZING_EXPERIMENT = "PROFILING_DOWNSIZING_EXPERIMENT".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/case_insights_attributes.rb b/lib/datadog_api_client/v2/models/case_insights_attributes.rb deleted file mode 100644 index 26b8ce8d2267..000000000000 --- a/lib/datadog_api_client/v2/models/case_insights_attributes.rb +++ /dev/null @@ -1,133 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for adding or removing insights from a case. - class CaseInsightsAttributes - include BaseGenericModel - - # Array of insights to add to or remove from a case. - attr_reader :insights - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'insights' => :'insights' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'insights' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseInsightsAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'insights') - if (value = attributes[:'insights']).is_a?(Array) - self.insights = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @insights.nil? - return false if @insights.length > 100 - return false if @insights.length < 1 - true - end - - # Custom attribute writer method with validation - # @param insights [Object] Object to be assigned - # @!visibility private - def insights=(insights) - if insights.nil? - fail ArgumentError, 'invalid value for "insights", insights cannot be nil.' - end - if insights.length > 100 - fail ArgumentError, 'invalid value for "insights", number of items must be less than or equal to 100.' - end - if insights.length < 1 - fail ArgumentError, 'invalid value for "insights", number of items must be greater than or equal to 1.' - end - @insights = insights - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - insights == o.insights && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [insights, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_insights_data.rb b/lib/datadog_api_client/v2/models/case_insights_data.rb deleted file mode 100644 index 16a2a81692aa..000000000000 --- a/lib/datadog_api_client/v2/models/case_insights_data.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object containing the insights to add or remove. - class CaseInsightsData - include BaseGenericModel - - # Attributes for adding or removing insights from a case. - attr_reader :attributes - - # JSON:API resource type for cases. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseInsightsAttributes', - :'type' => :'CaseResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseInsightsData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_insights_request.rb b/lib/datadog_api_client/v2/models/case_insights_request.rb deleted file mode 100644 index d9088d48a03d..000000000000 --- a/lib/datadog_api_client/v2/models/case_insights_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for 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 deleted file mode 100644 index 5a1a0b9b2390..000000000000 --- a/lib/datadog_api_client/v2/models/case_link.rb +++ /dev/null @@ -1,165 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A 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 deleted file mode 100644 index 538737230643..000000000000 --- a/lib/datadog_api_client/v2/models/case_link_attributes.rb +++ /dev/null @@ -1,207 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes describing a directional relationship between two entities (cases, incidents, or pages). - class CaseLinkAttributes - include BaseGenericModel - - # The UUID of the child (target) entity in the relationship. - attr_reader :child_entity_id - - # The type of the child entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`. - attr_reader :child_entity_type - - # The UUID of the parent (source) entity in the relationship. - attr_reader :parent_entity_id - - # The type of the parent entity. Allowed values: `CASE`, `INCIDENT`, `PAGE`, `AGENT_CONVERSATION`. - attr_reader :parent_entity_type - - # The type of directional relationship. Allowed values: `RELATES_TO` (bidirectional association), `CAUSES` (parent causes child), `BLOCKS` (parent blocks child), `DUPLICATES` (parent duplicates child), `PARENT_OF` (hierarchical), `SUCCESSOR_OF` (sequence), `ESCALATES_TO` (priority escalation). - attr_reader :relationship - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'child_entity_id' => :'child_entity_id', - :'child_entity_type' => :'child_entity_type', - :'parent_entity_id' => :'parent_entity_id', - :'parent_entity_type' => :'parent_entity_type', - :'relationship' => :'relationship' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'child_entity_id' => :'String', - :'child_entity_type' => :'String', - :'parent_entity_id' => :'String', - :'parent_entity_type' => :'String', - :'relationship' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseLinkAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'child_entity_id') - self.child_entity_id = attributes[:'child_entity_id'] - end - - if attributes.key?(:'child_entity_type') - self.child_entity_type = attributes[:'child_entity_type'] - end - - if attributes.key?(:'parent_entity_id') - self.parent_entity_id = attributes[:'parent_entity_id'] - end - - if attributes.key?(:'parent_entity_type') - self.parent_entity_type = attributes[:'parent_entity_type'] - end - - if attributes.key?(:'relationship') - self.relationship = attributes[:'relationship'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @child_entity_id.nil? - return false if @child_entity_type.nil? - return false if @parent_entity_id.nil? - return false if @parent_entity_type.nil? - return false if @relationship.nil? - true - end - - # Custom attribute writer method with validation - # @param child_entity_id [Object] Object to be assigned - # @!visibility private - def child_entity_id=(child_entity_id) - if child_entity_id.nil? - fail ArgumentError, 'invalid value for "child_entity_id", child_entity_id cannot be nil.' - end - @child_entity_id = child_entity_id - end - - # Custom attribute writer method with validation - # @param child_entity_type [Object] Object to be assigned - # @!visibility private - def child_entity_type=(child_entity_type) - if child_entity_type.nil? - fail ArgumentError, 'invalid value for "child_entity_type", child_entity_type cannot be nil.' - end - @child_entity_type = child_entity_type - end - - # Custom attribute writer method with validation - # @param parent_entity_id [Object] Object to be assigned - # @!visibility private - def parent_entity_id=(parent_entity_id) - if parent_entity_id.nil? - fail ArgumentError, 'invalid value for "parent_entity_id", parent_entity_id cannot be nil.' - end - @parent_entity_id = parent_entity_id - end - - # Custom attribute writer method with validation - # @param parent_entity_type [Object] Object to be assigned - # @!visibility private - def parent_entity_type=(parent_entity_type) - if parent_entity_type.nil? - fail ArgumentError, 'invalid value for "parent_entity_type", parent_entity_type cannot be nil.' - end - @parent_entity_type = parent_entity_type - end - - # Custom attribute writer method with validation - # @param relationship [Object] Object to be assigned - # @!visibility private - def relationship=(relationship) - if relationship.nil? - fail ArgumentError, 'invalid value for "relationship", relationship cannot be nil.' - end - @relationship = relationship - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - child_entity_id == o.child_entity_id && - child_entity_type == o.child_entity_type && - parent_entity_id == o.parent_entity_id && - parent_entity_type == o.parent_entity_type && - relationship == o.relationship && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [child_entity_id, child_entity_type, parent_entity_id, parent_entity_type, relationship, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_link_create.rb b/lib/datadog_api_client/v2/models/case_link_create.rb deleted file mode 100644 index c778b8c02184..000000000000 --- a/lib/datadog_api_client/v2/models/case_link_create.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for creating a case link. - class CaseLinkCreate - include BaseGenericModel - - # Attributes describing a directional relationship between two entities (cases, incidents, or pages). - attr_reader :attributes - - # JSON:API resource type for case links. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseLinkAttributes', - :'type' => :'CaseLinkResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseLinkCreate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_link_create_request.rb b/lib/datadog_api_client/v2/models/case_link_create_request.rb deleted file mode 100644 index 40c1efb4ba79..000000000000 --- a/lib/datadog_api_client/v2/models/case_link_create_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for creating a 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_response.rb b/lib/datadog_api_client/v2/models/case_link_response.rb deleted file mode 100644 index 32d0d64fc1fa..000000000000 --- a/lib/datadog_api_client/v2/models/case_link_response.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a single case link. - class CaseLinkResponse - include BaseGenericModel - - # A directional link representing a relationship between two entities. At least one entity must be a case. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseLink' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseLinkResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_links_response.rb b/lib/datadog_api_client/v2/models/case_links_response.rb deleted file mode 100644 index 5b2ff3a4ccb2..000000000000 --- a/lib/datadog_api_client/v2/models/case_links_response.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a list of case links. - class CaseLinksResponse - include BaseGenericModel - - # A list of case links. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseLinksResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_resource_type.rb b/lib/datadog_api_client/v2/models/case_resource_type.rb index e0e9c8f4201a..967786b108fa 100644 --- a/lib/datadog_api_client/v2/models/case_resource_type.rb +++ b/lib/datadog_api_client/v2/models/case_resource_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for cases. + # Case resource type class CaseResourceType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/case_type_create.rb b/lib/datadog_api_client/v2/models/case_type_create.rb index 53df7d267273..874b7c82c0c3 100644 --- a/lib/datadog_api_client/v2/models/case_type_create.rb +++ b/lib/datadog_api_client/v2/models/case_type_create.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Data object for creating a case type. + # Case type class CaseTypeCreate include BaseGenericModel - # Attributes of a case type, which define a classification category for cases. Organizations use case types to model different workflows (for example, Security Incident, Bug Report, Change Request). + # Case Type resource attributes attr_reader :attributes - # JSON:API resource type for case types. + # Case type resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_type_create_request.rb b/lib/datadog_api_client/v2/models/case_type_create_request.rb index de73024c903c..412a5408f25e 100644 --- a/lib/datadog_api_client/v2/models/case_type_create_request.rb +++ b/lib/datadog_api_client/v2/models/case_type_create_request.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for creating a case type. + # Case type create request class CaseTypeCreateRequest include BaseGenericModel - # Data object for creating a case type. + # Case type attr_reader :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_type_resource.rb b/lib/datadog_api_client/v2/models/case_type_resource.rb index 736c04a2495d..9b28ee4b9bb5 100644 --- a/lib/datadog_api_client/v2/models/case_type_resource.rb +++ b/lib/datadog_api_client/v2/models/case_type_resource.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A case type that defines a classification category for cases. Each case type can have its own custom attributes, statuses, and automation rules. + # The definition of `CaseType` object. class CaseTypeResource include BaseGenericModel - # Attributes of a case type, which define a classification category for cases. Organizations use case types to model different workflows (for example, Security Incident, Bug Report, Change Request). + # Case Type resource attributes attr_accessor :attributes # Case type's identifier attr_accessor :id - # JSON:API resource type for case types. + # Case type resource type attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_type_resource_attributes.rb b/lib/datadog_api_client/v2/models/case_type_resource_attributes.rb index 71a28d234182..b317858dc7b0 100644 --- a/lib/datadog_api_client/v2/models/case_type_resource_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_type_resource_attributes.rb @@ -17,20 +17,20 @@ require 'time' module DatadogAPIClient::V2 - # Attributes of a case type, which define a classification category for cases. Organizations use case types to model different workflows (for example, Security Incident, Bug Report, Change Request). + # Case Type resource attributes class CaseTypeResourceAttributes include BaseGenericModel - # Timestamp when the case type was marked as deleted. A null value indicates the case type is active. + # Timestamp of when the case type was deleted attr_accessor :deleted_at - # A detailed description explaining when this case type should be used. + # Case type description. attr_accessor :description - # An emoji icon representing the case type in the UI. + # Case type emoji. attr_accessor :emoji - # The display name of the case type, shown in the Case Management UI when creating or viewing cases. + # Case type name. attr_reader :name attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_type_resource_type.rb b/lib/datadog_api_client/v2/models/case_type_resource_type.rb index 57e3f78e128c..d5c743dea544 100644 --- a/lib/datadog_api_client/v2/models/case_type_resource_type.rb +++ b/lib/datadog_api_client/v2/models/case_type_resource_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for case types. + # Case type resource type class CaseTypeResourceType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/case_type_response.rb b/lib/datadog_api_client/v2/models/case_type_response.rb index bfc0ab3e5ccf..a1a486804aa3 100644 --- a/lib/datadog_api_client/v2/models/case_type_response.rb +++ b/lib/datadog_api_client/v2/models/case_type_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Response containing a single case type. + # Case type response class CaseTypeResponse include BaseGenericModel - # A case type that defines a classification category for cases. Each case type can have its own custom attributes, statuses, and automation rules. + # The definition of `CaseType` object. attr_accessor :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_type_update.rb b/lib/datadog_api_client/v2/models/case_type_update.rb deleted file mode 100644 index 50c26ff2d4c2..000000000000 --- a/lib/datadog_api_client/v2/models/case_type_update.rb +++ /dev/null @@ -1,133 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a case type. - class CaseTypeUpdate - include BaseGenericModel - - # Attributes of a case type, which define a classification category for cases. Organizations use case types to model different workflows (for example, Security Incident, Bug Report, Change Request). - attr_accessor :attributes - - # JSON:API resource type for case types. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseTypeResourceAttributes', - :'type' => :'CaseTypeResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseTypeUpdate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_type_update_request.rb b/lib/datadog_api_client/v2/models/case_type_update_request.rb deleted file mode 100644 index 67451e683a86..000000000000 --- a/lib/datadog_api_client/v2/models/case_type_update_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating a 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 0104a30e7506..697aa99c4c79 100644 --- a/lib/datadog_api_client/v2/models/case_types_response.rb +++ b/lib/datadog_api_client/v2/models/case_types_response.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Response containing a list of case types. + # Case types response. class CaseTypesResponse include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/case_update_attributes.rb b/lib/datadog_api_client/v2/models/case_update_attributes.rb index 4205c6edf2cb..d65f0a256721 100644 --- a/lib/datadog_api_client/v2/models/case_update_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_update_attributes.rb @@ -24,7 +24,7 @@ class CaseUpdateAttributes # Case update attributes attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_attributes_attributes.rb b/lib/datadog_api_client/v2/models/case_update_attributes_attributes.rb index 94a273e87fe3..383966e519fa 100644 --- a/lib/datadog_api_client/v2/models/case_update_attributes_attributes.rb +++ b/lib/datadog_api_client/v2/models/case_update_attributes_attributes.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class CaseUpdateAttributesAttributes include BaseGenericModel - # Key-value pairs of case attributes. Each key maps to an array of string values, used for flexible metadata such as labels or tags. + # The definition of `CaseObjectAttributes` object. attr_reader :attributes attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_comment.rb b/lib/datadog_api_client/v2/models/case_update_comment.rb deleted file mode 100644 index d30653c7dc99..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_comment.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a case comment. - class CaseUpdateComment - include BaseGenericModel - - # Attributes for updating a comment. - attr_reader :attributes - - # JSON:API resource type for cases. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseUpdateCommentAttributes', - :'type' => :'CaseResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateComment` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_comment_attributes.rb b/lib/datadog_api_client/v2/models/case_update_comment_attributes.rb deleted file mode 100644 index 7813378c875e..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_comment_attributes.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for updating a comment. - class CaseUpdateCommentAttributes - include BaseGenericModel - - # The updated comment message. - attr_reader :comment - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'comment' => :'comment' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'comment' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateCommentAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'comment') - self.comment = attributes[:'comment'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @comment.nil? - true - end - - # Custom attribute writer method with validation - # @param comment [Object] Object to be assigned - # @!visibility private - def comment=(comment) - if comment.nil? - fail ArgumentError, 'invalid value for "comment", comment cannot be nil.' - end - @comment = comment - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - comment == o.comment && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [comment, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_comment_request.rb b/lib/datadog_api_client/v2/models/case_update_comment_request.rb deleted file mode 100644 index 3b67f1dd66da..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_comment_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating a comment on a case timeline. - class CaseUpdateCommentRequest - include BaseGenericModel - - # Data object for updating a case comment. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseUpdateComment' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateCommentRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_custom_attribute.rb b/lib/datadog_api_client/v2/models/case_update_custom_attribute.rb index d1f115c6d453..986d0f7de606 100644 --- a/lib/datadog_api_client/v2/models/case_update_custom_attribute.rb +++ b/lib/datadog_api_client/v2/models/case_update_custom_attribute.rb @@ -21,10 +21,10 @@ module DatadogAPIClient::V2 class CaseUpdateCustomAttribute include BaseGenericModel - # A typed value for a custom attribute on a specific case. + # Custom attribute values attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_description.rb b/lib/datadog_api_client/v2/models/case_update_description.rb index 6a1f13055390..1167c430886c 100644 --- a/lib/datadog_api_client/v2/models/case_update_description.rb +++ b/lib/datadog_api_client/v2/models/case_update_description.rb @@ -24,7 +24,7 @@ class CaseUpdateDescription # Case update description attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_due_date.rb b/lib/datadog_api_client/v2/models/case_update_due_date.rb deleted file mode 100644 index 3ca5afeefd25..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_due_date.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a case's due date. - class CaseUpdateDueDate - include BaseGenericModel - - # Attributes for setting or clearing a case's due date. - attr_reader :attributes - - # JSON:API resource type for cases. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseUpdateDueDateAttributes', - :'type' => :'CaseResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateDueDate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_due_date_attributes.rb b/lib/datadog_api_client/v2/models/case_update_due_date_attributes.rb deleted file mode 100644 index 37f7a69d883c..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_due_date_attributes.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for setting or clearing a case's due date. - class CaseUpdateDueDateAttributes - include BaseGenericModel - - # The target resolution date for the case, in `YYYY-MM-DD` format. Set to `null` to clear the due date. - attr_reader :due_date - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'due_date' => :'due_date' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'due_date' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateDueDateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'due_date') - self.due_date = attributes[:'due_date'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @due_date.nil? - true - end - - # Custom attribute writer method with validation - # @param due_date [Object] Object to be assigned - # @!visibility private - def due_date=(due_date) - if due_date.nil? - fail ArgumentError, 'invalid value for "due_date", due_date cannot be nil.' - end - @due_date = due_date - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - due_date == o.due_date && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [due_date, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_due_date_request.rb b/lib/datadog_api_client/v2/models/case_update_due_date_request.rb deleted file mode 100644 index db434df49cd2..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_due_date_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating a case's due date. - class CaseUpdateDueDateRequest - include BaseGenericModel - - # Data object for updating a case's due date. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseUpdateDueDate' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateDueDateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_priority.rb b/lib/datadog_api_client/v2/models/case_update_priority.rb index 7fce18a8c47f..dfc7cd1751f3 100644 --- a/lib/datadog_api_client/v2/models/case_update_priority.rb +++ b/lib/datadog_api_client/v2/models/case_update_priority.rb @@ -24,7 +24,7 @@ class CaseUpdatePriority # Case update priority attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_resolved_reason.rb b/lib/datadog_api_client/v2/models/case_update_resolved_reason.rb deleted file mode 100644 index 21b79e1248e7..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_resolved_reason.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a case's resolved reason. - class CaseUpdateResolvedReason - include BaseGenericModel - - # Attributes for setting the resolution reason on a security case. - attr_reader :attributes - - # JSON:API resource type for cases. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseUpdateResolvedReasonAttributes', - :'type' => :'CaseResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateResolvedReason` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @attributes.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned - # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' - end - @attributes = attributes - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_resolved_reason_attributes.rb b/lib/datadog_api_client/v2/models/case_update_resolved_reason_attributes.rb deleted file mode 100644 index ab7d1370c503..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_resolved_reason_attributes.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes for setting the resolution reason on a security case. - class CaseUpdateResolvedReasonAttributes - include BaseGenericModel - - # The reason the security case was resolved (for example, `FALSE_POSITIVE`, `TRUE_POSITIVE`, `BENIGN_POSITIVE`). - attr_reader :security_resolved_reason - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'security_resolved_reason' => :'security_resolved_reason' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'security_resolved_reason' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateResolvedReasonAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'security_resolved_reason') - self.security_resolved_reason = attributes[:'security_resolved_reason'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @security_resolved_reason.nil? - true - end - - # Custom attribute writer method with validation - # @param security_resolved_reason [Object] Object to be assigned - # @!visibility private - def security_resolved_reason=(security_resolved_reason) - if security_resolved_reason.nil? - fail ArgumentError, 'invalid value for "security_resolved_reason", security_resolved_reason cannot be nil.' - end - @security_resolved_reason = security_resolved_reason - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - security_resolved_reason == o.security_resolved_reason && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [security_resolved_reason, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_resolved_reason_request.rb b/lib/datadog_api_client/v2/models/case_update_resolved_reason_request.rb deleted file mode 100644 index 020957932604..000000000000 --- a/lib/datadog_api_client/v2/models/case_update_resolved_reason_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating the resolution reason on a closed security case. - class CaseUpdateResolvedReasonRequest - include BaseGenericModel - - # Data object for updating a case's resolved reason. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseUpdateResolvedReason' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseUpdateResolvedReasonRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_update_status.rb b/lib/datadog_api_client/v2/models/case_update_status.rb index 37ad158349ac..77d652d314c6 100644 --- a/lib/datadog_api_client/v2/models/case_update_status.rb +++ b/lib/datadog_api_client/v2/models/case_update_status.rb @@ -24,7 +24,7 @@ class CaseUpdateStatus # Case update status attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_update_title.rb b/lib/datadog_api_client/v2/models/case_update_title.rb index 55311210b2da..b5f41b6d4fb9 100644 --- a/lib/datadog_api_client/v2/models/case_update_title.rb +++ b/lib/datadog_api_client/v2/models/case_update_title.rb @@ -24,7 +24,7 @@ class CaseUpdateTitle # Case update title attributes attr_reader :attributes - # JSON:API resource type for cases. + # Case resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/case_view_attributes.rb b/lib/datadog_api_client/v2/models/case_view_attributes.rb deleted file mode 100644 index 9048ef887fcb..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_attributes.rb +++ /dev/null @@ -1,185 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes of a 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_attributes.rb b/lib/datadog_api_client/v2/models/case_view_create_attributes.rb deleted file mode 100644 index 00d718839eaf..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_create_attributes.rb +++ /dev/null @@ -1,175 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes required to create a case view. - class CaseViewCreateAttributes - include BaseGenericModel - - # The name of the view. - attr_reader :name - - # The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - attr_accessor :np_rule_id - - # The UUID of the project this view belongs to. Views are scoped to a single project. - attr_reader :project_id - - # The query used to filter cases in this view. - attr_reader :query - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name', - :'np_rule_id' => :'np_rule_id', - :'project_id' => :'project_id', - :'query' => :'query' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String', - :'np_rule_id' => :'String', - :'project_id' => :'String', - :'query' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewCreateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'np_rule_id') - self.np_rule_id = attributes[:'np_rule_id'] - end - - if attributes.key?(:'project_id') - self.project_id = attributes[:'project_id'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @name.nil? - return false if @project_id.nil? - return false if @query.nil? - true - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Custom attribute writer method with validation - # @param project_id [Object] Object to be assigned - # @!visibility private - def project_id=(project_id) - if project_id.nil? - fail ArgumentError, 'invalid value for "project_id", project_id cannot be nil.' - end - @project_id = project_id - end - - # Custom attribute writer method with validation - # @param query [Object] Object to be assigned - # @!visibility private - def query=(query) - if query.nil? - fail ArgumentError, 'invalid value for "query", query cannot be nil.' - end - @query = query - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - np_rule_id == o.np_rule_id && - project_id == o.project_id && - query == o.query && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, np_rule_id, project_id, query, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_view_create_request.rb b/lib/datadog_api_client/v2/models/case_view_create_request.rb deleted file mode 100644 index ba15cdf0aaa5..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_create_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for creating a 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 deleted file mode 100644 index a47f5b1ca337..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_relationships.rb +++ /dev/null @@ -1,134 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Related resources for the 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 deleted file mode 100644 index 2d851ce89a8c..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_resource_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # JSON:API resource type for 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 deleted file mode 100644 index f5a2adab3de6..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_response.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a single case view. - class CaseViewResponse - include BaseGenericModel - - # A saved case view that provides a filtered, reusable list of cases matching a specific query. Views act as persistent dashboards for monitoring case subsets. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CaseView' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_view_update.rb b/lib/datadog_api_client/v2/models/case_view_update.rb deleted file mode 100644 index f35e40625995..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_update.rb +++ /dev/null @@ -1,133 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a case view. - class CaseViewUpdate - include BaseGenericModel - - # Attributes that can be updated on a case view. All fields are optional; only provided fields are changed. - attr_accessor :attributes - - # JSON:API resource type for case views. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CaseViewUpdateAttributes', - :'type' => :'CaseViewResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewUpdate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_view_update_attributes.rb b/lib/datadog_api_client/v2/models/case_view_update_attributes.rb deleted file mode 100644 index a3a92a02757f..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_update_attributes.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes that can be updated on a case view. All fields are optional; only provided fields are changed. - class CaseViewUpdateAttributes - include BaseGenericModel - - # The name of the view. - attr_accessor :name - - # The identifier of a notification rule linked to this view. When set, users subscribed to the view receive alerts for matching cases. - attr_accessor :np_rule_id - - # The query used to filter cases in this view. - attr_accessor :query - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'name' => :'name', - :'np_rule_id' => :'np_rule_id', - :'query' => :'query' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'name' => :'String', - :'np_rule_id' => :'String', - :'query' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewUpdateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'np_rule_id') - self.np_rule_id = attributes[:'np_rule_id'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - name == o.name && - np_rule_id == o.np_rule_id && - query == o.query && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [name, np_rule_id, query, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_view_update_request.rb b/lib/datadog_api_client/v2/models/case_view_update_request.rb deleted file mode 100644 index 0cdcfc79e116..000000000000 --- a/lib/datadog_api_client/v2/models/case_view_update_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating a 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 deleted file mode 100644 index 68c150c8dc7a..000000000000 --- a/lib/datadog_api_client/v2/models/case_views_response.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a list of case 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 deleted file mode 100644 index 3bd4faa392f4..000000000000 --- a/lib/datadog_api_client/v2/models/case_watcher.rb +++ /dev/null @@ -1,165 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Represents a user who is subscribed to notifications for a case. Watchers receive updates when the case's status, priority, assignee, or comments change. - class CaseWatcher - include BaseGenericModel - - # The primary identifier of the case watcher. - attr_reader :id - - # Relationships for a case watcher, linking to the underlying user resource. - attr_reader :relationships - - # JSON:API resource type for case watchers. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'id' => :'id', - :'relationships' => :'relationships', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'id' => :'String', - :'relationships' => :'CaseWatcherRelationships', - :'type' => :'CaseWatcherResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseWatcher` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @id.nil? - return false if @relationships.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param relationships [Object] Object to be assigned - # @!visibility private - def relationships=(relationships) - if relationships.nil? - fail ArgumentError, 'invalid value for "relationships", relationships cannot be nil.' - end - @relationships = relationships - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - relationships == o.relationships && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [id, relationships, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_watcher_relationships.rb b/lib/datadog_api_client/v2/models/case_watcher_relationships.rb deleted file mode 100644 index efb530d45aa8..000000000000 --- a/lib/datadog_api_client/v2/models/case_watcher_relationships.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Relationships for a case watcher, linking to the underlying user resource. - class CaseWatcherRelationships - include BaseGenericModel - - # The user relationship for a case watcher. - attr_reader :user - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'user' => :'user' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'user' => :'CaseWatcherUserRelationship' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseWatcherRelationships` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'user') - self.user = attributes[:'user'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @user.nil? - true - end - - # Custom attribute writer method with validation - # @param user [Object] Object to be assigned - # @!visibility private - def user=(user) - if user.nil? - fail ArgumentError, 'invalid value for "user", user cannot be nil.' - end - @user = user - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - user == o.user && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [user, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_watcher_resource_type.rb b/lib/datadog_api_client/v2/models/case_watcher_resource_type.rb deleted file mode 100644 index c65383a1d597..000000000000 --- a/lib/datadog_api_client/v2/models/case_watcher_resource_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # JSON:API resource type for 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 deleted file mode 100644 index 5b62e26eb150..000000000000 --- a/lib/datadog_api_client/v2/models/case_watcher_user_relationship.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # The user relationship for a case watcher. - class CaseWatcherUserRelationship - include BaseGenericModel - - # Relationship to user object. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'UserRelationshipData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseWatcherUserRelationship` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/case_watchers_response.rb b/lib/datadog_api_client/v2/models/case_watchers_response.rb deleted file mode 100644 index 4eaad11ff1ef..000000000000 --- a/lib/datadog_api_client/v2/models/case_watchers_response.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing the list of users watching a case. - class CaseWatchersResponse - include BaseGenericModel - - # List of case watchers. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseWatchersResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config.rb b/lib/datadog_api_client/v2/models/custom_attribute_config.rb index b78efdeb6a45..1db82cea9155 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A custom attribute configuration that defines an organization-specific metadata field on cases. Custom attributes are scoped to a case type and can hold text, URLs, numbers, or predefined select options. + # The definition of `CustomAttributeConfig` object. class CustomAttributeConfig include BaseGenericModel - # Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type. + # Custom attribute resource attributes attr_accessor :attributes # Custom attribute configs identifier attr_accessor :id - # JSON:API resource type for custom attribute configurations. + # Custom attributes config JSON:API resource type attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_attributes_create.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_attributes_create.rb index 89cda11d1b36..11f6ca147db7 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_attributes_create.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_attributes_create.rb @@ -17,23 +17,23 @@ require 'time' module DatadogAPIClient::V2 - # Attributes required to create a custom attribute configuration. + # Custom attribute config resource attributes class CustomAttributeConfigAttributesCreate include BaseGenericModel - # A description explaining the purpose and expected values for this custom attribute. + # Custom attribute description. attr_accessor :description - # The human-readable label shown in the Case Management UI for this custom attribute. + # Custom attribute name. attr_reader :display_name - # If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed. + # Whether multiple values can be set attr_reader :is_multi - # The programmatic key used to reference this custom attribute in search queries and API calls. + # Custom attribute key. This will be the value use to search on this custom attribute attr_reader :key - # The data type of the custom attribute, which determines the allowed values and UI input control. + # Custom attributes type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_create.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_create.rb index 9aa9877b5f53..1dd69d393f32 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_create.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_create.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Data object for creating a custom attribute configuration. + # Custom attribute config class CustomAttributeConfigCreate include BaseGenericModel - # Attributes required to create a custom attribute configuration. + # Custom attribute config resource attributes attr_reader :attributes - # JSON:API resource type for custom attribute configurations. + # Custom attributes config JSON:API resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_create_request.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_create_request.rb index 76dfa49cbe44..218c169ce4c9 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_create_request.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_create_request.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Request payload for creating a custom attribute configuration. + # Custom attribute config create request class CustomAttributeConfigCreateRequest include BaseGenericModel - # Data object for creating a custom attribute configuration. + # Custom attribute config attr_reader :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_resource_attributes.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_resource_attributes.rb index 4c7236e5f6fb..ba238edb4cd1 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_resource_attributes.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_resource_attributes.rb @@ -17,26 +17,26 @@ require 'time' module DatadogAPIClient::V2 - # Attributes of a custom attribute configuration, defining an organization-specific metadata field that can be added to cases of a given type. + # Custom attribute resource attributes class CustomAttributeConfigResourceAttributes include BaseGenericModel - # The UUID of the case type this custom attribute belongs to. + # Custom attribute config identifier. attr_reader :case_type_id - # A description explaining the purpose and expected values for this custom attribute. + # Custom attribute description. attr_accessor :description - # The human-readable label shown in the Case Management UI for this custom attribute. + # Custom attribute name. attr_reader :display_name - # If `true`, this attribute accepts an array of values. If `false`, only a single value is allowed. + # Whether multiple values can be set attr_reader :is_multi - # The programmatic key used to reference this custom attribute in search queries and API calls. + # Custom attribute key. This will be the value use to search on this custom attribute attr_reader :key - # The data type of the custom attribute, which determines the allowed values and UI input control. + # Custom attributes type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_resource_type.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_resource_type.rb index 8327df42b053..a0d880da5375 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_resource_type.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_resource_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for custom attribute configurations. + # Custom attributes config JSON:API resource type class CustomAttributeConfigResourceType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_response.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_response.rb index 2619759ee411..f9269f21d020 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_response.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_config_response.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Response containing a single custom attribute configuration. + # Custom attribute config response. class CustomAttributeConfigResponse include BaseGenericModel - # A custom attribute configuration that defines an organization-specific metadata field on cases. Custom attributes are scoped to a case type and can hold text, URLs, numbers, or predefined select options. + # The definition of `CustomAttributeConfig` object. attr_accessor :data attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_update.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_update.rb deleted file mode 100644 index a81741d7449d..000000000000 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_update.rb +++ /dev/null @@ -1,133 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a custom attribute configuration. - class CustomAttributeConfigUpdate - include BaseGenericModel - - # Attributes that can be updated on a custom attribute configuration. All fields are optional; only provided fields are changed. - attr_accessor :attributes - - # JSON:API resource type for custom attribute configurations. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'CustomAttributeConfigUpdateAttributes', - :'type' => :'CustomAttributeConfigResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomAttributeConfigUpdate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_update_attributes.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_update_attributes.rb deleted file mode 100644 index 1259abe6ab16..000000000000 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_update_attributes.rb +++ /dev/null @@ -1,145 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes that can be updated on a custom attribute configuration. All fields are optional; only provided fields are changed. - class CustomAttributeConfigUpdateAttributes - include BaseGenericModel - - # A description explaining the purpose and expected values for this custom attribute. - attr_accessor :description - - # The human-readable label shown in the Case Management UI for this custom attribute. - attr_accessor :display_name - - # An external field identifier to auto-populate this attribute from (used for integrations with external systems). - attr_accessor :map_from - - # The data type of the custom attribute, which determines the allowed values and UI input control. - attr_accessor :type - - # Type-specific configuration for the custom attribute. For SELECT-type attributes, this contains the list of allowed options. - attr_accessor :type_data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'description' => :'description', - :'display_name' => :'display_name', - :'map_from' => :'map_from', - :'type' => :'type', - :'type_data' => :'type_data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'description' => :'String', - :'display_name' => :'String', - :'map_from' => :'String', - :'type' => :'CustomAttributeType', - :'type_data' => :'CustomAttributeTypeData' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomAttributeConfigUpdateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'description') - self.description = attributes[:'description'] - end - - if attributes.key?(:'display_name') - self.display_name = attributes[:'display_name'] - end - - if attributes.key?(:'map_from') - self.map_from = attributes[:'map_from'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - - if attributes.key?(:'type_data') - self.type_data = attributes[:'type_data'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - description == o.description && - display_name == o.display_name && - map_from == o.map_from && - type == o.type && - type_data == o.type_data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [description, display_name, map_from, type, type_data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_config_update_request.rb b/lib/datadog_api_client/v2/models/custom_attribute_config_update_request.rb deleted file mode 100644 index f7bdec82308f..000000000000 --- a/lib/datadog_api_client/v2/models/custom_attribute_config_update_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating a custom attribute configuration. - class CustomAttributeConfigUpdateRequest - include BaseGenericModel - - # Data object for updating a custom attribute configuration. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'CustomAttributeConfigUpdate' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomAttributeConfigUpdateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_configs_response.rb b/lib/datadog_api_client/v2/models/custom_attribute_configs_response.rb index ab483099ce1c..04f397c542fb 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_configs_response.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_configs_response.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Response containing a list of custom attribute configurations. + # Custom attribute configs response. class CustomAttributeConfigsResponse include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/custom_attribute_select_option.rb b/lib/datadog_api_client/v2/models/custom_attribute_select_option.rb deleted file mode 100644 index 522a02d98fb2..000000000000 --- a/lib/datadog_api_client/v2/models/custom_attribute_select_option.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # 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 de62c0f6dcf5..64ba08a58311 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_type.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The data type of the custom attribute, which determines the allowed values and UI input control. + # Custom attributes type class CustomAttributeType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/custom_attribute_type_data.rb b/lib/datadog_api_client/v2/models/custom_attribute_type_data.rb deleted file mode 100644 index f7e76514867f..000000000000 --- a/lib/datadog_api_client/v2/models/custom_attribute_type_data.rb +++ /dev/null @@ -1,107 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Type-specific configuration for the custom attribute. For SELECT-type attributes, this contains the list of allowed options. - class CustomAttributeTypeData - include BaseGenericModel - - # Options for SELECT type custom attributes. - attr_accessor :options - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'options' => :'options' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'options' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CustomAttributeTypeData` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'options') - if (value = attributes[:'options']).is_a?(Array) - self.options = value - end - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - options == o.options && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [options, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/custom_attribute_value.rb b/lib/datadog_api_client/v2/models/custom_attribute_value.rb index a9ee8c94346d..d8cb9ad15a45 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_value.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_value.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A typed value for a custom attribute on a specific case. + # Custom attribute values class CustomAttributeValue include BaseGenericModel # If true, value must be an array attr_reader :is_multi - # The data type of the custom attribute, which determines the allowed values and UI input control. + # Custom attributes type attr_reader :type - # The value of a custom attribute. The accepted format depends on the attribute's type and whether it accepts multiple values. + # Union of supported value for a custom attribute attr_reader :value attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/custom_attribute_values_union.rb b/lib/datadog_api_client/v2/models/custom_attribute_values_union.rb index 31dc05f9faf0..b651f2309d56 100644 --- a/lib/datadog_api_client/v2/models/custom_attribute_values_union.rb +++ b/lib/datadog_api_client/v2/models/custom_attribute_values_union.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The value of a custom attribute. The accepted format depends on the attribute's type and whether it accepts multiple values. + # Union of supported value for a custom attribute module CustomAttributeValuesUnion class << self include BaseOneOfModel diff --git a/lib/datadog_api_client/v2/models/maintenance_window.rb b/lib/datadog_api_client/v2/models/maintenance_window.rb deleted file mode 100644 index ee8d4dddd52b..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window.rb +++ /dev/null @@ -1,165 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # A 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 deleted file mode 100644 index 089144a81dd6..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_attributes.rb +++ /dev/null @@ -1,206 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes of a maintenance window, including its schedule and the query that determines which cases are affected. - class MaintenanceWindowAttributes - include BaseGenericModel - - # The UUID of the user who created this maintenance window. Read-only. - attr_accessor :created_by - - # The ISO 8601 timestamp when the maintenance window ends and normal notification behavior resumes. - attr_reader :end_at - - # A human-readable name for the maintenance window (for example, `Database migration - Dec 15`). - attr_reader :name - - # A case search query that determines which cases are affected during the maintenance window. Uses the same syntax as the Case Management search bar. - attr_reader :query - - # The ISO 8601 timestamp when the maintenance window begins and notifications start being suppressed. - attr_reader :start_at - - # The UUID of the user who last modified this maintenance window. Read-only. - attr_accessor :updated_by - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'created_by' => :'created_by', - :'end_at' => :'end_at', - :'name' => :'name', - :'query' => :'query', - :'start_at' => :'start_at', - :'updated_by' => :'updated_by' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'created_by' => :'String', - :'end_at' => :'Time', - :'name' => :'String', - :'query' => :'String', - :'start_at' => :'Time', - :'updated_by' => :'String' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'created_by') - self.created_by = attributes[:'created_by'] - end - - if attributes.key?(:'end_at') - self.end_at = attributes[:'end_at'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.key?(:'start_at') - self.start_at = attributes[:'start_at'] - end - - if attributes.key?(:'updated_by') - self.updated_by = attributes[:'updated_by'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @end_at.nil? - return false if @name.nil? - return false if @query.nil? - return false if @start_at.nil? - true - end - - # Custom attribute writer method with validation - # @param end_at [Object] Object to be assigned - # @!visibility private - def end_at=(end_at) - if end_at.nil? - fail ArgumentError, 'invalid value for "end_at", end_at cannot be nil.' - end - @end_at = end_at - end - - # Custom attribute writer method with validation - # @param name [Object] Object to be assigned - # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' - end - @name = name - end - - # Custom attribute writer method with validation - # @param query [Object] Object to be assigned - # @!visibility private - def query=(query) - if query.nil? - fail ArgumentError, 'invalid value for "query", query cannot be nil.' - end - @query = query - end - - # Custom attribute writer method with validation - # @param start_at [Object] Object to be assigned - # @!visibility private - def start_at=(start_at) - if start_at.nil? - fail ArgumentError, 'invalid value for "start_at", start_at cannot be nil.' - end - @start_at = start_at - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - created_by == o.created_by && - end_at == o.end_at && - name == o.name && - query == o.query && - start_at == o.start_at && - updated_by == o.updated_by && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [created_by, end_at, name, query, start_at, updated_by, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_create.rb b/lib/datadog_api_client/v2/models/maintenance_window_create.rb deleted file mode 100644 index 870f1227a484..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_create.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for creating a 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_request.rb b/lib/datadog_api_client/v2/models/maintenance_window_create_request.rb deleted file mode 100644 index 6aa6f78782d3..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_create_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for creating a maintenance window. - class MaintenanceWindowCreateRequest - include BaseGenericModel - - # Data object for creating a maintenance window. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'MaintenanceWindowCreate' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowCreateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_resource_type.rb b/lib/datadog_api_client/v2/models/maintenance_window_resource_type.rb deleted file mode 100644 index 681018c99926..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_resource_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # JSON:API resource type for maintenance windows. - class MaintenanceWindowResourceType - include BaseEnumModel - - MAINTENANCE_WINDOW = "maintenance_window".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_response.rb b/lib/datadog_api_client/v2/models/maintenance_window_response.rb deleted file mode 100644 index b572e9918ecf..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_response.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a single maintenance window. - class MaintenanceWindowResponse - include BaseGenericModel - - # A maintenance window that defines a scheduled time period during which case-related notifications and automation rules are suppressed. Each maintenance window applies to cases matching a specified query. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'MaintenanceWindow' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_update.rb b/lib/datadog_api_client/v2/models/maintenance_window_update.rb deleted file mode 100644 index 60639773c83d..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_update.rb +++ /dev/null @@ -1,133 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Data object for updating a maintenance window. - class MaintenanceWindowUpdate - include BaseGenericModel - - # Attributes that can be updated on a maintenance window. All fields are optional; only provided fields are changed. - attr_accessor :attributes - - # JSON:API resource type for maintenance windows. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'attributes' => :'attributes', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'attributes' => :'MaintenanceWindowUpdateAttributes', - :'type' => :'MaintenanceWindowResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowUpdate` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - attributes == o.attributes && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [attributes, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_update_attributes.rb b/lib/datadog_api_client/v2/models/maintenance_window_update_attributes.rb deleted file mode 100644 index b7b517c3abce..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_update_attributes.rb +++ /dev/null @@ -1,135 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Attributes that can be updated on a maintenance window. All fields are optional; only provided fields are changed. - class MaintenanceWindowUpdateAttributes - include BaseGenericModel - - # The end time of the maintenance window. - attr_accessor :end_at - - # The name of the maintenance window. - attr_accessor :name - - # The query to filter event management cases for this maintenance window. - attr_accessor :query - - # The start time of the maintenance window. - attr_accessor :start_at - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'end_at' => :'end_at', - :'name' => :'name', - :'query' => :'query', - :'start_at' => :'start_at' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'end_at' => :'Time', - :'name' => :'String', - :'query' => :'String', - :'start_at' => :'Time' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowUpdateAttributes` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'end_at') - self.end_at = attributes[:'end_at'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.key?(:'query') - self.query = attributes[:'query'] - end - - if attributes.key?(:'start_at') - self.start_at = attributes[:'start_at'] - end - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - end_at == o.end_at && - name == o.name && - query == o.query && - start_at == o.start_at && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [end_at, name, query, start_at, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_update_request.rb b/lib/datadog_api_client/v2/models/maintenance_window_update_request.rb deleted file mode 100644 index 561d305a34de..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_window_update_request.rb +++ /dev/null @@ -1,123 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Request payload for updating a maintenance window. - class MaintenanceWindowUpdateRequest - include BaseGenericModel - - # Data object for updating a maintenance window. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'MaintenanceWindowUpdate' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowUpdateRequest` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - self.data = attributes[:'data'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/maintenance_windows_response.rb b/lib/datadog_api_client/v2/models/maintenance_windows_response.rb deleted file mode 100644 index 29f16c8a9bc9..000000000000 --- a/lib/datadog_api_client/v2/models/maintenance_windows_response.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing a list of maintenance windows. - class MaintenanceWindowsResponse - include BaseGenericModel - - # List of maintenance windows. - attr_reader :data - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'data' => :'data' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'data' => :'Array' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowsResponse` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'data') - if (value = attributes[:'data']).is_a?(Array) - self.data = value - end - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @data.nil? - true - end - - # Custom attribute writer method with validation - # @param data [Object] Object to be assigned - # @!visibility private - def data=(data) - if data.nil? - fail ArgumentError, 'invalid value for "data", data cannot be nil.' - end - @data = data - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - data == o.data && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [data, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/automation_rule.rb b/lib/datadog_api_client/v2/models/observability_pipeline_add_metric_tags_processor.rb similarity index 56% rename from lib/datadog_api_client/v2/models/automation_rule.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_add_metric_tags_processor.rb index 598533bd12f0..e1aa2af1af3c 100644 --- a/lib/datadog_api_client/v2/models/automation_rule.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_add_metric_tags_processor.rb @@ -17,20 +17,28 @@ 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 + # The `add_metric_tags` processor adds static tags to metrics. + # + # **Supported pipeline types:** metrics + class ObservabilityPipelineAddMetricTagsProcessor include BaseGenericModel - # Core attributes of an automation rule, including its name, trigger condition, action to execute, and current state. - attr_reader :attributes + # The display name for a component. + attr_accessor :display_name - # Automation rule identifier. + # Indicates whether the processor is enabled. + attr_reader :enabled + + # The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). attr_reader :id - # Related resources for the automation rule, including the users who created and last modified it. - attr_accessor :relationships + # A Datadog search query used to determine which metrics this processor targets. + attr_reader :include + + # A list of static tags (key-value pairs) added to each metric processed by this component. + attr_reader :tags - # JSON:API resource type for case automation rules. + # The processor type. The value must be `add_metric_tags`. attr_reader :type attr_accessor :additional_properties @@ -39,9 +47,11 @@ class AutomationRule # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', + :'display_name' => :'display_name', + :'enabled' => :'enabled', :'id' => :'id', - :'relationships' => :'relationships', + :'include' => :'include', + :'tags' => :'tags', :'type' => :'type' } end @@ -50,10 +60,12 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'AutomationRuleAttributes', + :'display_name' => :'String', + :'enabled' => :'Boolean', :'id' => :'String', - :'relationships' => :'AutomationRuleRelationships', - :'type' => :'CaseAutomationRuleResourceType' + :'include' => :'String', + :'tags' => :'Array', + :'type' => :'ObservabilityPipelineAddMetricTagsProcessorType' } end @@ -62,7 +74,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutomationRule` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineAddMetricTagsProcessor` initialize method" end self.additional_properties = {} @@ -75,16 +87,26 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] end if attributes.key?(:'id') self.id = attributes[:'id'] end - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end end if attributes.key?(:'type') @@ -96,20 +118,23 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? + return false if @enabled.nil? return false if @id.nil? + return false if @include.nil? + return false if @tags.nil? + return false if @tags.length > 15 return false if @type.nil? true end # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned + # @param enabled [Object] Object to be assigned # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' end - @attributes = attributes + @enabled = enabled end # Custom attribute writer method with validation @@ -122,6 +147,29 @@ def id=(id) @id = id end + # Custom attribute writer method with validation + # @param include [Object] Object to be assigned + # @!visibility private + def include=(include) + if include.nil? + fail ArgumentError, 'invalid value for "include", include cannot be nil.' + end + @include = include + end + + # Custom attribute writer method with validation + # @param tags [Object] Object to be assigned + # @!visibility private + def tags=(tags) + if tags.nil? + fail ArgumentError, 'invalid value for "tags", tags cannot be nil.' + end + if tags.length > 15 + fail ArgumentError, 'invalid value for "tags", number of items must be less than or equal to 15.' + end + @tags = tags + end + # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -158,9 +206,11 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && + display_name == o.display_name && + enabled == o.enabled && id == o.id && - relationships == o.relationships && + include == o.include && + tags == o.tags && type == o.type && additional_properties == o.additional_properties end @@ -169,7 +219,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, id, relationships, type, additional_properties].hash + [display_name, enabled, id, include, tags, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_bulk_resource_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_add_metric_tags_processor_type.rb similarity index 77% rename from lib/datadog_api_client/v2/models/case_bulk_resource_type.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_add_metric_tags_processor_type.rb index 08e463635e92..0c46afaf8fd5 100644 --- a/lib/datadog_api_client/v2/models/case_bulk_resource_type.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_add_metric_tags_processor_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for bulk case operations. - class CaseBulkResourceType + # The processor type. The value must be `add_metric_tags`. + class ObservabilityPipelineAddMetricTagsProcessorType include BaseEnumModel - BULK = "bulk".freeze + ADD_METRIC_TAGS = "add_metric_tags".freeze end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor.rb new file mode 100644 index 000000000000..97700d98343f --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor.rb @@ -0,0 +1,248 @@ +=begin +#Datadog 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 `aggregate` processor combines metrics that share the same name and tags into a single metric over a configurable interval. + # + # **Supported pipeline types:** metrics + class ObservabilityPipelineAggregateProcessor + include BaseGenericModel + + # The display name for a component. + attr_accessor :display_name + + # Indicates whether the processor is enabled. + attr_reader :enabled + + # The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). + attr_reader :id + + # A Datadog search query used to determine which metrics this processor targets. + attr_reader :include + + # The interval, in seconds, over which metrics are aggregated. + attr_reader :interval_secs + + # The aggregation mode applied to metrics that share the same name and tags within the interval. + attr_reader :mode + + # The processor type. The value must be `aggregate`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'display_name' => :'display_name', + :'enabled' => :'enabled', + :'id' => :'id', + :'include' => :'include', + :'interval_secs' => :'interval_secs', + :'mode' => :'mode', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'display_name' => :'String', + :'enabled' => :'Boolean', + :'id' => :'String', + :'include' => :'String', + :'interval_secs' => :'Integer', + :'mode' => :'ObservabilityPipelineAggregateProcessorMode', + :'type' => :'ObservabilityPipelineAggregateProcessorType' + } + 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::ObservabilityPipelineAggregateProcessor` 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?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'interval_secs') + self.interval_secs = attributes[:'interval_secs'] + end + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + 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 @enabled.nil? + return false if @id.nil? + return false if @include.nil? + return false if @interval_secs.nil? + return false if @interval_secs > 60 + return false if @interval_secs < 1 + return false if @mode.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param enabled [Object] Object to be assigned + # @!visibility private + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' + end + @enabled = enabled + 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 include [Object] Object to be assigned + # @!visibility private + def include=(include) + if include.nil? + fail ArgumentError, 'invalid value for "include", include cannot be nil.' + end + @include = include + end + + # Custom attribute writer method with validation + # @param interval_secs [Object] Object to be assigned + # @!visibility private + def interval_secs=(interval_secs) + if interval_secs.nil? + fail ArgumentError, 'invalid value for "interval_secs", interval_secs cannot be nil.' + end + if interval_secs > 60 + fail ArgumentError, 'invalid value for "interval_secs", must be smaller than or equal to 60.' + end + if interval_secs < 1 + fail ArgumentError, 'invalid value for "interval_secs", must be greater than or equal to 1.' + end + @interval_secs = interval_secs + end + + # Custom attribute writer method with validation + # @param mode [Object] Object to be assigned + # @!visibility private + def mode=(mode) + if mode.nil? + fail ArgumentError, 'invalid value for "mode", mode cannot be nil.' + end + @mode = mode + end + + # Custom attribute writer method with validation + # @param 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 && + display_name == o.display_name && + enabled == o.enabled && + id == o.id && + include == o.include && + interval_secs == o.interval_secs && + mode == o.mode && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [display_name, enabled, id, include, interval_secs, mode, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor_mode.rb b/lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor_mode.rb new file mode 100644 index 000000000000..e48067f12fd2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor_mode.rb @@ -0,0 +1,32 @@ +=begin +#Datadog 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 aggregation mode applied to metrics that share the same name and tags within the interval. + class ObservabilityPipelineAggregateProcessorMode + include BaseEnumModel + + AUTO = "auto".freeze + SUM = "sum".freeze + LATEST = "latest".freeze + COUNT = "count".freeze + MAX = "max".freeze + MIN = "min".freeze + MEAN = "mean".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/case_aggregate_resource_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor_type.rb similarity index 85% rename from lib/datadog_api_client/v2/models/case_aggregate_resource_type.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor_type.rb index 7a6a6db2ede8..155838bd1c11 100644 --- a/lib/datadog_api_client/v2/models/case_aggregate_resource_type.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_aggregate_processor_type.rb @@ -17,8 +17,8 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for case aggregation requests. - class CaseAggregateResourceType + # The processor type. The value must be `aggregate`. + class ObservabilityPipelineAggregateProcessorType include BaseEnumModel AGGREGATE = "aggregate".freeze diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb b/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb index 9c6c290c3c53..402c3e6e483b 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_config_processor_item.rb @@ -47,7 +47,11 @@ def openapi_one_of :'ObservabilityPipelineSensitiveDataScannerProcessor', :'ObservabilityPipelineSplitArrayProcessor', :'ObservabilityPipelineThrottleProcessor', - :'ObservabilityPipelineMetricTagsProcessor' + :'ObservabilityPipelineAddMetricTagsProcessor', + :'ObservabilityPipelineAggregateProcessor', + :'ObservabilityPipelineMetricTagsProcessor', + :'ObservabilityPipelineRenameMetricTagsProcessor', + :'ObservabilityPipelineTagCardinalityLimitProcessor' ] end # Builds the object diff --git a/lib/datadog_api_client/v2/models/case_view.rb b/lib/datadog_api_client/v2/models/observability_pipeline_rename_metric_tags_processor.rb similarity index 55% rename from lib/datadog_api_client/v2/models/case_view.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_rename_metric_tags_processor.rb index 4f5fe4fa77f3..af64e789b2b5 100644 --- a/lib/datadog_api_client/v2/models/case_view.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_rename_metric_tags_processor.rb @@ -17,20 +17,28 @@ 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 + # The `rename_metric_tags` processor changes the keys of tags on metrics. + # + # **Supported pipeline types:** metrics + class ObservabilityPipelineRenameMetricTagsProcessor include BaseGenericModel - # Attributes of a case view, including the filter query and optional notification rule. - attr_reader :attributes + # The display name for a component. + attr_accessor :display_name - # The view's identifier. + # Indicates whether the processor is enabled. + attr_reader :enabled + + # The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). attr_reader :id - # Related resources for the case view, including the creator, last modifier, and associated project. - attr_accessor :relationships + # A Datadog search query used to determine which metrics this processor targets. + attr_reader :include + + # A list of rename rules specifying which tag keys to rename on each metric. + attr_reader :tags - # JSON:API resource type for case views. + # The processor type. The value must be `rename_metric_tags`. attr_reader :type attr_accessor :additional_properties @@ -39,9 +47,11 @@ class CaseView # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', + :'display_name' => :'display_name', + :'enabled' => :'enabled', :'id' => :'id', - :'relationships' => :'relationships', + :'include' => :'include', + :'tags' => :'tags', :'type' => :'type' } end @@ -50,10 +60,12 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'CaseViewAttributes', + :'display_name' => :'String', + :'enabled' => :'Boolean', :'id' => :'String', - :'relationships' => :'CaseViewRelationships', - :'type' => :'CaseViewResourceType' + :'include' => :'String', + :'tags' => :'Array', + :'type' => :'ObservabilityPipelineRenameMetricTagsProcessorType' } end @@ -62,7 +74,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseView` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineRenameMetricTagsProcessor` initialize method" end self.additional_properties = {} @@ -75,16 +87,26 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.key?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] end if attributes.key?(:'id') self.id = attributes[:'id'] end - if attributes.key?(:'relationships') - self.relationships = attributes[:'relationships'] + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end end if attributes.key?(:'type') @@ -96,20 +118,23 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? + return false if @enabled.nil? return false if @id.nil? + return false if @include.nil? + return false if @tags.nil? + return false if @tags.length > 15 return false if @type.nil? true end # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned + # @param enabled [Object] Object to be assigned # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' end - @attributes = attributes + @enabled = enabled end # Custom attribute writer method with validation @@ -122,6 +147,29 @@ def id=(id) @id = id end + # Custom attribute writer method with validation + # @param include [Object] Object to be assigned + # @!visibility private + def include=(include) + if include.nil? + fail ArgumentError, 'invalid value for "include", include cannot be nil.' + end + @include = include + end + + # Custom attribute writer method with validation + # @param tags [Object] Object to be assigned + # @!visibility private + def tags=(tags) + if tags.nil? + fail ArgumentError, 'invalid value for "tags", tags cannot be nil.' + end + if tags.length > 15 + fail ArgumentError, 'invalid value for "tags", number of items must be less than or equal to 15.' + end + @tags = tags + end + # Custom attribute writer method with validation # @param type [Object] Object to be assigned # @!visibility private @@ -158,9 +206,11 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && + display_name == o.display_name && + enabled == o.enabled && id == o.id && - relationships == o.relationships && + include == o.include && + tags == o.tags && type == o.type && additional_properties == o.additional_properties end @@ -169,7 +219,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, id, relationships, type, additional_properties].hash + [display_name, enabled, id, include, tags, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/case_view_create.rb b/lib/datadog_api_client/v2/models/observability_pipeline_rename_metric_tags_processor_tag.rb similarity index 70% rename from lib/datadog_api_client/v2/models/case_view_create.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_rename_metric_tags_processor_tag.rb index e04bba9a974a..01e4f03e8a06 100644 --- a/lib/datadog_api_client/v2/models/case_view_create.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_rename_metric_tags_processor_tag.rb @@ -17,15 +17,15 @@ require 'time' module DatadogAPIClient::V2 - # Data object for creating a case view. - class CaseViewCreate + # Defines how to rename a tag on metric events. + class ObservabilityPipelineRenameMetricTagsProcessorTag include BaseGenericModel - # Attributes required to create a case view. - attr_reader :attributes + # The new tag key to assign in place of the original. + attr_reader :rename_to - # JSON:API resource type for case views. - attr_reader :type + # The original tag key on the metric event. + attr_reader :tag attr_accessor :additional_properties @@ -33,8 +33,8 @@ class CaseViewCreate # @!visibility private def self.attribute_map { - :'attributes' => :'attributes', - :'type' => :'type' + :'rename_to' => :'rename_to', + :'tag' => :'tag' } end @@ -42,8 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'attributes' => :'CaseViewCreateAttributes', - :'type' => :'CaseViewResourceType' + :'rename_to' => :'String', + :'tag' => :'String' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseViewCreate` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineRenameMetricTagsProcessorTag` initialize method" end self.additional_properties = {} @@ -65,12 +65,12 @@ def initialize(attributes = {}) end } - if attributes.key?(:'attributes') - self.attributes = attributes[:'attributes'] + if attributes.key?(:'rename_to') + self.rename_to = attributes[:'rename_to'] end - if attributes.key?(:'type') - self.type = attributes[:'type'] + if attributes.key?(:'tag') + self.tag = attributes[:'tag'] end end @@ -78,29 +78,29 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @attributes.nil? - return false if @type.nil? + return false if @rename_to.nil? + return false if @tag.nil? true end # Custom attribute writer method with validation - # @param attributes [Object] Object to be assigned + # @param rename_to [Object] Object to be assigned # @!visibility private - def attributes=(attributes) - if attributes.nil? - fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + def rename_to=(rename_to) + if rename_to.nil? + fail ArgumentError, 'invalid value for "rename_to", rename_to cannot be nil.' end - @attributes = attributes + @rename_to = rename_to end # Custom attribute writer method with validation - # @param type [Object] Object to be assigned + # @param tag [Object] Object to be assigned # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' + def tag=(tag) + if tag.nil? + fail ArgumentError, 'invalid value for "tag", tag cannot be nil.' end - @type = type + @tag = tag end # Returns the object in the form of hash, with additionalProperties support. @@ -129,8 +129,8 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - attributes == o.attributes && - type == o.type && + rename_to == o.rename_to && + tag == o.tag && additional_properties == o.additional_properties end @@ -138,7 +138,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, type, additional_properties].hash + [rename_to, tag, 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/observability_pipeline_rename_metric_tags_processor_type.rb similarity index 76% rename from lib/datadog_api_client/v2/models/case_link_resource_type.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_rename_metric_tags_processor_type.rb index 0f78749ff688..6d7b9246fee0 100644 --- a/lib/datadog_api_client/v2/models/case_link_resource_type.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_rename_metric_tags_processor_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for case links. - class CaseLinkResourceType + # The processor type. The value must be `rename_metric_tags`. + class ObservabilityPipelineRenameMetricTagsProcessorType include BaseEnumModel - LINK = "link".freeze + RENAME_METRIC_TAGS = "rename_metric_tags".freeze end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor.rb b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor.rb new file mode 100644 index 000000000000..1b38d76515bb --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor.rb @@ -0,0 +1,271 @@ +=begin +#Datadog 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 `tag_cardinality_limit` processor caps the number of distinct tag value combinations on metrics, dropping tags or events once the limit is exceeded. + # + # **Supported pipeline types:** metrics + class ObservabilityPipelineTagCardinalityLimitProcessor + include BaseGenericModel + + # The display name for a component. + attr_accessor :display_name + + # Indicates whether the processor is enabled. + attr_reader :enabled + + # The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). + attr_reader :id + + # A Datadog search query used to determine which metrics this processor targets. + attr_reader :include + + # The action to take when the cardinality limit is exceeded. + attr_reader :limit_exceeded_action + + # A list of per-metric cardinality overrides that take precedence over the default `value_limit`. + attr_reader :per_metric_limits + + # The processor type. The value must be `tag_cardinality_limit`. + attr_reader :type + + # The default maximum number of distinct tag value combinations allowed per metric. + attr_reader :value_limit + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'display_name' => :'display_name', + :'enabled' => :'enabled', + :'id' => :'id', + :'include' => :'include', + :'limit_exceeded_action' => :'limit_exceeded_action', + :'per_metric_limits' => :'per_metric_limits', + :'type' => :'type', + :'value_limit' => :'value_limit' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'display_name' => :'String', + :'enabled' => :'Boolean', + :'id' => :'String', + :'include' => :'String', + :'limit_exceeded_action' => :'ObservabilityPipelineTagCardinalityLimitProcessorAction', + :'per_metric_limits' => :'Array', + :'type' => :'ObservabilityPipelineTagCardinalityLimitProcessorType', + :'value_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::ObservabilityPipelineTagCardinalityLimitProcessor` 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?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'include') + self.include = attributes[:'include'] + end + + if attributes.key?(:'limit_exceeded_action') + self.limit_exceeded_action = attributes[:'limit_exceeded_action'] + end + + if attributes.key?(:'per_metric_limits') + if (value = attributes[:'per_metric_limits']).is_a?(Array) + self.per_metric_limits = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'value_limit') + self.value_limit = attributes[:'value_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 @enabled.nil? + return false if @id.nil? + return false if @include.nil? + return false if @limit_exceeded_action.nil? + return false if !@per_metric_limits.nil? && @per_metric_limits.length > 100 + return false if @type.nil? + return false if @value_limit.nil? + return false if @value_limit > 1000000 + return false if @value_limit < 0 + true + end + + # Custom attribute writer method with validation + # @param enabled [Object] Object to be assigned + # @!visibility private + def enabled=(enabled) + if enabled.nil? + fail ArgumentError, 'invalid value for "enabled", enabled cannot be nil.' + end + @enabled = enabled + 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 include [Object] Object to be assigned + # @!visibility private + def include=(include) + if include.nil? + fail ArgumentError, 'invalid value for "include", include cannot be nil.' + end + @include = include + end + + # Custom attribute writer method with validation + # @param limit_exceeded_action [Object] Object to be assigned + # @!visibility private + def limit_exceeded_action=(limit_exceeded_action) + if limit_exceeded_action.nil? + fail ArgumentError, 'invalid value for "limit_exceeded_action", limit_exceeded_action cannot be nil.' + end + @limit_exceeded_action = limit_exceeded_action + end + + # Custom attribute writer method with validation + # @param per_metric_limits [Object] Object to be assigned + # @!visibility private + def per_metric_limits=(per_metric_limits) + if !per_metric_limits.nil? && per_metric_limits.length > 100 + fail ArgumentError, 'invalid value for "per_metric_limits", number of items must be less than or equal to 100.' + end + @per_metric_limits = per_metric_limits + 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 + + # Custom attribute writer method with validation + # @param value_limit [Object] Object to be assigned + # @!visibility private + def value_limit=(value_limit) + if value_limit.nil? + fail ArgumentError, 'invalid value for "value_limit", value_limit cannot be nil.' + end + if value_limit > 1000000 + fail ArgumentError, 'invalid value for "value_limit", must be smaller than or equal to 1000000.' + end + if value_limit < 0 + fail ArgumentError, 'invalid value for "value_limit", must be greater than or equal to 0.' + end + @value_limit = value_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 && + display_name == o.display_name && + enabled == o.enabled && + id == o.id && + include == o.include && + limit_exceeded_action == o.limit_exceeded_action && + per_metric_limits == o.per_metric_limits && + type == o.type && + value_limit == o.value_limit && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [display_name, enabled, id, include, limit_exceeded_action, per_metric_limits, type, value_limit, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_action.rb b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_action.rb new file mode 100644 index 000000000000..ba243acf75a9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_action.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 action to take when the cardinality limit is exceeded. + class ObservabilityPipelineTagCardinalityLimitProcessorAction + include BaseEnumModel + + DROP_TAG = "drop_tag".freeze + DROP_EVENT = "drop_event".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_metric_limit.rb b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_metric_limit.rb new file mode 100644 index 000000000000..ccb077af387d --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_metric_limit.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 + # A cardinality override applied to a specific metric. + class ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit + include BaseGenericModel + + # The action to take when the cardinality limit is exceeded. + attr_reader :limit_exceeded_action + + # The name of the metric this override applies to. + attr_reader :metric_name + + # How the per-metric override is applied. `tracked` enforces a custom limit; `excluded` skips the metric entirely. + attr_reader :mode + + # A list of per-tag cardinality overrides that apply within this metric. + attr_reader :per_tag_limits + + # The maximum number of distinct tag value combinations allowed for this metric. + attr_reader :value_limit + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'limit_exceeded_action' => :'limit_exceeded_action', + :'metric_name' => :'metric_name', + :'mode' => :'mode', + :'per_tag_limits' => :'per_tag_limits', + :'value_limit' => :'value_limit' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'limit_exceeded_action' => :'ObservabilityPipelineTagCardinalityLimitProcessorAction', + :'metric_name' => :'String', + :'mode' => :'ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode', + :'per_tag_limits' => :'Array', + :'value_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::ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit` 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_exceeded_action') + self.limit_exceeded_action = attributes[:'limit_exceeded_action'] + end + + if attributes.key?(:'metric_name') + self.metric_name = attributes[:'metric_name'] + end + + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] + end + + if attributes.key?(:'per_tag_limits') + if (value = attributes[:'per_tag_limits']).is_a?(Array) + self.per_tag_limits = value + end + end + + if attributes.key?(:'value_limit') + self.value_limit = attributes[:'value_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 @limit_exceeded_action.nil? + return false if @metric_name.nil? + return false if @mode.nil? + return false if !@per_tag_limits.nil? && @per_tag_limits.length > 50 + return false if @value_limit.nil? + return false if @value_limit > 1000000 + return false if @value_limit < 0 + true + end + + # Custom attribute writer method with validation + # @param limit_exceeded_action [Object] Object to be assigned + # @!visibility private + def limit_exceeded_action=(limit_exceeded_action) + if limit_exceeded_action.nil? + fail ArgumentError, 'invalid value for "limit_exceeded_action", limit_exceeded_action cannot be nil.' + end + @limit_exceeded_action = limit_exceeded_action + end + + # Custom attribute writer method with validation + # @param metric_name [Object] Object to be assigned + # @!visibility private + def metric_name=(metric_name) + if metric_name.nil? + fail ArgumentError, 'invalid value for "metric_name", metric_name cannot be nil.' + end + @metric_name = metric_name + end + + # Custom attribute writer method with validation + # @param mode [Object] Object to be assigned + # @!visibility private + def mode=(mode) + if mode.nil? + fail ArgumentError, 'invalid value for "mode", mode cannot be nil.' + end + @mode = mode + end + + # Custom attribute writer method with validation + # @param per_tag_limits [Object] Object to be assigned + # @!visibility private + def per_tag_limits=(per_tag_limits) + if !per_tag_limits.nil? && per_tag_limits.length > 50 + fail ArgumentError, 'invalid value for "per_tag_limits", number of items must be less than or equal to 50.' + end + @per_tag_limits = per_tag_limits + end + + # Custom attribute writer method with validation + # @param value_limit [Object] Object to be assigned + # @!visibility private + def value_limit=(value_limit) + if value_limit.nil? + fail ArgumentError, 'invalid value for "value_limit", value_limit cannot be nil.' + end + if value_limit > 1000000 + fail ArgumentError, 'invalid value for "value_limit", must be smaller than or equal to 1000000.' + end + if value_limit < 0 + fail ArgumentError, 'invalid value for "value_limit", must be greater than or equal to 0.' + end + @value_limit = value_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 && + limit_exceeded_action == o.limit_exceeded_action && + metric_name == o.metric_name && + mode == o.mode && + per_tag_limits == o.per_tag_limits && + value_limit == o.value_limit && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [limit_exceeded_action, metric_name, mode, per_tag_limits, value_limit, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_automation_rule_state.rb b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_metric_mode.rb similarity index 69% rename from lib/datadog_api_client/v2/models/case_automation_rule_state.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_metric_mode.rb index b0b9bedaf7a6..0a73d35dbc7e 100644 --- a/lib/datadog_api_client/v2/models/case_automation_rule_state.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_metric_mode.rb @@ -17,11 +17,11 @@ 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 + # How the per-metric override is applied. `tracked` enforces a custom limit; `excluded` skips the metric entirely. + class ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode include BaseEnumModel - ENABLED = "ENABLED".freeze - DISABLED = "DISABLED".freeze + TRACKED = "tracked".freeze + EXCLUDED = "excluded".freeze end end diff --git a/lib/datadog_api_client/v2/models/maintenance_window_create_attributes.rb b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_tag_limit.rb similarity index 56% rename from lib/datadog_api_client/v2/models/maintenance_window_create_attributes.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_tag_limit.rb index c610b816599c..7a853a7ed4a0 100644 --- a/lib/datadog_api_client/v2/models/maintenance_window_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_tag_limit.rb @@ -17,21 +17,18 @@ require 'time' module DatadogAPIClient::V2 - # Attributes required to create a maintenance window. - class MaintenanceWindowCreateAttributes + # A cardinality override for a specific tag key within a per-metric limit. + class ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit include BaseGenericModel - # The end time of the maintenance window. - attr_reader :end_at + # How the per-tag override is applied. `limit_override` enforces a custom limit on the tag; `excluded` skips the tag from cardinality tracking. + attr_reader :mode - # The name of the maintenance window. - attr_reader :name + # The tag key this override applies to. + attr_reader :tag_key - # 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 + # The maximum number of distinct values allowed for this tag. + attr_reader :value_limit attr_accessor :additional_properties @@ -39,10 +36,9 @@ class MaintenanceWindowCreateAttributes # @!visibility private def self.attribute_map { - :'end_at' => :'end_at', - :'name' => :'name', - :'query' => :'query', - :'start_at' => :'start_at' + :'mode' => :'mode', + :'tag_key' => :'tag_key', + :'value_limit' => :'value_limit' } end @@ -50,10 +46,9 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'end_at' => :'Time', - :'name' => :'String', - :'query' => :'String', - :'start_at' => :'Time' + :'mode' => :'ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode', + :'tag_key' => :'String', + :'value_limit' => :'Integer' } end @@ -62,7 +57,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::MaintenanceWindowCreateAttributes` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit` initialize method" end self.additional_properties = {} @@ -75,20 +70,16 @@ def initialize(attributes = {}) end } - if attributes.key?(:'end_at') - self.end_at = attributes[:'end_at'] - end - - if attributes.key?(:'name') - self.name = attributes[:'name'] + if attributes.key?(:'mode') + self.mode = attributes[:'mode'] end - if attributes.key?(:'query') - self.query = attributes[:'query'] + if attributes.key?(:'tag_key') + self.tag_key = attributes[:'tag_key'] end - if attributes.key?(:'start_at') - self.start_at = attributes[:'start_at'] + if attributes.key?(:'value_limit') + self.value_limit = attributes[:'value_limit'] end end @@ -96,51 +87,48 @@ def initialize(attributes = {}) # @return true if the model is valid # @!visibility private def valid? - return false if @end_at.nil? - return false if @name.nil? - return false if @query.nil? - return false if @start_at.nil? + return false if @mode.nil? + return false if @tag_key.nil? + return false if @value_limit.nil? + return false if @value_limit > 1000000 + return false if @value_limit < 0 true end # Custom attribute writer method with validation - # @param end_at [Object] Object to be assigned + # @param mode [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.' + def mode=(mode) + if mode.nil? + fail ArgumentError, 'invalid value for "mode", mode cannot be nil.' end - @end_at = end_at + @mode = mode end # Custom attribute writer method with validation - # @param name [Object] Object to be assigned + # @param tag_key [Object] Object to be assigned # @!visibility private - def name=(name) - if name.nil? - fail ArgumentError, 'invalid value for "name", name cannot be nil.' + def tag_key=(tag_key) + if tag_key.nil? + fail ArgumentError, 'invalid value for "tag_key", tag_key cannot be nil.' end - @name = name + @tag_key = tag_key end # Custom attribute writer method with validation - # @param query [Object] Object to be assigned + # @param value_limit [Object] Object to be assigned # @!visibility private - def query=(query) - if query.nil? - fail ArgumentError, 'invalid value for "query", query cannot be nil.' + def value_limit=(value_limit) + if value_limit.nil? + fail ArgumentError, 'invalid value for "value_limit", value_limit 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.' + if value_limit > 1000000 + fail ArgumentError, 'invalid value for "value_limit", must be smaller than or equal to 1000000.' + end + if value_limit < 0 + fail ArgumentError, 'invalid value for "value_limit", must be greater than or equal to 0.' end - @start_at = start_at + @value_limit = value_limit end # Returns the object in the form of hash, with additionalProperties support. @@ -169,10 +157,9 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - end_at == o.end_at && - name == o.name && - query == o.query && - start_at == o.start_at && + mode == o.mode && + tag_key == o.tag_key && + value_limit == o.value_limit && additional_properties == o.additional_properties end @@ -180,7 +167,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [end_at, name, query, start_at, additional_properties].hash + [mode, tag_key, value_limit, 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/observability_pipeline_tag_cardinality_limit_processor_per_tag_mode.rb similarity index 66% rename from lib/datadog_api_client/v2/models/automation_rule_action_type.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_tag_mode.rb index 70178e9c576c..4e2dd13f7af9 100644 --- a/lib/datadog_api_client/v2/models/automation_rule_action_type.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_per_tag_mode.rb @@ -17,11 +17,11 @@ 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 + # How the per-tag override is applied. `limit_override` enforces a custom limit on the tag; `excluded` skips the tag from cardinality tracking. + class ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode include BaseEnumModel - EXECUTE_WORKFLOW = "execute_workflow".freeze - ASSIGN_AGENT = "assign_agent".freeze + LIMIT_OVERRIDE = "limit_override".freeze + EXCLUDED = "excluded".freeze end end diff --git a/lib/datadog_api_client/v2/models/case_automation_rule_resource_type.rb b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_type.rb similarity index 75% rename from lib/datadog_api_client/v2/models/case_automation_rule_resource_type.rb rename to lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_type.rb index ceecf984f734..786ad244888b 100644 --- a/lib/datadog_api_client/v2/models/case_automation_rule_resource_type.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_tag_cardinality_limit_processor_type.rb @@ -17,10 +17,10 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for case automation rules. - class CaseAutomationRuleResourceType + # The processor type. The value must be `tag_cardinality_limit`. + class ObservabilityPipelineTagCardinalityLimitProcessorType include BaseEnumModel - RULE = "rule".freeze + TAG_CARDINALITY_LIMIT = "tag_cardinality_limit".freeze end end diff --git a/lib/datadog_api_client/v2/models/project_favorite.rb b/lib/datadog_api_client/v2/models/project_favorite.rb deleted file mode 100644 index 6fe48d468dd3..000000000000 --- a/lib/datadog_api_client/v2/models/project_favorite.rb +++ /dev/null @@ -1,144 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Represents a case project that the current user has bookmarked for quick access. Favorited projects appear prominently in the Case Management UI. - class ProjectFavorite - include BaseGenericModel - - # The UUID of the favorited project. - attr_reader :id - - # JSON:API resource type for project favorites. - attr_reader :type - - attr_accessor :additional_properties - - # Attribute mapping from ruby-style variable name to JSON key. - # @!visibility private - def self.attribute_map - { - :'id' => :'id', - :'type' => :'type' - } - end - - # Attribute type mapping. - # @!visibility private - def self.openapi_types - { - :'id' => :'String', - :'type' => :'ProjectFavoriteResourceType' - } - end - - # Initializes the object - # @param attributes [Hash] Model attributes in the form of hash - # @!visibility private - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectFavorite` initialize method" - end - - self.additional_properties = {} - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - self.additional_properties[k.to_sym] = v - else - h[k.to_sym] = v - end - } - - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - - if attributes.key?(:'type') - self.type = attributes[:'type'] - end - end - - # Check to see if the all the properties in the model are valid - # @return true if the model is valid - # @!visibility private - def valid? - return false if @id.nil? - return false if @type.nil? - true - end - - # Custom attribute writer method with validation - # @param id [Object] Object to be assigned - # @!visibility private - def id=(id) - if id.nil? - fail ArgumentError, 'invalid value for "id", id cannot be nil.' - end - @id = id - end - - # Custom attribute writer method with validation - # @param type [Object] Object to be assigned - # @!visibility private - def type=(type) - if type.nil? - fail ArgumentError, 'invalid value for "type", type cannot be nil.' - end - @type = type - end - - # Returns the object in the form of hash, with additionalProperties support. - # @return [Hash] Returns the object in the form of hash - # @!visibility private - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = self.send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - self.additional_properties.each_pair do |attr, value| - hash[attr] = value - end - hash - end - - # Checks equality by comparing each attribute. - # @param o [Object] Object to be compared - # @!visibility private - def ==(o) - return true if self.equal?(o) - self.class == o.class && - id == o.id && - type == o.type && - additional_properties == o.additional_properties - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - # @!visibility private - def hash - [id, type, additional_properties].hash - end - end -end diff --git a/lib/datadog_api_client/v2/models/project_favorite_resource_type.rb b/lib/datadog_api_client/v2/models/project_favorite_resource_type.rb deleted file mode 100644 index 1e1c71deb9ea..000000000000 --- a/lib/datadog_api_client/v2/models/project_favorite_resource_type.rb +++ /dev/null @@ -1,26 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # JSON:API resource type for project favorites. - class ProjectFavoriteResourceType - include BaseEnumModel - - PROJECT_FAVORITE = "project_favorite".freeze - end -end diff --git a/lib/datadog_api_client/v2/models/project_favorites_response.rb b/lib/datadog_api_client/v2/models/project_favorites_response.rb deleted file mode 100644 index a634b2760ecc..000000000000 --- a/lib/datadog_api_client/v2/models/project_favorites_response.rb +++ /dev/null @@ -1,125 +0,0 @@ -=begin -#Datadog API V2 Collection - -#Collection of all Datadog Public endpoints. - -The version of the OpenAPI document: 1.0 -Contact: support@datadoghq.com -Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator - - Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. - This product includes software developed at Datadog (https://www.datadoghq.com/). - Copyright 2020-Present Datadog, Inc. - -=end - -require 'date' -require 'time' - -module DatadogAPIClient::V2 - # Response containing the list of 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 8c8463155e73..eff1de922436 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Attributes of a timeline cell, representing a single event in a case's chronological activity log (for example, a comment, status change, or assignment update). + # timeline cell class TimelineCell include BaseGenericModel - # The author of the timeline cell. Currently only user authors are supported. + # author of the timeline cell attr_accessor :author - # The content payload of a timeline cell, varying by cell type. + # timeline cell content attr_accessor :cell_content # Timestamp of when the cell was created @@ -36,7 +36,7 @@ class TimelineCell # Timestamp of when the cell was last modified attr_accessor :modified_at - # The type of content in the timeline cell. Currently only `COMMENT` is supported in this endpoint. + # Timeline cell content type attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/timeline_cell_author.rb b/lib/datadog_api_client/v2/models/timeline_cell_author.rb index 260335808816..d4b7c4acfb45 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_author.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_author.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The author of the timeline cell. Currently only user authors are supported. + # author of the timeline cell module TimelineCellAuthor class << self include BaseOneOfModel diff --git a/lib/datadog_api_client/v2/models/timeline_cell_author_user.rb b/lib/datadog_api_client/v2/models/timeline_cell_author_user.rb index 66ec8eb22531..274ddf6a559d 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_author_user.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_author_user.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # A user who authored a timeline cell. + # timeline cell user author class TimelineCellAuthorUser include BaseGenericModel - # Profile information for the user who authored the timeline cell. + # user author content. attr_accessor :content - # The type of timeline cell author. Currently only `USER` is supported. + # user author type. attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/timeline_cell_author_user_content.rb b/lib/datadog_api_client/v2/models/timeline_cell_author_user_content.rb index d66a3f18b25d..8bd93d4d0412 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_author_user_content.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_author_user_content.rb @@ -17,20 +17,20 @@ require 'time' module DatadogAPIClient::V2 - # Profile information for the user who authored the timeline cell. + # user author content. class TimelineCellAuthorUserContent include BaseGenericModel - # The email address of the user. + # user email attr_accessor :email - # The Datadog handle of the user. + # user handle attr_accessor :handle - # The UUID of the user. + # user UUID attr_accessor :id - # The display name of the user. + # user name attr_accessor :name attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/timeline_cell_author_user_type.rb b/lib/datadog_api_client/v2/models/timeline_cell_author_user_type.rb index 21527600064d..76643ee1dd86 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_author_user_type.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_author_user_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The type of timeline cell author. Currently only `USER` is supported. + # user author type. class TimelineCellAuthorUserType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/timeline_cell_content.rb b/lib/datadog_api_client/v2/models/timeline_cell_content.rb index 9166df6f85e9..8a3f4ed465ac 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_content.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_content.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The content payload of a timeline cell, varying by cell type. + # timeline cell content module TimelineCellContent class << self include BaseOneOfModel diff --git a/lib/datadog_api_client/v2/models/timeline_cell_content_comment.rb b/lib/datadog_api_client/v2/models/timeline_cell_content_comment.rb index dbcd86330a55..ad7fb072114c 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_content_comment.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_content_comment.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # The content of a comment timeline cell. + # comment content class TimelineCellContentComment include BaseGenericModel - # The text content of the comment. Supports Markdown formatting. + # comment message attr_accessor :message attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/timeline_cell_resource.rb b/lib/datadog_api_client/v2/models/timeline_cell_resource.rb index 5c1e21b5733c..35e988e7b8d8 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_resource.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_resource.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # A timeline cell resource representing a single entry in a case's activity timeline. + # Timeline cell JSON:API resource class TimelineCellResource include BaseGenericModel - # Attributes of a timeline cell, representing a single event in a case's chronological activity log (for example, a comment, status change, or assignment update). + # timeline cell attr_reader :attributes # Timeline cell's identifier attr_reader :id - # JSON:API resource type for timeline cells. + # Timeline cell JSON:API resource type attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/timeline_cell_resource_type.rb b/lib/datadog_api_client/v2/models/timeline_cell_resource_type.rb index 4d22d0b60d24..0e1dddb79835 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_resource_type.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_resource_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # JSON:API resource type for timeline cells. + # Timeline cell JSON:API resource type class TimelineCellResourceType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/timeline_cell_type.rb b/lib/datadog_api_client/v2/models/timeline_cell_type.rb index 1afc72a7e8cc..25b6ea18b771 100644 --- a/lib/datadog_api_client/v2/models/timeline_cell_type.rb +++ b/lib/datadog_api_client/v2/models/timeline_cell_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # The type of content in the timeline cell. Currently only `COMMENT` is supported in this endpoint. + # Timeline cell content type class TimelineCellType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/timeline_response.rb b/lib/datadog_api_client/v2/models/timeline_response.rb index 81061ff5bc27..a1413a23fb04 100644 --- a/lib/datadog_api_client/v2/models/timeline_response.rb +++ b/lib/datadog_api_client/v2/models/timeline_response.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Response containing the chronological list of timeline cells for a case. + # Timeline response class TimelineResponse include BaseGenericModel