From dfd97884f79ce7211cccb0294fb0cb8279a335ba Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 14 May 2026 14:28:12 +0000 Subject: [PATCH] Regenerate client from commit 79f73e9 of spec repo --- .generator/schemas/v2/openapi.yaml | 5997 ++++++++++++++++ .../BatchCreateIncidentRuleExecutionStates.rb | 22 + .../BatchUpdateIncidentRuleExecutionStates.rb | 22 + .../incidents/CreateIncidentCommunication.rb | 30 + .../CreateIncidentGoogleMeetSpace.rb | 8 + .../v2/incidents/CreateIncidentJiraIssue.rb | 20 + .../incidents/CreateIncidentJiraTemplate.rb | 40 + .../CreateIncidentMSTeamsOnlineMeeting.rb | 8 + ...eateIncidentMicrosoftTeamsConfiguration.rb | 18 + .../incidents/CreateIncidentRoleAssignment.rb | 37 + .../CreateIncidentStatusPageNotice.rb | 22 + .../CreateIncidentStatuspageIncident.rb | 22 + .../incidents/CreateIncidentTimelineEntry.rb | 22 + .../CreateIncidentZoomConfiguration.rb | 19 + .../v2/incidents/CreateIncidentZoomMeeting.rb | 17 + .../CreateStatuspageEmailSubscription.rb | 17 + .../incidents/DeleteIncidentCommunication.rb | 8 + .../incidents/DeleteIncidentJiraTemplate.rb | 8 + .../incidents/DeleteIncidentRoleAssignment.rb | 8 + .../incidents/DeleteIncidentTimelineEntry.rb | 8 + examples/v2/incidents/ExportIncidents.rb | 17 + .../v2/incidents/GetIncidentAutomationData.rb | 8 + .../v2/incidents/GetIncidentCaseSourceLink.rb | 8 + .../v2/incidents/GetIncidentCommunication.rb | 8 + .../v2/incidents/GetIncidentJiraTemplate.rb | 8 + .../v2/incidents/GetIncidentPageSourceLink.rb | 8 + .../GetIncidentPagerdutyRelatedIncidents.rb | 8 + .../v2/incidents/GetIncidentReservedRole.rb | 8 + .../v2/incidents/GetIncidentRoleAssignment.rb | 8 + .../GetIncidentStatusPagesSuggestion.rb | 8 + .../GetIncidentTimelineEntryThread.rb | 8 + .../GetStatuspageSubscriptionPreferences.rb | 8 + .../incidents/ListIncidentCommunications.rb | 8 + .../v2/incidents/ListIncidentJiraTemplates.rb | 8 + .../ListIncidentPagerdutyServices.rb | 8 + .../v2/incidents/ListIncidentReservedRoles.rb | 8 + .../ListIncidentRuleExecutionStates.rb | 8 + .../ListIncidentTemplateVariables.rb | 8 + .../incidents/ListIncidentTimelineEntries.rb | 8 + .../ListStatuspageEmailSubscriptions.rb | 8 + .../PatchIncidentNotificationRule.rb | 51 + .../v2/incidents/RenderIncidentTemplate.rb | 21 + examples/v2/incidents/SearchIncidentsV2.rb | 8 + .../incidents/UpdateIncidentCommunication.rb | 30 + .../incidents/UpdateIncidentJiraTemplate.rb | 40 + ...dateIncidentMicrosoftTeamsConfiguration.rb | 18 + .../UpdateIncidentStatusPageNotice.rb | 19 + .../UpdateIncidentStatuspageIncident.rb | 22 + .../incidents/UpdateIncidentTimelineEntry.rb | 22 + .../UpdateIncidentZoomConfiguration.rb | 19 + .../incidents/UpsertIncidentAutomationData.rb | 17 + features/scenarios_model_mapping.rb | 197 + features/v2/incidents.feature | 1150 ++- features/v2/undo.json | 332 + lib/datadog_api_client/configuration.rb | 50 + lib/datadog_api_client/inflector.rb | 171 + .../v2/api/incidents_api.rb | 6281 +++++++++++++---- ...dent_automation_data_attributes_request.rb | 123 + ...ent_automation_data_attributes_response.rb | 207 + .../incident_automation_data_data_request.rb | 144 + .../incident_automation_data_data_response.rb | 165 + .../incident_automation_data_request.rb | 123 + .../incident_automation_data_response.rb | 123 + .../models/incident_automation_data_type.rb | 26 + ...batch_create_rule_execution_states_data.rb | 144 + ...e_rule_execution_states_data_attributes.rb | 125 + ...ch_create_rule_execution_states_request.rb | 123 + ...batch_update_rule_execution_states_data.rb | 144 + ...e_rule_execution_states_data_attributes.rb | 125 + ...ch_update_rule_execution_states_request.rb | 123 + .../v2/models/incident_case_link_data.rb | 165 + .../incident_case_link_data_attributes.rb | 165 + .../v2/models/incident_case_link_response.rb | 123 + .../v2/models/incident_case_link_type.rb | 26 + .../models/incident_communication_content.rb | 187 + .../incident_communication_content_handle.rb | 143 + ...t_communication_data_attributes_request.rb | 144 + ..._communication_data_attributes_response.rb | 207 + .../incident_communication_data_request.rb | 144 + .../incident_communication_data_response.rb | 165 + .../v2/models/incident_communication_kind.rb | 27 + .../models/incident_communication_request.rb | 123 + .../models/incident_communication_response.rb | 123 + .../v2/models/incident_communication_type.rb | 26 + .../incident_communications_response.rb | 125 + .../incident_create_zoom_meeting_data.rb | 144 + ...ent_create_zoom_meeting_data_attributes.rb | 123 + .../incident_create_zoom_meeting_request.rb | 123 + ...google_meet_integration_data_attributes.rb | 209 + ...t_google_meet_integration_data_response.rb | 165 + ...cident_google_meet_integration_response.rb | 123 + .../incident_google_meet_integration_type.rb | 26 + .../v2/models/incident_google_meet_space.rb | 165 + ...dent_jira_issue_data_attributes_request.rb | 175 + .../incident_jira_issue_data_request.rb | 144 + ..._jira_issue_integration_data_attributes.rb | 186 + ...nt_jira_issue_integration_data_response.rb | 165 + ...ncident_jira_issue_integration_response.rb | 123 + .../incident_jira_issue_integration_type.rb | 26 + .../v2/models/incident_jira_issue_request.rb | 123 + .../v2/models/incident_jira_issue_type.rb | 26 + ...t_jira_template_data_attributes_request.rb | 268 + ..._jira_template_data_attributes_response.rb | 396 ++ .../incident_jira_template_data_request.rb | 154 + .../incident_jira_template_data_response.rb | 175 + ...ident_jira_template_field_configuration.rb | 193 + ...ira_template_incident_type_relationship.rb | 123 + ...emplate_incident_type_relationship_data.rb | 144 + .../incident_jira_template_relationships.rb | 105 + .../models/incident_jira_template_request.rb | 123 + .../models/incident_jira_template_response.rb | 123 + .../v2/models/incident_jira_template_type.rb | 26 + .../incident_jira_templates_response.rb | 125 + ...s_configuration_data_attributes_request.rb | 115 + ..._configuration_data_attributes_response.rb | 186 + ...rosoft_teams_configuration_data_request.rb | 144 + ...osoft_teams_configuration_data_response.rb | 165 + ...t_microsoft_teams_configuration_request.rb | 123 + ..._microsoft_teams_configuration_response.rb | 123 + ...dent_microsoft_teams_configuration_type.rb | 26 + ...cident_microsoft_teams_integration_type.rb | 26 + .../v2/models/incident_ms_teams_channel.rb | 184 + ...nt_ms_teams_integration_data_attributes.rb | 209 + ...dent_ms_teams_integration_data_response.rb | 165 + .../incident_ms_teams_integration_response.rb | 123 + ...cident_pagerduty_incident_data_response.rb | 144 + ...nt_pagerduty_related_incidents_response.rb | 125 + .../models/incident_pagerduty_service_data.rb | 165 + ...ident_pagerduty_service_data_attributes.rb | 186 + .../models/incident_pagerduty_service_type.rb | 26 + .../incident_pagerduty_services_response.rb | 125 + ...render_template_data_attributes_request.rb | 172 + .../incident_render_template_data_request.rb | 144 + .../incident_render_template_request.rb | 123 + .../models/incident_rendered_template_data.rb | 165 + ...ident_rendered_template_data_attributes.rb | 123 + .../incident_rendered_template_response.rb | 123 + .../models/incident_rendered_template_type.rb | 26 + ..._reserved_role_data_attributes_response.rb | 204 + .../incident_reserved_role_data_response.rb | 165 + .../models/incident_reserved_role_policy.rb | 123 + .../models/incident_reserved_role_response.rb | 123 + .../v2/models/incident_reserved_role_type.rb | 26 + .../incident_reserved_roles_response.rb | 125 + ...role_assignment_data_attributes_request.rb | 113 + ...ole_assignment_data_attributes_response.rb | 186 + .../incident_role_assignment_data_request.rb | 154 + .../incident_role_assignment_data_response.rb | 175 + ...t_role_assignment_relationships_request.rb | 143 + ..._role_assignment_relationships_response.rb | 163 + .../incident_role_assignment_request.rb | 123 + ..._role_assignment_responder_relationship.rb | 123 + ..._assignment_responder_relationship_data.rb | 144 + .../incident_role_assignment_response.rb | 123 + ...ident_role_assignment_role_relationship.rb | 105 + ..._role_assignment_role_relationship_data.rb | 144 + .../models/incident_role_assignment_type.rb | 26 + ...xecution_state_data_attributes_response.rb | 204 + ...dent_rule_execution_state_data_response.rb | 165 + .../incident_rule_execution_state_rule.rb | 141 + .../incident_rule_execution_state_type.rb | 26 + ...incident_rule_execution_states_response.rb | 125 + ...ncident_search_incidents_export_request.rb | 146 + .../incident_search_incidents_include_type.rb | 31 + .../incident_search_incidents_sort_order.rb | 29 + ...incident_status_page_notice_create_data.rb | 144 + ...atus_page_notice_create_data_attributes.rb | 135 + ...ident_status_page_notice_create_request.rb | 123 + ...page_notice_integration_data_attributes.rb | 186 + ...s_page_notice_integration_data_response.rb | 165 + ...status_page_notice_integration_response.rb | 123 + ...ent_status_page_notice_integration_type.rb | 26 + ...incident_status_page_notice_update_data.rb | 144 + ...atus_page_notice_update_data_attributes.rb | 135 + ...ident_status_page_notice_update_request.rb | 123 + .../incident_status_pages_suggestion_data.rb | 165 + ...status_pages_suggestion_data_attributes.rb | 144 + ...cident_status_pages_suggestion_response.rb | 123 + .../incident_status_pages_suggestion_type.rb | 26 + ...uspage_incident_data_attributes_request.rb | 177 + ...spage_incident_data_attributes_response.rb | 198 + ...cident_statuspage_incident_data_request.rb | 144 + ...ident_statuspage_incident_data_response.rb | 165 + .../incident_statuspage_incident_entry.rb | 154 + .../incident_statuspage_incident_request.rb | 123 + .../incident_statuspage_incident_response.rb | 123 + .../incident_statuspage_incident_type.rb | 26 + .../incident_statuspage_preferences_data.rb | 165 + ..._statuspage_preferences_data_attributes.rb | 123 + ...ncident_statuspage_preferences_response.rb | 123 + .../incident_statuspage_preferences_type.rb | 26 + ...ge_subscription_data_attributes_request.rb | 123 + ...e_subscription_data_attributes_response.rb | 165 + ...nt_statuspage_subscription_data_request.rb | 144 + ...t_statuspage_subscription_data_response.rb | 165 + ...ncident_statuspage_subscription_request.rb | 123 + ...cident_statuspage_subscription_response.rb | 123 + .../incident_statuspage_subscription_type.rb | 26 + ...ident_statuspage_subscriptions_response.rb | 125 + .../models/incident_template_variable_data.rb | 165 + ...ident_template_variable_data_attributes.rb | 186 + .../models/incident_template_variable_type.rb | 26 + .../incident_template_variables_response.rb | 125 + .../models/incident_timeline_cell_source.rb | 29 + .../v2/models/incident_timeline_cell_type.rb | 32 + .../incident_timeline_entries_response.rb | 125 + .../models/incident_timeline_entry_content.rb | 105 + ..._timeline_entry_data_attributes_request.rb | 164 + ...timeline_entry_data_attributes_response.rb | 288 + .../incident_timeline_entry_data_request.rb | 144 + .../incident_timeline_entry_data_response.rb | 165 + .../models/incident_timeline_entry_request.rb | 123 + .../incident_timeline_entry_response.rb | 123 + .../v2/models/incident_timeline_entry_type.rb | 26 + .../incident_timeline_thread_data_response.rb | 165 + .../incident_timeline_thread_response.rb | 125 + ...m_configuration_data_attributes_request.rb | 125 + ..._configuration_data_attributes_response.rb | 207 + ...ncident_zoom_configuration_data_request.rb | 144 + ...cident_zoom_configuration_data_response.rb | 165 + .../incident_zoom_configuration_request.rb | 123 + .../incident_zoom_configuration_response.rb | 123 + .../incident_zoom_configuration_type.rb | 26 + ...cident_zoom_integration_data_attributes.rb | 209 + ...incident_zoom_integration_data_response.rb | 165 + .../incident_zoom_integration_response.rb | 123 + .../models/incident_zoom_integration_type.rb | 26 + .../v2/models/incident_zoom_meeting.rb | 174 + 228 files changed, 35926 insertions(+), 1253 deletions(-) create mode 100644 examples/v2/incidents/BatchCreateIncidentRuleExecutionStates.rb create mode 100644 examples/v2/incidents/BatchUpdateIncidentRuleExecutionStates.rb create mode 100644 examples/v2/incidents/CreateIncidentCommunication.rb create mode 100644 examples/v2/incidents/CreateIncidentGoogleMeetSpace.rb create mode 100644 examples/v2/incidents/CreateIncidentJiraIssue.rb create mode 100644 examples/v2/incidents/CreateIncidentJiraTemplate.rb create mode 100644 examples/v2/incidents/CreateIncidentMSTeamsOnlineMeeting.rb create mode 100644 examples/v2/incidents/CreateIncidentMicrosoftTeamsConfiguration.rb create mode 100644 examples/v2/incidents/CreateIncidentRoleAssignment.rb create mode 100644 examples/v2/incidents/CreateIncidentStatusPageNotice.rb create mode 100644 examples/v2/incidents/CreateIncidentStatuspageIncident.rb create mode 100644 examples/v2/incidents/CreateIncidentTimelineEntry.rb create mode 100644 examples/v2/incidents/CreateIncidentZoomConfiguration.rb create mode 100644 examples/v2/incidents/CreateIncidentZoomMeeting.rb create mode 100644 examples/v2/incidents/CreateStatuspageEmailSubscription.rb create mode 100644 examples/v2/incidents/DeleteIncidentCommunication.rb create mode 100644 examples/v2/incidents/DeleteIncidentJiraTemplate.rb create mode 100644 examples/v2/incidents/DeleteIncidentRoleAssignment.rb create mode 100644 examples/v2/incidents/DeleteIncidentTimelineEntry.rb create mode 100644 examples/v2/incidents/ExportIncidents.rb create mode 100644 examples/v2/incidents/GetIncidentAutomationData.rb create mode 100644 examples/v2/incidents/GetIncidentCaseSourceLink.rb create mode 100644 examples/v2/incidents/GetIncidentCommunication.rb create mode 100644 examples/v2/incidents/GetIncidentJiraTemplate.rb create mode 100644 examples/v2/incidents/GetIncidentPageSourceLink.rb create mode 100644 examples/v2/incidents/GetIncidentPagerdutyRelatedIncidents.rb create mode 100644 examples/v2/incidents/GetIncidentReservedRole.rb create mode 100644 examples/v2/incidents/GetIncidentRoleAssignment.rb create mode 100644 examples/v2/incidents/GetIncidentStatusPagesSuggestion.rb create mode 100644 examples/v2/incidents/GetIncidentTimelineEntryThread.rb create mode 100644 examples/v2/incidents/GetStatuspageSubscriptionPreferences.rb create mode 100644 examples/v2/incidents/ListIncidentCommunications.rb create mode 100644 examples/v2/incidents/ListIncidentJiraTemplates.rb create mode 100644 examples/v2/incidents/ListIncidentPagerdutyServices.rb create mode 100644 examples/v2/incidents/ListIncidentReservedRoles.rb create mode 100644 examples/v2/incidents/ListIncidentRuleExecutionStates.rb create mode 100644 examples/v2/incidents/ListIncidentTemplateVariables.rb create mode 100644 examples/v2/incidents/ListIncidentTimelineEntries.rb create mode 100644 examples/v2/incidents/ListStatuspageEmailSubscriptions.rb create mode 100644 examples/v2/incidents/PatchIncidentNotificationRule.rb create mode 100644 examples/v2/incidents/RenderIncidentTemplate.rb create mode 100644 examples/v2/incidents/SearchIncidentsV2.rb create mode 100644 examples/v2/incidents/UpdateIncidentCommunication.rb create mode 100644 examples/v2/incidents/UpdateIncidentJiraTemplate.rb create mode 100644 examples/v2/incidents/UpdateIncidentMicrosoftTeamsConfiguration.rb create mode 100644 examples/v2/incidents/UpdateIncidentStatusPageNotice.rb create mode 100644 examples/v2/incidents/UpdateIncidentStatuspageIncident.rb create mode 100644 examples/v2/incidents/UpdateIncidentTimelineEntry.rb create mode 100644 examples/v2/incidents/UpdateIncidentZoomConfiguration.rb create mode 100644 examples/v2/incidents/UpsertIncidentAutomationData.rb create mode 100644 lib/datadog_api_client/v2/models/incident_automation_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_automation_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_automation_data_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_automation_data_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_automation_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_automation_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_automation_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_batch_update_rule_execution_states_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_batch_update_rule_execution_states_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_batch_update_rule_execution_states_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_case_link_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_case_link_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_case_link_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_case_link_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communication_content.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communication_content_handle.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communication_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communication_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communication_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communication_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communication_kind.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communication_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communication_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communication_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_communications_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_create_zoom_meeting_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_create_zoom_meeting_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_create_zoom_meeting_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_google_meet_integration_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_google_meet_integration_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_google_meet_integration_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_google_meet_integration_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_google_meet_space.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_issue_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_issue_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_issue_integration_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_issue_integration_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_issue_integration_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_issue_integration_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_issue_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_issue_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_field_configuration.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_incident_type_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_incident_type_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_template_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_jira_templates_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_microsoft_teams_integration_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_ms_teams_channel.rb create mode 100644 lib/datadog_api_client/v2/models/incident_ms_teams_integration_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_ms_teams_integration_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_ms_teams_integration_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_pagerduty_incident_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_pagerduty_related_incidents_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_pagerduty_service_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_pagerduty_service_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_pagerduty_service_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_pagerduty_services_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_render_template_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_render_template_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_render_template_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_rendered_template_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_rendered_template_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_rendered_template_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_rendered_template_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_reserved_role_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_reserved_role_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_reserved_role_policy.rb create mode 100644 lib/datadog_api_client/v2/models/incident_reserved_role_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_reserved_role_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_reserved_roles_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_relationships_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_relationships_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_responder_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_responder_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_role_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_role_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_role_assignment_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_rule_execution_state_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_rule_execution_state_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_rule_execution_state_rule.rb create mode 100644 lib/datadog_api_client/v2/models/incident_rule_execution_state_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_rule_execution_states_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_search_incidents_export_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_search_incidents_include_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_search_incidents_sort_order.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_page_notice_create_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_page_notice_create_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_page_notice_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_page_notice_integration_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_page_notice_integration_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_page_notice_integration_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_page_notice_integration_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_page_notice_update_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_page_notice_update_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_page_notice_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_pages_suggestion_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_pages_suggestion_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_pages_suggestion_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_status_pages_suggestion_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_incident_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_incident_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_incident_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_incident_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_incident_entry.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_incident_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_incident_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_incident_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_preferences_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_preferences_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_preferences_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_preferences_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_subscription_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_subscription_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_subscription_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_statuspage_subscriptions_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_template_variable_data.rb create mode 100644 lib/datadog_api_client/v2/models/incident_template_variable_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_template_variable_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_template_variables_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_cell_source.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_cell_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_entries_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_entry_content.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_entry_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_entry_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_entry_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_entry_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_entry_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_entry_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_entry_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_thread_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_timeline_thread_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_configuration_data_attributes_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_configuration_data_attributes_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_configuration_data_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_configuration_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_configuration_request.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_configuration_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_configuration_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_integration_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_integration_data_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_integration_response.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_integration_type.rb create mode 100644 lib/datadog_api_client/v2/models/incident_zoom_meeting.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 73163c4c177d..7d0cf9ebb603 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -558,6 +558,37 @@ components: required: true schema: type: string + IncidentAutomationDataIncludeParameter: + description: Specifies which related objects to include in the response. + in: query + name: include + required: false + schema: + type: string + IncidentAutomationDataKeyParameter: + description: The automation data key. + example: workflow_status + in: path + name: key + required: true + schema: + type: string + IncidentCommunicationFilterTypeParameter: + description: Filter by communication type. + in: query + name: "filter[communication_type]" + required: false + schema: + type: string + IncidentCommunicationIdParameter: + description: The ID of the communication. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: communication_id + required: true + schema: + format: uuid + type: string IncidentIDPathParameter: description: The UUID of the incident. in: path @@ -609,6 +640,53 @@ components: required: true schema: type: string + IncidentJiraTemplateIdParameter: + description: The ID of the Jira template. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: template_id + required: true + schema: + format: uuid + type: string + IncidentJiraTemplateIncidentTypeIdParameter: + description: Filter templates by incident type identifier. + in: query + name: incidentTypeId + required: false + schema: + format: uuid + type: string + IncidentJiraTemplateIsDefaultParameter: + description: Filter templates by default status. + in: query + name: isDefault + required: false + schema: + type: boolean + IncidentJiraTemplateTypeParameter: + description: Filter templates by type. + in: query + name: templateType + required: false + schema: + type: string + IncidentMicrosoftTeamsConfigurationIdParameter: + description: The ID of the Microsoft Teams configuration. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: configuration_id + required: true + schema: + format: uuid + type: string + IncidentMicrosoftTeamsIncludeParameter: + description: Specifies which related objects to include in the response. + in: query + name: include + required: false + schema: + type: string IncidentNotificationRuleIDPathParameter: description: The ID of the notification rule. in: path @@ -657,6 +735,77 @@ components: schema: example: "created_by_user,incident_type" type: string + IncidentReservedRoleIdParameter: + description: The ID of the reserved role. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: role_id + required: true + schema: + format: uuid + type: string + IncidentRoleAssignmentIdParameter: + description: The ID of the role assignment. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: role_assignment_id + required: true + schema: + format: uuid + type: string + IncidentSearchIncidentsIncludeParameter: + description: Specifies which types of related objects to include. + in: query + name: include + required: false + schema: + items: + $ref: "#/components/schemas/IncidentSearchIncidentsIncludeType" + type: array + IncidentSearchIncidentsQueryParameter: + description: Specifies which incidents should be returned by the search. + in: query + name: query + required: false + schema: + type: string + IncidentSearchIncidentsSemanticQueryParameter: + description: A semantic search query. + in: query + name: semantic_query + required: false + schema: + type: string + IncidentSearchIncidentsSortParameter: + description: Specifies the order of returned incidents. + in: query + name: sort + required: false + schema: + $ref: "#/components/schemas/IncidentSearchIncidentsSortOrder" + IncidentSearchIncidentsTimezoneParameter: + description: The timezone for date-based operations. + in: query + name: timeZone + required: false + schema: + type: string + IncidentSearchIncidentsWithDeletedParameter: + description: Whether to include deleted incidents in the response. + in: query + name: "filter[with_deleted]" + required: false + schema: + default: false + type: boolean + IncidentSearchIncidentsWithFacetsParameter: + description: Whether to include facet data in the response. + in: query + name: with_facets + required: false + schema: + default: true + type: boolean IncidentSearchIncludeQueryParameter: description: Specifies which types of related objects should be included in the response. in: query @@ -705,6 +854,79 @@ components: schema: example: "ExampleServiceName" type: string + IncidentStatusPageIdParameter: + description: The ID of the status page. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: statuspage_id + required: true + schema: + format: uuid + type: string + IncidentStatusPageNoticeIdParameter: + description: The ID of the status page notice. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: notice_id + required: true + schema: + format: uuid + type: string + IncidentStatusPageNotifySubscribersParameter: + description: Whether to notify subscribers about this notice. + in: query + name: notify_subscribers + required: false + schema: + type: boolean + IncidentStatuspageIncidentIdParameter: + description: The ID of the Statuspage incident. + example: abc123 + in: path + name: statuspage_incident_id + required: true + schema: + type: string + IncidentStatuspagePageIdParameter: + description: The ID of the Statuspage page. + example: abc123 + in: path + name: page_id + required: true + schema: + type: string + IncidentStatuspagePageIdPathParameter: + description: The ID of the status page. + example: my-status-page + in: path + name: page_id + required: true + schema: + type: string + IncidentTemplateVariableFilterIncidentTypeParameter: + description: Filter template variables by incident type. + in: query + name: "filter[incident-type]" + required: false + schema: + format: uuid + type: string + IncidentTemplateVariableIncludeFollowUpsParameter: + description: Whether to include follow-up template variables. + in: query + name: includeFollowUps + required: false + schema: + type: boolean + IncidentTimelineEntryIdParameter: + description: The ID of the timeline entry. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: timeline_entry_id + required: true + schema: + format: uuid + type: string IncidentTodoIDPathParameter: description: The UUID of the incident todo. in: path @@ -734,6 +956,22 @@ components: schema: example: "00000000-0000-0000-0000-000000000000" type: string + IncidentZoomConfigurationIdParameter: + description: The ID of the Zoom configuration. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: configuration_id + required: true + schema: + format: uuid + type: string + IncidentZoomIncludeParameter: + description: Specifies which related objects to include in the response. + in: query + name: include + required: false + schema: + type: string Include: description: Include relationship data. explode: true @@ -1116,6 +1354,22 @@ components: example: 10 format: int64 type: integer + PagerdutyIncidentIdParameter: + description: The PagerDuty incident identifier. + example: P1234AB + in: path + name: pagerduty_incident_id + required: true + schema: + type: string + PagerdutyIncludeUnresolvedParameter: + description: Whether to include unresolved PagerDuty services. + in: query + name: include_unresolved + required: false + schema: + default: false + type: boolean PersonaMappingID: description: The ID of the persona mapping example: c5c758c6-18c2-4484-ae3f-46b84128404a @@ -33501,6 +33755,373 @@ components: type: string x-enum-varnames: - INCIDENT_ATTACHMENTS + IncidentAutomationDataAttributesRequest: + description: Attributes for upserting automation data. + properties: + value: + description: The automation data value. + example: completed + type: string + required: + - value + type: object + IncidentAutomationDataAttributesResponse: + description: Attributes of incident automation data. + properties: + created_at: + description: Timestamp when the data was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incident_id: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + key: + description: The automation data key. + example: workflow_status + type: string + updated_at: + description: Timestamp when the data was last updated. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + value: + description: The automation data value. + example: completed + type: string + required: + - incident_id + - key + - value + - created_at + - updated_at + type: object + IncidentAutomationDataDataRequest: + description: Automation data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentAutomationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentAutomationDataType" + required: + - type + - attributes + type: object + IncidentAutomationDataDataResponse: + description: Automation data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentAutomationDataAttributesResponse" + id: + description: The automation data identifier. + example: workflow_status + type: string + type: + $ref: "#/components/schemas/IncidentAutomationDataType" + required: + - id + - type + - attributes + type: object + IncidentAutomationDataRequest: + description: Request to upsert automation data. + properties: + data: + $ref: "#/components/schemas/IncidentAutomationDataDataRequest" + required: + - data + type: object + IncidentAutomationDataResponse: + description: Response with automation data. + properties: + data: + $ref: "#/components/schemas/IncidentAutomationDataDataResponse" + required: + - data + type: object + IncidentAutomationDataType: + description: Incident automation data resource type. + enum: + - incidents_automation_data + example: incidents_automation_data + type: string + x-enum-varnames: + - INCIDENTS_AUTOMATION_DATA + IncidentBatchCreateRuleExecutionStatesData: + description: Data for batch creating rule execution states. + properties: + attributes: + $ref: "#/components/schemas/IncidentBatchCreateRuleExecutionStatesDataAttributes" + type: + $ref: "#/components/schemas/IncidentRuleExecutionStateType" + required: + - type + - attributes + type: object + IncidentBatchCreateRuleExecutionStatesDataAttributes: + description: Attributes for batch creating rule execution states. + properties: + rules: + description: List of rules to create execution states for. + items: + $ref: "#/components/schemas/IncidentRuleExecutionStateRule" + type: array + required: + - rules + type: object + IncidentBatchCreateRuleExecutionStatesRequest: + description: Request to batch create rule execution states. + properties: + data: + $ref: "#/components/schemas/IncidentBatchCreateRuleExecutionStatesData" + required: + - data + type: object + IncidentBatchUpdateRuleExecutionStatesData: + description: Data for batch updating rule execution states. + properties: + attributes: + $ref: "#/components/schemas/IncidentBatchUpdateRuleExecutionStatesDataAttributes" + type: + $ref: "#/components/schemas/IncidentRuleExecutionStateType" + required: + - type + - attributes + type: object + IncidentBatchUpdateRuleExecutionStatesDataAttributes: + description: Attributes for batch updating rule execution states. + properties: + rules: + description: List of rules to update execution states for. + items: + $ref: "#/components/schemas/IncidentRuleExecutionStateRule" + type: array + required: + - rules + type: object + IncidentBatchUpdateRuleExecutionStatesRequest: + description: Request to batch update rule execution states. + properties: + data: + $ref: "#/components/schemas/IncidentBatchUpdateRuleExecutionStatesData" + required: + - data + type: object + IncidentCaseLinkData: + description: Case link data. + properties: + attributes: + $ref: "#/components/schemas/IncidentCaseLinkDataAttributes" + id: + description: The case link identifier. + example: "12345" + type: string + type: + $ref: "#/components/schemas/IncidentCaseLinkType" + required: + - id + - type + - attributes + type: object + IncidentCaseLinkDataAttributes: + description: Attributes of a case link. + properties: + entity_id: + description: The entity identifier. + example: "12345" + type: string + is_page: + description: Whether this is a page link. + example: false + type: boolean + relationship: + description: The relationship type. + example: source + type: string + required: + - entity_id + - is_page + - relationship + type: object + IncidentCaseLinkResponse: + description: Response with a case link. + properties: + data: + $ref: "#/components/schemas/IncidentCaseLinkData" + required: + - data + type: object + IncidentCaseLinkType: + description: Case link resource type. + enum: + - case_link + example: case_link + type: string + x-enum-varnames: + - CASE_LINK + IncidentCommunicationContent: + description: The content of a communication. + properties: + grouping_key: + description: A key used for grouping communications. + example: update-1 + type: string + handles: + description: The list of handles the communication is sent to. + items: + $ref: "#/components/schemas/IncidentCommunicationContentHandle" + type: array + message: + description: The message body of the communication. + example: Incident update for INC-123. + type: string + status: + description: The status code of the communication. + example: 0 + format: int32 + maximum: 2147483647 + type: integer + subject: + description: The subject line of the communication. + example: "Incident INC-123: Update" + type: string + required: + - handles + - message + type: object + IncidentCommunicationContentHandle: + description: A handle used for sending a communication. + properties: + created_at: + description: Timestamp when the handle was added. + example: "2024-01-01T00:00:00.000Z" + type: string + display_name: + description: The display name for the handle. + example: "#incidents-channel" + type: string + handle: + description: The notification handle. + example: "@slack-incidents-channel" + type: string + required: + - handle + type: object + IncidentCommunicationDataAttributesRequest: + description: Attributes for creating or updating a communication. + properties: + communication_type: + $ref: "#/components/schemas/IncidentCommunicationKind" + content: + $ref: "#/components/schemas/IncidentCommunicationContent" + required: + - communication_type + - content + type: object + IncidentCommunicationDataAttributesResponse: + description: Attributes of an incident communication response. + properties: + communication_type: + $ref: "#/components/schemas/IncidentCommunicationKind" + content: + $ref: "#/components/schemas/IncidentCommunicationContent" + created: + description: Timestamp when the communication was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incident_id: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + modified: + description: Timestamp when the communication was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + required: + - incident_id + - communication_type + - content + - created + - modified + type: object + IncidentCommunicationDataRequest: + description: Incident communication data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentCommunicationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentCommunicationType" + required: + - type + - attributes + type: object + IncidentCommunicationDataResponse: + description: Incident communication data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentCommunicationDataAttributesResponse" + id: + description: The communication identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentCommunicationType" + required: + - id + - type + - attributes + type: object + IncidentCommunicationKind: + description: The kind of communication. + enum: + - manual + - automated + example: manual + type: string + x-enum-varnames: + - MANUAL + - AUTOMATED + IncidentCommunicationRequest: + description: Request to create or update a communication. + properties: + data: + $ref: "#/components/schemas/IncidentCommunicationDataRequest" + required: + - data + type: object + IncidentCommunicationResponse: + description: Response with a single communication. + properties: + data: + $ref: "#/components/schemas/IncidentCommunicationDataResponse" + required: + - data + type: object + IncidentCommunicationType: + description: Incident communication resource type. + enum: + - communication + example: communication + type: string + x-enum-varnames: + - COMMUNICATION + IncidentCommunicationsResponse: + description: Response with a list of communications. + properties: + data: + description: List of communications. + items: + $ref: "#/components/schemas/IncidentCommunicationDataResponse" + type: array + required: + - data + type: object IncidentCreateAttributes: description: The incident's attributes for a create request. properties: @@ -33574,6 +34195,35 @@ components: required: - data type: object + IncidentCreateZoomMeetingData: + description: Data for creating a Zoom meeting. + properties: + attributes: + $ref: "#/components/schemas/IncidentCreateZoomMeetingDataAttributes" + type: + $ref: "#/components/schemas/IncidentZoomIntegrationType" + required: + - type + - attributes + type: object + IncidentCreateZoomMeetingDataAttributes: + description: Attributes for creating a Zoom meeting. + properties: + topic: + description: The topic of the Zoom meeting. + example: "Incident INC-123 War Room" + type: string + required: + - topic + type: object + IncidentCreateZoomMeetingRequest: + description: Request to create a Zoom meeting for an incident. + properties: + data: + $ref: "#/components/schemas/IncidentCreateZoomMeetingData" + required: + - data + type: object IncidentFieldAttributes: description: Dynamic fields for which selections can be made, with field names as keys. oneOf: @@ -33631,6 +34281,92 @@ components: - TEXTARRAY - METRICTAG - AUTOCOMPLETE + IncidentGoogleMeetIntegrationDataAttributes: + description: Attributes of a Google Meet integration metadata. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: google_meet + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + spaces: + description: List of Google Meet spaces. + items: + $ref: "#/components/schemas/IncidentGoogleMeetSpace" + type: array + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - spaces + - created + - modified + type: object + IncidentGoogleMeetIntegrationDataResponse: + description: Google Meet integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentGoogleMeetIntegrationResponse: + description: Response with Google Meet integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationDataResponse" + required: + - data + type: object + IncidentGoogleMeetIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentGoogleMeetSpace: + description: A Google Meet space associated with an incident. + properties: + join_url: + description: The URL to join the Google Meet space. + example: https://meet.google.com/abc-defg-hij + type: string + meeting_code: + description: The meeting code for the space. + example: abc-defg-hij + type: string + name: + description: The name of the Google Meet space. + example: spaces/abc123 + type: string + required: + - name + - join_url + - meeting_code + type: object IncidentHandleAttributesFields: description: Dynamic fields associated with the handle example: @@ -34454,6 +35190,579 @@ components: last_modified_by_user: $ref: "#/components/schemas/RelationshipToUser" type: object + IncidentJiraIssueDataAttributesRequest: + description: Attributes for creating a Jira issue from an incident. + properties: + account_id: + description: The Jira account identifier. + example: "123456" + type: string + issue_type_id: + description: The Jira issue type identifier. + example: "10001" + type: string + project_id: + description: The Jira project identifier. + example: "10000" + type: string + template_id: + description: The identifier of the Jira template to use. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + required: + - account_id + - project_id + - issue_type_id + type: object + IncidentJiraIssueDataRequest: + description: Jira issue data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraIssueDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentJiraIssueType" + required: + - type + - attributes + type: object + IncidentJiraIssueIntegrationDataAttributes: + description: Attributes of a Jira issue integration. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: jira + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - created + - modified + type: object + IncidentJiraIssueIntegrationDataResponse: + description: Jira issue integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentJiraIssueIntegrationResponse: + description: Response with Jira issue integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationDataResponse" + required: + - data + type: object + IncidentJiraIssueIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentJiraIssueRequest: + description: Request to create a Jira issue from an incident. + properties: + data: + $ref: "#/components/schemas/IncidentJiraIssueDataRequest" + required: + - data + type: object + IncidentJiraIssueType: + description: Incident Jira issue resource type. + enum: + - incident_jira_issues + example: incident_jira_issues + type: string + x-enum-varnames: + - INCIDENT_JIRA_ISSUES + IncidentJiraTemplateDataAttributesRequest: + description: Attributes for creating or updating an incident Jira template. + properties: + account_id: + description: The Jira account identifier. + example: "123456" + type: string + field_configurations: + description: Field configuration mappings. + items: + $ref: "#/components/schemas/IncidentJiraTemplateFieldConfiguration" + type: array + fields: + additionalProperties: {} + description: The Jira fields configuration. + type: object + is_default: + description: Whether this is the default template. + example: false + type: boolean + issue_id: + description: The Jira issue type identifier. + example: "10001" + type: string + mappings: + additionalProperties: {} + description: The field mappings configuration. + type: object + meta: + additionalProperties: {} + description: Additional metadata for the template. + type: object + name: + description: The name of the template. + example: Default Jira Template + type: string + project_id: + description: The Jira project identifier. + example: "10000" + type: string + project_key: + description: The Jira project key. + example: INC + type: string + sync_enabled: + description: Whether synchronization is enabled. + example: true + type: boolean + type: + description: The type of the template. + example: jira + type: string + required: + - account_id + - issue_id + - project_id + - project_key + type: object + IncidentJiraTemplateDataAttributesResponse: + description: Attributes of an incident Jira template. + properties: + account_id: + description: The Jira account identifier. + example: "123456" + type: string + created: + description: Timestamp when the template was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + created_by_uuid: + description: UUID of the user who created the template. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + field_configurations: + description: Field configuration mappings. + items: + $ref: "#/components/schemas/IncidentJiraTemplateFieldConfiguration" + type: array + fields: + additionalProperties: {} + description: The Jira fields configuration. + type: object + is_default: + description: Whether this is the default template. + example: false + type: boolean + issue_id: + description: The Jira issue type identifier. + example: "10001" + type: string + last_modified_by_uuid: + description: UUID of the user who last modified the template. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + mappings: + additionalProperties: {} + description: The field mappings configuration. + type: object + meta: + additionalProperties: {} + description: Additional metadata for the template. + type: object + modified: + description: Timestamp when the template was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + name: + description: The name of the template. + example: Default Jira Template + type: string + project_id: + description: The Jira project identifier. + example: "10000" + type: string + project_key: + description: The Jira project key. + example: INC + type: string + sync_enabled: + description: Whether synchronization is enabled. + example: true + type: boolean + type: + description: The type of the template. + example: jira + type: string + required: + - account_id + - issue_id + - project_id + - project_key + - name + - type + - is_default + - sync_enabled + - created + - modified + - created_by_uuid + - last_modified_by_uuid + type: object + IncidentJiraTemplateDataRequest: + description: Incident Jira template data for a create or update request. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraTemplateDataAttributesRequest" + relationships: + $ref: "#/components/schemas/IncidentJiraTemplateRelationships" + type: + $ref: "#/components/schemas/IncidentJiraTemplateType" + required: + - type + - attributes + type: object + IncidentJiraTemplateDataResponse: + description: Incident Jira template data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraTemplateDataAttributesResponse" + id: + description: The template identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentJiraTemplateRelationships" + type: + $ref: "#/components/schemas/IncidentJiraTemplateType" + required: + - id + - type + - attributes + type: object + IncidentJiraTemplateFieldConfiguration: + description: Configuration for a Jira field mapping. + properties: + custom_outbound_value: + description: Custom value for outbound synchronization. + incident_field: + description: The incident field to map to. + example: title + nullable: true + type: string + jira_field_key: + description: The Jira field key. + example: summary + type: string + jira_field_type: + description: The type of the Jira field. + example: string + nullable: true + type: string + sync_direction: + description: The direction of synchronization. + example: bidirectional + type: string + value_mapping: + additionalProperties: + type: string + description: Mapping of values between incident and Jira fields. + type: object + required: + - jira_field_key + - sync_direction + type: object + IncidentJiraTemplateIncidentTypeRelationship: + description: Relationship to an incident type. + properties: + data: + $ref: "#/components/schemas/IncidentJiraTemplateIncidentTypeRelationshipData" + required: + - data + type: object + IncidentJiraTemplateIncidentTypeRelationshipData: + description: Incident type relationship data. + properties: + id: + description: The incident type identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The incident type resource type. + example: incident_types + type: string + required: + - id + - type + type: object + IncidentJiraTemplateRelationships: + description: Relationships for an incident Jira template. + properties: + incident_type: + $ref: "#/components/schemas/IncidentJiraTemplateIncidentTypeRelationship" + type: object + IncidentJiraTemplateRequest: + description: Create or update request for an incident Jira template. + properties: + data: + $ref: "#/components/schemas/IncidentJiraTemplateDataRequest" + required: + - data + type: object + IncidentJiraTemplateResponse: + description: Response with a single incident Jira template. + properties: + data: + $ref: "#/components/schemas/IncidentJiraTemplateDataResponse" + required: + - data + type: object + IncidentJiraTemplateType: + description: Incident Jira template resource type. + enum: + - incidents_jira_templates + example: incidents_jira_templates + type: string + x-enum-varnames: + - INCIDENTS_JIRA_TEMPLATES + IncidentJiraTemplatesResponse: + description: Response with a list of incident Jira templates. + properties: + data: + description: List of incident Jira templates. + items: + $ref: "#/components/schemas/IncidentJiraTemplateDataResponse" + type: array + required: + - data + type: object + IncidentMSTeamsChannel: + description: A Microsoft Teams channel associated with an incident. + properties: + ms_channel_id: + description: The Teams channel identifier. + example: "19:abc123@thread.tacv2" + type: string + ms_channel_name: + description: The name of the Teams channel. + example: incidents-channel + type: string + ms_team_id: + description: The Teams team identifier. + example: "00000000-0000-0000-0000-000000000000" + type: string + ms_tenant_id: + description: The Teams tenant identifier. + example: "00000000-0000-0000-0000-000000000000" + type: string + redirect_url: + description: The redirect URL for the channel. + example: https://teams.microsoft.com/l/channel/abc123 + type: string + team_name: + description: The name of the Teams team. + example: Incident Response + type: string + required: + - ms_channel_name + - ms_channel_id + type: object + IncidentMSTeamsIntegrationDataAttributes: + description: Attributes of a Microsoft Teams integration metadata. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: ms_teams + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + teams: + description: List of Microsoft Teams channels. + items: + $ref: "#/components/schemas/IncidentMSTeamsChannel" + type: array + required: + - status + - integration_type + - teams + - created + - modified + type: object + IncidentMSTeamsIntegrationDataResponse: + description: Microsoft Teams integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentMSTeamsIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentMicrosoftTeamsIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentMSTeamsIntegrationResponse: + description: Response with Microsoft Teams integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentMSTeamsIntegrationDataResponse" + required: + - data + type: object + IncidentMicrosoftTeamsConfigurationDataAttributesRequest: + description: Attributes for creating or updating a Microsoft Teams configuration. + properties: + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + type: object + IncidentMicrosoftTeamsConfigurationDataAttributesResponse: + description: Attributes of a Microsoft Teams configuration. + properties: + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + modified_at: + description: Timestamp when the configuration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + required: + - manual_meeting_creation + - post_meeting_summary + - created_at + - modified_at + type: object + IncidentMicrosoftTeamsConfigurationDataRequest: + description: Microsoft Teams configuration data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationType" + required: + - type + - attributes + type: object + IncidentMicrosoftTeamsConfigurationDataResponse: + description: Microsoft Teams configuration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataAttributesResponse" + id: + description: The configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationType" + required: + - id + - type + - attributes + type: object + IncidentMicrosoftTeamsConfigurationRequest: + description: Request to create or update a Microsoft Teams configuration. + properties: + data: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataRequest" + required: + - data + type: object + IncidentMicrosoftTeamsConfigurationResponse: + description: Response with a Microsoft Teams configuration. + properties: + data: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataResponse" + required: + - data + type: object + IncidentMicrosoftTeamsConfigurationType: + description: Microsoft Teams configuration resource type. + enum: + - microsoft_teams_configurations + example: microsoft_teams_configurations + type: string + x-enum-varnames: + - MICROSOFT_TEAMS_CONFIGURATIONS + IncidentMicrosoftTeamsIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS IncidentNonDatadogCreator: description: Incident's non Datadog creator. nullable: true @@ -34967,6 +36276,93 @@ components: - id - type type: object + IncidentPagerdutyIncidentDataResponse: + description: Incident data related to a PagerDuty incident. + properties: + id: + description: The Datadog incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The incident resource type. + example: incidents + type: string + required: + - id + - type + type: object + IncidentPagerdutyRelatedIncidentsResponse: + description: Response with a list of Datadog incidents related to a PagerDuty incident. + properties: + data: + description: List of related Datadog incidents. + items: + $ref: "#/components/schemas/IncidentPagerdutyIncidentDataResponse" + type: array + required: + - data + type: object + IncidentPagerdutyServiceData: + description: PagerDuty service data. + properties: + attributes: + $ref: "#/components/schemas/IncidentPagerdutyServiceDataAttributes" + id: + description: The PagerDuty service identifier. + example: P1234AB + type: string + type: + $ref: "#/components/schemas/IncidentPagerdutyServiceType" + required: + - id + - type + - attributes + type: object + IncidentPagerdutyServiceDataAttributes: + description: Attributes of a PagerDuty service. + properties: + handle: + description: The handle for the PagerDuty service. + example: my-pagerduty-service + type: string + name: + description: The name of the PagerDuty service. + example: My PagerDuty Service + type: string + service_id: + description: The PagerDuty service identifier. + example: P1234AB + type: string + webhooks_enabled: + description: Whether webhooks are enabled for this service. + example: true + type: boolean + required: + - name + - service_id + - webhooks_enabled + - handle + type: object + IncidentPagerdutyServiceType: + description: PagerDuty service resource type. + enum: + - pagerduty_service + example: pagerduty_service + type: string + x-enum-varnames: + - PAGERDUTY_SERVICE + IncidentPagerdutyServicesResponse: + description: Response with a list of PagerDuty services. + properties: + data: + description: List of PagerDuty services. + items: + $ref: "#/components/schemas/IncidentPagerdutyServiceData" + type: array + required: + - data + type: object IncidentPostmortemType: default: incident_postmortems description: Incident postmortem resource type. @@ -34998,6 +36394,180 @@ components: - type - id type: object + IncidentRenderTemplateDataAttributesRequest: + description: Attributes for rendering a template. + properties: + content: + description: The template content to render. + example: "Incident INC-123 is SEV-1." + type: string + datetime_format: + description: The date-time format to use for rendering. + example: "2006-01-02T15:04:05Z07:00" + type: string + timezone: + description: The timezone to use for rendering. + example: America/New_York + type: string + validate_links: + description: Whether to validate links in the rendered template. + example: false + nullable: true + type: boolean + validate_variables: + description: Whether to validate variables in the template. + example: false + nullable: true + type: boolean + required: + - content + type: object + IncidentRenderTemplateDataRequest: + description: Data for rendering a template. + properties: + attributes: + $ref: "#/components/schemas/IncidentRenderTemplateDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentRenderedTemplateType" + required: + - type + - attributes + type: object + IncidentRenderTemplateRequest: + description: Request to render a template. + properties: + data: + $ref: "#/components/schemas/IncidentRenderTemplateDataRequest" + required: + - data + type: object + IncidentRenderedTemplateData: + description: Rendered template data. + properties: + attributes: + $ref: "#/components/schemas/IncidentRenderedTemplateDataAttributes" + id: + description: The rendered template identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentRenderedTemplateType" + required: + - id + - type + - attributes + type: object + IncidentRenderedTemplateDataAttributes: + description: Attributes of a rendered template. + properties: + rendered_content: + description: The rendered template content. + example: "Incident Server Down is SEV-1." + type: string + required: + - rendered_content + type: object + IncidentRenderedTemplateResponse: + description: Response with a rendered template. + properties: + data: + $ref: "#/components/schemas/IncidentRenderedTemplateData" + required: + - data + type: object + IncidentRenderedTemplateType: + description: Rendered template resource type. + enum: + - rendered_templates + example: rendered_templates + type: string + x-enum-varnames: + - RENDERED_TEMPLATES + IncidentReservedRoleDataAttributesResponse: + description: Attributes of a reserved role. + properties: + created: + description: Timestamp when the role was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + description: + description: A description of the reserved role. + example: The incident commander. + nullable: true + type: string + modified: + description: Timestamp when the role was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + name: + description: The name of the reserved role. + example: commander + type: string + policy: + $ref: "#/components/schemas/IncidentReservedRolePolicy" + required: + - name + - policy + - created + - modified + type: object + IncidentReservedRoleDataResponse: + description: Reserved role data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentReservedRoleDataAttributesResponse" + id: + description: The reserved role identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentReservedRoleType" + required: + - id + - type + - attributes + type: object + IncidentReservedRolePolicy: + description: Policy for a reserved role. + properties: + is_single: + description: Whether this role can only be assigned to a single responder. + example: true + type: boolean + required: + - is_single + type: object + IncidentReservedRoleResponse: + description: Response with a single reserved role. + properties: + data: + $ref: "#/components/schemas/IncidentReservedRoleDataResponse" + required: + - data + type: object + IncidentReservedRoleType: + description: Incident reserved role resource type. + enum: + - incident_reserved_roles + example: incident_reserved_roles + type: string + x-enum-varnames: + - INCIDENT_RESERVED_ROLES + IncidentReservedRolesResponse: + description: Response with a list of reserved roles. + properties: + data: + description: List of reserved roles. + items: + $ref: "#/components/schemas/IncidentReservedRoleDataResponse" + type: array + required: + - data + type: object IncidentResourceType: description: Incident resource type enum: @@ -35241,6 +36811,310 @@ components: user_defined_fields: $ref: "#/components/schemas/RelationshipToIncidentUserDefinedFields" type: object + IncidentRoleAssignmentDataAttributesRequest: + description: Attributes for creating a role assignment. + properties: + role: + description: The name of the role to assign. + example: commander + nullable: true + type: string + type: object + IncidentRoleAssignmentDataAttributesResponse: + description: Attributes of an incident role assignment. + properties: + created: + description: Timestamp when the role assignment was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + modified: + description: Timestamp when the role assignment was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + responder_type: + description: The type of the responder. + example: user + type: string + role: + description: The name of the assigned role. + example: commander + type: string + required: + - role + - responder_type + - created + - modified + type: object + IncidentRoleAssignmentDataRequest: + description: Role assignment data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentRoleAssignmentDataAttributesRequest" + relationships: + $ref: "#/components/schemas/IncidentRoleAssignmentRelationshipsRequest" + type: + $ref: "#/components/schemas/IncidentRoleAssignmentType" + required: + - type + - relationships + type: object + IncidentRoleAssignmentDataResponse: + description: Role assignment data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentRoleAssignmentDataAttributesResponse" + id: + description: The role assignment identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentRoleAssignmentRelationshipsResponse" + type: + $ref: "#/components/schemas/IncidentRoleAssignmentType" + required: + - id + - type + - attributes + type: object + IncidentRoleAssignmentRelationshipsRequest: + description: Relationships for creating a role assignment. + properties: + reserved_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + responder: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + user_defined_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + required: + - responder + type: object + IncidentRoleAssignmentRelationshipsResponse: + description: Relationships of a role assignment. + properties: + created_by_user: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + last_modified_by_user: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + reserved_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + responder: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + user_defined_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + required: + - responder + type: object + IncidentRoleAssignmentRequest: + description: Request to create a role assignment. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentDataRequest" + required: + - data + type: object + IncidentRoleAssignmentResponderRelationship: + description: Relationship to a responder. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationshipData" + required: + - data + type: object + IncidentRoleAssignmentResponderRelationshipData: + description: Responder relationship data. + properties: + id: + description: The responder identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The responder resource type. + example: users + type: string + required: + - id + - type + type: object + IncidentRoleAssignmentResponse: + description: Response with a single role assignment. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentDataResponse" + required: + - data + type: object + IncidentRoleAssignmentRoleRelationship: + description: Relationship to a role. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationshipData" + type: object + IncidentRoleAssignmentRoleRelationshipData: + description: Role relationship data. + properties: + id: + description: The role identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The role resource type. + example: incident_reserved_roles + type: string + required: + - id + - type + type: object + IncidentRoleAssignmentType: + description: Incident role assignment resource type. + enum: + - incident_role_assignments + example: incident_role_assignments + type: string + x-enum-varnames: + - INCIDENT_ROLE_ASSIGNMENTS + IncidentRuleExecutionStateDataAttributesResponse: + description: Attributes of an incident rule execution state. + properties: + created: + description: Timestamp when the state was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incident_uuid: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + last_executed_at: + description: Timestamp of the last rule execution. + example: "2024-01-01T00:00:00.000Z" + format: date-time + nullable: true + type: string + modified: + description: Timestamp when the state was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + rule_uuid: + description: The rule identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + required: + - rule_uuid + - incident_uuid + - created + - modified + type: object + IncidentRuleExecutionStateDataResponse: + description: Rule execution state data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentRuleExecutionStateDataAttributesResponse" + id: + description: The rule execution state identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentRuleExecutionStateType" + required: + - id + - type + - attributes + type: object + IncidentRuleExecutionStateRule: + description: A rule in a batch request. + properties: + last_executed_at: + description: Timestamp of the last rule execution. + example: "2024-01-01T00:00:00.000Z" + format: date-time + nullable: true + type: string + rule_uuid: + description: The rule identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + required: + - rule_uuid + type: object + IncidentRuleExecutionStateType: + description: Incident rule execution state resource type. + enum: + - incident_rule_execution_states + example: incident_rule_execution_states + type: string + x-enum-varnames: + - INCIDENT_RULE_EXECUTION_STATES + IncidentRuleExecutionStatesResponse: + description: Response with a list of rule execution states. + properties: + data: + description: List of rule execution states. + items: + $ref: "#/components/schemas/IncidentRuleExecutionStateDataResponse" + type: array + required: + - data + type: object + IncidentSearchIncidentsExportRequest: + description: Request to export incidents as CSV. + properties: + fields: + description: The list of fields to include in the export. + example: + - title + - severity + - state + items: + type: string + type: array + query: + description: The search query to filter incidents for export. + example: "state:active" + type: string + required: + - query + - fields + type: object + IncidentSearchIncidentsIncludeType: + description: Types of related objects to include. + enum: + - incident_type + - impacts + - users + - responders + - integrations + - attachments + type: string + x-enum-varnames: + - INCIDENT_TYPE + - IMPACTS + - USERS + - RESPONDERS + - INTEGRATIONS + - ATTACHMENTS + IncidentSearchIncidentsSortOrder: + description: The ways searched incidents can be sorted. + enum: + - created + - -created + - modified + - -modified + type: string + x-enum-varnames: + - CREATED_ASCENDING + - CREATED_DESCENDING + - MODIFIED_ASCENDING + - MODIFIED_DESCENDING IncidentSearchResponse: description: Response with incidents and facets. properties: @@ -35638,6 +37512,531 @@ components: - SEV_3 - SEV_4 - SEV_5 + IncidentStatusPageNoticeCreateData: + description: Data for publishing a status page notice. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPageNoticeCreateDataAttributes" + type: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationType" + required: + - type + - attributes + type: object + IncidentStatusPageNoticeCreateDataAttributes: + description: Attributes for publishing a status page notice. + properties: + components: + additionalProperties: + type: string + description: Map of component identifiers to their status. + example: + component_1: degraded_performance + type: object + message: + description: The message body of the notice. + example: We are investigating reports of elevated error rates. + type: string + status: + description: The status of the notice. + example: investigating + type: string + title: + description: The title of the notice. + example: Service degradation detected. + type: string + type: object + IncidentStatusPageNoticeCreateRequest: + description: Request to publish a status page notice. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPageNoticeCreateData" + required: + - data + type: object + IncidentStatusPageNoticeIntegrationDataAttributes: + description: Attributes of a status page notice integration. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: statuspage + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - created + - modified + type: object + IncidentStatusPageNoticeIntegrationDataResponse: + description: Status page notice integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentStatusPageNoticeIntegrationResponse: + description: Response with status page notice integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationDataResponse" + required: + - data + type: object + IncidentStatusPageNoticeIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentStatusPageNoticeUpdateData: + description: Data for updating a status page notice. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPageNoticeUpdateDataAttributes" + type: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationType" + required: + - type + - attributes + type: object + IncidentStatusPageNoticeUpdateDataAttributes: + description: Attributes for updating a status page notice. + properties: + components: + additionalProperties: + type: string + description: Map of component identifiers to their status. + type: object + message: + description: The message body of the notice. + example: The issue has been resolved. + type: string + status: + description: The status of the notice. + example: resolved + type: string + title: + description: The title of the notice. + example: Service degradation resolved. + type: string + type: object + IncidentStatusPageNoticeUpdateRequest: + description: Request to update a status page notice. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPageNoticeUpdateData" + required: + - data + type: object + IncidentStatusPagesSuggestionData: + description: Status pages suggestion data. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionDataAttributes" + id: + description: The suggestion title. + example: Service Degradation Detected + type: string + type: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionType" + required: + - id + - type + - attributes + type: object + IncidentStatusPagesSuggestionDataAttributes: + description: Attributes of a status pages suggestion. + properties: + status: + description: The suggested status for the status page. + example: investigating + type: string + update_text: + description: The suggested update text for the status page notice. + example: We are investigating reports of elevated error rates. + type: string + required: + - status + - update_text + type: object + IncidentStatusPagesSuggestionResponse: + description: Response with a status pages suggestion. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionData" + required: + - data + type: object + IncidentStatusPagesSuggestionType: + description: Incident status pages suggestion resource type. + enum: + - incident_statuspages_suggestion + example: incident_statuspages_suggestion + type: string + x-enum-varnames: + - INCIDENT_STATUSPAGES_SUGGESTION + IncidentStatuspageIncidentDataAttributesRequest: + description: Attributes for creating or updating a Statuspage incident. + properties: + body: + description: The body text of the Statuspage incident. + example: We are investigating the issue. + nullable: true + type: string + components: + additionalProperties: + type: string + description: Map of component identifiers to their status. + type: object + deliver_notifications: + description: Whether to deliver notifications. + example: true + nullable: true + type: boolean + impact: + description: The impact level of the incident. + example: major + nullable: true + type: string + name: + description: The name of the Statuspage incident. + example: Service Outage + nullable: true + type: string + page_id: + description: The Statuspage page identifier. + example: abc123 + type: string + status: + description: The status of the Statuspage incident. + example: investigating + nullable: true + type: string + type: object + IncidentStatuspageIncidentDataAttributesResponse: + description: Attributes of a Statuspage incident integration. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incidents: + description: List of Statuspage incidents. + items: + $ref: "#/components/schemas/IncidentStatuspageIncidentEntry" + type: array + integration_type: + description: The type of integration. + example: statuspage + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - created + - modified + type: object + IncidentStatuspageIncidentDataRequest: + description: Statuspage incident data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentStatuspageIncidentType" + required: + - type + - attributes + type: object + IncidentStatuspageIncidentDataResponse: + description: Statuspage incident data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataAttributesResponse" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentStatuspageIncidentType" + required: + - id + - type + - attributes + type: object + IncidentStatuspageIncidentEntry: + description: A Statuspage incident entry. + properties: + incident_id: + description: The Datadog incident identifier. + example: "12345" + type: string + page_id: + description: The Statuspage page identifier. + example: abc123 + type: string + redirect_url: + description: The URL of the Statuspage incident. + example: https://status.example.com/incidents/abc123 + type: string + required: + - incident_id + - page_id + type: object + IncidentStatuspageIncidentRequest: + description: Request to create or update a Statuspage incident. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataRequest" + required: + - data + type: object + IncidentStatuspageIncidentResponse: + description: Response with Statuspage incident integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataResponse" + required: + - data + type: object + IncidentStatuspageIncidentType: + description: Statuspage incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentStatuspagePreferencesData: + description: Subscription preferences data. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspagePreferencesDataAttributes" + id: + description: The preferences identifier. + example: "12345" + type: string + type: + $ref: "#/components/schemas/IncidentStatuspagePreferencesType" + required: + - id + - type + - attributes + type: object + IncidentStatuspagePreferencesDataAttributes: + description: Attributes of subscription preferences. + properties: + subscribed: + description: Whether the user is subscribed. + example: true + type: boolean + required: + - subscribed + type: object + IncidentStatuspagePreferencesResponse: + description: Response with subscription preferences. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspagePreferencesData" + required: + - data + type: object + IncidentStatuspagePreferencesType: + description: Subscription preferences resource type. + enum: + - statuspage_subscription_preferences + example: statuspage_subscription_preferences + type: string + x-enum-varnames: + - STATUSPAGE_SUBSCRIPTION_PREFERENCES + IncidentStatuspageSubscriptionDataAttributesRequest: + description: Attributes for creating an email subscription. + properties: + email: + description: The email address to subscribe. + example: user@example.com + type: string + required: + - email + type: object + IncidentStatuspageSubscriptionDataAttributesResponse: + description: Attributes of an email subscription. + properties: + confirmed: + description: Whether the subscription has been confirmed. + example: true + type: boolean + created_at: + description: Timestamp when the subscription was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + email: + description: The subscribed email address. + example: user@example.com + type: string + required: + - email + - confirmed + - created_at + type: object + IncidentStatuspageSubscriptionDataRequest: + description: Subscription data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionType" + required: + - type + - attributes + type: object + IncidentStatuspageSubscriptionDataResponse: + description: Email subscription data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataAttributesResponse" + id: + description: The subscription identifier. + example: "12345" + type: string + type: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionType" + required: + - id + - type + - attributes + type: object + IncidentStatuspageSubscriptionRequest: + description: Request to create an email subscription. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataRequest" + required: + - data + type: object + IncidentStatuspageSubscriptionResponse: + description: Response with a single email subscription. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataResponse" + required: + - data + type: object + IncidentStatuspageSubscriptionType: + description: Statuspage email subscription resource type. + enum: + - statuspage_email_subscription + example: statuspage_email_subscription + type: string + x-enum-varnames: + - STATUSPAGE_EMAIL_SUBSCRIPTION + IncidentStatuspageSubscriptionsResponse: + description: Response with a list of email subscriptions. + properties: + data: + description: List of email subscriptions. + items: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataResponse" + type: array + required: + - data + type: object + IncidentTemplateVariableData: + description: Template variable data. + properties: + attributes: + $ref: "#/components/schemas/IncidentTemplateVariableDataAttributes" + id: + description: The template variable identifier. + example: incident.title + type: string + type: + $ref: "#/components/schemas/IncidentTemplateVariableType" + required: + - id + - type + - attributes + type: object + IncidentTemplateVariableDataAttributes: + description: Attributes of a template variable. + properties: + description: + description: A description of the template variable. + example: The title of the incident. + type: string + display_name: + description: The display name of the template variable. + example: Incident Title + type: string + domain: + description: The domain of the template variable. + example: incident + type: string + variable: + description: The variable name used in templates. + example: "incident.title" + type: string + required: + - display_name + - domain + - variable + - description + type: object + IncidentTemplateVariableType: + description: Template variable resource type. + enum: + - template_variables + example: template_variables + type: string + x-enum-varnames: + - TEMPLATE_VARIABLES + IncidentTemplateVariablesResponse: + description: Response with a list of template variables. + properties: + data: + description: List of template variables. + items: + $ref: "#/components/schemas/IncidentTemplateVariableData" + type: array + required: + - data + type: object IncidentTimelineCellCreateAttributes: description: The timeline cell's attributes for a create request. oneOf: @@ -35676,6 +38075,206 @@ components: nullable: false type: string type: object + IncidentTimelineCellSource: + description: The source of a timeline cell. + enum: + - slack + - microsoft_teams + - datadog + - api + example: api + type: string + x-enum-varnames: + - SLACK + - MICROSOFT_TEAMS + - DATADOG + - API + IncidentTimelineCellType: + description: The type of a timeline cell. + enum: + - markdown + - incident_status_change + - timestamp_change + - meeting_summary + - meeting_chat + - role_assignment_change + - postmortem_change + example: markdown + type: string + x-enum-varnames: + - MARKDOWN + - INCIDENT_STATUS_CHANGE + - TIMESTAMP_CHANGE + - MEETING_SUMMARY + - MEETING_CHAT + - ROLE_ASSIGNMENT_CHANGE + - POSTMORTEM_CHANGE + IncidentTimelineEntriesResponse: + description: Response with a list of timeline entries. + properties: + data: + description: List of timeline entries. + items: + $ref: "#/components/schemas/IncidentTimelineEntryDataResponse" + type: array + required: + - data + type: object + IncidentTimelineEntryContent: + description: The content of a timeline entry. + properties: + message: + description: The markdown message content. + example: Investigating the issue. + type: string + type: object + IncidentTimelineEntryDataAttributesRequest: + description: Attributes for creating or updating a timeline entry. + properties: + cell_type: + $ref: "#/components/schemas/IncidentTimelineCellType" + content: + $ref: "#/components/schemas/IncidentTimelineEntryContent" + display_time: + description: The display time for this timeline entry. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + important: + description: Whether this timeline entry is marked as important. + example: false + type: boolean + required: + - cell_type + - content + type: object + IncidentTimelineEntryDataAttributesResponse: + description: Attributes of a timeline entry. + properties: + cell_type: + $ref: "#/components/schemas/IncidentTimelineCellType" + content: + $ref: "#/components/schemas/IncidentTimelineEntryContent" + created: + description: Timestamp when the entry was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + display_time: + description: The display time for this timeline entry. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + important: + description: Whether this timeline entry is marked as important. + example: false + type: boolean + incident_id: + description: The incident identifier. + example: "12345" + type: string + modified: + description: Timestamp when the entry was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + parent_uuid: + description: UUID of the parent timeline entry. + example: 00000000-0000-0000-0000-000000000000 + nullable: true + type: string + source: + $ref: "#/components/schemas/IncidentTimelineCellSource" + required: + - incident_id + - cell_type + - content + - source + - display_time + - important + - created + - modified + type: object + IncidentTimelineEntryDataRequest: + description: Timeline entry data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimelineEntryDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentTimelineEntryType" + required: + - type + - attributes + type: object + IncidentTimelineEntryDataResponse: + description: Timeline entry data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimelineEntryDataAttributesResponse" + id: + description: The timeline entry identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentTimelineEntryType" + required: + - id + - type + - attributes + type: object + IncidentTimelineEntryRequest: + description: Request to create or update a timeline entry. + properties: + data: + $ref: "#/components/schemas/IncidentTimelineEntryDataRequest" + required: + - data + type: object + IncidentTimelineEntryResponse: + description: Response with a single timeline entry. + properties: + data: + $ref: "#/components/schemas/IncidentTimelineEntryDataResponse" + required: + - data + type: object + IncidentTimelineEntryType: + description: Incident timeline entry resource type. + enum: + - incident_timeline_cells + example: incident_timeline_cells + type: string + x-enum-varnames: + - INCIDENT_TIMELINE_CELLS + IncidentTimelineThreadDataResponse: + description: Thread data for a timeline entry. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimelineEntryDataAttributesResponse" + id: + description: The thread entry identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentTimelineEntryType" + required: + - id + - type + - attributes + type: object + IncidentTimelineThreadResponse: + description: Response with thread entries for a timeline entry. + properties: + data: + description: List of thread entries. + items: + $ref: "#/components/schemas/IncidentTimelineThreadDataResponse" + type: array + required: + - data + type: object IncidentTodoAnonymousAssignee: description: Anonymous assignee entity. properties: @@ -36624,6 +39223,200 @@ components: - display_name - value type: object + IncidentZoomConfigurationDataAttributesRequest: + description: Attributes for creating or updating a Zoom configuration. + properties: + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + meeting_chat_timeline_sync: + description: Whether meeting chat timeline sync is enabled. + example: false + type: boolean + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + type: object + IncidentZoomConfigurationDataAttributesResponse: + description: Attributes of a Zoom configuration. + properties: + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + meeting_chat_timeline_sync: + description: Whether meeting chat timeline sync is enabled. + example: false + type: boolean + modified_at: + description: Timestamp when the configuration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + required: + - manual_meeting_creation + - post_meeting_summary + - meeting_chat_timeline_sync + - created_at + - modified_at + type: object + IncidentZoomConfigurationDataRequest: + description: Zoom configuration data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentZoomConfigurationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentZoomConfigurationType" + required: + - type + - attributes + type: object + IncidentZoomConfigurationDataResponse: + description: Zoom configuration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentZoomConfigurationDataAttributesResponse" + id: + description: The configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentZoomConfigurationType" + required: + - id + - type + - attributes + type: object + IncidentZoomConfigurationRequest: + description: Request to create or update a Zoom configuration. + properties: + data: + $ref: "#/components/schemas/IncidentZoomConfigurationDataRequest" + required: + - data + type: object + IncidentZoomConfigurationResponse: + description: Response with a Zoom configuration. + properties: + data: + $ref: "#/components/schemas/IncidentZoomConfigurationDataResponse" + required: + - data + type: object + IncidentZoomConfigurationType: + description: Zoom configuration resource type. + enum: + - zoom_configurations + example: zoom_configurations + type: string + x-enum-varnames: + - ZOOM_CONFIGURATIONS + IncidentZoomIntegrationDataAttributes: + description: Attributes of a Zoom integration metadata. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: zoom + type: string + meetings: + description: List of Zoom meetings. + items: + $ref: "#/components/schemas/IncidentZoomMeeting" + type: array + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - meetings + - created + - modified + type: object + IncidentZoomIntegrationDataResponse: + description: Zoom integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentZoomIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentZoomIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentZoomIntegrationResponse: + description: Response with Zoom integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentZoomIntegrationDataResponse" + required: + - data + type: object + IncidentZoomIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentZoomMeeting: + description: A Zoom meeting associated with an incident. + properties: + host_id: + description: The Zoom host identifier. + example: abc123 + type: string + join_url: + description: The URL to join the meeting. + example: https://zoom.us/j/1234567890 + type: string + meeting_id: + description: The Zoom meeting identifier. + example: 1234567890 + format: int64 + type: integer + password: + description: The meeting password. + example: abc123 + type: string + recording_url: + description: The URL of the meeting recording. + example: https://zoom.us/rec/share/abc123 + type: string + required: + - join_url + - meeting_id + type: object IncidentsResponse: description: Response with a list of incidents. properties: @@ -104250,6 +107043,475 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/jira-templates: + get: + description: List all incident Jira templates for the organization. + operationId: ListIncidentJiraTemplates + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIsDefaultParameter" + - $ref: "#/components/parameters/IncidentJiraTemplateIncidentTypeIdParameter" + - $ref: "#/components/parameters/IncidentJiraTemplateTypeParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentJiraTemplatesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: List incident Jira templates + tags: + - Incidents + 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: Create a new incident Jira template for the organization. + operationId: CreateIncidentJiraTemplate + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + issue_id: "10001" + project_id: "10000" + project_key: INC + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + created: "2024-01-01T00:00:00.000Z" + created_by_uuid: 00000000-0000-0000-0000-000000000000 + is_default: false + issue_id: "10001" + last_modified_by_uuid: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + name: Default Jira Template + project_id: "10000" + project_key: INC + sync_enabled: true + type: jira + id: 00000000-0000-0000-0000-000000000000 + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident Jira template + tags: + - Incidents + 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/incidents/config/jira-templates/{template_id}: + delete: + description: Delete an incident Jira template by its identifier. + operationId: DeleteIncidentJiraTemplate + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Delete an incident Jira template + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the details of an incident Jira template by its identifier. + operationId: GetIncidentJiraTemplate + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + created: "2024-01-01T00:00:00.000Z" + created_by_uuid: 00000000-0000-0000-0000-000000000000 + is_default: false + issue_id: "10001" + last_modified_by_uuid: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + name: Default Jira Template + project_id: "10000" + project_key: INC + sync_enabled: true + type: jira + id: 00000000-0000-0000-0000-000000000000 + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: Get an incident Jira template + tags: + - Incidents + 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: Update an existing incident Jira template. + operationId: UpdateIncidentJiraTemplate + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + issue_id: "10001" + project_id: "10000" + project_key: INC + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + created: "2024-01-01T00:00:00.000Z" + created_by_uuid: 00000000-0000-0000-0000-000000000000 + is_default: false + issue_id: "10001" + last_modified_by_uuid: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + name: Default Jira Template + project_id: "10000" + project_key: INC + sync_enabled: true + type: jira + id: 00000000-0000-0000-0000-000000000000 + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident Jira template + tags: + - Incidents + 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/incidents/config/microsoft-teams-configurations: + post: + description: Create a Microsoft Teams configuration for incidents. + operationId: CreateIncidentMicrosoftTeamsConfiguration + parameters: + - $ref: "#/components/parameters/IncidentMicrosoftTeamsIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + post_meeting_summary: true + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident Microsoft Teams configuration + tags: + - Incidents + 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/incidents/config/microsoft-teams-configurations/{configuration_id}: + patch: + description: Update a Microsoft Teams configuration for incidents. + operationId: UpdateIncidentMicrosoftTeamsConfiguration + parameters: + - $ref: "#/components/parameters/IncidentMicrosoftTeamsConfigurationIdParameter" + - $ref: "#/components/parameters/IncidentMicrosoftTeamsIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + post_meeting_summary: true + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident Microsoft Teams configuration + tags: + - Incidents + 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/incidents/config/notification-rules: get: description: Lists all notification rules for the organization. Optionally filter by incident type. @@ -104488,6 +107750,100 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Partially updates an existing notification rule. + operationId: PatchIncidentNotificationRule + parameters: + - $ref: "#/components/parameters/IncidentNotificationRuleIDPathParameter" + - $ref: "#/components/parameters/IncidentNotificationRuleIncludeQueryParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + conditions: + - field: severity + values: + - SEV-1 + - SEV-2 + enabled: true + handles: + - "@team-email@company.com" + - "@slack-channel" + renotify_on: + - status + - severity + trigger: incident_created_trigger + visibility: organization + id: 00000000-0000-0000-0000-000000000001 + relationships: + incident_type: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_types + notification_template: + data: + id: 00000000-0000-0000-0000-000000000001 + type: notification_templates + type: incident_notification_rules + schema: + $ref: "#/components/schemas/PutIncidentNotificationRuleRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + conditions: + - field: severity + values: + - SEV-1 + - SEV-2 + created: "2024-01-01T00:00:00+00:00" + enabled: true + handles: + - "@team-email@example.com" + modified: "2024-01-01T00:00:00+00:00" + trigger: incident_created_trigger + visibility: organization + id: 00000000-0000-0000-0000-000000000001 + type: incident_notification_rules + schema: + $ref: "#/components/schemas/IncidentNotificationRule" + 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: + - incident_notification_settings_write + summary: Patch an incident notification rule + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - incident_notification_settings_write + 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 an existing notification rule with a complete replacement. operationId: UpdateIncidentNotificationRule @@ -105093,6 +108449,146 @@ 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/incidents/config/reserved-roles: + get: + description: List all reserved roles for incidents. + operationId: ListIncidentReservedRoles + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentReservedRolesResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: List incident reserved roles + tags: + - Incidents + 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/incidents/config/reserved-roles/{role_id}: + get: + description: Get the details of a reserved role by its identifier. + operationId: GetIncidentReservedRole + parameters: + - $ref: "#/components/parameters/IncidentReservedRoleIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + description: The incident commander. + modified: "2024-01-01T00:00:00.000Z" + name: commander + policy: + is_single: true + id: 00000000-0000-0000-0000-000000000000 + type: incident_reserved_roles + schema: + $ref: "#/components/schemas/IncidentReservedRoleResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: Get an incident reserved role + tags: + - Incidents + 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/incidents/config/template-variables: + get: + description: List all available template variables for incident templates. + operationId: ListIncidentTemplateVariables + parameters: + - $ref: "#/components/parameters/IncidentTemplateVariableFilterIncidentTypeParameter" + - $ref: "#/components/parameters/IncidentTemplateVariableIncludeFollowUpsParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentTemplateVariablesResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident template variables + tags: + - Incidents + 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/incidents/config/types: get: description: Get all incident types. @@ -105832,6 +109328,155 @@ 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/incidents/config/zoom-configurations: + post: + description: Create a Zoom configuration for incidents. + operationId: CreateIncidentZoomConfiguration + parameters: + - $ref: "#/components/parameters/IncidentZoomIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + meeting_chat_timeline_sync: false + post_meeting_summary: true + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + meeting_chat_timeline_sync: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident Zoom configuration + tags: + - Incidents + 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/incidents/config/zoom-configurations/{configuration_id}: + patch: + description: Update a Zoom configuration for incidents. + operationId: UpdateIncidentZoomConfiguration + parameters: + - $ref: "#/components/parameters/IncidentZoomConfigurationIdParameter" + - $ref: "#/components/parameters/IncidentZoomIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + meeting_chat_timeline_sync: false + post_meeting_summary: true + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + meeting_chat_timeline_sync: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident Zoom configuration + tags: + - Incidents + 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/incidents/import: post: description: |- @@ -105922,6 +109567,297 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/pagerduty/services: + get: + description: List all PagerDuty services configured for the organization. + operationId: ListIncidentPagerdutyServices + parameters: + - $ref: "#/components/parameters/PagerdutyIncludeUnresolvedParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentPagerdutyServicesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List PagerDuty services + tags: + - Incidents + 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/incidents/pagerduty/{pagerduty_incident_id}/relationships/incidents: + get: + description: Get the list of Datadog incidents attached to a PagerDuty incident. + operationId: GetIncidentPagerdutyRelatedIncidents + parameters: + - $ref: "#/components/parameters/PagerdutyIncidentIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentPagerdutyRelatedIncidentsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get PagerDuty related incidents + tags: + - Incidents + 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/incidents/role_assignments: + post: + description: Create a new role assignment for an incident. + operationId: CreateIncidentRoleAssignment + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + role: commander + relationships: + responder: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + type: incident_role_assignments + schema: + $ref: "#/components/schemas/IncidentRoleAssignmentRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + modified: "2024-01-01T00:00:00.000Z" + responder_type: user + role: commander + id: 00000000-0000-0000-0000-000000000000 + type: incident_role_assignments + schema: + $ref: "#/components/schemas/IncidentRoleAssignmentResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident role assignment + tags: + - Incidents + 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/incidents/role_assignments/{role_assignment_id}: + delete: + description: Delete a role assignment by its identifier. + operationId: DeleteIncidentRoleAssignment + parameters: + - $ref: "#/components/parameters/IncidentRoleAssignmentIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident role assignment + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the details of a role assignment by its identifier. + operationId: GetIncidentRoleAssignment + parameters: + - $ref: "#/components/parameters/IncidentRoleAssignmentIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + modified: "2024-01-01T00:00:00.000Z" + responder_type: user + role: commander + id: 00000000-0000-0000-0000-000000000000 + type: incident_role_assignments + schema: + $ref: "#/components/schemas/IncidentRoleAssignmentResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get an incident role assignment + tags: + - Incidents + 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/incidents/search: get: description: >- @@ -105980,6 +109916,285 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/search-incidents: + get: + description: Search for incidents using advanced filtering and pagination. + operationId: SearchIncidentsV2 + parameters: + - $ref: "#/components/parameters/IncidentSearchIncidentsQueryParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsSortParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsWithFacetsParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsWithDeletedParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsSemanticQueryParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsTimezoneParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsIncludeParameter" + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/PageOffset" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + facets: {} + incidents: [] + total: 0 + type: incidents_search_results + schema: + $ref: "#/components/schemas/IncidentSearchResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Search incidents + tags: + - Incidents + 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/incidents/search-incidents/export: + post: + description: Export incidents matching a search query as a CSV file. + operationId: ExportIncidents + requestBody: + content: + application/json: + examples: + default: + value: + fields: + - title + - severity + - state + query: "state:active" + schema: + $ref: "#/components/schemas/IncidentSearchIncidentsExportRequest" + required: true + responses: + "200": + content: + text/csv: + examples: + default: + value: "title,severity,state" + schema: + format: binary + type: string + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Export incidents + tags: + - Incidents + 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/incidents/statuspage/{incident_id}/statuspage-incidents: + post: + description: Create a Statuspage incident linked to a Datadog incident. + operationId: CreateIncidentStatuspageIncident + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + body: We are investigating the issue. + deliver_notifications: true + name: Service Outage + page_id: abc123 + status: investigating + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Statuspage incident + tags: + - Incidents + 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/incidents/statuspage/{incident_id}/statuspage-incidents/pages/{page_id}/incidents/{statuspage_incident_id}: + patch: + description: Update a Statuspage incident linked to a Datadog incident. + operationId: UpdateIncidentStatuspageIncident + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentStatuspagePageIdParameter" + - $ref: "#/components/parameters/IncidentStatuspageIncidentIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + body: The issue has been resolved. + deliver_notifications: true + name: Service Outage + page_id: abc123 + status: resolved + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident Statuspage incident + tags: + - Incidents + 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/incidents/{incident_id}: delete: description: Deletes an existing incident from the users organization. @@ -106461,6 +110676,592 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/automation-data/{key}: + get: + description: Get automation data for a given incident and key. + operationId: GetIncidentAutomationData + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentAutomationDataKeyParameter" + - $ref: "#/components/parameters/IncidentAutomationDataIncludeParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + key: workflow_status + updated_at: "2024-01-01T00:00:00.000Z" + value: completed + id: workflow_status + type: incidents_automation_data + schema: + $ref: "#/components/schemas/IncidentAutomationDataResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident automation data + tags: + - Incidents + 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: Create or update automation data for a given incident and key. + operationId: UpsertIncidentAutomationData + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentAutomationDataKeyParameter" + - $ref: "#/components/parameters/IncidentAutomationDataIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + value: completed + type: incidents_automation_data + schema: + $ref: "#/components/schemas/IncidentAutomationDataRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + key: workflow_status + updated_at: "2024-01-01T00:00:00.000Z" + value: completed + id: workflow_status + type: incidents_automation_data + schema: + $ref: "#/components/schemas/IncidentAutomationDataResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Upsert incident automation data + tags: + - Incidents + 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/incidents/{incident_id}/cases/source-link: + get: + description: Get the source link for a case associated with an incident. + operationId: GetIncidentCaseSourceLink + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + entity_id: "12345" + is_page: false + relationship: source + id: "12345" + type: case_link + schema: + $ref: "#/components/schemas/IncidentCaseLinkResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident case source link + tags: + - Incidents + 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/incidents/{incident_id}/communications: + get: + description: List all communications for a given incident. + operationId: ListIncidentCommunications + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationFilterTypeParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentCommunicationsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident communications + tags: + - Incidents + 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: Create a new communication for a given incident. + operationId: CreateIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Incident update for INC-123. + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Incident update for INC-123. + created: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000000 + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident communication + tags: + - Incidents + 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/incidents/{incident_id}/communications/{communication_id}: + delete: + description: Delete a communication for a given incident. + operationId: DeleteIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident communication + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the details of a communication for a given incident. + operationId: GetIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Incident update for INC-123. + created: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000000 + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get an incident communication + tags: + - Incidents + 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/). + patch: + description: Update a communication for a given incident. + operationId: UpdateIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Updated incident communication for INC-123. + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Updated incident communication for INC-123. + created: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000000 + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident communication + tags: + - Incidents + 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/incidents/{incident_id}/google-meet/space: + post: + description: Create a Google Meet space for a given incident. + operationId: CreateIncidentGoogleMeetSpace + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: google_meet + modified: "2024-01-01T00:00:00.000Z" + spaces: [] + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Google Meet space + tags: + - Incidents + 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/incidents/{incident_id}/impacts: get: description: Get all impacts for an incident. @@ -106604,6 +111405,198 @@ paths: operator: OR permissions: - incident_write + /api/v2/incidents/{incident_id}/jira-issues: + post: + description: Create a Jira issue linked to a given incident. + operationId: CreateIncidentJiraIssue + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + issue_type_id: "10001" + project_id: "10000" + type: incident_jira_issues + schema: + $ref: "#/components/schemas/IncidentJiraIssueRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: jira + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Jira issue + tags: + - Incidents + 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/incidents/{incident_id}/microsoft-teams-integration/online-meeting: + post: + description: Create a Microsoft Teams online meeting for a given incident. + operationId: CreateIncidentMSTeamsOnlineMeeting + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: ms_teams + modified: "2024-01-01T00:00:00.000Z" + status: active + teams: [] + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentMSTeamsIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Microsoft Teams online meeting + tags: + - Incidents + 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/incidents/{incident_id}/pages/source-link: + get: + description: Get the source link for a page associated with an incident. + operationId: GetIncidentPageSourceLink + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + entity_id: "12345" + is_page: true + relationship: source + id: "12345" + type: case_link + schema: + $ref: "#/components/schemas/IncidentCaseLinkResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident page source link + tags: + - Incidents + 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/incidents/{incident_id}/relationships/integrations: get: description: Get all integration metadata for an incident. @@ -107142,6 +112135,871 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/render-template: + post: + description: Render a template with incident-specific data. + operationId: RenderIncidentTemplate + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + content: "Incident INC-123 is SEV-1." + type: rendered_templates + schema: + $ref: "#/components/schemas/IncidentRenderTemplateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + rendered_content: "Incident Server Down is SEV-1." + id: 00000000-0000-0000-0000-000000000000 + type: rendered_templates + schema: + $ref: "#/components/schemas/IncidentRenderedTemplateResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Render an incident template + tags: + - Incidents + 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/incidents/{incident_id}/rule-execution-states: + get: + description: List all rule execution states for a given incident. + operationId: ListIncidentRuleExecutionStates + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRuleExecutionStatesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident rule execution states + tags: + - Incidents + 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/incidents/{incident_id}/rule-execution-states/batch: + post: + description: Batch create rule execution states for a given incident. + operationId: BatchCreateIncidentRuleExecutionStates + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + rules: + - rule_uuid: 00000000-0000-0000-0000-000000000000 + type: incident_rule_execution_states + schema: + $ref: "#/components/schemas/IncidentBatchCreateRuleExecutionStatesRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRuleExecutionStatesResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Batch create incident rule execution states + tags: + - Incidents + 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: Batch update rule execution states for a given incident. + operationId: BatchUpdateIncidentRuleExecutionStates + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + rules: + - last_executed_at: "2024-01-01T00:00:00.000Z" + rule_uuid: 00000000-0000-0000-0000-000000000000 + type: incident_rule_execution_states + schema: + $ref: "#/components/schemas/IncidentBatchUpdateRuleExecutionStatesRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRuleExecutionStatesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Batch update incident rule execution states + tags: + - Incidents + 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/incidents/{incident_id}/statuspages-suggestion: + get: + description: Get an AI-generated suggestion for a status page notice for a given incident. + operationId: GetIncidentStatusPagesSuggestion + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + status: investigating + update_text: We are investigating reports of elevated error rates. + id: Service Degradation Detected + type: incident_statuspages_suggestion + schema: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident status pages suggestion + tags: + - Incidents + 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/incidents/{incident_id}/statuspages/{statuspage_id}/notices: + post: + description: Publish a status page notice for a given incident. + operationId: CreateIncidentStatusPageNotice + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentStatusPageIdParameter" + - $ref: "#/components/parameters/IncidentStatusPageNotifySubscribersParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + components: + component_1: degraded_performance + message: We are investigating reports of elevated error rates. + status: investigating + title: Service degradation detected. + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeCreateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Publish an incident status page notice + tags: + - Incidents + 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/incidents/{incident_id}/statuspages/{statuspage_id}/notices/{notice_id}: + patch: + description: Update a status page notice for a given incident. + operationId: UpdateIncidentStatusPageNotice + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentStatusPageIdParameter" + - $ref: "#/components/parameters/IncidentStatusPageNoticeIdParameter" + - $ref: "#/components/parameters/IncidentStatusPageNotifySubscribersParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + message: The issue has been resolved. + status: resolved + title: Service degradation resolved. + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident status page notice + tags: + - Incidents + 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/incidents/{incident_id}/timeline: + get: + description: Get the timeline for a given incident. + operationId: ListIncidentTimelineEntries + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentTimelineEntriesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident timeline entries + tags: + - Incidents + 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: Create a new timeline entry for a given incident. + operationId: CreateIncidentTimelineEntry + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Investigating the issue. + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Investigating the issue. + created: "2024-01-01T00:00:00.000Z" + display_time: "2024-01-01T00:00:00.000Z" + important: false + incident_id: "12345" + modified: "2024-01-01T00:00:00.000Z" + source: api + id: 00000000-0000-0000-0000-000000000000 + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident timeline entry + tags: + - Incidents + 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/incidents/{incident_id}/timeline/{timeline_entry_id}: + delete: + description: Delete a timeline entry for a given incident. + operationId: DeleteIncidentTimelineEntry + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimelineEntryIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident timeline entry + tags: + - Incidents + 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/). + patch: + description: Update a timeline entry for a given incident. + operationId: UpdateIncidentTimelineEntry + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimelineEntryIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Updated investigation notes. + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Updated investigation notes. + created: "2024-01-01T00:00:00.000Z" + display_time: "2024-01-01T00:00:00.000Z" + important: false + incident_id: "12345" + modified: "2024-01-01T00:00:00.000Z" + source: api + id: 00000000-0000-0000-0000-000000000000 + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident timeline entry + tags: + - Incidents + 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/incidents/{incident_id}/timeline/{timeline_entry_id}/thread: + get: + description: Get the thread entries for a given timeline entry. + operationId: GetIncidentTimelineEntryThread + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimelineEntryIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentTimelineThreadResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident timeline entry thread + tags: + - Incidents + 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/incidents/{incident_id}/zoom/meeting: + post: + description: Create a Zoom meeting for a given incident. + operationId: CreateIncidentZoomMeeting + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + topic: "Incident INC-123 War Room" + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentCreateZoomMeetingRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: zoom + meetings: [] + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentZoomIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Zoom meeting + tags: + - Incidents + 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/integration/aws/accounts: get: description: Get a list of AWS Account Integration Configs. @@ -139061,6 +144919,48 @@ paths: operator: AND permissions: - status_pages_settings_read + /api/v2/statuspages/subscription/preferences: + get: + description: Get the subscription preferences for the current user. + operationId: GetStatuspageSubscriptionPreferences + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + subscribed: true + id: "12345" + type: statuspage_subscription_preferences + schema: + $ref: "#/components/schemas/IncidentStatuspagePreferencesResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get status page subscription preferences + tags: + - Incidents + 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/statuspages/{page_id}: delete: description: Deletes a status page by its ID. @@ -140168,6 +146068,103 @@ paths: - status_pages_settings_write - status_pages_public_page_publish - status_pages_internal_page_publish + /api/v2/statuspages/{page_id}/subscriptions/email: + get: + description: List all email subscriptions for a status page. + operationId: ListStatuspageEmailSubscriptions + parameters: + - $ref: "#/components/parameters/IncidentStatuspagePageIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionsResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List status page email subscriptions + tags: + - Incidents + 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: Create an email subscription for a status page. + operationId: CreateStatuspageEmailSubscription + parameters: + - $ref: "#/components/parameters/IncidentStatuspagePageIdPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + email: user@example.com + type: statuspage_email_subscription + schema: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + confirmed: true + created_at: "2024-01-01T00:00:00.000Z" + email: user@example.com + id: "12345" + type: statuspage_email_subscription + schema: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a status page email subscription + tags: + - Incidents + 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/statuspages/{page_id}/unpublish: post: description: Unpublishes a status page. For pages of type `public`, removes the status page from the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, removes the `status-pages/$domain_prefix/view` route from the Datadog organization and requires the `status_pages_internal_page_publish` permission. The `status_pages_settings_write` permission is temporarily honored as we migrate unpublishing functionality from the update status page endpoint to the unpublish status page endpoint. diff --git a/examples/v2/incidents/BatchCreateIncidentRuleExecutionStates.rb b/examples/v2/incidents/BatchCreateIncidentRuleExecutionStates.rb new file mode 100644 index 000000000000..4a052323a52d --- /dev/null +++ b/examples/v2/incidents/BatchCreateIncidentRuleExecutionStates.rb @@ -0,0 +1,22 @@ +# Batch create incident rule execution states returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.batch_create_incident_rule_execution_states".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentBatchCreateRuleExecutionStatesRequest.new({ + data: DatadogAPIClient::V2::IncidentBatchCreateRuleExecutionStatesData.new({ + attributes: DatadogAPIClient::V2::IncidentBatchCreateRuleExecutionStatesDataAttributes.new({ + rules: [ + DatadogAPIClient::V2::IncidentRuleExecutionStateRule.new({ + last_executed_at: "2024-01-01T00:00:00.000Z", + rule_uuid: "00000000-0000-0000-0000-000000000000", + }), + ], + }), + type: DatadogAPIClient::V2::IncidentRuleExecutionStateType::INCIDENT_RULE_EXECUTION_STATES, + }), +}) +p api_instance.batch_create_incident_rule_execution_states("incident_id", body) diff --git a/examples/v2/incidents/BatchUpdateIncidentRuleExecutionStates.rb b/examples/v2/incidents/BatchUpdateIncidentRuleExecutionStates.rb new file mode 100644 index 000000000000..d89df38d84f0 --- /dev/null +++ b/examples/v2/incidents/BatchUpdateIncidentRuleExecutionStates.rb @@ -0,0 +1,22 @@ +# Batch update incident rule execution states returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.batch_update_incident_rule_execution_states".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentBatchUpdateRuleExecutionStatesRequest.new({ + data: DatadogAPIClient::V2::IncidentBatchUpdateRuleExecutionStatesData.new({ + attributes: DatadogAPIClient::V2::IncidentBatchUpdateRuleExecutionStatesDataAttributes.new({ + rules: [ + DatadogAPIClient::V2::IncidentRuleExecutionStateRule.new({ + last_executed_at: "2024-01-01T00:00:00.000Z", + rule_uuid: "00000000-0000-0000-0000-000000000000", + }), + ], + }), + type: DatadogAPIClient::V2::IncidentRuleExecutionStateType::INCIDENT_RULE_EXECUTION_STATES, + }), +}) +p api_instance.batch_update_incident_rule_execution_states("incident_id", body) diff --git a/examples/v2/incidents/CreateIncidentCommunication.rb b/examples/v2/incidents/CreateIncidentCommunication.rb new file mode 100644 index 000000000000..177a0c4166fb --- /dev/null +++ b/examples/v2/incidents/CreateIncidentCommunication.rb @@ -0,0 +1,30 @@ +# Create an incident communication returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_communication".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentCommunicationRequest.new({ + data: DatadogAPIClient::V2::IncidentCommunicationDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentCommunicationDataAttributesRequest.new({ + communication_type: DatadogAPIClient::V2::IncidentCommunicationKind::MANUAL, + content: DatadogAPIClient::V2::IncidentCommunicationContent.new({ + grouping_key: "update-1", + handles: [ + DatadogAPIClient::V2::IncidentCommunicationContentHandle.new({ + created_at: "2024-01-01T00:00:00.000Z", + display_name: "#incidents-channel", + handle: "@slack-incidents-channel", + }), + ], + message: "Incident update for INC-123.", + status: 0, + subject: "Incident INC-123: Update", + }), + }), + type: DatadogAPIClient::V2::IncidentCommunicationType::COMMUNICATION, + }), +}) +p api_instance.create_incident_communication("incident_id", body) diff --git a/examples/v2/incidents/CreateIncidentGoogleMeetSpace.rb b/examples/v2/incidents/CreateIncidentGoogleMeetSpace.rb new file mode 100644 index 000000000000..7bb8bcc3fd91 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentGoogleMeetSpace.rb @@ -0,0 +1,8 @@ +# Create an incident Google Meet space returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_google_meet_space".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.create_incident_google_meet_space("incident_id") diff --git a/examples/v2/incidents/CreateIncidentJiraIssue.rb b/examples/v2/incidents/CreateIncidentJiraIssue.rb new file mode 100644 index 000000000000..1a39ea45da4f --- /dev/null +++ b/examples/v2/incidents/CreateIncidentJiraIssue.rb @@ -0,0 +1,20 @@ +# Create an incident Jira issue returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_jira_issue".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentJiraIssueRequest.new({ + data: DatadogAPIClient::V2::IncidentJiraIssueDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentJiraIssueDataAttributesRequest.new({ + account_id: "123456", + issue_type_id: "10001", + project_id: "10000", + template_id: "00000000-0000-0000-0000-000000000000", + }), + type: DatadogAPIClient::V2::IncidentJiraIssueType::INCIDENT_JIRA_ISSUES, + }), +}) +p api_instance.create_incident_jira_issue("incident_id", body) diff --git a/examples/v2/incidents/CreateIncidentJiraTemplate.rb b/examples/v2/incidents/CreateIncidentJiraTemplate.rb new file mode 100644 index 000000000000..654f6f50fde6 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentJiraTemplate.rb @@ -0,0 +1,40 @@ +# Create an incident Jira template returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_jira_template".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentJiraTemplateRequest.new({ + data: DatadogAPIClient::V2::IncidentJiraTemplateDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentJiraTemplateDataAttributesRequest.new({ + account_id: "123456", + field_configurations: [ + DatadogAPIClient::V2::IncidentJiraTemplateFieldConfiguration.new({ + incident_field: "title", + jira_field_key: "summary", + jira_field_type: "string", + sync_direction: "bidirectional", + }), + ], + is_default: false, + issue_id: "10001", + name: "Default Jira Template", + project_id: "10000", + project_key: "INC", + sync_enabled: true, + type: "jira", + }), + relationships: DatadogAPIClient::V2::IncidentJiraTemplateRelationships.new({ + incident_type: DatadogAPIClient::V2::IncidentJiraTemplateIncidentTypeRelationship.new({ + data: DatadogAPIClient::V2::IncidentJiraTemplateIncidentTypeRelationshipData.new({ + id: "00000000-0000-0000-0000-000000000000", + type: "incident_types", + }), + }), + }), + type: DatadogAPIClient::V2::IncidentJiraTemplateType::INCIDENTS_JIRA_TEMPLATES, + }), +}) +p api_instance.create_incident_jira_template(body) diff --git a/examples/v2/incidents/CreateIncidentMSTeamsOnlineMeeting.rb b/examples/v2/incidents/CreateIncidentMSTeamsOnlineMeeting.rb new file mode 100644 index 000000000000..3b21a471d369 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentMSTeamsOnlineMeeting.rb @@ -0,0 +1,8 @@ +# Create an incident Microsoft Teams online meeting returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_ms_teams_online_meeting".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.create_incident_ms_teams_online_meeting("incident_id") diff --git a/examples/v2/incidents/CreateIncidentMicrosoftTeamsConfiguration.rb b/examples/v2/incidents/CreateIncidentMicrosoftTeamsConfiguration.rb new file mode 100644 index 000000000000..198cb3206b73 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentMicrosoftTeamsConfiguration.rb @@ -0,0 +1,18 @@ +# Create an incident Microsoft Teams configuration returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_microsoft_teams_configuration".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationRequest.new({ + data: DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationDataAttributesRequest.new({ + manual_meeting_creation: false, + post_meeting_summary: true, + }), + type: DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationType::MICROSOFT_TEAMS_CONFIGURATIONS, + }), +}) +p api_instance.create_incident_microsoft_teams_configuration(body) diff --git a/examples/v2/incidents/CreateIncidentRoleAssignment.rb b/examples/v2/incidents/CreateIncidentRoleAssignment.rb new file mode 100644 index 000000000000..bcd270530912 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentRoleAssignment.rb @@ -0,0 +1,37 @@ +# Create an incident role assignment returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_role_assignment".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentRoleAssignmentRequest.new({ + data: DatadogAPIClient::V2::IncidentRoleAssignmentDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentRoleAssignmentDataAttributesRequest.new({ + role: "commander", + }), + relationships: DatadogAPIClient::V2::IncidentRoleAssignmentRelationshipsRequest.new({ + reserved_role: DatadogAPIClient::V2::IncidentRoleAssignmentRoleRelationship.new({ + data: DatadogAPIClient::V2::IncidentRoleAssignmentRoleRelationshipData.new({ + id: "00000000-0000-0000-0000-000000000000", + type: "incident_reserved_roles", + }), + }), + responder: DatadogAPIClient::V2::IncidentRoleAssignmentResponderRelationship.new({ + data: DatadogAPIClient::V2::IncidentRoleAssignmentResponderRelationshipData.new({ + id: "00000000-0000-0000-0000-000000000000", + type: "users", + }), + }), + user_defined_role: DatadogAPIClient::V2::IncidentRoleAssignmentRoleRelationship.new({ + data: DatadogAPIClient::V2::IncidentRoleAssignmentRoleRelationshipData.new({ + id: "00000000-0000-0000-0000-000000000000", + type: "incident_reserved_roles", + }), + }), + }), + type: DatadogAPIClient::V2::IncidentRoleAssignmentType::INCIDENT_ROLE_ASSIGNMENTS, + }), +}) +p api_instance.create_incident_role_assignment(body) diff --git a/examples/v2/incidents/CreateIncidentStatusPageNotice.rb b/examples/v2/incidents/CreateIncidentStatusPageNotice.rb new file mode 100644 index 000000000000..905a663ef749 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentStatusPageNotice.rb @@ -0,0 +1,22 @@ +# Publish an incident status page notice returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_status_page_notice".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentStatusPageNoticeCreateRequest.new({ + data: DatadogAPIClient::V2::IncidentStatusPageNoticeCreateData.new({ + attributes: DatadogAPIClient::V2::IncidentStatusPageNoticeCreateDataAttributes.new({ + components: { + component_1: "degraded_performance", + }, + message: "We are investigating reports of elevated error rates.", + status: "investigating", + title: "Service degradation detected.", + }), + type: DatadogAPIClient::V2::IncidentStatusPageNoticeIntegrationType::INCIDENT_INTEGRATIONS, + }), +}) +p api_instance.create_incident_status_page_notice("incident_id", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body) diff --git a/examples/v2/incidents/CreateIncidentStatuspageIncident.rb b/examples/v2/incidents/CreateIncidentStatuspageIncident.rb new file mode 100644 index 000000000000..9bab98ae2379 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentStatuspageIncident.rb @@ -0,0 +1,22 @@ +# Create an incident Statuspage incident returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_statuspage_incident".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentStatuspageIncidentRequest.new({ + data: DatadogAPIClient::V2::IncidentStatuspageIncidentDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentStatuspageIncidentDataAttributesRequest.new({ + body: "We are investigating the issue.", + deliver_notifications: true, + impact: "major", + name: "Service Outage", + page_id: "abc123", + status: "investigating", + }), + type: DatadogAPIClient::V2::IncidentStatuspageIncidentType::INCIDENT_INTEGRATIONS, + }), +}) +p api_instance.create_incident_statuspage_incident("incident_id", body) diff --git a/examples/v2/incidents/CreateIncidentTimelineEntry.rb b/examples/v2/incidents/CreateIncidentTimelineEntry.rb new file mode 100644 index 000000000000..6427d6dfa86a --- /dev/null +++ b/examples/v2/incidents/CreateIncidentTimelineEntry.rb @@ -0,0 +1,22 @@ +# Create an incident timeline entry returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_timeline_entry".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentTimelineEntryRequest.new({ + data: DatadogAPIClient::V2::IncidentTimelineEntryDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentTimelineEntryDataAttributesRequest.new({ + cell_type: DatadogAPIClient::V2::IncidentTimelineCellType::MARKDOWN, + content: DatadogAPIClient::V2::IncidentTimelineEntryContent.new({ + message: "Investigating the issue.", + }), + display_time: "2024-01-01T00:00:00.000Z", + important: false, + }), + type: DatadogAPIClient::V2::IncidentTimelineEntryType::INCIDENT_TIMELINE_CELLS, + }), +}) +p api_instance.create_incident_timeline_entry("incident_id", body) diff --git a/examples/v2/incidents/CreateIncidentZoomConfiguration.rb b/examples/v2/incidents/CreateIncidentZoomConfiguration.rb new file mode 100644 index 000000000000..370cdca48aa8 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentZoomConfiguration.rb @@ -0,0 +1,19 @@ +# Create an incident Zoom configuration returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_zoom_configuration".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentZoomConfigurationRequest.new({ + data: DatadogAPIClient::V2::IncidentZoomConfigurationDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentZoomConfigurationDataAttributesRequest.new({ + manual_meeting_creation: false, + meeting_chat_timeline_sync: false, + post_meeting_summary: true, + }), + type: DatadogAPIClient::V2::IncidentZoomConfigurationType::ZOOM_CONFIGURATIONS, + }), +}) +p api_instance.create_incident_zoom_configuration(body) diff --git a/examples/v2/incidents/CreateIncidentZoomMeeting.rb b/examples/v2/incidents/CreateIncidentZoomMeeting.rb new file mode 100644 index 000000000000..14ac1c614216 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentZoomMeeting.rb @@ -0,0 +1,17 @@ +# Create an incident Zoom meeting returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_incident_zoom_meeting".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentCreateZoomMeetingRequest.new({ + data: DatadogAPIClient::V2::IncidentCreateZoomMeetingData.new({ + attributes: DatadogAPIClient::V2::IncidentCreateZoomMeetingDataAttributes.new({ + topic: "Incident INC-123 War Room", + }), + type: DatadogAPIClient::V2::IncidentZoomIntegrationType::INCIDENT_INTEGRATIONS, + }), +}) +p api_instance.create_incident_zoom_meeting("incident_id", body) diff --git a/examples/v2/incidents/CreateStatuspageEmailSubscription.rb b/examples/v2/incidents/CreateStatuspageEmailSubscription.rb new file mode 100644 index 000000000000..edeba99e0331 --- /dev/null +++ b/examples/v2/incidents/CreateStatuspageEmailSubscription.rb @@ -0,0 +1,17 @@ +# Create a status page email subscription returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_statuspage_email_subscription".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentStatuspageSubscriptionRequest.new({ + data: DatadogAPIClient::V2::IncidentStatuspageSubscriptionDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentStatuspageSubscriptionDataAttributesRequest.new({ + email: "user@example.com", + }), + type: DatadogAPIClient::V2::IncidentStatuspageSubscriptionType::STATUSPAGE_EMAIL_SUBSCRIPTION, + }), +}) +p api_instance.create_statuspage_email_subscription("page_id", body) diff --git a/examples/v2/incidents/DeleteIncidentCommunication.rb b/examples/v2/incidents/DeleteIncidentCommunication.rb new file mode 100644 index 000000000000..82bb693f5580 --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentCommunication.rb @@ -0,0 +1,8 @@ +# Delete an incident communication returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_incident_communication".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +api_instance.delete_incident_communication("incident_id", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/incidents/DeleteIncidentJiraTemplate.rb b/examples/v2/incidents/DeleteIncidentJiraTemplate.rb new file mode 100644 index 000000000000..d3ebadd281af --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentJiraTemplate.rb @@ -0,0 +1,8 @@ +# Delete an incident Jira template returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_incident_jira_template".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +api_instance.delete_incident_jira_template("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/incidents/DeleteIncidentRoleAssignment.rb b/examples/v2/incidents/DeleteIncidentRoleAssignment.rb new file mode 100644 index 000000000000..a7c09cb65239 --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentRoleAssignment.rb @@ -0,0 +1,8 @@ +# Delete an incident role assignment returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_incident_role_assignment".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +api_instance.delete_incident_role_assignment("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/incidents/DeleteIncidentTimelineEntry.rb b/examples/v2/incidents/DeleteIncidentTimelineEntry.rb new file mode 100644 index 000000000000..659464d09d25 --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentTimelineEntry.rb @@ -0,0 +1,8 @@ +# Delete an incident timeline entry returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_incident_timeline_entry".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +api_instance.delete_incident_timeline_entry("incident_id", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/incidents/ExportIncidents.rb b/examples/v2/incidents/ExportIncidents.rb new file mode 100644 index 000000000000..c7629d0f37e6 --- /dev/null +++ b/examples/v2/incidents/ExportIncidents.rb @@ -0,0 +1,17 @@ +# Export incidents returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.export_incidents".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentSearchIncidentsExportRequest.new({ + fields: [ + "title", + "severity", + "state", + ], + query: "state:active", +}) +p api_instance.export_incidents(body) diff --git a/examples/v2/incidents/GetIncidentAutomationData.rb b/examples/v2/incidents/GetIncidentAutomationData.rb new file mode 100644 index 000000000000..b0e8eb6bfedd --- /dev/null +++ b/examples/v2/incidents/GetIncidentAutomationData.rb @@ -0,0 +1,8 @@ +# Get incident automation data returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_incident_automation_data".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_incident_automation_data("incident_id", "key") diff --git a/examples/v2/incidents/GetIncidentCaseSourceLink.rb b/examples/v2/incidents/GetIncidentCaseSourceLink.rb new file mode 100644 index 000000000000..319082afd105 --- /dev/null +++ b/examples/v2/incidents/GetIncidentCaseSourceLink.rb @@ -0,0 +1,8 @@ +# Get incident case source link returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_incident_case_source_link".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_incident_case_source_link("incident_id") diff --git a/examples/v2/incidents/GetIncidentCommunication.rb b/examples/v2/incidents/GetIncidentCommunication.rb new file mode 100644 index 000000000000..0806df252673 --- /dev/null +++ b/examples/v2/incidents/GetIncidentCommunication.rb @@ -0,0 +1,8 @@ +# Get an incident communication returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_incident_communication".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_incident_communication("incident_id", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/incidents/GetIncidentJiraTemplate.rb b/examples/v2/incidents/GetIncidentJiraTemplate.rb new file mode 100644 index 000000000000..38d502679d0e --- /dev/null +++ b/examples/v2/incidents/GetIncidentJiraTemplate.rb @@ -0,0 +1,8 @@ +# Get an incident Jira template returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_incident_jira_template".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_incident_jira_template("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/incidents/GetIncidentPageSourceLink.rb b/examples/v2/incidents/GetIncidentPageSourceLink.rb new file mode 100644 index 000000000000..57e85673d0bc --- /dev/null +++ b/examples/v2/incidents/GetIncidentPageSourceLink.rb @@ -0,0 +1,8 @@ +# Get incident page source link returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_incident_page_source_link".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_incident_page_source_link("incident_id") diff --git a/examples/v2/incidents/GetIncidentPagerdutyRelatedIncidents.rb b/examples/v2/incidents/GetIncidentPagerdutyRelatedIncidents.rb new file mode 100644 index 000000000000..a8dcd1668a69 --- /dev/null +++ b/examples/v2/incidents/GetIncidentPagerdutyRelatedIncidents.rb @@ -0,0 +1,8 @@ +# Get PagerDuty related incidents returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_incident_pagerduty_related_incidents".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_incident_pagerduty_related_incidents("pagerduty_incident_id") diff --git a/examples/v2/incidents/GetIncidentReservedRole.rb b/examples/v2/incidents/GetIncidentReservedRole.rb new file mode 100644 index 000000000000..fd7b3238ced3 --- /dev/null +++ b/examples/v2/incidents/GetIncidentReservedRole.rb @@ -0,0 +1,8 @@ +# Get an incident reserved role returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_incident_reserved_role".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_incident_reserved_role("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/incidents/GetIncidentRoleAssignment.rb b/examples/v2/incidents/GetIncidentRoleAssignment.rb new file mode 100644 index 000000000000..094ce2b554fb --- /dev/null +++ b/examples/v2/incidents/GetIncidentRoleAssignment.rb @@ -0,0 +1,8 @@ +# Get an incident role assignment returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_incident_role_assignment".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_incident_role_assignment("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/incidents/GetIncidentStatusPagesSuggestion.rb b/examples/v2/incidents/GetIncidentStatusPagesSuggestion.rb new file mode 100644 index 000000000000..edd8ef086411 --- /dev/null +++ b/examples/v2/incidents/GetIncidentStatusPagesSuggestion.rb @@ -0,0 +1,8 @@ +# Get incident status pages suggestion returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_incident_status_pages_suggestion".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_incident_status_pages_suggestion("incident_id") diff --git a/examples/v2/incidents/GetIncidentTimelineEntryThread.rb b/examples/v2/incidents/GetIncidentTimelineEntryThread.rb new file mode 100644 index 000000000000..94fcbbb3ab48 --- /dev/null +++ b/examples/v2/incidents/GetIncidentTimelineEntryThread.rb @@ -0,0 +1,8 @@ +# Get incident timeline entry thread returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_incident_timeline_entry_thread".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_incident_timeline_entry_thread("incident_id", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") diff --git a/examples/v2/incidents/GetStatuspageSubscriptionPreferences.rb b/examples/v2/incidents/GetStatuspageSubscriptionPreferences.rb new file mode 100644 index 000000000000..1eec1675ab42 --- /dev/null +++ b/examples/v2/incidents/GetStatuspageSubscriptionPreferences.rb @@ -0,0 +1,8 @@ +# Get status page subscription preferences returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_statuspage_subscription_preferences".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.get_statuspage_subscription_preferences() diff --git a/examples/v2/incidents/ListIncidentCommunications.rb b/examples/v2/incidents/ListIncidentCommunications.rb new file mode 100644 index 000000000000..117e1bf81fd4 --- /dev/null +++ b/examples/v2/incidents/ListIncidentCommunications.rb @@ -0,0 +1,8 @@ +# List incident communications returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_incident_communications".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.list_incident_communications("incident_id") diff --git a/examples/v2/incidents/ListIncidentJiraTemplates.rb b/examples/v2/incidents/ListIncidentJiraTemplates.rb new file mode 100644 index 000000000000..66bf3f0e3ed0 --- /dev/null +++ b/examples/v2/incidents/ListIncidentJiraTemplates.rb @@ -0,0 +1,8 @@ +# List incident Jira templates returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_incident_jira_templates".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.list_incident_jira_templates() diff --git a/examples/v2/incidents/ListIncidentPagerdutyServices.rb b/examples/v2/incidents/ListIncidentPagerdutyServices.rb new file mode 100644 index 000000000000..c4760c4e2f9f --- /dev/null +++ b/examples/v2/incidents/ListIncidentPagerdutyServices.rb @@ -0,0 +1,8 @@ +# List PagerDuty services returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_incident_pagerduty_services".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.list_incident_pagerduty_services() diff --git a/examples/v2/incidents/ListIncidentReservedRoles.rb b/examples/v2/incidents/ListIncidentReservedRoles.rb new file mode 100644 index 000000000000..41ac348f560f --- /dev/null +++ b/examples/v2/incidents/ListIncidentReservedRoles.rb @@ -0,0 +1,8 @@ +# List incident reserved roles returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_incident_reserved_roles".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.list_incident_reserved_roles() diff --git a/examples/v2/incidents/ListIncidentRuleExecutionStates.rb b/examples/v2/incidents/ListIncidentRuleExecutionStates.rb new file mode 100644 index 000000000000..d80474177e3d --- /dev/null +++ b/examples/v2/incidents/ListIncidentRuleExecutionStates.rb @@ -0,0 +1,8 @@ +# List incident rule execution states returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_incident_rule_execution_states".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.list_incident_rule_execution_states("incident_id") diff --git a/examples/v2/incidents/ListIncidentTemplateVariables.rb b/examples/v2/incidents/ListIncidentTemplateVariables.rb new file mode 100644 index 000000000000..6d0e33a79628 --- /dev/null +++ b/examples/v2/incidents/ListIncidentTemplateVariables.rb @@ -0,0 +1,8 @@ +# List incident template variables returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_incident_template_variables".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.list_incident_template_variables() diff --git a/examples/v2/incidents/ListIncidentTimelineEntries.rb b/examples/v2/incidents/ListIncidentTimelineEntries.rb new file mode 100644 index 000000000000..263c775c182b --- /dev/null +++ b/examples/v2/incidents/ListIncidentTimelineEntries.rb @@ -0,0 +1,8 @@ +# List incident timeline entries returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_incident_timeline_entries".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.list_incident_timeline_entries("incident_id") diff --git a/examples/v2/incidents/ListStatuspageEmailSubscriptions.rb b/examples/v2/incidents/ListStatuspageEmailSubscriptions.rb new file mode 100644 index 000000000000..14bd9cf1cd2a --- /dev/null +++ b/examples/v2/incidents/ListStatuspageEmailSubscriptions.rb @@ -0,0 +1,8 @@ +# List status page email subscriptions returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_statuspage_email_subscriptions".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.list_statuspage_email_subscriptions("page_id") diff --git a/examples/v2/incidents/PatchIncidentNotificationRule.rb b/examples/v2/incidents/PatchIncidentNotificationRule.rb new file mode 100644 index 000000000000..32f06cef7713 --- /dev/null +++ b/examples/v2/incidents/PatchIncidentNotificationRule.rb @@ -0,0 +1,51 @@ +# Patch an incident notification rule returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.patch_incident_notification_rule".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::PutIncidentNotificationRuleRequest.new({ + data: DatadogAPIClient::V2::IncidentNotificationRuleUpdateData.new({ + attributes: DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributes.new({ + conditions: [ + DatadogAPIClient::V2::IncidentNotificationRuleConditionsItems.new({ + field: "severity", + values: [ + "SEV-1", + "SEV-2", + ], + }), + ], + enabled: true, + handles: [ + "@team-email@company.com", + "@slack-channel", + ], + renotify_on: [ + "status", + "severity", + ], + trigger: "incident_created_trigger", + visibility: DatadogAPIClient::V2::IncidentNotificationRuleCreateAttributesVisibility::ORGANIZATION, + }), + id: "00000000-0000-0000-0000-000000000001", + relationships: DatadogAPIClient::V2::IncidentNotificationRuleCreateDataRelationships.new({ + incident_type: DatadogAPIClient::V2::RelationshipToIncidentType.new({ + data: DatadogAPIClient::V2::RelationshipToIncidentTypeData.new({ + id: "00000000-0000-0000-0000-000000000000", + type: DatadogAPIClient::V2::IncidentTypeType::INCIDENT_TYPES, + }), + }), + notification_template: DatadogAPIClient::V2::RelationshipToIncidentNotificationTemplate.new({ + data: DatadogAPIClient::V2::RelationshipToIncidentNotificationTemplateData.new({ + id: "00000000-0000-0000-0000-000000000001", + type: DatadogAPIClient::V2::IncidentNotificationTemplateType::NOTIFICATION_TEMPLATES, + }), + }), + }), + type: DatadogAPIClient::V2::IncidentNotificationRuleType::INCIDENT_NOTIFICATION_RULES, + }), +}) +p api_instance.patch_incident_notification_rule("00000000-0000-0000-0000-000000000001", body) diff --git a/examples/v2/incidents/RenderIncidentTemplate.rb b/examples/v2/incidents/RenderIncidentTemplate.rb new file mode 100644 index 000000000000..f7eb92e66eac --- /dev/null +++ b/examples/v2/incidents/RenderIncidentTemplate.rb @@ -0,0 +1,21 @@ +# Render an incident template returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.render_incident_template".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentRenderTemplateRequest.new({ + data: DatadogAPIClient::V2::IncidentRenderTemplateDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentRenderTemplateDataAttributesRequest.new({ + content: "Incident INC-123 is SEV-1.", + datetime_format: "2006-01-02T15:04:05Z07:00", + timezone: "America/New_York", + validate_links: false, + validate_variables: false, + }), + type: DatadogAPIClient::V2::IncidentRenderedTemplateType::RENDERED_TEMPLATES, + }), +}) +p api_instance.render_incident_template("incident_id", body) diff --git a/examples/v2/incidents/SearchIncidentsV2.rb b/examples/v2/incidents/SearchIncidentsV2.rb new file mode 100644 index 000000000000..1679fd79537d --- /dev/null +++ b/examples/v2/incidents/SearchIncidentsV2.rb @@ -0,0 +1,8 @@ +# Search incidents returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.search_incidents_v2".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new +p api_instance.search_incidents_v2() diff --git a/examples/v2/incidents/UpdateIncidentCommunication.rb b/examples/v2/incidents/UpdateIncidentCommunication.rb new file mode 100644 index 000000000000..a34dec2a4f9e --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentCommunication.rb @@ -0,0 +1,30 @@ +# Update an incident communication returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_incident_communication".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentCommunicationRequest.new({ + data: DatadogAPIClient::V2::IncidentCommunicationDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentCommunicationDataAttributesRequest.new({ + communication_type: DatadogAPIClient::V2::IncidentCommunicationKind::MANUAL, + content: DatadogAPIClient::V2::IncidentCommunicationContent.new({ + grouping_key: "update-1", + handles: [ + DatadogAPIClient::V2::IncidentCommunicationContentHandle.new({ + created_at: "2024-01-01T00:00:00.000Z", + display_name: "#incidents-channel", + handle: "@slack-incidents-channel", + }), + ], + message: "Incident update for INC-123.", + status: 0, + subject: "Incident INC-123: Update", + }), + }), + type: DatadogAPIClient::V2::IncidentCommunicationType::COMMUNICATION, + }), +}) +p api_instance.update_incident_communication("incident_id", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body) diff --git a/examples/v2/incidents/UpdateIncidentJiraTemplate.rb b/examples/v2/incidents/UpdateIncidentJiraTemplate.rb new file mode 100644 index 000000000000..8515fd390acb --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentJiraTemplate.rb @@ -0,0 +1,40 @@ +# Update an incident Jira template returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_incident_jira_template".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentJiraTemplateRequest.new({ + data: DatadogAPIClient::V2::IncidentJiraTemplateDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentJiraTemplateDataAttributesRequest.new({ + account_id: "123456", + field_configurations: [ + DatadogAPIClient::V2::IncidentJiraTemplateFieldConfiguration.new({ + incident_field: "title", + jira_field_key: "summary", + jira_field_type: "string", + sync_direction: "bidirectional", + }), + ], + is_default: false, + issue_id: "10001", + name: "Default Jira Template", + project_id: "10000", + project_key: "INC", + sync_enabled: true, + type: "jira", + }), + relationships: DatadogAPIClient::V2::IncidentJiraTemplateRelationships.new({ + incident_type: DatadogAPIClient::V2::IncidentJiraTemplateIncidentTypeRelationship.new({ + data: DatadogAPIClient::V2::IncidentJiraTemplateIncidentTypeRelationshipData.new({ + id: "00000000-0000-0000-0000-000000000000", + type: "incident_types", + }), + }), + }), + type: DatadogAPIClient::V2::IncidentJiraTemplateType::INCIDENTS_JIRA_TEMPLATES, + }), +}) +p api_instance.update_incident_jira_template("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body) diff --git a/examples/v2/incidents/UpdateIncidentMicrosoftTeamsConfiguration.rb b/examples/v2/incidents/UpdateIncidentMicrosoftTeamsConfiguration.rb new file mode 100644 index 000000000000..958f5fc644d4 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentMicrosoftTeamsConfiguration.rb @@ -0,0 +1,18 @@ +# Update an incident Microsoft Teams configuration returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_incident_microsoft_teams_configuration".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationRequest.new({ + data: DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationDataAttributesRequest.new({ + manual_meeting_creation: false, + post_meeting_summary: true, + }), + type: DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationType::MICROSOFT_TEAMS_CONFIGURATIONS, + }), +}) +p api_instance.update_incident_microsoft_teams_configuration("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body) diff --git a/examples/v2/incidents/UpdateIncidentStatusPageNotice.rb b/examples/v2/incidents/UpdateIncidentStatusPageNotice.rb new file mode 100644 index 000000000000..9734ee76dd56 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentStatusPageNotice.rb @@ -0,0 +1,19 @@ +# Update an incident status page notice returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_incident_status_page_notice".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentStatusPageNoticeUpdateRequest.new({ + data: DatadogAPIClient::V2::IncidentStatusPageNoticeUpdateData.new({ + attributes: DatadogAPIClient::V2::IncidentStatusPageNoticeUpdateDataAttributes.new({ + message: "The issue has been resolved.", + status: "resolved", + title: "Service degradation resolved.", + }), + type: DatadogAPIClient::V2::IncidentStatusPageNoticeIntegrationType::INCIDENT_INTEGRATIONS, + }), +}) +p api_instance.update_incident_status_page_notice("incident_id", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body) diff --git a/examples/v2/incidents/UpdateIncidentStatuspageIncident.rb b/examples/v2/incidents/UpdateIncidentStatuspageIncident.rb new file mode 100644 index 000000000000..31f629c50b9e --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentStatuspageIncident.rb @@ -0,0 +1,22 @@ +# Update an incident Statuspage incident returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_incident_statuspage_incident".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentStatuspageIncidentRequest.new({ + data: DatadogAPIClient::V2::IncidentStatuspageIncidentDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentStatuspageIncidentDataAttributesRequest.new({ + body: "We are investigating the issue.", + deliver_notifications: true, + impact: "major", + name: "Service Outage", + page_id: "abc123", + status: "investigating", + }), + type: DatadogAPIClient::V2::IncidentStatuspageIncidentType::INCIDENT_INTEGRATIONS, + }), +}) +p api_instance.update_incident_statuspage_incident("incident_id", "page_id", "statuspage_incident_id", body) diff --git a/examples/v2/incidents/UpdateIncidentTimelineEntry.rb b/examples/v2/incidents/UpdateIncidentTimelineEntry.rb new file mode 100644 index 000000000000..5bccae050727 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentTimelineEntry.rb @@ -0,0 +1,22 @@ +# Update an incident timeline entry returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_incident_timeline_entry".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentTimelineEntryRequest.new({ + data: DatadogAPIClient::V2::IncidentTimelineEntryDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentTimelineEntryDataAttributesRequest.new({ + cell_type: DatadogAPIClient::V2::IncidentTimelineCellType::MARKDOWN, + content: DatadogAPIClient::V2::IncidentTimelineEntryContent.new({ + message: "Investigating the issue.", + }), + display_time: "2024-01-01T00:00:00.000Z", + important: false, + }), + type: DatadogAPIClient::V2::IncidentTimelineEntryType::INCIDENT_TIMELINE_CELLS, + }), +}) +p api_instance.update_incident_timeline_entry("incident_id", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body) diff --git a/examples/v2/incidents/UpdateIncidentZoomConfiguration.rb b/examples/v2/incidents/UpdateIncidentZoomConfiguration.rb new file mode 100644 index 000000000000..9e81961f70e0 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentZoomConfiguration.rb @@ -0,0 +1,19 @@ +# Update an incident Zoom configuration returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_incident_zoom_configuration".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentZoomConfigurationRequest.new({ + data: DatadogAPIClient::V2::IncidentZoomConfigurationDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentZoomConfigurationDataAttributesRequest.new({ + manual_meeting_creation: false, + meeting_chat_timeline_sync: false, + post_meeting_summary: true, + }), + type: DatadogAPIClient::V2::IncidentZoomConfigurationType::ZOOM_CONFIGURATIONS, + }), +}) +p api_instance.update_incident_zoom_configuration("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body) diff --git a/examples/v2/incidents/UpsertIncidentAutomationData.rb b/examples/v2/incidents/UpsertIncidentAutomationData.rb new file mode 100644 index 000000000000..ed74d4c75a46 --- /dev/null +++ b/examples/v2/incidents/UpsertIncidentAutomationData.rb @@ -0,0 +1,17 @@ +# Upsert incident automation data returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.upsert_incident_automation_data".to_sym] = true +end +api_instance = DatadogAPIClient::V2::IncidentsAPI.new + +body = DatadogAPIClient::V2::IncidentAutomationDataRequest.new({ + data: DatadogAPIClient::V2::IncidentAutomationDataDataRequest.new({ + attributes: DatadogAPIClient::V2::IncidentAutomationDataAttributesRequest.new({ + value: "completed", + }), + type: DatadogAPIClient::V2::IncidentAutomationDataType::INCIDENTS_AUTOMATION_DATA, + }), +}) +p api_instance.upsert_incident_automation_data("incident_id", "key", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index ec3f4f8a915c..003803dceaf0 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2607,6 +2607,33 @@ "v2.UpdateGlobalIncidentSettings" => { "body" => "GlobalIncidentSettingsRequest", }, + "v2.ListIncidentJiraTemplates" => { + "is_default" => "Boolean", + "incident_type_id" => "UUID", + "template_type" => "String", + }, + "v2.CreateIncidentJiraTemplate" => { + "body" => "IncidentJiraTemplateRequest", + }, + "v2.DeleteIncidentJiraTemplate" => { + "template_id" => "UUID", + }, + "v2.GetIncidentJiraTemplate" => { + "template_id" => "UUID", + }, + "v2.UpdateIncidentJiraTemplate" => { + "template_id" => "UUID", + "body" => "IncidentJiraTemplateRequest", + }, + "v2.CreateIncidentMicrosoftTeamsConfiguration" => { + "include" => "String", + "body" => "IncidentMicrosoftTeamsConfigurationRequest", + }, + "v2.UpdateIncidentMicrosoftTeamsConfiguration" => { + "configuration_id" => "UUID", + "include" => "String", + "body" => "IncidentMicrosoftTeamsConfigurationRequest", + }, "v2.ListIncidentNotificationRules" => { "include" => "String", }, @@ -2621,6 +2648,11 @@ "id" => "UUID", "include" => "String", }, + "v2.PatchIncidentNotificationRule" => { + "id" => "UUID", + "include" => "String", + "body" => "PutIncidentNotificationRuleRequest", + }, "v2.UpdateIncidentNotificationRule" => { "id" => "UUID", "include" => "String", @@ -2659,6 +2691,13 @@ "template_id" => "String", "body" => "PostmortemTemplateRequest", }, + "v2.GetIncidentReservedRole" => { + "role_id" => "UUID", + }, + "v2.ListIncidentTemplateVariables" => { + "filter_incident_type" => "UUID", + "include_follow_ups" => "Boolean", + }, "v2.ListIncidentTypes" => { "include_deleted" => "Boolean", }, @@ -2698,10 +2737,34 @@ "include" => "String", "body" => "IncidentUserDefinedFieldUpdateRequest", }, + "v2.CreateIncidentZoomConfiguration" => { + "include" => "String", + "body" => "IncidentZoomConfigurationRequest", + }, + "v2.UpdateIncidentZoomConfiguration" => { + "configuration_id" => "UUID", + "include" => "String", + "body" => "IncidentZoomConfigurationRequest", + }, "v2.ImportIncident" => { "include" => "Array", "body" => "IncidentImportRequest", }, + "v2.ListIncidentPagerdutyServices" => { + "include_unresolved" => "Boolean", + }, + "v2.GetIncidentPagerdutyRelatedIncidents" => { + "pagerduty_incident_id" => "String", + }, + "v2.CreateIncidentRoleAssignment" => { + "body" => "IncidentRoleAssignmentRequest", + }, + "v2.DeleteIncidentRoleAssignment" => { + "role_assignment_id" => "UUID", + }, + "v2.GetIncidentRoleAssignment" => { + "role_assignment_id" => "UUID", + }, "v2.SearchIncidents" => { "include" => "IncidentRelatedObject", "query" => "String", @@ -2709,6 +2772,30 @@ "page_size" => "Integer", "page_offset" => "Integer", }, + "v2.SearchIncidentsV2" => { + "query" => "String", + "sort" => "IncidentSearchIncidentsSortOrder", + "with_facets" => "Boolean", + "filter_with_deleted" => "Boolean", + "semantic_query" => "String", + "time_zone" => "String", + "include" => "Array", + "page_size" => "Integer", + "page_offset" => "Integer", + }, + "v2.ExportIncidents" => { + "body" => "IncidentSearchIncidentsExportRequest", + }, + "v2.CreateIncidentStatuspageIncident" => { + "incident_id" => "String", + "body" => "IncidentStatuspageIncidentRequest", + }, + "v2.UpdateIncidentStatuspageIncident" => { + "incident_id" => "String", + "page_id" => "String", + "statuspage_incident_id" => "String", + "body" => "IncidentStatuspageIncidentRequest", + }, "v2.DeleteIncident" => { "incident_id" => "String", }, @@ -2745,6 +2832,44 @@ "include" => "String", "body" => "PatchAttachmentRequest", }, + "v2.GetIncidentAutomationData" => { + "incident_id" => "String", + "key" => "String", + "include" => "String", + }, + "v2.UpsertIncidentAutomationData" => { + "incident_id" => "String", + "key" => "String", + "include" => "String", + "body" => "IncidentAutomationDataRequest", + }, + "v2.GetIncidentCaseSourceLink" => { + "incident_id" => "String", + }, + "v2.ListIncidentCommunications" => { + "incident_id" => "String", + "filter_communication_type" => "String", + }, + "v2.CreateIncidentCommunication" => { + "incident_id" => "String", + "body" => "IncidentCommunicationRequest", + }, + "v2.DeleteIncidentCommunication" => { + "incident_id" => "String", + "communication_id" => "UUID", + }, + "v2.GetIncidentCommunication" => { + "incident_id" => "String", + "communication_id" => "UUID", + }, + "v2.UpdateIncidentCommunication" => { + "incident_id" => "String", + "communication_id" => "UUID", + "body" => "IncidentCommunicationRequest", + }, + "v2.CreateIncidentGoogleMeetSpace" => { + "incident_id" => "String", + }, "v2.ListIncidentImpacts" => { "incident_id" => "String", "include" => "Array", @@ -2758,6 +2883,16 @@ "incident_id" => "String", "impact_id" => "String", }, + "v2.CreateIncidentJiraIssue" => { + "incident_id" => "String", + "body" => "IncidentJiraIssueRequest", + }, + "v2.CreateIncidentMSTeamsOnlineMeeting" => { + "incident_id" => "String", + }, + "v2.GetIncidentPageSourceLink" => { + "incident_id" => "String", + }, "v2.ListIncidentIntegrations" => { "incident_id" => "String", }, @@ -2798,6 +2933,68 @@ "todo_id" => "String", "body" => "IncidentTodoPatchRequest", }, + "v2.RenderIncidentTemplate" => { + "incident_id" => "String", + "body" => "IncidentRenderTemplateRequest", + }, + "v2.ListIncidentRuleExecutionStates" => { + "incident_id" => "String", + }, + "v2.BatchCreateIncidentRuleExecutionStates" => { + "incident_id" => "String", + "body" => "IncidentBatchCreateRuleExecutionStatesRequest", + }, + "v2.BatchUpdateIncidentRuleExecutionStates" => { + "incident_id" => "String", + "body" => "IncidentBatchUpdateRuleExecutionStatesRequest", + }, + "v2.GetIncidentStatusPagesSuggestion" => { + "incident_id" => "String", + }, + "v2.CreateIncidentStatusPageNotice" => { + "incident_id" => "String", + "statuspage_id" => "UUID", + "notify_subscribers" => "Boolean", + "body" => "IncidentStatusPageNoticeCreateRequest", + }, + "v2.UpdateIncidentStatusPageNotice" => { + "incident_id" => "String", + "statuspage_id" => "UUID", + "notice_id" => "UUID", + "notify_subscribers" => "Boolean", + "body" => "IncidentStatusPageNoticeUpdateRequest", + }, + "v2.ListIncidentTimelineEntries" => { + "incident_id" => "String", + }, + "v2.CreateIncidentTimelineEntry" => { + "incident_id" => "String", + "body" => "IncidentTimelineEntryRequest", + }, + "v2.DeleteIncidentTimelineEntry" => { + "incident_id" => "String", + "timeline_entry_id" => "UUID", + }, + "v2.UpdateIncidentTimelineEntry" => { + "incident_id" => "String", + "timeline_entry_id" => "UUID", + "body" => "IncidentTimelineEntryRequest", + }, + "v2.GetIncidentTimelineEntryThread" => { + "incident_id" => "String", + "timeline_entry_id" => "UUID", + }, + "v2.CreateIncidentZoomMeeting" => { + "incident_id" => "String", + "body" => "IncidentCreateZoomMeetingRequest", + }, + "v2.ListStatuspageEmailSubscriptions" => { + "page_id" => "String", + }, + "v2.CreateStatuspageEmailSubscription" => { + "page_id" => "String", + "body" => "IncidentStatuspageSubscriptionRequest", + }, "v2.ListAWSAccounts" => { "aws_account_id" => "String", }, diff --git a/features/v2/incidents.feature b/features/v2/incidents.feature index df4c5fe28da5..1d8162b6fb2d 100644 --- a/features/v2/incidents.feature +++ b/features/v2/incidents.feature @@ -21,6 +21,282 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Batch create incident rule execution states returns "Bad Request" response + Given operation "BatchCreateIncidentRuleExecutionStates" enabled + And new "BatchCreateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Batch create incident rule execution states returns "Created" response + Given operation "BatchCreateIncidentRuleExecutionStates" enabled + And new "BatchCreateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Batch create incident rule execution states returns "Not Found" response + Given operation "BatchCreateIncidentRuleExecutionStates" enabled + And new "BatchCreateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Batch update incident rule execution states returns "Bad Request" response + Given operation "BatchUpdateIncidentRuleExecutionStates" enabled + And new "BatchUpdateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Batch update incident rule execution states returns "Not Found" response + Given operation "BatchUpdateIncidentRuleExecutionStates" enabled + And new "BatchUpdateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Batch update incident rule execution states returns "OK" response + Given operation "BatchUpdateIncidentRuleExecutionStates" enabled + And new "BatchUpdateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Create a status page email subscription returns "Bad Request" response + Given operation "CreateStatuspageEmailSubscription" enabled + And new "CreateStatuspageEmailSubscription" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"email": "user@example.com"}, "type": "statuspage_email_subscription"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create a status page email subscription returns "Created" response + Given operation "CreateStatuspageEmailSubscription" enabled + And new "CreateStatuspageEmailSubscription" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"email": "user@example.com"}, "type": "statuspage_email_subscription"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Google Meet space returns "Bad Request" response + Given operation "CreateIncidentGoogleMeetSpace" enabled + And new "CreateIncidentGoogleMeetSpace" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Google Meet space returns "Created" response + Given operation "CreateIncidentGoogleMeetSpace" enabled + And new "CreateIncidentGoogleMeetSpace" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Google Meet space returns "Not Found" response + Given operation "CreateIncidentGoogleMeetSpace" enabled + And new "CreateIncidentGoogleMeetSpace" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira issue returns "Bad Request" response + Given operation "CreateIncidentJiraIssue" enabled + And new "CreateIncidentJiraIssue" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "issue_type_id": "10001", "project_id": "10000", "template_id": "00000000-0000-0000-0000-000000000000"}, "type": "incident_jira_issues"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira issue returns "Created" response + Given operation "CreateIncidentJiraIssue" enabled + And new "CreateIncidentJiraIssue" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "issue_type_id": "10001", "project_id": "10000", "template_id": "00000000-0000-0000-0000-000000000000"}, "type": "incident_jira_issues"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira issue returns "Not Found" response + Given operation "CreateIncidentJiraIssue" enabled + And new "CreateIncidentJiraIssue" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "issue_type_id": "10001", "project_id": "10000", "template_id": "00000000-0000-0000-0000-000000000000"}, "type": "incident_jira_issues"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira template returns "Bad Request" response + Given operation "CreateIncidentJiraTemplate" enabled + And new "CreateIncidentJiraTemplate" request + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira template returns "Created" response + Given operation "CreateIncidentJiraTemplate" enabled + And new "CreateIncidentJiraTemplate" request + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams configuration returns "Bad Request" response + Given operation "CreateIncidentMicrosoftTeamsConfiguration" enabled + And new "CreateIncidentMicrosoftTeamsConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams configuration returns "Created" response + Given operation "CreateIncidentMicrosoftTeamsConfiguration" enabled + And new "CreateIncidentMicrosoftTeamsConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams online meeting returns "Bad Request" response + Given operation "CreateIncidentMSTeamsOnlineMeeting" enabled + And new "CreateIncidentMSTeamsOnlineMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams online meeting returns "Created" response + Given operation "CreateIncidentMSTeamsOnlineMeeting" enabled + And new "CreateIncidentMSTeamsOnlineMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams online meeting returns "Not Found" response + Given operation "CreateIncidentMSTeamsOnlineMeeting" enabled + And new "CreateIncidentMSTeamsOnlineMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Statuspage incident returns "Bad Request" response + Given operation "CreateIncidentStatuspageIncident" enabled + And new "CreateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Statuspage incident returns "Not Found" response + Given operation "CreateIncidentStatuspageIncident" enabled + And new "CreateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Statuspage incident returns "OK" response + Given operation "CreateIncidentStatuspageIncident" enabled + And new "CreateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom configuration returns "Bad Request" response + Given operation "CreateIncidentZoomConfiguration" enabled + And new "CreateIncidentZoomConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom configuration returns "Created" response + Given operation "CreateIncidentZoomConfiguration" enabled + And new "CreateIncidentZoomConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom meeting returns "Bad Request" response + Given operation "CreateIncidentZoomMeeting" enabled + And new "CreateIncidentZoomMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"topic": "Incident INC-123 War Room"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom meeting returns "Created" response + Given operation "CreateIncidentZoomMeeting" enabled + And new "CreateIncidentZoomMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"topic": "Incident INC-123 War Room"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom meeting returns "Not Found" response + Given operation "CreateIncidentZoomMeeting" enabled + And new "CreateIncidentZoomMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"topic": "Incident INC-123 War Room"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident communication returns "Bad Request" response + Given operation "CreateIncidentCommunication" enabled + And new "CreateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident communication returns "Created" response + Given operation "CreateIncidentCommunication" enabled + And new "CreateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident communication returns "Not Found" response + Given operation "CreateIncidentCommunication" enabled + And new "CreateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 404 Not Found + @skip @team:DataDog/incident-app Scenario: Create an incident impact returns "Bad Request" response Given operation "CreateIncidentImpact" enabled @@ -133,6 +409,65 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Bad Request" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Conflict" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Created" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Not Found" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident timeline entry returns "Bad Request" response + Given operation "CreateIncidentTimelineEntry" enabled + And new "CreateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident timeline entry returns "Created" response + Given operation "CreateIncidentTimelineEntry" enabled + And new "CreateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident timeline entry returns "Not Found" response + Given operation "CreateIncidentTimelineEntry" enabled + And new "CreateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:Datadog/incident-app Scenario: Create an incident todo returns "Bad Request" response Given operation "CreateIncidentTodo" enabled @@ -379,6 +714,57 @@ Feature: Incidents When the request is sent Then the response status is 204 OK + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident Jira template returns "Bad Request" response + Given operation "DeleteIncidentJiraTemplate" enabled + And new "DeleteIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident Jira template returns "No Content" response + Given operation "DeleteIncidentJiraTemplate" enabled + And new "DeleteIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident Jira template returns "Not Found" response + Given operation "DeleteIncidentJiraTemplate" enabled + And new "DeleteIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident communication returns "Bad Request" response + Given operation "DeleteIncidentCommunication" enabled + And new "DeleteIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident communication returns "No Content" response + Given operation "DeleteIncidentCommunication" enabled + And new "DeleteIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident communication returns "Not Found" response + Given operation "DeleteIncidentCommunication" enabled + And new "DeleteIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @skip @team:DataDog/incident-app Scenario: Delete an incident impact returns "No Content" response Given there is a valid "incident" in the system @@ -452,6 +838,57 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident role assignment returns "Bad Request" response + Given operation "DeleteIncidentRoleAssignment" enabled + And new "DeleteIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident role assignment returns "No Content" response + Given operation "DeleteIncidentRoleAssignment" enabled + And new "DeleteIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident role assignment returns "Not Found" response + Given operation "DeleteIncidentRoleAssignment" enabled + And new "DeleteIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident timeline entry returns "Bad Request" response + Given operation "DeleteIncidentTimelineEntry" enabled + And new "DeleteIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident timeline entry returns "No Content" response + Given operation "DeleteIncidentTimelineEntry" enabled + And new "DeleteIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident timeline entry returns "Not Found" response + Given operation "DeleteIncidentTimelineEntry" enabled + And new "DeleteIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:Datadog/incident-app Scenario: Delete an incident todo returns "Bad Request" response Given operation "DeleteIncidentTodo" enabled @@ -625,6 +1062,46 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: Export incidents returns "Bad Request" response + Given operation "ExportIncidents" enabled + And new "ExportIncidents" request + And body with value {"fields": ["title", "severity", "state"], "query": "state:active"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Export incidents returns "OK" response + Given operation "ExportIncidents" enabled + And new "ExportIncidents" request + And body with value {"fields": ["title", "severity", "state"], "query": "state:active"} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get PagerDuty related incidents returns "Bad Request" response + Given operation "GetIncidentPagerdutyRelatedIncidents" enabled + And new "GetIncidentPagerdutyRelatedIncidents" request + And request contains "pagerduty_incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get PagerDuty related incidents returns "Not Found" response + Given operation "GetIncidentPagerdutyRelatedIncidents" enabled + And new "GetIncidentPagerdutyRelatedIncidents" request + And request contains "pagerduty_incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get PagerDuty related incidents returns "OK" response + Given operation "GetIncidentPagerdutyRelatedIncidents" enabled + And new "GetIncidentPagerdutyRelatedIncidents" request + And request contains "pagerduty_incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get a list of an incident's integration metadata returns "Bad Request" response Given operation "ListIncidentIntegrations" enabled @@ -741,6 +1218,57 @@ Feature: Incidents Then the response status is 200 OK And the response has 3 items + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident Jira template returns "Bad Request" response + Given operation "GetIncidentJiraTemplate" enabled + And new "GetIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident Jira template returns "Not Found" response + Given operation "GetIncidentJiraTemplate" enabled + And new "GetIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident Jira template returns "OK" response + Given operation "GetIncidentJiraTemplate" enabled + And new "GetIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident communication returns "Bad Request" response + Given operation "GetIncidentCommunication" enabled + And new "GetIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident communication returns "Not Found" response + Given operation "GetIncidentCommunication" enabled + And new "GetIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident communication returns "OK" response + Given operation "GetIncidentCommunication" enabled + And new "GetIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: Get an incident notification rule returns "Bad Request" response Given operation "GetIncidentNotificationRule" enabled @@ -765,6 +1293,46 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident reserved role returns "Not Found" response + Given operation "GetIncidentReservedRole" enabled + And new "GetIncidentReservedRole" request + And request contains "role_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident reserved role returns "OK" response + Given operation "GetIncidentReservedRole" enabled + And new "GetIncidentReservedRole" request + And request contains "role_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident role assignment returns "Bad Request" response + Given operation "GetIncidentRoleAssignment" enabled + And new "GetIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident role assignment returns "Not Found" response + Given operation "GetIncidentRoleAssignment" enabled + And new "GetIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident role assignment returns "OK" response + Given operation "GetIncidentRoleAssignment" enabled + And new "GetIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get an incident user-defined field returns "Not Found" response Given operation "GetIncidentUserDefinedField" enabled @@ -795,6 +1363,49 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Get incident automation data returns "Bad Request" response + Given operation "GetIncidentAutomationData" enabled + And new "GetIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident automation data returns "Not Found" response + Given operation "GetIncidentAutomationData" enabled + And new "GetIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident automation data returns "OK" response + Given operation "GetIncidentAutomationData" enabled + And new "GetIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident case source link returns "Not Found" response + Given operation "GetIncidentCaseSourceLink" enabled + And new "GetIncidentCaseSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident case source link returns "OK" response + Given operation "GetIncidentCaseSourceLink" enabled + And new "GetIncidentCaseSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get incident integration metadata details returns "Bad Request" response Given operation "GetIncidentIntegration" enabled @@ -869,10 +1480,69 @@ Feature: Incidents And request contains "id" parameter from "notification_template.data.id" When the request is sent Then the response status is 200 OK - And the response "data.type" is equal to "notification_templates" - And the response "data.id" has the same value as "notification_template.data.id" - And the response "data" has field "attributes" - And the response "data" has field "relationships" + And the response "data.type" is equal to "notification_templates" + And the response "data.id" has the same value as "notification_template.data.id" + And the response "data" has field "attributes" + And the response "data" has field "relationships" + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident page source link returns "Not Found" response + Given operation "GetIncidentPageSourceLink" enabled + And new "GetIncidentPageSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident page source link returns "OK" response + Given operation "GetIncidentPageSourceLink" enabled + And new "GetIncidentPageSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident status pages suggestion returns "Not Found" response + Given operation "GetIncidentStatusPagesSuggestion" enabled + And new "GetIncidentStatusPagesSuggestion" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident status pages suggestion returns "OK" response + Given operation "GetIncidentStatusPagesSuggestion" enabled + And new "GetIncidentStatusPagesSuggestion" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident timeline entry thread returns "Bad Request" response + Given operation "GetIncidentTimelineEntryThread" enabled + And new "GetIncidentTimelineEntryThread" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident timeline entry thread returns "Not Found" response + Given operation "GetIncidentTimelineEntryThread" enabled + And new "GetIncidentTimelineEntryThread" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident timeline entry thread returns "OK" response + Given operation "GetIncidentTimelineEntryThread" enabled + And new "GetIncidentTimelineEntryThread" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK @generated @skip @team:Datadog/incident-app Scenario: Get incident todo details returns "Bad Request" response @@ -953,6 +1623,13 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Get status page subscription preferences returns "OK" response + Given operation "GetStatuspageSubscriptionPreferences" enabled + And new "GetStatuspageSubscriptionPreferences" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get the details of an incident returns "Bad Request" response Given operation "GetIncident" enabled @@ -1005,6 +1682,20 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: List PagerDuty services returns "Bad Request" response + Given operation "ListIncidentPagerdutyServices" enabled + And new "ListIncidentPagerdutyServices" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List PagerDuty services returns "OK" response + Given operation "ListIncidentPagerdutyServices" enabled + And new "ListIncidentPagerdutyServices" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: List an incident's impacts returns "Bad Request" response Given new "ListIncidentImpacts" request @@ -1042,6 +1733,20 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: List incident Jira templates returns "Bad Request" response + Given operation "ListIncidentJiraTemplates" enabled + And new "ListIncidentJiraTemplates" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident Jira templates returns "OK" response + Given operation "ListIncidentJiraTemplates" enabled + And new "ListIncidentJiraTemplates" request + When the request is sent + Then the response status is 200 OK + @skip @team:DataDog/incident-app Scenario: List incident attachments returns "Bad Request" response Given operation "ListIncidentAttachments" enabled @@ -1061,6 +1766,30 @@ Feature: Incidents Then the response status is 200 OK And the response "data" has length 1 + @generated @skip @team:DataDog/incident-app + Scenario: List incident communications returns "Bad Request" response + Given operation "ListIncidentCommunications" enabled + And new "ListIncidentCommunications" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident communications returns "Not Found" response + Given operation "ListIncidentCommunications" enabled + And new "ListIncidentCommunications" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List incident communications returns "OK" response + Given operation "ListIncidentCommunications" enabled + And new "ListIncidentCommunications" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: List incident notification rules returns "Bad Request" response Given operation "ListIncidentNotificationRules" enabled @@ -1108,6 +1837,68 @@ Feature: Incidents Then the response status is 200 OK And the response "data" has length 0 + @generated @skip @team:DataDog/incident-app + Scenario: List incident reserved roles returns "OK" response + Given operation "ListIncidentReservedRoles" enabled + And new "ListIncidentReservedRoles" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: List incident rule execution states returns "Bad Request" response + Given operation "ListIncidentRuleExecutionStates" enabled + And new "ListIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident rule execution states returns "Not Found" response + Given operation "ListIncidentRuleExecutionStates" enabled + And new "ListIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List incident rule execution states returns "OK" response + Given operation "ListIncidentRuleExecutionStates" enabled + And new "ListIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: List incident template variables returns "OK" response + Given operation "ListIncidentTemplateVariables" enabled + And new "ListIncidentTemplateVariables" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: List incident timeline entries returns "Bad Request" response + Given operation "ListIncidentTimelineEntries" enabled + And new "ListIncidentTimelineEntries" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident timeline entries returns "Not Found" response + Given operation "ListIncidentTimelineEntries" enabled + And new "ListIncidentTimelineEntries" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List incident timeline entries returns "OK" response + Given operation "ListIncidentTimelineEntries" enabled + And new "ListIncidentTimelineEntries" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: List postmortem templates returns "Bad Request" response Given operation "ListIncidentPostmortemTemplates" enabled @@ -1122,6 +1913,79 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: List status page email subscriptions returns "Not Found" response + Given operation "ListStatuspageEmailSubscriptions" enabled + And new "ListStatuspageEmailSubscriptions" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List status page email subscriptions returns "OK" response + Given operation "ListStatuspageEmailSubscriptions" enabled + And new "ListStatuspageEmailSubscriptions" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/incident-app + Scenario: Patch an incident notification rule returns "Bad Request" response + Given operation "PatchIncidentNotificationRule" enabled + And new "PatchIncidentNotificationRule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"conditions": [{"field": "severity", "values": ["SEV-1", "SEV-2"]}], "enabled": true, "handles": ["@team-email@company.com", "@slack-channel"], "renotify_on": ["status", "severity"], "trigger": "incident_created_trigger", "visibility": "organization"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}, "notification_template": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "notification_templates"}}}, "type": "incident_notification_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Patch an incident notification rule returns "Not Found" response + Given operation "PatchIncidentNotificationRule" enabled + And new "PatchIncidentNotificationRule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"conditions": [{"field": "severity", "values": ["SEV-1", "SEV-2"]}], "enabled": true, "handles": ["@team-email@company.com", "@slack-channel"], "renotify_on": ["status", "severity"], "trigger": "incident_created_trigger", "visibility": "organization"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}, "notification_template": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "notification_templates"}}}, "type": "incident_notification_rules"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/incident-app + Scenario: Patch an incident notification rule returns "OK" response + Given operation "PatchIncidentNotificationRule" enabled + And new "PatchIncidentNotificationRule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"conditions": [{"field": "severity", "values": ["SEV-1", "SEV-2"]}], "enabled": true, "handles": ["@team-email@company.com", "@slack-channel"], "renotify_on": ["status", "severity"], "trigger": "incident_created_trigger", "visibility": "organization"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}, "notification_template": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "notification_templates"}}}, "type": "incident_notification_rules"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Publish an incident status page notice returns "Bad Request" response + Given operation "CreateIncidentStatusPageNotice" enabled + And new "CreateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"components": {"component_1": "degraded_performance"}, "message": "We are investigating reports of elevated error rates.", "status": "investigating", "title": "Service degradation detected."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Publish an incident status page notice returns "Not Found" response + Given operation "CreateIncidentStatusPageNotice" enabled + And new "CreateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"components": {"component_1": "degraded_performance"}, "message": "We are investigating reports of elevated error rates.", "status": "investigating", "title": "Service degradation detected."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Publish an incident status page notice returns "OK" response + Given operation "CreateIncidentStatusPageNotice" enabled + And new "CreateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"components": {"component_1": "degraded_performance"}, "message": "We are investigating reports of elevated error rates.", "status": "investigating", "title": "Service degradation detected."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/incident-app Scenario: Remove commander from an incident returns "OK" response Given operation "UpdateIncident" enabled @@ -1133,6 +1997,33 @@ Feature: Incidents Then the response status is 200 OK And the response "data.relationships.commander_user.data" is equal to null + @generated @skip @team:DataDog/incident-app + Scenario: Render an incident template returns "Bad Request" response + Given operation "RenderIncidentTemplate" enabled + And new "RenderIncidentTemplate" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"content": "Incident INC-123 is SEV-1.", "datetime_format": "2006-01-02T15:04:05Z07:00", "timezone": "America/New_York", "validate_links": false, "validate_variables": false}, "type": "rendered_templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Render an incident template returns "Not Found" response + Given operation "RenderIncidentTemplate" enabled + And new "RenderIncidentTemplate" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"content": "Incident INC-123 is SEV-1.", "datetime_format": "2006-01-02T15:04:05Z07:00", "timezone": "America/New_York", "validate_links": false, "validate_variables": false}, "type": "rendered_templates"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Render an incident template returns "OK" response + Given operation "RenderIncidentTemplate" enabled + And new "RenderIncidentTemplate" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"content": "Incident INC-123 is SEV-1.", "datetime_format": "2006-01-02T15:04:05Z07:00", "timezone": "America/New_York", "validate_links": false, "validate_variables": false}, "type": "rendered_templates"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Search for incidents returns "Bad Request" response Given operation "SearchIncidents" enabled @@ -1170,6 +2061,20 @@ Feature: Incidents Then the response status is 200 OK And the response has 3 items + @generated @skip @team:DataDog/incident-app + Scenario: Search incidents returns "Bad Request" response + Given operation "SearchIncidentsV2" enabled + And new "SearchIncidentsV2" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Search incidents returns "OK" response + Given operation "SearchIncidentsV2" enabled + And new "SearchIncidentsV2" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Update an existing incident integration metadata returns "Bad Request" response Given operation "UpdateIncidentIntegration" enabled @@ -1232,6 +2137,150 @@ Feature: Incidents Then the response status is 200 OK And the response "data.attributes.title" is equal to "{{ incident.data.attributes.title }}-updated" + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Jira template returns "Bad Request" response + Given operation "UpdateIncidentJiraTemplate" enabled + And new "UpdateIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Jira template returns "Not Found" response + Given operation "UpdateIncidentJiraTemplate" enabled + And new "UpdateIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Jira template returns "OK" response + Given operation "UpdateIncidentJiraTemplate" enabled + And new "UpdateIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Microsoft Teams configuration returns "Bad Request" response + Given operation "UpdateIncidentMicrosoftTeamsConfiguration" enabled + And new "UpdateIncidentMicrosoftTeamsConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Microsoft Teams configuration returns "Not Found" response + Given operation "UpdateIncidentMicrosoftTeamsConfiguration" enabled + And new "UpdateIncidentMicrosoftTeamsConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Microsoft Teams configuration returns "OK" response + Given operation "UpdateIncidentMicrosoftTeamsConfiguration" enabled + And new "UpdateIncidentMicrosoftTeamsConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Statuspage incident returns "Bad Request" response + Given operation "UpdateIncidentStatuspageIncident" enabled + And new "UpdateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "statuspage_incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Statuspage incident returns "Not Found" response + Given operation "UpdateIncidentStatuspageIncident" enabled + And new "UpdateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "statuspage_incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Statuspage incident returns "OK" response + Given operation "UpdateIncidentStatuspageIncident" enabled + And new "UpdateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "statuspage_incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Zoom configuration returns "Bad Request" response + Given operation "UpdateIncidentZoomConfiguration" enabled + And new "UpdateIncidentZoomConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Zoom configuration returns "Not Found" response + Given operation "UpdateIncidentZoomConfiguration" enabled + And new "UpdateIncidentZoomConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Zoom configuration returns "OK" response + Given operation "UpdateIncidentZoomConfiguration" enabled + And new "UpdateIncidentZoomConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident communication returns "Bad Request" response + Given operation "UpdateIncidentCommunication" enabled + And new "UpdateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident communication returns "Not Found" response + Given operation "UpdateIncidentCommunication" enabled + And new "UpdateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident communication returns "OK" response + Given operation "UpdateIncidentCommunication" enabled + And new "UpdateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: Update an incident notification rule returns "Bad Request" response Given operation "UpdateIncidentNotificationRule" enabled @@ -1259,6 +2308,69 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident status page notice returns "Bad Request" response + Given operation "UpdateIncidentStatusPageNotice" enabled + And new "UpdateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And request contains "notice_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "The issue has been resolved.", "status": "resolved", "title": "Service degradation resolved."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident status page notice returns "Not Found" response + Given operation "UpdateIncidentStatusPageNotice" enabled + And new "UpdateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And request contains "notice_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "The issue has been resolved.", "status": "resolved", "title": "Service degradation resolved."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident status page notice returns "OK" response + Given operation "UpdateIncidentStatusPageNotice" enabled + And new "UpdateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And request contains "notice_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "The issue has been resolved.", "status": "resolved", "title": "Service degradation resolved."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident timeline entry returns "Bad Request" response + Given operation "UpdateIncidentTimelineEntry" enabled + And new "UpdateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident timeline entry returns "Not Found" response + Given operation "UpdateIncidentTimelineEntry" enabled + And new "UpdateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident timeline entry returns "OK" response + Given operation "UpdateIncidentTimelineEntry" enabled + And new "UpdateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: Update an incident todo returns "Bad Request" response Given operation "UpdateIncidentTodo" enabled @@ -1506,3 +2618,33 @@ Feature: Incidents And body with value {"data": {"attributes": {"name": "Standard Postmortem Template"}, "type": "postmortem_template"}} When the request is sent Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Upsert incident automation data returns "Bad Request" response + Given operation "UpsertIncidentAutomationData" enabled + And new "UpsertIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"value": "completed"}, "type": "incidents_automation_data"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Upsert incident automation data returns "Not Found" response + Given operation "UpsertIncidentAutomationData" enabled + And new "UpsertIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"value": "completed"}, "type": "incidents_automation_data"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Upsert incident automation data returns "OK" response + Given operation "UpsertIncidentAutomationData" enabled + And new "UpsertIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"value": "completed"}, "type": "incidents_automation_data"}} + 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 dc1a8b2fbbde..5141ba44f685 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2191,6 +2191,54 @@ "type": "idempotent" } }, + "ListIncidentJiraTemplates": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentJiraTemplate", + "parameters": [ + { + "name": "template_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpdateIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "CreateIncidentMicrosoftTeamsConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentMicrosoftTeamsConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListIncidentNotificationRules": { "tag": "Incidents", "undo": { @@ -2222,6 +2270,12 @@ "type": "safe" } }, + "PatchIncidentNotificationRule": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "UpdateIncidentNotificationRule": { "tag": "Incidents", "undo": { @@ -2302,6 +2356,24 @@ "type": "idempotent" } }, + "ListIncidentReservedRoles": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "GetIncidentReservedRole": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ListIncidentTemplateVariables": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "ListIncidentTypes": { "tag": "Incidents", "undo": { @@ -2376,6 +2448,18 @@ "type": "idempotent" } }, + "CreateIncidentZoomConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentZoomConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ImportIncident": { "tag": "Incidents", "undo": { @@ -2389,12 +2473,72 @@ "type": "unsafe" } }, + "ListIncidentPagerdutyServices": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "GetIncidentPagerdutyRelatedIncidents": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentRoleAssignment": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentRoleAssignment", + "parameters": [ + { + "name": "role_assignment_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentRoleAssignment": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentRoleAssignment": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "SearchIncidents": { "tag": "Incidents", "undo": { "type": "safe" } }, + "SearchIncidentsV2": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ExportIncidents": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentStatuspageIncident": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentStatuspageIncident": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "DeleteIncident": { "tag": "Incidents", "undo": { @@ -2456,6 +2600,70 @@ "type": "idempotent" } }, + "GetIncidentAutomationData": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpsertIncidentAutomationData": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentCaseSourceLink": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ListIncidentCommunications": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentCommunication": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentCommunication", + "parameters": [ + { + "name": "incident_id", + "source": "data.attributes.incident_id" + }, + { + "name": "communication_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentCommunication": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentCommunication": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpdateIncidentCommunication": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "CreateIncidentGoogleMeetSpace": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListIncidentImpacts": { "tag": "Incidents", "undo": { @@ -2485,6 +2693,24 @@ "type": "idempotent" } }, + "CreateIncidentJiraIssue": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "CreateIncidentMSTeamsOnlineMeeting": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentPageSourceLink": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "ListIncidentIntegrations": { "tag": "Incidents", "undo": { @@ -2567,6 +2793,94 @@ "type": "idempotent" } }, + "RenderIncidentTemplate": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ListIncidentRuleExecutionStates": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "BatchCreateIncidentRuleExecutionStates": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "BatchUpdateIncidentRuleExecutionStates": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentStatusPagesSuggestion": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentStatusPageNotice": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentStatusPageNotice": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "ListIncidentTimelineEntries": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentTimelineEntry": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentTimelineEntry", + "parameters": [ + { + "name": "incident_id", + "source": "data.attributes.incident_id" + }, + { + "name": "timeline_entry_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentTimelineEntry": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentTimelineEntry": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentTimelineEntryThread": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentZoomMeeting": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListAWSAccounts": { "tag": "AWS Integration", "undo": { @@ -6371,6 +6685,12 @@ "type": "safe" } }, + "GetStatuspageSubscriptionPreferences": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "DeleteStatusPage": { "tag": "Status Pages", "undo": { @@ -6512,6 +6832,18 @@ "type": "idempotent" } }, + "ListStatuspageEmailSubscriptions": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateStatuspageEmailSubscription": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "UnpublishStatusPage": { "tag": "Status Pages", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 5f9e199c1b69..a1b2cfd69899 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -322,59 +322,109 @@ def initialize "v2.create_email_transport_webhook_intake": false, "v2.create_hamr_org_connection": false, "v2.get_hamr_org_connection": false, + "v2.batch_create_incident_rule_execution_states": false, + "v2.batch_update_incident_rule_execution_states": false, "v2.create_global_incident_handle": false, "v2.create_incident": false, "v2.create_incident_attachment": false, + "v2.create_incident_communication": false, + "v2.create_incident_google_meet_space": false, "v2.create_incident_integration": false, + "v2.create_incident_jira_issue": false, + "v2.create_incident_jira_template": false, + "v2.create_incident_microsoft_teams_configuration": false, + "v2.create_incident_ms_teams_online_meeting": false, "v2.create_incident_notification_rule": false, "v2.create_incident_notification_template": false, "v2.create_incident_postmortem_attachment": false, "v2.create_incident_postmortem_template": false, + "v2.create_incident_role_assignment": false, + "v2.create_incident_statuspage_incident": false, + "v2.create_incident_status_page_notice": false, + "v2.create_incident_timeline_entry": false, "v2.create_incident_todo": false, "v2.create_incident_type": false, "v2.create_incident_user_defined_field": false, + "v2.create_incident_zoom_configuration": false, + "v2.create_incident_zoom_meeting": false, + "v2.create_statuspage_email_subscription": false, "v2.delete_global_incident_handle": false, "v2.delete_incident": false, "v2.delete_incident_attachment": false, + "v2.delete_incident_communication": false, "v2.delete_incident_integration": false, + "v2.delete_incident_jira_template": false, "v2.delete_incident_notification_rule": false, "v2.delete_incident_notification_template": false, "v2.delete_incident_postmortem_template": false, + "v2.delete_incident_role_assignment": false, + "v2.delete_incident_timeline_entry": false, "v2.delete_incident_todo": false, "v2.delete_incident_type": false, "v2.delete_incident_user_defined_field": false, + "v2.export_incidents": false, "v2.get_global_incident_settings": false, "v2.get_incident": false, + "v2.get_incident_automation_data": false, + "v2.get_incident_case_source_link": false, + "v2.get_incident_communication": false, "v2.get_incident_integration": false, + "v2.get_incident_jira_template": false, "v2.get_incident_notification_rule": false, "v2.get_incident_notification_template": false, + "v2.get_incident_pagerduty_related_incidents": false, + "v2.get_incident_page_source_link": false, "v2.get_incident_postmortem_template": false, + "v2.get_incident_reserved_role": false, + "v2.get_incident_role_assignment": false, + "v2.get_incident_status_pages_suggestion": false, + "v2.get_incident_timeline_entry_thread": false, "v2.get_incident_todo": false, "v2.get_incident_type": false, "v2.get_incident_user_defined_field": false, + "v2.get_statuspage_subscription_preferences": false, "v2.import_incident": false, "v2.list_global_incident_handles": false, "v2.list_incident_attachments": false, + "v2.list_incident_communications": false, "v2.list_incident_integrations": false, + "v2.list_incident_jira_templates": false, "v2.list_incident_notification_rules": false, "v2.list_incident_notification_templates": false, + "v2.list_incident_pagerduty_services": false, "v2.list_incident_postmortem_templates": false, + "v2.list_incident_reserved_roles": false, + "v2.list_incident_rule_execution_states": false, "v2.list_incidents": false, + "v2.list_incident_template_variables": false, + "v2.list_incident_timeline_entries": false, "v2.list_incident_todos": false, "v2.list_incident_types": false, "v2.list_incident_user_defined_fields": false, + "v2.list_statuspage_email_subscriptions": false, + "v2.patch_incident_notification_rule": false, + "v2.render_incident_template": false, "v2.search_incidents": false, + "v2.search_incidents_v2": false, "v2.update_global_incident_handle": false, "v2.update_global_incident_settings": false, "v2.update_incident": false, "v2.update_incident_attachment": false, + "v2.update_incident_communication": false, "v2.update_incident_integration": false, + "v2.update_incident_jira_template": false, + "v2.update_incident_microsoft_teams_configuration": false, "v2.update_incident_notification_rule": false, "v2.update_incident_notification_template": false, "v2.update_incident_postmortem_template": false, + "v2.update_incident_statuspage_incident": false, + "v2.update_incident_status_page_notice": false, + "v2.update_incident_timeline_entry": false, "v2.update_incident_todo": false, "v2.update_incident_type": false, "v2.update_incident_user_defined_field": false, + "v2.update_incident_zoom_configuration": false, + "v2.upsert_incident_automation_data": false, "v2.create_aws_account_ccm_config": false, "v2.delete_aws_account_ccm_config": false, "v2.get_aws_account_ccm_config": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 9f5558e0d1ac..98915aea6e33 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3091,15 +3091,51 @@ def overrides "v2.http_token_update" => "HTTPTokenUpdate", "v2.idp_metadata_form_data" => "IdPMetadataFormData", "v2.incident_attachment_type" => "IncidentAttachmentType", + "v2.incident_automation_data_attributes_request" => "IncidentAutomationDataAttributesRequest", + "v2.incident_automation_data_attributes_response" => "IncidentAutomationDataAttributesResponse", + "v2.incident_automation_data_data_request" => "IncidentAutomationDataDataRequest", + "v2.incident_automation_data_data_response" => "IncidentAutomationDataDataResponse", + "v2.incident_automation_data_request" => "IncidentAutomationDataRequest", + "v2.incident_automation_data_response" => "IncidentAutomationDataResponse", + "v2.incident_automation_data_type" => "IncidentAutomationDataType", + "v2.incident_batch_create_rule_execution_states_data" => "IncidentBatchCreateRuleExecutionStatesData", + "v2.incident_batch_create_rule_execution_states_data_attributes" => "IncidentBatchCreateRuleExecutionStatesDataAttributes", + "v2.incident_batch_create_rule_execution_states_request" => "IncidentBatchCreateRuleExecutionStatesRequest", + "v2.incident_batch_update_rule_execution_states_data" => "IncidentBatchUpdateRuleExecutionStatesData", + "v2.incident_batch_update_rule_execution_states_data_attributes" => "IncidentBatchUpdateRuleExecutionStatesDataAttributes", + "v2.incident_batch_update_rule_execution_states_request" => "IncidentBatchUpdateRuleExecutionStatesRequest", + "v2.incident_case_link_data" => "IncidentCaseLinkData", + "v2.incident_case_link_data_attributes" => "IncidentCaseLinkDataAttributes", + "v2.incident_case_link_response" => "IncidentCaseLinkResponse", + "v2.incident_case_link_type" => "IncidentCaseLinkType", + "v2.incident_communication_content" => "IncidentCommunicationContent", + "v2.incident_communication_content_handle" => "IncidentCommunicationContentHandle", + "v2.incident_communication_data_attributes_request" => "IncidentCommunicationDataAttributesRequest", + "v2.incident_communication_data_attributes_response" => "IncidentCommunicationDataAttributesResponse", + "v2.incident_communication_data_request" => "IncidentCommunicationDataRequest", + "v2.incident_communication_data_response" => "IncidentCommunicationDataResponse", + "v2.incident_communication_kind" => "IncidentCommunicationKind", + "v2.incident_communication_request" => "IncidentCommunicationRequest", + "v2.incident_communication_response" => "IncidentCommunicationResponse", + "v2.incident_communications_response" => "IncidentCommunicationsResponse", + "v2.incident_communication_type" => "IncidentCommunicationType", "v2.incident_create_attributes" => "IncidentCreateAttributes", "v2.incident_create_data" => "IncidentCreateData", "v2.incident_create_relationships" => "IncidentCreateRelationships", "v2.incident_create_request" => "IncidentCreateRequest", + "v2.incident_create_zoom_meeting_data" => "IncidentCreateZoomMeetingData", + "v2.incident_create_zoom_meeting_data_attributes" => "IncidentCreateZoomMeetingDataAttributes", + "v2.incident_create_zoom_meeting_request" => "IncidentCreateZoomMeetingRequest", "v2.incident_field_attributes" => "IncidentFieldAttributes", "v2.incident_field_attributes_multiple_value" => "IncidentFieldAttributesMultipleValue", "v2.incident_field_attributes_single_value" => "IncidentFieldAttributesSingleValue", "v2.incident_field_attributes_single_value_type" => "IncidentFieldAttributesSingleValueType", "v2.incident_field_attributes_value_type" => "IncidentFieldAttributesValueType", + "v2.incident_google_meet_integration_data_attributes" => "IncidentGoogleMeetIntegrationDataAttributes", + "v2.incident_google_meet_integration_data_response" => "IncidentGoogleMeetIntegrationDataResponse", + "v2.incident_google_meet_integration_response" => "IncidentGoogleMeetIntegrationResponse", + "v2.incident_google_meet_integration_type" => "IncidentGoogleMeetIntegrationType", + "v2.incident_google_meet_space" => "IncidentGoogleMeetSpace", "v2.incident_handle_attributes_fields" => "IncidentHandleAttributesFields", "v2.incident_handle_attributes_request" => "IncidentHandleAttributesRequest", "v2.incident_handle_attributes_response" => "IncidentHandleAttributesResponse", @@ -3151,6 +3187,38 @@ def overrides "v2.incident_integration_metadata_response_included_item" => "IncidentIntegrationMetadataResponseIncludedItem", "v2.incident_integration_metadata_type" => "IncidentIntegrationMetadataType", "v2.incident_integration_relationships" => "IncidentIntegrationRelationships", + "v2.incident_jira_issue_data_attributes_request" => "IncidentJiraIssueDataAttributesRequest", + "v2.incident_jira_issue_data_request" => "IncidentJiraIssueDataRequest", + "v2.incident_jira_issue_integration_data_attributes" => "IncidentJiraIssueIntegrationDataAttributes", + "v2.incident_jira_issue_integration_data_response" => "IncidentJiraIssueIntegrationDataResponse", + "v2.incident_jira_issue_integration_response" => "IncidentJiraIssueIntegrationResponse", + "v2.incident_jira_issue_integration_type" => "IncidentJiraIssueIntegrationType", + "v2.incident_jira_issue_request" => "IncidentJiraIssueRequest", + "v2.incident_jira_issue_type" => "IncidentJiraIssueType", + "v2.incident_jira_template_data_attributes_request" => "IncidentJiraTemplateDataAttributesRequest", + "v2.incident_jira_template_data_attributes_response" => "IncidentJiraTemplateDataAttributesResponse", + "v2.incident_jira_template_data_request" => "IncidentJiraTemplateDataRequest", + "v2.incident_jira_template_data_response" => "IncidentJiraTemplateDataResponse", + "v2.incident_jira_template_field_configuration" => "IncidentJiraTemplateFieldConfiguration", + "v2.incident_jira_template_incident_type_relationship" => "IncidentJiraTemplateIncidentTypeRelationship", + "v2.incident_jira_template_incident_type_relationship_data" => "IncidentJiraTemplateIncidentTypeRelationshipData", + "v2.incident_jira_template_relationships" => "IncidentJiraTemplateRelationships", + "v2.incident_jira_template_request" => "IncidentJiraTemplateRequest", + "v2.incident_jira_template_response" => "IncidentJiraTemplateResponse", + "v2.incident_jira_templates_response" => "IncidentJiraTemplatesResponse", + "v2.incident_jira_template_type" => "IncidentJiraTemplateType", + "v2.incident_microsoft_teams_configuration_data_attributes_request" => "IncidentMicrosoftTeamsConfigurationDataAttributesRequest", + "v2.incident_microsoft_teams_configuration_data_attributes_response" => "IncidentMicrosoftTeamsConfigurationDataAttributesResponse", + "v2.incident_microsoft_teams_configuration_data_request" => "IncidentMicrosoftTeamsConfigurationDataRequest", + "v2.incident_microsoft_teams_configuration_data_response" => "IncidentMicrosoftTeamsConfigurationDataResponse", + "v2.incident_microsoft_teams_configuration_request" => "IncidentMicrosoftTeamsConfigurationRequest", + "v2.incident_microsoft_teams_configuration_response" => "IncidentMicrosoftTeamsConfigurationResponse", + "v2.incident_microsoft_teams_configuration_type" => "IncidentMicrosoftTeamsConfigurationType", + "v2.incident_microsoft_teams_integration_type" => "IncidentMicrosoftTeamsIntegrationType", + "v2.incident_ms_teams_channel" => "IncidentMSTeamsChannel", + "v2.incident_ms_teams_integration_data_attributes" => "IncidentMSTeamsIntegrationDataAttributes", + "v2.incident_ms_teams_integration_data_response" => "IncidentMSTeamsIntegrationDataResponse", + "v2.incident_ms_teams_integration_response" => "IncidentMSTeamsIntegrationResponse", "v2.incident_non_datadog_creator" => "IncidentNonDatadogCreator", "v2.incident_notification_handle" => "IncidentNotificationHandle", "v2.incident_notification_rule" => "IncidentNotificationRule", @@ -3184,9 +3252,28 @@ def overrides "v2.incident_notification_template_type" => "IncidentNotificationTemplateType", "v2.incident_notification_template_update_attributes" => "IncidentNotificationTemplateUpdateAttributes", "v2.incident_notification_template_update_data" => "IncidentNotificationTemplateUpdateData", + "v2.incident_pagerduty_incident_data_response" => "IncidentPagerdutyIncidentDataResponse", + "v2.incident_pagerduty_related_incidents_response" => "IncidentPagerdutyRelatedIncidentsResponse", + "v2.incident_pagerduty_service_data" => "IncidentPagerdutyServiceData", + "v2.incident_pagerduty_service_data_attributes" => "IncidentPagerdutyServiceDataAttributes", + "v2.incident_pagerduty_services_response" => "IncidentPagerdutyServicesResponse", + "v2.incident_pagerduty_service_type" => "IncidentPagerdutyServiceType", "v2.incident_postmortem_type" => "IncidentPostmortemType", "v2.incident_related_object" => "IncidentRelatedObject", "v2.incident_relationship_data" => "IncidentRelationshipData", + "v2.incident_rendered_template_data" => "IncidentRenderedTemplateData", + "v2.incident_rendered_template_data_attributes" => "IncidentRenderedTemplateDataAttributes", + "v2.incident_rendered_template_response" => "IncidentRenderedTemplateResponse", + "v2.incident_rendered_template_type" => "IncidentRenderedTemplateType", + "v2.incident_render_template_data_attributes_request" => "IncidentRenderTemplateDataAttributesRequest", + "v2.incident_render_template_data_request" => "IncidentRenderTemplateDataRequest", + "v2.incident_render_template_request" => "IncidentRenderTemplateRequest", + "v2.incident_reserved_role_data_attributes_response" => "IncidentReservedRoleDataAttributesResponse", + "v2.incident_reserved_role_data_response" => "IncidentReservedRoleDataResponse", + "v2.incident_reserved_role_policy" => "IncidentReservedRolePolicy", + "v2.incident_reserved_role_response" => "IncidentReservedRoleResponse", + "v2.incident_reserved_roles_response" => "IncidentReservedRolesResponse", + "v2.incident_reserved_role_type" => "IncidentReservedRoleType", "v2.incident_resource_type" => "IncidentResourceType", "v2.incident_responders_type" => "IncidentRespondersType", "v2.incident_response" => "IncidentResponse", @@ -3196,6 +3283,27 @@ def overrides "v2.incident_response_meta" => "IncidentResponseMeta", "v2.incident_response_meta_pagination" => "IncidentResponseMetaPagination", "v2.incident_response_relationships" => "IncidentResponseRelationships", + "v2.incident_role_assignment_data_attributes_request" => "IncidentRoleAssignmentDataAttributesRequest", + "v2.incident_role_assignment_data_attributes_response" => "IncidentRoleAssignmentDataAttributesResponse", + "v2.incident_role_assignment_data_request" => "IncidentRoleAssignmentDataRequest", + "v2.incident_role_assignment_data_response" => "IncidentRoleAssignmentDataResponse", + "v2.incident_role_assignment_relationships_request" => "IncidentRoleAssignmentRelationshipsRequest", + "v2.incident_role_assignment_relationships_response" => "IncidentRoleAssignmentRelationshipsResponse", + "v2.incident_role_assignment_request" => "IncidentRoleAssignmentRequest", + "v2.incident_role_assignment_responder_relationship" => "IncidentRoleAssignmentResponderRelationship", + "v2.incident_role_assignment_responder_relationship_data" => "IncidentRoleAssignmentResponderRelationshipData", + "v2.incident_role_assignment_response" => "IncidentRoleAssignmentResponse", + "v2.incident_role_assignment_role_relationship" => "IncidentRoleAssignmentRoleRelationship", + "v2.incident_role_assignment_role_relationship_data" => "IncidentRoleAssignmentRoleRelationshipData", + "v2.incident_role_assignment_type" => "IncidentRoleAssignmentType", + "v2.incident_rule_execution_state_data_attributes_response" => "IncidentRuleExecutionStateDataAttributesResponse", + "v2.incident_rule_execution_state_data_response" => "IncidentRuleExecutionStateDataResponse", + "v2.incident_rule_execution_state_rule" => "IncidentRuleExecutionStateRule", + "v2.incident_rule_execution_states_response" => "IncidentRuleExecutionStatesResponse", + "v2.incident_rule_execution_state_type" => "IncidentRuleExecutionStateType", + "v2.incident_search_incidents_export_request" => "IncidentSearchIncidentsExportRequest", + "v2.incident_search_incidents_include_type" => "IncidentSearchIncidentsIncludeType", + "v2.incident_search_incidents_sort_order" => "IncidentSearchIncidentsSortOrder", "v2.incident_search_response" => "IncidentSearchResponse", "v2.incident_search_response_attributes" => "IncidentSearchResponseAttributes", "v2.incident_search_response_data" => "IncidentSearchResponseData", @@ -3224,10 +3332,61 @@ def overrides "v2.incident_service_update_request" => "IncidentServiceUpdateRequest", "v2.incident_severity" => "IncidentSeverity", "v2.incidents_response" => "IncidentsResponse", + "v2.incident_statuspage_incident_data_attributes_request" => "IncidentStatuspageIncidentDataAttributesRequest", + "v2.incident_statuspage_incident_data_attributes_response" => "IncidentStatuspageIncidentDataAttributesResponse", + "v2.incident_statuspage_incident_data_request" => "IncidentStatuspageIncidentDataRequest", + "v2.incident_statuspage_incident_data_response" => "IncidentStatuspageIncidentDataResponse", + "v2.incident_statuspage_incident_entry" => "IncidentStatuspageIncidentEntry", + "v2.incident_statuspage_incident_request" => "IncidentStatuspageIncidentRequest", + "v2.incident_statuspage_incident_response" => "IncidentStatuspageIncidentResponse", + "v2.incident_statuspage_incident_type" => "IncidentStatuspageIncidentType", + "v2.incident_status_page_notice_create_data" => "IncidentStatusPageNoticeCreateData", + "v2.incident_status_page_notice_create_data_attributes" => "IncidentStatusPageNoticeCreateDataAttributes", + "v2.incident_status_page_notice_create_request" => "IncidentStatusPageNoticeCreateRequest", + "v2.incident_status_page_notice_integration_data_attributes" => "IncidentStatusPageNoticeIntegrationDataAttributes", + "v2.incident_status_page_notice_integration_data_response" => "IncidentStatusPageNoticeIntegrationDataResponse", + "v2.incident_status_page_notice_integration_response" => "IncidentStatusPageNoticeIntegrationResponse", + "v2.incident_status_page_notice_integration_type" => "IncidentStatusPageNoticeIntegrationType", + "v2.incident_status_page_notice_update_data" => "IncidentStatusPageNoticeUpdateData", + "v2.incident_status_page_notice_update_data_attributes" => "IncidentStatusPageNoticeUpdateDataAttributes", + "v2.incident_status_page_notice_update_request" => "IncidentStatusPageNoticeUpdateRequest", + "v2.incident_statuspage_preferences_data" => "IncidentStatuspagePreferencesData", + "v2.incident_statuspage_preferences_data_attributes" => "IncidentStatuspagePreferencesDataAttributes", + "v2.incident_statuspage_preferences_response" => "IncidentStatuspagePreferencesResponse", + "v2.incident_statuspage_preferences_type" => "IncidentStatuspagePreferencesType", + "v2.incident_status_pages_suggestion_data" => "IncidentStatusPagesSuggestionData", + "v2.incident_status_pages_suggestion_data_attributes" => "IncidentStatusPagesSuggestionDataAttributes", + "v2.incident_status_pages_suggestion_response" => "IncidentStatusPagesSuggestionResponse", + "v2.incident_status_pages_suggestion_type" => "IncidentStatusPagesSuggestionType", + "v2.incident_statuspage_subscription_data_attributes_request" => "IncidentStatuspageSubscriptionDataAttributesRequest", + "v2.incident_statuspage_subscription_data_attributes_response" => "IncidentStatuspageSubscriptionDataAttributesResponse", + "v2.incident_statuspage_subscription_data_request" => "IncidentStatuspageSubscriptionDataRequest", + "v2.incident_statuspage_subscription_data_response" => "IncidentStatuspageSubscriptionDataResponse", + "v2.incident_statuspage_subscription_request" => "IncidentStatuspageSubscriptionRequest", + "v2.incident_statuspage_subscription_response" => "IncidentStatuspageSubscriptionResponse", + "v2.incident_statuspage_subscriptions_response" => "IncidentStatuspageSubscriptionsResponse", + "v2.incident_statuspage_subscription_type" => "IncidentStatuspageSubscriptionType", + "v2.incident_template_variable_data" => "IncidentTemplateVariableData", + "v2.incident_template_variable_data_attributes" => "IncidentTemplateVariableDataAttributes", + "v2.incident_template_variables_response" => "IncidentTemplateVariablesResponse", + "v2.incident_template_variable_type" => "IncidentTemplateVariableType", "v2.incident_timeline_cell_create_attributes" => "IncidentTimelineCellCreateAttributes", "v2.incident_timeline_cell_markdown_content_type" => "IncidentTimelineCellMarkdownContentType", "v2.incident_timeline_cell_markdown_create_attributes" => "IncidentTimelineCellMarkdownCreateAttributes", "v2.incident_timeline_cell_markdown_create_attributes_content" => "IncidentTimelineCellMarkdownCreateAttributesContent", + "v2.incident_timeline_cell_source" => "IncidentTimelineCellSource", + "v2.incident_timeline_cell_type" => "IncidentTimelineCellType", + "v2.incident_timeline_entries_response" => "IncidentTimelineEntriesResponse", + "v2.incident_timeline_entry_content" => "IncidentTimelineEntryContent", + "v2.incident_timeline_entry_data_attributes_request" => "IncidentTimelineEntryDataAttributesRequest", + "v2.incident_timeline_entry_data_attributes_response" => "IncidentTimelineEntryDataAttributesResponse", + "v2.incident_timeline_entry_data_request" => "IncidentTimelineEntryDataRequest", + "v2.incident_timeline_entry_data_response" => "IncidentTimelineEntryDataResponse", + "v2.incident_timeline_entry_request" => "IncidentTimelineEntryRequest", + "v2.incident_timeline_entry_response" => "IncidentTimelineEntryResponse", + "v2.incident_timeline_entry_type" => "IncidentTimelineEntryType", + "v2.incident_timeline_thread_data_response" => "IncidentTimelineThreadDataResponse", + "v2.incident_timeline_thread_response" => "IncidentTimelineThreadResponse", "v2.incident_todo_anonymous_assignee" => "IncidentTodoAnonymousAssignee", "v2.incident_todo_anonymous_assignee_source" => "IncidentTodoAnonymousAssigneeSource", "v2.incident_todo_assignee" => "IncidentTodoAssignee", @@ -3281,6 +3440,18 @@ def overrides "v2.incident_user_defined_field_update_data" => "IncidentUserDefinedFieldUpdateData", "v2.incident_user_defined_field_update_request" => "IncidentUserDefinedFieldUpdateRequest", "v2.incident_user_defined_field_valid_value" => "IncidentUserDefinedFieldValidValue", + "v2.incident_zoom_configuration_data_attributes_request" => "IncidentZoomConfigurationDataAttributesRequest", + "v2.incident_zoom_configuration_data_attributes_response" => "IncidentZoomConfigurationDataAttributesResponse", + "v2.incident_zoom_configuration_data_request" => "IncidentZoomConfigurationDataRequest", + "v2.incident_zoom_configuration_data_response" => "IncidentZoomConfigurationDataResponse", + "v2.incident_zoom_configuration_request" => "IncidentZoomConfigurationRequest", + "v2.incident_zoom_configuration_response" => "IncidentZoomConfigurationResponse", + "v2.incident_zoom_configuration_type" => "IncidentZoomConfigurationType", + "v2.incident_zoom_integration_data_attributes" => "IncidentZoomIntegrationDataAttributes", + "v2.incident_zoom_integration_data_response" => "IncidentZoomIntegrationDataResponse", + "v2.incident_zoom_integration_response" => "IncidentZoomIntegrationResponse", + "v2.incident_zoom_integration_type" => "IncidentZoomIntegrationType", + "v2.incident_zoom_meeting" => "IncidentZoomMeeting", "v2.include_type" => "IncludeType", "v2.input_schema" => "InputSchema", "v2.input_schema_parameters" => "InputSchemaParameters", diff --git a/lib/datadog_api_client/v2/api/incidents_api.rb b/lib/datadog_api_client/v2/api/incidents_api.rb index e5ea4e02b73e..f777b2f1429c 100644 --- a/lib/datadog_api_client/v2/api/incidents_api.rb +++ b/lib/datadog_api_client/v2/api/incidents_api.rb @@ -23,6 +23,162 @@ def initialize(api_client = DatadogAPIClient::APIClient.default) @api_client = api_client end + # Batch create incident rule execution states. + # + # @see #batch_create_incident_rule_execution_states_with_http_info + def batch_create_incident_rule_execution_states(incident_id, body, opts = {}) + data, _status_code, _headers = batch_create_incident_rule_execution_states_with_http_info(incident_id, body, opts) + data + end + + # Batch create incident rule execution states. + # + # Batch create rule execution states for a given incident. + # + # @param incident_id [String] The UUID of the incident. + # @param body [IncidentBatchCreateRuleExecutionStatesRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentRuleExecutionStatesResponse, Integer, Hash)>] IncidentRuleExecutionStatesResponse data, response status code and response headers + def batch_create_incident_rule_execution_states_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.batch_create_incident_rule_execution_states".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.batch_create_incident_rule_execution_states") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.batch_create_incident_rule_execution_states")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.batch_create_incident_rule_execution_states ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.batch_create_incident_rule_execution_states" + 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 IncidentsAPI.batch_create_incident_rule_execution_states" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/rule-execution-states/batch'.sub('{incident_id}', CGI.escape(incident_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] || 'IncidentRuleExecutionStatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :batch_create_incident_rule_execution_states, + :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: IncidentsAPI#batch_create_incident_rule_execution_states\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Batch update incident rule execution states. + # + # @see #batch_update_incident_rule_execution_states_with_http_info + def batch_update_incident_rule_execution_states(incident_id, body, opts = {}) + data, _status_code, _headers = batch_update_incident_rule_execution_states_with_http_info(incident_id, body, opts) + data + end + + # Batch update incident rule execution states. + # + # Batch update rule execution states for a given incident. + # + # @param incident_id [String] The UUID of the incident. + # @param body [IncidentBatchUpdateRuleExecutionStatesRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentRuleExecutionStatesResponse, Integer, Hash)>] IncidentRuleExecutionStatesResponse data, response status code and response headers + def batch_update_incident_rule_execution_states_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.batch_update_incident_rule_execution_states".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.batch_update_incident_rule_execution_states") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.batch_update_incident_rule_execution_states")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.batch_update_incident_rule_execution_states ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.batch_update_incident_rule_execution_states" + 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 IncidentsAPI.batch_update_incident_rule_execution_states" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/rule-execution-states/batch'.sub('{incident_id}', CGI.escape(incident_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] || 'IncidentRuleExecutionStatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :batch_update_incident_rule_execution_states, + :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: IncidentsAPI#batch_update_incident_rule_execution_states\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Create global incident handle. # # @see #create_global_incident_handle_with_http_info @@ -251,42 +407,46 @@ def create_incident_attachment_with_http_info(incident_id, body, opts = {}) return data, status_code, headers end - # Create an incident impact. + # Create an incident communication. # - # @see #create_incident_impact_with_http_info - def create_incident_impact(incident_id, body, opts = {}) - data, _status_code, _headers = create_incident_impact_with_http_info(incident_id, body, opts) + # @see #create_incident_communication_with_http_info + def create_incident_communication(incident_id, body, opts = {}) + data, _status_code, _headers = create_incident_communication_with_http_info(incident_id, body, opts) data end - # Create an incident impact. + # Create an incident communication. # - # Create an impact for an incident. + # Create a new communication for a given incident. # # @param incident_id [String] The UUID of the incident. - # @param body [IncidentImpactCreateRequest] Incident impact payload. + # @param body [IncidentCommunicationRequest] # @param opts [Hash] the optional parameters - # @option opts [Array] :include Specifies which related resources should be included in the response. - # @return [Array<(IncidentImpactResponse, Integer, Hash)>] IncidentImpactResponse data, response status code and response headers - def create_incident_impact_with_http_info(incident_id, body, opts = {}) + # @return [Array<(IncidentCommunicationResponse, Integer, Hash)>] IncidentCommunicationResponse data, response status code and response headers + def create_incident_communication_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_communication".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_communication") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_communication")) + end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_impact ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_communication ...' end # verify the required parameter 'incident_id' is set if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_impact" + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_communication" 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 IncidentsAPI.create_incident_impact" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.create_incident_communication" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/impacts'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/communications'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} @@ -302,13 +462,13 @@ def create_incident_impact_with_http_info(incident_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'IncidentImpactResponse' + return_type = opts[:debug_return_type] || 'IncidentCommunicationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_incident_impact, + :operation => :create_incident_communication, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -320,48 +480,43 @@ def create_incident_impact_with_http_info(incident_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: IncidentsAPI#create_incident_impact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_communication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create an incident integration metadata. + # Create an incident Google Meet space. # - # @see #create_incident_integration_with_http_info - def create_incident_integration(incident_id, body, opts = {}) - data, _status_code, _headers = create_incident_integration_with_http_info(incident_id, body, opts) + # @see #create_incident_google_meet_space_with_http_info + def create_incident_google_meet_space(incident_id, opts = {}) + data, _status_code, _headers = create_incident_google_meet_space_with_http_info(incident_id, opts) data end - # Create an incident integration metadata. + # Create an incident Google Meet space. # - # Create an incident integration metadata. + # Create a Google Meet space for a given incident. # # @param incident_id [String] The UUID of the incident. - # @param body [IncidentIntegrationMetadataCreateRequest] Incident integration metadata payload. # @param opts [Hash] the optional parameters - # @return [Array<(IncidentIntegrationMetadataResponse, Integer, Hash)>] IncidentIntegrationMetadataResponse data, response status code and response headers - def create_incident_integration_with_http_info(incident_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_integration".to_sym] + # @return [Array<(IncidentGoogleMeetIntegrationResponse, Integer, Hash)>] IncidentGoogleMeetIntegrationResponse data, response status code and response headers + def create_incident_google_meet_space_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_google_meet_space".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_integration") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_google_meet_space") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_integration")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_google_meet_space")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_integration ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_google_meet_space ...' end # verify the required parameter 'incident_id' is set if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_integration" - 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 IncidentsAPI.create_incident_integration" + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_google_meet_space" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/relationships/integrations'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/google-meet/space'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -370,23 +525,21 @@ def create_incident_integration_with_http_info(incident_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] || 'IncidentIntegrationMetadataResponse' + return_type = opts[:debug_return_type] || 'IncidentGoogleMeetIntegrationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_incident_integration, + :operation => :create_incident_google_meet_space, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -398,46 +551,47 @@ def create_incident_integration_with_http_info(incident_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: IncidentsAPI#create_incident_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_google_meet_space\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create an incident notification rule. + # Create an incident impact. # - # @see #create_incident_notification_rule_with_http_info - def create_incident_notification_rule(body, opts = {}) - data, _status_code, _headers = create_incident_notification_rule_with_http_info(body, opts) + # @see #create_incident_impact_with_http_info + def create_incident_impact(incident_id, body, opts = {}) + data, _status_code, _headers = create_incident_impact_with_http_info(incident_id, body, opts) data end - # Create an incident notification rule. + # Create an incident impact. # - # Creates a new notification rule. + # Create an impact for an incident. # - # @param body [CreateIncidentNotificationRuleRequest] + # @param incident_id [String] The UUID of the incident. + # @param body [IncidentImpactCreateRequest] Incident impact payload. # @param opts [Hash] the optional parameters - # @return [Array<(IncidentNotificationRule, Integer, Hash)>] IncidentNotificationRule data, response status code and response headers - def create_incident_notification_rule_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_notification_rule".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_notification_rule") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_notification_rule")) - end + # @option opts [Array] :include Specifies which related resources should be included in the response. + # @return [Array<(IncidentImpactResponse, Integer, Hash)>] IncidentImpactResponse data, response status code and response headers + def create_incident_impact_with_http_info(incident_id, body, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_notification_rule ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_impact ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_impact" 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 IncidentsAPI.create_incident_notification_rule" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.create_incident_impact" end # resource path - local_var_path = '/api/v2/incidents/config/notification-rules' + local_var_path = '/api/v2/incidents/{incident_id}/impacts'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} + query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} @@ -453,13 +607,13 @@ def create_incident_notification_rule_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] || 'IncidentNotificationRule' + return_type = opts[:debug_return_type] || 'IncidentImpactResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_incident_notification_rule, + :operation => :create_incident_impact, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -471,43 +625,48 @@ def create_incident_notification_rule_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: IncidentsAPI#create_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_impact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create incident notification template. + # Create an incident integration metadata. # - # @see #create_incident_notification_template_with_http_info - def create_incident_notification_template(body, opts = {}) - data, _status_code, _headers = create_incident_notification_template_with_http_info(body, opts) + # @see #create_incident_integration_with_http_info + def create_incident_integration(incident_id, body, opts = {}) + data, _status_code, _headers = create_incident_integration_with_http_info(incident_id, body, opts) data end - # Create incident notification template. + # Create an incident integration metadata. # - # Creates a new notification template. + # Create an incident integration metadata. # - # @param body [CreateIncidentNotificationTemplateRequest] + # @param incident_id [String] The UUID of the incident. + # @param body [IncidentIntegrationMetadataCreateRequest] Incident integration metadata payload. # @param opts [Hash] the optional parameters - # @return [Array<(IncidentNotificationTemplate, Integer, Hash)>] IncidentNotificationTemplate data, response status code and response headers - def create_incident_notification_template_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_notification_template".to_sym] + # @return [Array<(IncidentIntegrationMetadataResponse, Integer, Hash)>] IncidentIntegrationMetadataResponse data, response status code and response headers + def create_incident_integration_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_integration".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_notification_template") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_integration") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_notification_template")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_integration")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_notification_template ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_integration ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_integration" 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 IncidentsAPI.create_incident_notification_template" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.create_incident_integration" end # resource path - local_var_path = '/api/v2/incidents/config/notification-templates' + local_var_path = '/api/v2/incidents/{incident_id}/relationships/integrations'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -526,13 +685,13 @@ def create_incident_notification_template_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] || 'IncidentNotificationTemplate' + return_type = opts[:debug_return_type] || 'IncidentIntegrationMetadataResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_incident_notification_template, + :operation => :create_incident_integration, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -544,52 +703,48 @@ def create_incident_notification_template_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: IncidentsAPI#create_incident_notification_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create postmortem attachment. + # Create an incident Jira issue. # - # @see #create_incident_postmortem_attachment_with_http_info - def create_incident_postmortem_attachment(incident_id, body, opts = {}) - data, _status_code, _headers = create_incident_postmortem_attachment_with_http_info(incident_id, body, opts) + # @see #create_incident_jira_issue_with_http_info + def create_incident_jira_issue(incident_id, body, opts = {}) + data, _status_code, _headers = create_incident_jira_issue_with_http_info(incident_id, body, opts) data end - # Create postmortem attachment. + # Create an incident Jira issue. # - # Create a postmortem attachment for an incident. + # Create a Jira issue linked to a given incident. # - # The endpoint accepts markdown for notebooks created in Confluence or Google Docs. - # Postmortems created from notebooks need to be formatted using frontend notebook cells, - # in addition to markdown format. - # - # @param incident_id [String] The ID of the incident - # @param body [PostmortemAttachmentRequest] + # @param incident_id [String] The UUID of the incident. + # @param body [IncidentJiraIssueRequest] # @param opts [Hash] the optional parameters - # @return [Array<(Attachment, Integer, Hash)>] Attachment data, response status code and response headers - def create_incident_postmortem_attachment_with_http_info(incident_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_postmortem_attachment".to_sym] + # @return [Array<(IncidentJiraIssueIntegrationResponse, Integer, Hash)>] IncidentJiraIssueIntegrationResponse data, response status code and response headers + def create_incident_jira_issue_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_jira_issue".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_postmortem_attachment") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_jira_issue") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_postmortem_attachment")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_jira_issue")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_postmortem_attachment ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_jira_issue ...' end # verify the required parameter 'incident_id' is set if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_postmortem_attachment" + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_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 IncidentsAPI.create_incident_postmortem_attachment" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.create_incident_jira_issue" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/attachments/postmortems'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/jira-issues'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -608,13 +763,13 @@ def create_incident_postmortem_attachment_with_http_info(incident_id, body, opts post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'Attachment' + return_type = opts[:debug_return_type] || 'IncidentJiraIssueIntegrationResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_incident_postmortem_attachment, + :operation => :create_incident_jira_issue, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -626,43 +781,43 @@ def create_incident_postmortem_attachment_with_http_info(incident_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: IncidentsAPI#create_incident_postmortem_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_jira_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create postmortem template. + # Create an incident Jira template. # - # @see #create_incident_postmortem_template_with_http_info - def create_incident_postmortem_template(body, opts = {}) - data, _status_code, _headers = create_incident_postmortem_template_with_http_info(body, opts) + # @see #create_incident_jira_template_with_http_info + def create_incident_jira_template(body, opts = {}) + data, _status_code, _headers = create_incident_jira_template_with_http_info(body, opts) data end - # Create postmortem template. + # Create an incident Jira template. # - # Create a new postmortem template for incidents. + # Create a new incident Jira template for the organization. # - # @param body [PostmortemTemplateRequest] + # @param body [IncidentJiraTemplateRequest] # @param opts [Hash] the optional parameters - # @return [Array<(PostmortemTemplateResponse, Integer, Hash)>] PostmortemTemplateResponse data, response status code and response headers - def create_incident_postmortem_template_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_postmortem_template".to_sym] + # @return [Array<(IncidentJiraTemplateResponse, Integer, Hash)>] IncidentJiraTemplateResponse data, response status code and response headers + def create_incident_jira_template_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_jira_template".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_postmortem_template") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_jira_template") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_postmortem_template")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_jira_template")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_postmortem_template ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_jira_template ...' 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 IncidentsAPI.create_incident_postmortem_template" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.create_incident_jira_template" end # resource path - local_var_path = '/api/v2/incidents/config/postmortem-templates' + local_var_path = '/api/v2/incidents/config/jira-templates' # query parameters query_params = opts[:query_params] || {} @@ -681,13 +836,13 @@ def create_incident_postmortem_template_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] || 'PostmortemTemplateResponse' + return_type = opts[:debug_return_type] || 'IncidentJiraTemplateResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_incident_postmortem_template, + :operation => :create_incident_jira_template, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -699,51 +854,48 @@ def create_incident_postmortem_template_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: IncidentsAPI#create_incident_postmortem_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_jira_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create an incident todo. + # Create an incident Microsoft Teams configuration. # - # @see #create_incident_todo_with_http_info - def create_incident_todo(incident_id, body, opts = {}) - data, _status_code, _headers = create_incident_todo_with_http_info(incident_id, body, opts) + # @see #create_incident_microsoft_teams_configuration_with_http_info + def create_incident_microsoft_teams_configuration(body, opts = {}) + data, _status_code, _headers = create_incident_microsoft_teams_configuration_with_http_info(body, opts) data end - # Create an incident todo. + # Create an incident Microsoft Teams configuration. # - # Create an incident todo. + # Create a Microsoft Teams configuration for incidents. # - # @param incident_id [String] The UUID of the incident. - # @param body [IncidentTodoCreateRequest] Incident todo payload. + # @param body [IncidentMicrosoftTeamsConfigurationRequest] # @param opts [Hash] the optional parameters - # @return [Array<(IncidentTodoResponse, Integer, Hash)>] IncidentTodoResponse data, response status code and response headers - def create_incident_todo_with_http_info(incident_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_todo".to_sym] + # @option opts [String] :include Specifies which related objects to include in the response. + # @return [Array<(IncidentMicrosoftTeamsConfigurationResponse, Integer, Hash)>] IncidentMicrosoftTeamsConfigurationResponse data, response status code and response headers + def create_incident_microsoft_teams_configuration_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_microsoft_teams_configuration".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_todo") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_microsoft_teams_configuration") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_todo")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_microsoft_teams_configuration")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_todo ...' - end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_todo" + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_microsoft_teams_configuration ...' 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 IncidentsAPI.create_incident_todo" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.create_incident_microsoft_teams_configuration" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/relationships/todos'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/microsoft-teams-configurations' # query parameters query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} @@ -759,13 +911,13 @@ def create_incident_todo_with_http_info(incident_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'IncidentTodoResponse' + return_type = opts[:debug_return_type] || 'IncidentMicrosoftTeamsConfigurationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_incident_todo, + :operation => :create_incident_microsoft_teams_configuration, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -777,43 +929,43 @@ def create_incident_todo_with_http_info(incident_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: IncidentsAPI#create_incident_todo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_microsoft_teams_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create an incident type. + # Create an incident Microsoft Teams online meeting. # - # @see #create_incident_type_with_http_info - def create_incident_type(body, opts = {}) - data, _status_code, _headers = create_incident_type_with_http_info(body, opts) + # @see #create_incident_ms_teams_online_meeting_with_http_info + def create_incident_ms_teams_online_meeting(incident_id, opts = {}) + data, _status_code, _headers = create_incident_ms_teams_online_meeting_with_http_info(incident_id, opts) data end - # Create an incident type. + # Create an incident Microsoft Teams online meeting. # - # Create an incident type. + # Create a Microsoft Teams online meeting for a given incident. # - # @param body [IncidentTypeCreateRequest] Incident type payload. + # @param incident_id [String] The UUID of the incident. # @param opts [Hash] the optional parameters - # @return [Array<(IncidentTypeResponse, Integer, Hash)>] IncidentTypeResponse data, response status code and response headers - def create_incident_type_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_type".to_sym] + # @return [Array<(IncidentMSTeamsIntegrationResponse, Integer, Hash)>] IncidentMSTeamsIntegrationResponse data, response status code and response headers + def create_incident_ms_teams_online_meeting_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_ms_teams_online_meeting".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_type") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_ms_teams_online_meeting") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_type")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_ms_teams_online_meeting")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_type ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_ms_teams_online_meeting ...' 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 IncidentsAPI.create_incident_type" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_ms_teams_online_meeting" end # resource path - local_var_path = '/api/v2/incidents/config/types' + local_var_path = '/api/v2/incidents/{incident_id}/microsoft-teams-integration/online-meeting'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -822,23 +974,21 @@ def create_incident_type_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] || 'IncidentTypeResponse' + return_type = opts[:debug_return_type] || 'IncidentMSTeamsIntegrationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_incident_type, + :operation => :create_incident_ms_teams_online_meeting, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -850,48 +1000,46 @@ def create_incident_type_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: IncidentsAPI#create_incident_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_ms_teams_online_meeting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create an incident user-defined field. + # Create an incident notification rule. # - # @see #create_incident_user_defined_field_with_http_info - def create_incident_user_defined_field(body, opts = {}) - data, _status_code, _headers = create_incident_user_defined_field_with_http_info(body, opts) + # @see #create_incident_notification_rule_with_http_info + def create_incident_notification_rule(body, opts = {}) + data, _status_code, _headers = create_incident_notification_rule_with_http_info(body, opts) data end - # Create an incident user-defined field. + # Create an incident notification rule. # - # Create an incident user-defined field. + # Creates a new notification rule. # - # @param body [IncidentUserDefinedFieldCreateRequest] Incident user-defined field payload. + # @param body [CreateIncidentNotificationRuleRequest] # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". - # @return [Array<(IncidentUserDefinedFieldResponse, Integer, Hash)>] IncidentUserDefinedFieldResponse data, response status code and response headers - def create_incident_user_defined_field_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_user_defined_field".to_sym] + # @return [Array<(IncidentNotificationRule, Integer, Hash)>] IncidentNotificationRule data, response status code and response headers + def create_incident_notification_rule_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_notification_rule".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_user_defined_field") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_notification_rule") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_user_defined_field")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_notification_rule")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_user_defined_field ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_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 IncidentsAPI.create_incident_user_defined_field" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.create_incident_notification_rule" end # resource path - local_var_path = '/api/v2/incidents/config/user-defined-fields' + local_var_path = '/api/v2/incidents/config/notification-rules' # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} @@ -907,13 +1055,13 @@ def create_incident_user_defined_field_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] || 'IncidentUserDefinedFieldResponse' + return_type = opts[:debug_return_type] || 'IncidentNotificationRule' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :create_incident_user_defined_field, + :operation => :create_incident_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -925,38 +1073,43 @@ def create_incident_user_defined_field_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: IncidentsAPI#create_incident_user_defined_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete global incident handle. + # Create incident notification template. # - # @see #delete_global_incident_handle_with_http_info - def delete_global_incident_handle(opts = {}) - delete_global_incident_handle_with_http_info(opts) - nil + # @see #create_incident_notification_template_with_http_info + def create_incident_notification_template(body, opts = {}) + data, _status_code, _headers = create_incident_notification_template_with_http_info(body, opts) + data end - # Delete global incident handle. + # Create incident notification template. # - # Delete a global incident handle. + # Creates a new notification template. # + # @param body [CreateIncidentNotificationTemplateRequest] # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_global_incident_handle_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_global_incident_handle".to_sym] + # @return [Array<(IncidentNotificationTemplate, Integer, Hash)>] IncidentNotificationTemplate data, response status code and response headers + def create_incident_notification_template_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_notification_template".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_global_incident_handle") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_notification_template") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_global_incident_handle")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_notification_template")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_global_incident_handle ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_notification_template ...' + 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 IncidentsAPI.create_incident_notification_template" end # resource path - local_var_path = '/api/v2/incidents/config/global/incident-handles' + local_var_path = '/api/v2/incidents/config/notification-templates' # query parameters query_params = opts[:query_params] || {} @@ -964,22 +1117,24 @@ def delete_global_incident_handle_with_http_info(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] || 'IncidentNotificationTemplate' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_global_incident_handle, + :operation => :create_incident_notification_template, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -989,45 +1144,54 @@ def delete_global_incident_handle_with_http_info(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: IncidentsAPI#delete_global_incident_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_notification_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete an existing incident. + # Create postmortem attachment. # - # @see #delete_incident_with_http_info - def delete_incident(incident_id, opts = {}) - delete_incident_with_http_info(incident_id, opts) - nil + # @see #create_incident_postmortem_attachment_with_http_info + def create_incident_postmortem_attachment(incident_id, body, opts = {}) + data, _status_code, _headers = create_incident_postmortem_attachment_with_http_info(incident_id, body, opts) + data end - # Delete an existing incident. + # Create postmortem attachment. # - # Deletes an existing incident from the users organization. + # Create a postmortem attachment for an incident. # - # @param incident_id [String] The UUID of the incident. + # The endpoint accepts markdown for notebooks created in Confluence or Google Docs. + # Postmortems created from notebooks need to be formatted using frontend notebook cells, + # in addition to markdown format. + # + # @param incident_id [String] The ID of the incident + # @param body [PostmortemAttachmentRequest] # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_with_http_info(incident_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident".to_sym] + # @return [Array<(Attachment, Integer, Hash)>] Attachment data, response status code and response headers + def create_incident_postmortem_attachment_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_postmortem_attachment".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_postmortem_attachment") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_postmortem_attachment")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_postmortem_attachment ...' end # verify the required parameter 'incident_id' is set if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident" + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_postmortem_attachment" + 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 IncidentsAPI.create_incident_postmortem_attachment" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/attachments/postmortems'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1035,22 +1199,24 @@ def delete_incident_with_http_info(incident_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'Attachment' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :delete_incident, + :operation => :create_incident_postmortem_attachment, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1060,47 +1226,45 @@ def delete_incident_with_http_info(incident_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_postmortem_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete incident attachment. + # Create postmortem template. # - # @see #delete_incident_attachment_with_http_info - def delete_incident_attachment(incident_id, attachment_id, opts = {}) - delete_incident_attachment_with_http_info(incident_id, attachment_id, opts) - nil + # @see #create_incident_postmortem_template_with_http_info + def create_incident_postmortem_template(body, opts = {}) + data, _status_code, _headers = create_incident_postmortem_template_with_http_info(body, opts) + data end - # Delete incident attachment. - # @param incident_id [String] The UUID of the incident. - # @param attachment_id [String] The ID of the attachment. + # Create postmortem template. + # + # Create a new postmortem template for incidents. + # + # @param body [PostmortemTemplateRequest] # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_attachment_with_http_info(incident_id, attachment_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_attachment".to_sym] + # @return [Array<(PostmortemTemplateResponse, Integer, Hash)>] PostmortemTemplateResponse data, response status code and response headers + def create_incident_postmortem_template_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_postmortem_template".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_attachment") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_postmortem_template") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_attachment")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_postmortem_template")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_attachment ...' - end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_attachment" + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_postmortem_template ...' end - # verify the required parameter 'attachment_id' is set - if @api_client.config.client_side_validation && attachment_id.nil? - fail ArgumentError, "Missing the required parameter 'attachment_id' when calling IncidentsAPI.delete_incident_attachment" + # 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 IncidentsAPI.create_incident_postmortem_template" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/attachments/{attachment_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{attachment_id}', CGI.escape(attachment_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/postmortem-templates' # query parameters query_params = opts[:query_params] || {} @@ -1108,22 +1272,24 @@ def delete_incident_attachment_with_http_info(incident_id, attachment_id, opts = # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'PostmortemTemplateResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :delete_incident_attachment, + :operation => :create_incident_postmortem_template, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1133,44 +1299,45 @@ def delete_incident_attachment_with_http_info(incident_id, attachment_id, opts = :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_postmortem_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete an incident impact. + # Create an incident role assignment. # - # @see #delete_incident_impact_with_http_info - def delete_incident_impact(incident_id, impact_id, opts = {}) - delete_incident_impact_with_http_info(incident_id, impact_id, opts) - nil + # @see #create_incident_role_assignment_with_http_info + def create_incident_role_assignment(body, opts = {}) + data, _status_code, _headers = create_incident_role_assignment_with_http_info(body, opts) + data end - # Delete an incident impact. + # Create an incident role assignment. # - # Delete an incident impact. + # Create a new role assignment for an incident. # - # @param incident_id [String] The UUID of the incident. - # @param impact_id [String] The UUID of the incident impact. + # @param body [IncidentRoleAssignmentRequest] # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_impact_with_http_info(incident_id, impact_id, opts = {}) + # @return [Array<(IncidentRoleAssignmentResponse, Integer, Hash)>] IncidentRoleAssignmentResponse data, response status code and response headers + def create_incident_role_assignment_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_role_assignment".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_role_assignment") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_role_assignment")) + end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_impact ...' - end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_impact" + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_role_assignment ...' end - # verify the required parameter 'impact_id' is set - if @api_client.config.client_side_validation && impact_id.nil? - fail ArgumentError, "Missing the required parameter 'impact_id' when calling IncidentsAPI.delete_incident_impact" + # 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 IncidentsAPI.create_incident_role_assignment" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/impacts/{impact_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{impact_id}', CGI.escape(impact_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/role_assignments' # query parameters query_params = opts[:query_params] || {} @@ -1178,22 +1345,24 @@ def delete_incident_impact_with_http_info(incident_id, impact_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'IncidentRoleAssignmentResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_incident_impact, + :operation => :create_incident_role_assignment, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1203,50 +1372,50 @@ def delete_incident_impact_with_http_info(incident_id, impact_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_impact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_role_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete an incident integration metadata. + # Create an incident Statuspage incident. # - # @see #delete_incident_integration_with_http_info - def delete_incident_integration(incident_id, integration_metadata_id, opts = {}) - delete_incident_integration_with_http_info(incident_id, integration_metadata_id, opts) - nil + # @see #create_incident_statuspage_incident_with_http_info + def create_incident_statuspage_incident(incident_id, body, opts = {}) + data, _status_code, _headers = create_incident_statuspage_incident_with_http_info(incident_id, body, opts) + data end - # Delete an incident integration metadata. + # Create an incident Statuspage incident. # - # Delete an incident integration metadata. + # Create a Statuspage incident linked to a Datadog incident. # # @param incident_id [String] The UUID of the incident. - # @param integration_metadata_id [String] The UUID of the incident integration metadata. + # @param body [IncidentStatuspageIncidentRequest] # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_integration_with_http_info(incident_id, integration_metadata_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_integration".to_sym] + # @return [Array<(IncidentStatuspageIncidentResponse, Integer, Hash)>] IncidentStatuspageIncidentResponse data, response status code and response headers + def create_incident_statuspage_incident_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_statuspage_incident".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_integration") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_statuspage_incident") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_integration")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_statuspage_incident")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_integration ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_statuspage_incident ...' end # verify the required parameter 'incident_id' is set if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_integration" + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_statuspage_incident" end - # verify the required parameter 'integration_metadata_id' is set - if @api_client.config.client_side_validation && integration_metadata_id.nil? - fail ArgumentError, "Missing the required parameter 'integration_metadata_id' when calling IncidentsAPI.delete_incident_integration" + # 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 IncidentsAPI.create_incident_statuspage_incident" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{integration_metadata_id}', CGI.escape(integration_metadata_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/statuspage/{incident_id}/statuspage-incidents'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1254,22 +1423,24 @@ def delete_incident_integration_with_http_info(incident_id, integration_metadata # 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] || 'IncidentStatuspageIncidentResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_incident_integration, + :operation => :create_incident_statuspage_incident, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1279,70 +1450,82 @@ def delete_incident_integration_with_http_info(incident_id, integration_metadata :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: IncidentsAPI#delete_incident_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_statuspage_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete an incident notification rule. + # Publish an incident status page notice. # - # @see #delete_incident_notification_rule_with_http_info - def delete_incident_notification_rule(id, opts = {}) - delete_incident_notification_rule_with_http_info(id, opts) - nil + # @see #create_incident_status_page_notice_with_http_info + def create_incident_status_page_notice(incident_id, statuspage_id, body, opts = {}) + data, _status_code, _headers = create_incident_status_page_notice_with_http_info(incident_id, statuspage_id, body, opts) + data end - # Delete an incident notification rule. + # Publish an incident status page notice. # - # Deletes a notification rule by its ID. + # Publish a status page notice for a given incident. # - # @param id [UUID] The ID of the notification rule. + # @param incident_id [String] The UUID of the incident. + # @param statuspage_id [UUID] The ID of the status page. + # @param body [IncidentStatusPageNoticeCreateRequest] # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_notification_rule_with_http_info(id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_notification_rule".to_sym] + # @option opts [Boolean] :notify_subscribers Whether to notify subscribers about this notice. + # @return [Array<(IncidentStatusPageNoticeIntegrationResponse, Integer, Hash)>] IncidentStatusPageNoticeIntegrationResponse data, response status code and response headers + def create_incident_status_page_notice_with_http_info(incident_id, statuspage_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_status_page_notice".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_notification_rule") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_status_page_notice") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_notification_rule")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_status_page_notice")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_notification_rule ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_status_page_notice ...' end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.delete_incident_notification_rule" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_status_page_notice" + end + # verify the required parameter 'statuspage_id' is set + if @api_client.config.client_side_validation && statuspage_id.nil? + fail ArgumentError, "Missing the required parameter 'statuspage_id' when calling IncidentsAPI.create_incident_status_page_notice" + 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 IncidentsAPI.create_incident_status_page_notice" end # resource path - local_var_path = '/api/v2/incidents/config/notification-rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/statuspages/{statuspage_id}/notices'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{statuspage_id}', CGI.escape(statuspage_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + query_params[:'notify_subscribers'] = opts[:'notify_subscribers'] if !opts[:'notify_subscribers'].nil? # 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] || 'IncidentStatusPageNoticeIntegrationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_incident_notification_rule, + :operation => :create_incident_status_page_notice, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1352,70 +1535,75 @@ def delete_incident_notification_rule_with_http_info(id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_status_page_notice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete a notification template. + # Create an incident timeline entry. # - # @see #delete_incident_notification_template_with_http_info - def delete_incident_notification_template(id, opts = {}) - delete_incident_notification_template_with_http_info(id, opts) - nil + # @see #create_incident_timeline_entry_with_http_info + def create_incident_timeline_entry(incident_id, body, opts = {}) + data, _status_code, _headers = create_incident_timeline_entry_with_http_info(incident_id, body, opts) + data end - # Delete a notification template. + # Create an incident timeline entry. # - # Deletes a notification template by its ID. + # Create a new timeline entry for a given incident. # - # @param id [UUID] The ID of the notification template. + # @param incident_id [String] The UUID of the incident. + # @param body [IncidentTimelineEntryRequest] # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_notification_template_with_http_info(id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_notification_template".to_sym] + # @return [Array<(IncidentTimelineEntryResponse, Integer, Hash)>] IncidentTimelineEntryResponse data, response status code and response headers + def create_incident_timeline_entry_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_timeline_entry".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_notification_template") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_timeline_entry") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_notification_template")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_timeline_entry")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_notification_template ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_timeline_entry ...' end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.delete_incident_notification_template" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_timeline_entry" + 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 IncidentsAPI.create_incident_timeline_entry" end # resource path - local_var_path = '/api/v2/incidents/config/notification-templates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/timeline'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # 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] || 'IncidentTimelineEntryResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_incident_notification_template, + :operation => :create_incident_timeline_entry, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1425,45 +1613,50 @@ def delete_incident_notification_template_with_http_info(id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_notification_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_timeline_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete postmortem template. + # Create an incident todo. # - # @see #delete_incident_postmortem_template_with_http_info - def delete_incident_postmortem_template(template_id, opts = {}) - delete_incident_postmortem_template_with_http_info(template_id, opts) - nil + # @see #create_incident_todo_with_http_info + def create_incident_todo(incident_id, body, opts = {}) + data, _status_code, _headers = create_incident_todo_with_http_info(incident_id, body, opts) + data end - # Delete postmortem template. + # Create an incident todo. # - # Delete a postmortem template. + # Create an incident todo. # - # @param template_id [String] The ID of the postmortem template + # @param incident_id [String] The UUID of the incident. + # @param body [IncidentTodoCreateRequest] Incident todo payload. # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_postmortem_template_with_http_info(template_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_postmortem_template".to_sym] + # @return [Array<(IncidentTodoResponse, Integer, Hash)>] IncidentTodoResponse data, response status code and response headers + def create_incident_todo_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_todo".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_postmortem_template") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_todo") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_postmortem_template")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_todo")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_postmortem_template ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_todo ...' end - # verify the required parameter 'template_id' is set - if @api_client.config.client_side_validation && template_id.nil? - fail ArgumentError, "Missing the required parameter 'template_id' when calling IncidentsAPI.delete_incident_postmortem_template" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_todo" + 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 IncidentsAPI.create_incident_todo" end # resource path - local_var_path = '/api/v2/incidents/config/postmortem-templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/relationships/todos'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1471,22 +1664,24 @@ def delete_incident_postmortem_template_with_http_info(template_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'IncidentTodoResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_incident_postmortem_template, + :operation => :create_incident_todo, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1496,50 +1691,45 @@ def delete_incident_postmortem_template_with_http_info(template_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_postmortem_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_todo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete an incident todo. + # Create an incident type. # - # @see #delete_incident_todo_with_http_info - def delete_incident_todo(incident_id, todo_id, opts = {}) - delete_incident_todo_with_http_info(incident_id, todo_id, opts) - nil + # @see #create_incident_type_with_http_info + def create_incident_type(body, opts = {}) + data, _status_code, _headers = create_incident_type_with_http_info(body, opts) + data end - # Delete an incident todo. + # Create an incident type. # - # Delete an incident todo. + # Create an incident type. # - # @param incident_id [String] The UUID of the incident. - # @param todo_id [String] The UUID of the incident todo. + # @param body [IncidentTypeCreateRequest] Incident type payload. # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_todo_with_http_info(incident_id, todo_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_todo".to_sym] + # @return [Array<(IncidentTypeResponse, Integer, Hash)>] IncidentTypeResponse data, response status code and response headers + def create_incident_type_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_type".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_todo") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_type") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_todo")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_type")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_todo ...' - end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_todo" + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_type ...' end - # verify the required parameter 'todo_id' is set - if @api_client.config.client_side_validation && todo_id.nil? - fail ArgumentError, "Missing the required parameter 'todo_id' when calling IncidentsAPI.delete_incident_todo" + # 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 IncidentsAPI.create_incident_type" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{todo_id}', CGI.escape(todo_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/types' # query parameters query_params = opts[:query_params] || {} @@ -1547,22 +1737,24 @@ def delete_incident_todo_with_http_info(incident_id, todo_id, opts = {}) # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['*/*']) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'IncidentTypeResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_incident_todo, + :operation => :create_incident_type, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1572,68 +1764,72 @@ def delete_incident_todo_with_http_info(incident_id, todo_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_todo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete an incident type. + # Create an incident user-defined field. # - # @see #delete_incident_type_with_http_info - def delete_incident_type(incident_type_id, opts = {}) - delete_incident_type_with_http_info(incident_type_id, opts) - nil + # @see #create_incident_user_defined_field_with_http_info + def create_incident_user_defined_field(body, opts = {}) + data, _status_code, _headers = create_incident_user_defined_field_with_http_info(body, opts) + data end - # Delete an incident type. + # Create an incident user-defined field. # - # Delete an incident type. + # Create an incident user-defined field. # - # @param incident_type_id [String] The UUID of the incident type. + # @param body [IncidentUserDefinedFieldCreateRequest] Incident user-defined field payload. # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_type_with_http_info(incident_type_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_type".to_sym] + # @option opts [String] :include Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". + # @return [Array<(IncidentUserDefinedFieldResponse, Integer, Hash)>] IncidentUserDefinedFieldResponse data, response status code and response headers + def create_incident_user_defined_field_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_user_defined_field".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_type") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_user_defined_field") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_type")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_user_defined_field")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_type ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_user_defined_field ...' end - # verify the required parameter 'incident_type_id' is set - if @api_client.config.client_side_validation && incident_type_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_type_id' when calling IncidentsAPI.delete_incident_type" + # 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 IncidentsAPI.create_incident_user_defined_field" end # resource path - local_var_path = '/api/v2/incidents/config/types/{incident_type_id}'.sub('{incident_type_id}', CGI.escape(incident_type_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/user-defined-fields' # query parameters query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # 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] || 'IncidentUserDefinedFieldResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_incident_type, + :operation => :create_incident_user_defined_field, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1643,68 +1839,72 @@ def delete_incident_type_with_http_info(incident_type_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_user_defined_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete an incident user-defined field. + # Create an incident Zoom configuration. # - # @see #delete_incident_user_defined_field_with_http_info - def delete_incident_user_defined_field(field_id, opts = {}) - delete_incident_user_defined_field_with_http_info(field_id, opts) - nil + # @see #create_incident_zoom_configuration_with_http_info + def create_incident_zoom_configuration(body, opts = {}) + data, _status_code, _headers = create_incident_zoom_configuration_with_http_info(body, opts) + data end - # Delete an incident user-defined field. + # Create an incident Zoom configuration. # - # Delete an incident user-defined field. + # Create a Zoom configuration for incidents. # - # @param field_id [String] The ID of the incident user-defined field. + # @param body [IncidentZoomConfigurationRequest] # @param opts [Hash] the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def delete_incident_user_defined_field_with_http_info(field_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_user_defined_field".to_sym] + # @option opts [String] :include Specifies which related objects to include in the response. + # @return [Array<(IncidentZoomConfigurationResponse, Integer, Hash)>] IncidentZoomConfigurationResponse data, response status code and response headers + def create_incident_zoom_configuration_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_zoom_configuration".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_user_defined_field") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_zoom_configuration") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_user_defined_field")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_zoom_configuration")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_user_defined_field ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_zoom_configuration ...' end - # verify the required parameter 'field_id' is set - if @api_client.config.client_side_validation && field_id.nil? - fail ArgumentError, "Missing the required parameter 'field_id' when calling IncidentsAPI.delete_incident_user_defined_field" + # 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 IncidentsAPI.create_incident_zoom_configuration" end # resource path - local_var_path = '/api/v2/incidents/config/user-defined-fields/{field_id}'.sub('{field_id}', CGI.escape(field_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/zoom-configurations' # query parameters query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # 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] || 'IncidentZoomConfigurationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :delete_incident_user_defined_field, + :operation => :create_incident_zoom_configuration, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1714,40 +1914,50 @@ def delete_incident_user_defined_field_with_http_info(field_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_user_defined_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_zoom_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get global incident settings. + # Create an incident Zoom meeting. # - # @see #get_global_incident_settings_with_http_info - def get_global_incident_settings(opts = {}) - data, _status_code, _headers = get_global_incident_settings_with_http_info(opts) + # @see #create_incident_zoom_meeting_with_http_info + def create_incident_zoom_meeting(incident_id, body, opts = {}) + data, _status_code, _headers = create_incident_zoom_meeting_with_http_info(incident_id, body, opts) data end - # Get global incident settings. + # Create an incident Zoom meeting. # - # Retrieve global incident settings for the organization. + # Create a Zoom meeting for a given incident. # + # @param incident_id [String] The UUID of the incident. + # @param body [IncidentCreateZoomMeetingRequest] # @param opts [Hash] the optional parameters - # @return [Array<(GlobalIncidentSettingsResponse, Integer, Hash)>] GlobalIncidentSettingsResponse data, response status code and response headers - def get_global_incident_settings_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_global_incident_settings".to_sym] + # @return [Array<(IncidentZoomIntegrationResponse, Integer, Hash)>] IncidentZoomIntegrationResponse data, response status code and response headers + def create_incident_zoom_meeting_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_incident_zoom_meeting".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_global_incident_settings") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_incident_zoom_meeting") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_global_incident_settings")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_incident_zoom_meeting")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_global_incident_settings ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_incident_zoom_meeting ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.create_incident_zoom_meeting" + 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 IncidentsAPI.create_incident_zoom_meeting" end # resource path - local_var_path = '/api/v2/incidents/config/global/settings' + local_var_path = '/api/v2/incidents/{incident_id}/zoom/meeting'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1756,21 +1966,23 @@ def get_global_incident_settings_with_http_info(opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'GlobalIncidentSettingsResponse' + return_type = opts[:debug_return_type] || 'IncidentZoomIntegrationResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_global_incident_settings, + :operation => :create_incident_zoom_meeting, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1780,70 +1992,75 @@ def get_global_incident_settings_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: IncidentsAPI#get_global_incident_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_incident_zoom_meeting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get the details of an incident. + # Create a status page email subscription. # - # @see #get_incident_with_http_info - def get_incident(incident_id, opts = {}) - data, _status_code, _headers = get_incident_with_http_info(incident_id, opts) + # @see #create_statuspage_email_subscription_with_http_info + def create_statuspage_email_subscription(page_id, body, opts = {}) + data, _status_code, _headers = create_statuspage_email_subscription_with_http_info(page_id, body, opts) data end - # Get the details of an incident. + # Create a status page email subscription. # - # Get the details of an incident by `incident_id`. + # Create an email subscription for a status page. # - # @param incident_id [String] The UUID of the incident. + # @param page_id [String] The ID of the status page. + # @param body [IncidentStatuspageSubscriptionRequest] # @param opts [Hash] the optional parameters - # @option opts [Array] :include Specifies which types of related objects should be included in the response. - # @return [Array<(IncidentResponse, Integer, Hash)>] IncidentResponse data, response status code and response headers - def get_incident_with_http_info(incident_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_incident".to_sym] + # @return [Array<(IncidentStatuspageSubscriptionResponse, Integer, Hash)>] IncidentStatuspageSubscriptionResponse data, response status code and response headers + def create_statuspage_email_subscription_with_http_info(page_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_statuspage_email_subscription".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_statuspage_email_subscription") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_statuspage_email_subscription")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.create_statuspage_email_subscription ...' end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident" + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling IncidentsAPI.create_statuspage_email_subscription" + 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 IncidentsAPI.create_statuspage_email_subscription" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/statuspages/{page_id}/subscriptions/email'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # 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] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'IncidentResponse' + return_type = opts[:debug_return_type] || 'IncidentStatuspageSubscriptionResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :get_incident, + :operation => :create_statuspage_email_subscription, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1853,50 +2070,40 @@ def get_incident_with_http_info(incident_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#get_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#create_statuspage_email_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get incident integration metadata details. + # Delete global incident handle. # - # @see #get_incident_integration_with_http_info - def get_incident_integration(incident_id, integration_metadata_id, opts = {}) - data, _status_code, _headers = get_incident_integration_with_http_info(incident_id, integration_metadata_id, opts) - data + # @see #delete_global_incident_handle_with_http_info + def delete_global_incident_handle(opts = {}) + delete_global_incident_handle_with_http_info(opts) + nil end - # Get incident integration metadata details. + # Delete global incident handle. # - # Get incident integration metadata details. + # Delete a global incident handle. # - # @param incident_id [String] The UUID of the incident. - # @param integration_metadata_id [String] The UUID of the incident integration metadata. # @param opts [Hash] the optional parameters - # @return [Array<(IncidentIntegrationMetadataResponse, Integer, Hash)>] IncidentIntegrationMetadataResponse data, response status code and response headers - def get_incident_integration_with_http_info(incident_id, integration_metadata_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_integration".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_global_incident_handle_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_global_incident_handle".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_integration") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_global_incident_handle") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_integration")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_global_incident_handle")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_integration ...' - end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident_integration" - end - # verify the required parameter 'integration_metadata_id' is set - if @api_client.config.client_side_validation && integration_metadata_id.nil? - fail ArgumentError, "Missing the required parameter 'integration_metadata_id' when calling IncidentsAPI.get_incident_integration" + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_global_incident_handle ...' end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{integration_metadata_id}', CGI.escape(integration_metadata_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/global/incident-handles' # query parameters query_params = opts[:query_params] || {} @@ -1904,7 +2111,7 @@ def get_incident_integration_with_http_info(incident_id, integration_metadata_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -1913,13 +2120,13 @@ def get_incident_integration_with_http_info(incident_id, integration_metadata_id post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentIntegrationMetadataResponse' + 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 => :get_incident_integration, + :operation => :delete_global_incident_handle, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -1929,55 +2136,53 @@ def get_incident_integration_with_http_info(incident_id, integration_metadata_id :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_global_incident_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get an incident notification rule. + # Delete an existing incident. # - # @see #get_incident_notification_rule_with_http_info - def get_incident_notification_rule(id, opts = {}) - data, _status_code, _headers = get_incident_notification_rule_with_http_info(id, opts) - data + # @see #delete_incident_with_http_info + def delete_incident(incident_id, opts = {}) + delete_incident_with_http_info(incident_id, opts) + nil end - # Get an incident notification rule. + # Delete an existing incident. # - # Retrieves a specific notification rule by its ID. + # Deletes an existing incident from the users organization. # - # @param id [UUID] The ID of the notification rule. + # @param incident_id [String] The UUID of the incident. # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` - # @return [Array<(IncidentNotificationRule, Integer, Hash)>] IncidentNotificationRule data, response status code and response headers - def get_incident_notification_rule_with_http_info(id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_notification_rule".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_notification_rule") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_notification_rule")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_notification_rule ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident ...' end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.get_incident_notification_rule" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident" end # resource path - local_var_path = '/api/v2/incidents/config/notification-rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -1986,13 +2191,13 @@ def get_incident_notification_rule_with_http_info(id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentNotificationRule' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_incident_notification_rule, + :operation => :delete_incident, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2002,55 +2207,55 @@ def get_incident_notification_rule_with_http_info(id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get incident notification template. + # Delete incident attachment. # - # @see #get_incident_notification_template_with_http_info - def get_incident_notification_template(id, opts = {}) - data, _status_code, _headers = get_incident_notification_template_with_http_info(id, opts) - data + # @see #delete_incident_attachment_with_http_info + def delete_incident_attachment(incident_id, attachment_id, opts = {}) + delete_incident_attachment_with_http_info(incident_id, attachment_id, opts) + nil end - # Get incident notification template. - # - # Retrieves a specific notification template by its ID. - # - # @param id [UUID] The ID of the notification template. + # Delete incident attachment. + # @param incident_id [String] The UUID of the incident. + # @param attachment_id [String] The ID of the attachment. # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` - # @return [Array<(IncidentNotificationTemplate, Integer, Hash)>] IncidentNotificationTemplate data, response status code and response headers - def get_incident_notification_template_with_http_info(id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_notification_template".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_attachment_with_http_info(incident_id, attachment_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_attachment".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_notification_template") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_attachment") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_notification_template")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_attachment")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_notification_template ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_attachment ...' end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.get_incident_notification_template" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_attachment" + end + # verify the required parameter 'attachment_id' is set + if @api_client.config.client_side_validation && attachment_id.nil? + fail ArgumentError, "Missing the required parameter 'attachment_id' when calling IncidentsAPI.delete_incident_attachment" end # resource path - local_var_path = '/api/v2/incidents/config/notification-templates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/attachments/{attachment_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{attachment_id}', CGI.escape(attachment_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2059,13 +2264,13 @@ def get_incident_notification_template_with_http_info(id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentNotificationTemplate' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_incident_notification_template, + :operation => :delete_incident_attachment, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2075,45 +2280,50 @@ def get_incident_notification_template_with_http_info(id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_notification_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get postmortem template. + # Delete an incident communication. # - # @see #get_incident_postmortem_template_with_http_info - def get_incident_postmortem_template(template_id, opts = {}) - data, _status_code, _headers = get_incident_postmortem_template_with_http_info(template_id, opts) - data + # @see #delete_incident_communication_with_http_info + def delete_incident_communication(incident_id, communication_id, opts = {}) + delete_incident_communication_with_http_info(incident_id, communication_id, opts) + nil end - # Get postmortem template. + # Delete an incident communication. # - # Retrieve details of a specific postmortem template. + # Delete a communication for a given incident. # - # @param template_id [String] The ID of the postmortem template + # @param incident_id [String] The UUID of the incident. + # @param communication_id [UUID] The ID of the communication. # @param opts [Hash] the optional parameters - # @return [Array<(PostmortemTemplateResponse, Integer, Hash)>] PostmortemTemplateResponse data, response status code and response headers - def get_incident_postmortem_template_with_http_info(template_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_postmortem_template".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_communication_with_http_info(incident_id, communication_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_communication".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_postmortem_template") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_communication") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_postmortem_template")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_communication")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_postmortem_template ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_communication ...' end - # verify the required parameter 'template_id' is set - if @api_client.config.client_side_validation && template_id.nil? - fail ArgumentError, "Missing the required parameter 'template_id' when calling IncidentsAPI.get_incident_postmortem_template" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_communication" + end + # verify the required parameter 'communication_id' is set + if @api_client.config.client_side_validation && communication_id.nil? + fail ArgumentError, "Missing the required parameter 'communication_id' when calling IncidentsAPI.delete_incident_communication" end # resource path - local_var_path = '/api/v2/incidents/config/postmortem-templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/communications/{communication_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{communication_id}', CGI.escape(communication_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -2121,7 +2331,7 @@ def get_incident_postmortem_template_with_http_info(template_id, 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(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2130,13 +2340,13 @@ def get_incident_postmortem_template_with_http_info(template_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'PostmortemTemplateResponse' + 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 => :get_incident_postmortem_template, + :operation => :delete_incident_communication, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2146,50 +2356,44 @@ def get_incident_postmortem_template_with_http_info(template_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_postmortem_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_communication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get incident todo details. + # Delete an incident impact. # - # @see #get_incident_todo_with_http_info - def get_incident_todo(incident_id, todo_id, opts = {}) - data, _status_code, _headers = get_incident_todo_with_http_info(incident_id, todo_id, opts) - data + # @see #delete_incident_impact_with_http_info + def delete_incident_impact(incident_id, impact_id, opts = {}) + delete_incident_impact_with_http_info(incident_id, impact_id, opts) + nil end - # Get incident todo details. + # Delete an incident impact. # - # Get incident todo details. + # Delete an incident impact. # # @param incident_id [String] The UUID of the incident. - # @param todo_id [String] The UUID of the incident todo. + # @param impact_id [String] The UUID of the incident impact. # @param opts [Hash] the optional parameters - # @return [Array<(IncidentTodoResponse, Integer, Hash)>] IncidentTodoResponse data, response status code and response headers - def get_incident_todo_with_http_info(incident_id, todo_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_todo".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_todo") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_todo")) - end + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_impact_with_http_info(incident_id, impact_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_todo ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_impact ...' end # verify the required parameter 'incident_id' is set if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident_todo" + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_impact" end - # verify the required parameter 'todo_id' is set - if @api_client.config.client_side_validation && todo_id.nil? - fail ArgumentError, "Missing the required parameter 'todo_id' when calling IncidentsAPI.get_incident_todo" + # verify the required parameter 'impact_id' is set + if @api_client.config.client_side_validation && impact_id.nil? + fail ArgumentError, "Missing the required parameter 'impact_id' when calling IncidentsAPI.delete_incident_impact" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{todo_id}', CGI.escape(todo_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/impacts/{impact_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{impact_id}', CGI.escape(impact_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -2197,7 +2401,7 @@ def get_incident_todo_with_http_info(incident_id, todo_id, 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(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2206,13 +2410,13 @@ def get_incident_todo_with_http_info(incident_id, todo_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentTodoResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_incident_todo, + :operation => :delete_incident_impact, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2222,45 +2426,50 @@ def get_incident_todo_with_http_info(incident_id, todo_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_todo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_impact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get incident type details. + # Delete an incident integration metadata. # - # @see #get_incident_type_with_http_info - def get_incident_type(incident_type_id, opts = {}) - data, _status_code, _headers = get_incident_type_with_http_info(incident_type_id, opts) - data + # @see #delete_incident_integration_with_http_info + def delete_incident_integration(incident_id, integration_metadata_id, opts = {}) + delete_incident_integration_with_http_info(incident_id, integration_metadata_id, opts) + nil end - # Get incident type details. + # Delete an incident integration metadata. # - # Get incident type details. + # Delete an incident integration metadata. # - # @param incident_type_id [String] The UUID of the incident type. + # @param incident_id [String] The UUID of the incident. + # @param integration_metadata_id [String] The UUID of the incident integration metadata. # @param opts [Hash] the optional parameters - # @return [Array<(IncidentTypeResponse, Integer, Hash)>] IncidentTypeResponse data, response status code and response headers - def get_incident_type_with_http_info(incident_type_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_type".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_integration_with_http_info(incident_id, integration_metadata_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_integration".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_type") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_integration") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_type")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_integration")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_type ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_integration ...' end - # verify the required parameter 'incident_type_id' is set - if @api_client.config.client_side_validation && incident_type_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_type_id' when calling IncidentsAPI.get_incident_type" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_integration" + end + # verify the required parameter 'integration_metadata_id' is set + if @api_client.config.client_side_validation && integration_metadata_id.nil? + fail ArgumentError, "Missing the required parameter 'integration_metadata_id' when calling IncidentsAPI.delete_incident_integration" end # resource path - local_var_path = '/api/v2/incidents/config/types/{incident_type_id}'.sub('{incident_type_id}', CGI.escape(incident_type_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{integration_metadata_id}', CGI.escape(integration_metadata_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -2268,7 +2477,7 @@ def get_incident_type_with_http_info(incident_type_id, 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(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2277,13 +2486,13 @@ def get_incident_type_with_http_info(incident_type_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentTypeResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_incident_type, + :operation => :delete_incident_integration, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2293,55 +2502,53 @@ def get_incident_type_with_http_info(incident_type_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get an incident user-defined field. + # Delete an incident Jira template. # - # @see #get_incident_user_defined_field_with_http_info - def get_incident_user_defined_field(field_id, opts = {}) - data, _status_code, _headers = get_incident_user_defined_field_with_http_info(field_id, opts) - data + # @see #delete_incident_jira_template_with_http_info + def delete_incident_jira_template(template_id, opts = {}) + delete_incident_jira_template_with_http_info(template_id, opts) + nil end - # Get an incident user-defined field. + # Delete an incident Jira template. # - # Get details of an incident user-defined field. + # Delete an incident Jira template by its identifier. # - # @param field_id [String] The ID of the incident user-defined field. + # @param template_id [UUID] The ID of the Jira template. # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". - # @return [Array<(IncidentUserDefinedFieldResponse, Integer, Hash)>] IncidentUserDefinedFieldResponse data, response status code and response headers - def get_incident_user_defined_field_with_http_info(field_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_user_defined_field".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_jira_template_with_http_info(template_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_jira_template".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_user_defined_field") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_jira_template") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_user_defined_field")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_jira_template")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_user_defined_field ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_jira_template ...' end - # verify the required parameter 'field_id' is set - if @api_client.config.client_side_validation && field_id.nil? - fail ArgumentError, "Missing the required parameter 'field_id' when calling IncidentsAPI.get_incident_user_defined_field" + # verify the required parameter 'template_id' is set + if @api_client.config.client_side_validation && template_id.nil? + fail ArgumentError, "Missing the required parameter 'template_id' when calling IncidentsAPI.delete_incident_jira_template" end # resource path - local_var_path = '/api/v2/incidents/config/user-defined-fields/{field_id}'.sub('{field_id}', CGI.escape(field_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/jira-templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2350,13 +2557,13 @@ def get_incident_user_defined_field_with_http_info(field_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentUserDefinedFieldResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :get_incident_user_defined_field, + :operation => :delete_incident_jira_template, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2366,74 +2573,70 @@ def get_incident_user_defined_field_with_http_info(field_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_user_defined_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_jira_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Import an incident. + # Delete an incident notification rule. # - # @see #import_incident_with_http_info - def import_incident(body, opts = {}) - data, _status_code, _headers = import_incident_with_http_info(body, opts) - data + # @see #delete_incident_notification_rule_with_http_info + def delete_incident_notification_rule(id, opts = {}) + delete_incident_notification_rule_with_http_info(id, opts) + nil end - # Import an incident. + # Delete an incident notification rule. # - # Import an incident from an external system. This endpoint allows you to create incidents with - # historical data such as custom timestamps for detection, declaration, and resolution. - # Imported incidents do not execute integrations or notification rules. + # Deletes a notification rule by its ID. # - # @param body [IncidentImportRequest] Incident import payload. + # @param id [UUID] The ID of the notification rule. # @param opts [Hash] the optional parameters - # @option opts [Array] :include Specifies which related object types to include in the response when importing an incident. - # @return [Array<(IncidentImportResponse, Integer, Hash)>] IncidentImportResponse data, response status code and response headers - def import_incident_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.import_incident".to_sym] + # @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_notification_rule_with_http_info(id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_notification_rule".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.import_incident") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_notification_rule") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.import_incident")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_notification_rule")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.import_incident ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_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 IncidentsAPI.import_incident" + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.delete_incident_notification_rule" end # resource path - local_var_path = '/api/v2/incidents/import' + local_var_path = '/api/v2/incidents/config/notification-rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # 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] || 'IncidentImportResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :import_incident, + :operation => :delete_incident_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2443,41 +2646,46 @@ def import_incident_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: IncidentsAPI#import_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List global incident handles. + # Delete a notification template. # - # @see #list_global_incident_handles_with_http_info - def list_global_incident_handles(opts = {}) - data, _status_code, _headers = list_global_incident_handles_with_http_info(opts) - data + # @see #delete_incident_notification_template_with_http_info + def delete_incident_notification_template(id, opts = {}) + delete_incident_notification_template_with_http_info(id, opts) + nil end - # List global incident handles. + # Delete a notification template. # - # Retrieve a list of global incident handles. + # Deletes a notification template by its ID. # + # @param id [UUID] The ID of the notification template. # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of related resources to include in the response - # @return [Array<(IncidentHandlesResponse, Integer, Hash)>] IncidentHandlesResponse data, response status code and response headers - def list_global_incident_handles_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_global_incident_handles".to_sym] + # @option opts [String] :include Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_notification_template_with_http_info(id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_notification_template".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_global_incident_handles") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_notification_template") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_global_incident_handles")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_notification_template")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_global_incident_handles ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_notification_template ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.delete_incident_notification_template" end # resource path - local_var_path = '/api/v2/incidents/config/global/incident-handles' + local_var_path = '/api/v2/incidents/config/notification-templates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -2486,7 +2694,7 @@ def list_global_incident_handles_with_http_info(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(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2495,13 +2703,13 @@ def list_global_incident_handles_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentHandlesResponse' + 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 => :list_global_incident_handles, + :operation => :delete_incident_notification_template, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2511,57 +2719,53 @@ def list_global_incident_handles_with_http_info(opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#list_global_incident_handles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_notification_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List incident attachments. + # Delete postmortem template. # - # @see #list_incident_attachments_with_http_info - def list_incident_attachments(incident_id, opts = {}) - data, _status_code, _headers = list_incident_attachments_with_http_info(incident_id, opts) - data + # @see #delete_incident_postmortem_template_with_http_info + def delete_incident_postmortem_template(template_id, opts = {}) + delete_incident_postmortem_template_with_http_info(template_id, opts) + nil end - # List incident attachments. + # Delete postmortem template. # - # List incident attachments. + # Delete a postmortem template. # - # @param incident_id [String] The UUID of the incident. + # @param template_id [String] The ID of the postmortem template # @param opts [Hash] the optional parameters - # @option opts [String] :filter_attachment_type Filter attachments by type. Supported values are `1` (`postmortem`) and `2` (`link`). - # @option opts [String] :include Resource to include in the response. Supported value: `last_modified_by_user`. - # @return [Array<(AttachmentArray, Integer, Hash)>] AttachmentArray data, response status code and response headers - def list_incident_attachments_with_http_info(incident_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_attachments".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_postmortem_template_with_http_info(template_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_postmortem_template".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_attachments") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_postmortem_template") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_attachments")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_postmortem_template")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_attachments ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_postmortem_template ...' end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_attachments" + # verify the required parameter 'template_id' is set + if @api_client.config.client_side_validation && template_id.nil? + fail ArgumentError, "Missing the required parameter 'template_id' when calling IncidentsAPI.delete_incident_postmortem_template" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/attachments'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/postmortem-templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'filter[attachment_type]'] = opts[:'filter_attachment_type'] if !opts[:'filter_attachment_type'].nil? - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2570,13 +2774,13 @@ def list_incident_attachments_with_http_info(incident_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'AttachmentArray' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :list_incident_attachments, + :operation => :delete_incident_postmortem_template, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2586,49 +2790,53 @@ def list_incident_attachments_with_http_info(incident_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#list_incident_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_postmortem_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List an incident's impacts. + # Delete an incident role assignment. # - # @see #list_incident_impacts_with_http_info - def list_incident_impacts(incident_id, opts = {}) - data, _status_code, _headers = list_incident_impacts_with_http_info(incident_id, opts) - data + # @see #delete_incident_role_assignment_with_http_info + def delete_incident_role_assignment(role_assignment_id, opts = {}) + delete_incident_role_assignment_with_http_info(role_assignment_id, opts) + nil end - # List an incident's impacts. + # Delete an incident role assignment. # - # Get all impacts for an incident. + # Delete a role assignment by its identifier. # - # @param incident_id [String] The UUID of the incident. + # @param role_assignment_id [UUID] The ID of the role assignment. # @param opts [Hash] the optional parameters - # @option opts [Array] :include Specifies which related resources should be included in the response. - # @return [Array<(IncidentImpactsResponse, Integer, Hash)>] IncidentImpactsResponse data, response status code and response headers - def list_incident_impacts_with_http_info(incident_id, opts = {}) + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_role_assignment_with_http_info(role_assignment_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_role_assignment".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_role_assignment") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_role_assignment")) + end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_impacts ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_role_assignment ...' end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_impacts" + # verify the required parameter 'role_assignment_id' is set + if @api_client.config.client_side_validation && role_assignment_id.nil? + fail ArgumentError, "Missing the required parameter 'role_assignment_id' when calling IncidentsAPI.delete_incident_role_assignment" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/impacts'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/role_assignments/{role_assignment_id}'.sub('{role_assignment_id}', CGI.escape(role_assignment_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2637,13 +2845,13 @@ def list_incident_impacts_with_http_info(incident_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentImpactsResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_incident_impacts, + :operation => :delete_incident_role_assignment, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2653,45 +2861,50 @@ def list_incident_impacts_with_http_info(incident_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#list_incident_impacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_role_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a list of an incident's integration metadata. + # Delete an incident timeline entry. # - # @see #list_incident_integrations_with_http_info - def list_incident_integrations(incident_id, opts = {}) - data, _status_code, _headers = list_incident_integrations_with_http_info(incident_id, opts) - data + # @see #delete_incident_timeline_entry_with_http_info + def delete_incident_timeline_entry(incident_id, timeline_entry_id, opts = {}) + delete_incident_timeline_entry_with_http_info(incident_id, timeline_entry_id, opts) + nil end - # Get a list of an incident's integration metadata. + # Delete an incident timeline entry. # - # Get all integration metadata for an incident. + # Delete a timeline entry for a given incident. # # @param incident_id [String] The UUID of the incident. + # @param timeline_entry_id [UUID] The ID of the timeline entry. # @param opts [Hash] the optional parameters - # @return [Array<(IncidentIntegrationMetadataListResponse, Integer, Hash)>] IncidentIntegrationMetadataListResponse data, response status code and response headers - def list_incident_integrations_with_http_info(incident_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_integrations".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_timeline_entry_with_http_info(incident_id, timeline_entry_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_timeline_entry".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_integrations") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_timeline_entry") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_integrations")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_timeline_entry")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_integrations ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_timeline_entry ...' end # verify the required parameter 'incident_id' is set if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_integrations" + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_timeline_entry" + end + # verify the required parameter 'timeline_entry_id' is set + if @api_client.config.client_side_validation && timeline_entry_id.nil? + fail ArgumentError, "Missing the required parameter 'timeline_entry_id' when calling IncidentsAPI.delete_incident_timeline_entry" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/relationships/integrations'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{timeline_entry_id}', CGI.escape(timeline_entry_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -2699,7 +2912,7 @@ def list_incident_integrations_with_http_info(incident_id, 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(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2708,13 +2921,13 @@ def list_incident_integrations_with_http_info(incident_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentIntegrationMetadataListResponse' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_incident_integrations, + :operation => :delete_incident_timeline_entry, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2724,50 +2937,58 @@ def list_incident_integrations_with_http_info(incident_id, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#list_incident_integrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_timeline_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List incident notification rules. + # Delete an incident todo. # - # @see #list_incident_notification_rules_with_http_info - def list_incident_notification_rules(opts = {}) - data, _status_code, _headers = list_incident_notification_rules_with_http_info(opts) - data + # @see #delete_incident_todo_with_http_info + def delete_incident_todo(incident_id, todo_id, opts = {}) + delete_incident_todo_with_http_info(incident_id, todo_id, opts) + nil end - # List incident notification rules. + # Delete an incident todo. # - # Lists all notification rules for the organization. Optionally filter by incident type. + # Delete an incident todo. # + # @param incident_id [String] The UUID of the incident. + # @param todo_id [String] The UUID of the incident todo. # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` - # @return [Array<(IncidentNotificationRuleArray, Integer, Hash)>] IncidentNotificationRuleArray data, response status code and response headers - def list_incident_notification_rules_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_notification_rules".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_todo_with_http_info(incident_id, todo_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_todo".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_notification_rules") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_todo") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_notification_rules")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_todo")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_notification_rules ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_todo ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.delete_incident_todo" + end + # verify the required parameter 'todo_id' is set + if @api_client.config.client_side_validation && todo_id.nil? + fail ArgumentError, "Missing the required parameter 'todo_id' when calling IncidentsAPI.delete_incident_todo" end # resource path - local_var_path = '/api/v2/incidents/config/notification-rules' + local_var_path = '/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{todo_id}', CGI.escape(todo_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2776,13 +2997,13 @@ def list_incident_notification_rules_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentNotificationRuleArray' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_incident_notification_rules, + :operation => :delete_incident_todo, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2792,52 +3013,53 @@ def list_incident_notification_rules_with_http_info(opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#list_incident_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_todo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List incident notification templates. + # Delete an incident type. # - # @see #list_incident_notification_templates_with_http_info - def list_incident_notification_templates(opts = {}) - data, _status_code, _headers = list_incident_notification_templates_with_http_info(opts) - data + # @see #delete_incident_type_with_http_info + def delete_incident_type(incident_type_id, opts = {}) + delete_incident_type_with_http_info(incident_type_id, opts) + nil end - # List incident notification templates. + # Delete an incident type. # - # Lists all notification templates. Optionally filter by incident type. + # Delete an incident type. # + # @param incident_type_id [String] The UUID of the incident type. # @param opts [Hash] the optional parameters - # @option opts [UUID] :filter_incident_type Optional incident type ID filter. - # @option opts [String] :include Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` - # @return [Array<(IncidentNotificationTemplateArray, Integer, Hash)>] IncidentNotificationTemplateArray data, response status code and response headers - def list_incident_notification_templates_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_notification_templates".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_type_with_http_info(incident_type_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_type".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_notification_templates") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_type") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_notification_templates")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_type")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_notification_templates ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_type ...' + end + # verify the required parameter 'incident_type_id' is set + if @api_client.config.client_side_validation && incident_type_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_type_id' when calling IncidentsAPI.delete_incident_type" end # resource path - local_var_path = '/api/v2/incidents/config/notification-templates' + local_var_path = '/api/v2/incidents/config/types/{incident_type_id}'.sub('{incident_type_id}', CGI.escape(incident_type_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'filter[incident-type]'] = opts[:'filter_incident_type'] if !opts[:'filter_incident_type'].nil? - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) - header_params['Accept'] = @api_client.select_header_accept(['application/json']) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2846,13 +3068,13 @@ def list_incident_notification_templates_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentNotificationTemplateArray' + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_incident_notification_templates, + :operation => :delete_incident_type, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2862,40 +3084,45 @@ def list_incident_notification_templates_with_http_info(opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#list_incident_notification_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List postmortem templates. + # Delete an incident user-defined field. # - # @see #list_incident_postmortem_templates_with_http_info - def list_incident_postmortem_templates(opts = {}) - data, _status_code, _headers = list_incident_postmortem_templates_with_http_info(opts) - data + # @see #delete_incident_user_defined_field_with_http_info + def delete_incident_user_defined_field(field_id, opts = {}) + delete_incident_user_defined_field_with_http_info(field_id, opts) + nil end - # List postmortem templates. + # Delete an incident user-defined field. # - # Retrieve a list of all postmortem templates for incidents. + # Delete an incident user-defined field. # + # @param field_id [String] The ID of the incident user-defined field. # @param opts [Hash] the optional parameters - # @return [Array<(PostmortemTemplatesResponse, Integer, Hash)>] PostmortemTemplatesResponse data, response status code and response headers - def list_incident_postmortem_templates_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_postmortem_templates".to_sym] + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_incident_user_defined_field_with_http_info(field_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_incident_user_defined_field".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_postmortem_templates") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_incident_user_defined_field") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_postmortem_templates")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_incident_user_defined_field")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_postmortem_templates ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.delete_incident_user_defined_field ...' + end + # verify the required parameter 'field_id' is set + if @api_client.config.client_side_validation && field_id.nil? + fail ArgumentError, "Missing the required parameter 'field_id' when calling IncidentsAPI.delete_incident_user_defined_field" end # resource path - local_var_path = '/api/v2/incidents/config/postmortem-templates' + local_var_path = '/api/v2/incidents/config/user-defined-fields/{field_id}'.sub('{field_id}', CGI.escape(field_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -2903,7 +3130,7 @@ def list_incident_postmortem_templates_with_http_info(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(['*/*']) # form parameters form_params = opts[:form_params] || {} @@ -2912,13 +3139,13 @@ def list_incident_postmortem_templates_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'PostmortemTemplatesResponse' + 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 => :list_incident_postmortem_templates, + :operation => :delete_incident_user_defined_field, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -2928,69 +3155,70 @@ def list_incident_postmortem_templates_with_http_info(opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#list_incident_postmortem_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#delete_incident_user_defined_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a list of incidents. + # Export incidents. # - # @see #list_incidents_with_http_info - def list_incidents(opts = {}) - data, _status_code, _headers = list_incidents_with_http_info(opts) + # @see #export_incidents_with_http_info + def export_incidents(body, opts = {}) + data, _status_code, _headers = export_incidents_with_http_info(body, opts) data end - # Get a list of incidents. + # Export incidents. # - # Get all incidents for the user's organization. + # Export incidents matching a search query as a CSV file. # + # @param body [IncidentSearchIncidentsExportRequest] # @param opts [Hash] the optional parameters - # @option opts [Array] :include Specifies which types of related objects should be included in the response. - # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. - # @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page. - # @return [Array<(IncidentsResponse, Integer, Hash)>] IncidentsResponse data, response status code and response headers - def list_incidents_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_incidents".to_sym] + # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers + def export_incidents_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.export_incidents".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incidents") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.export_incidents") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incidents")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.export_incidents")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incidents ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.export_incidents ...' + 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 IncidentsAPI.export_incidents" end # resource path - local_var_path = '/api/v2/incidents' + local_var_path = '/api/v2/incidents/search-incidents/export' # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].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(['text/csv', '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] || 'IncidentsResponse' + return_type = opts[:debug_return_type] || 'File' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_incidents, + :operation => :export_incidents, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3000,66 +3228,40 @@ def list_incidents_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: IncidentsAPI#list_incidents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#export_incidents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a list of incidents. - # - # Provide a paginated version of {#list_incidents}, returning all items. - # - # To use it you need to use a block: list_incidents_with_pagination { |item| p item } - # - # @yield [IncidentResponseData] Paginated items - def list_incidents_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) - while true do - response = list_incidents(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_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size) - end - end - - # Get a list of an incident's todos. + # Get global incident settings. # - # @see #list_incident_todos_with_http_info - def list_incident_todos(incident_id, opts = {}) - data, _status_code, _headers = list_incident_todos_with_http_info(incident_id, opts) + # @see #get_global_incident_settings_with_http_info + def get_global_incident_settings(opts = {}) + data, _status_code, _headers = get_global_incident_settings_with_http_info(opts) data end - # Get a list of an incident's todos. + # Get global incident settings. # - # Get all todos for an incident. + # Retrieve global incident settings for the organization. # - # @param incident_id [String] The UUID of the incident. # @param opts [Hash] the optional parameters - # @return [Array<(IncidentTodoListResponse, Integer, Hash)>] IncidentTodoListResponse data, response status code and response headers - def list_incident_todos_with_http_info(incident_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_todos".to_sym] + # @return [Array<(GlobalIncidentSettingsResponse, Integer, Hash)>] GlobalIncidentSettingsResponse data, response status code and response headers + def get_global_incident_settings_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_global_incident_settings".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_todos") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_global_incident_settings") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_todos")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_global_incident_settings")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_todos ...' - end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_todos" + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_global_incident_settings ...' end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/relationships/todos'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/global/settings' # query parameters query_params = opts[:query_params] || {} @@ -3076,13 +3278,13 @@ def list_incident_todos_with_http_info(incident_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentTodoListResponse' + return_type = opts[:debug_return_type] || 'GlobalIncidentSettingsResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :list_incident_todos, + :operation => :get_global_incident_settings, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3094,43 +3296,48 @@ def list_incident_todos_with_http_info(incident_id, opts = {}) 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: IncidentsAPI#list_incident_todos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#get_global_incident_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a list of incident types. + # Get the details of an incident. # - # @see #list_incident_types_with_http_info - def list_incident_types(opts = {}) - data, _status_code, _headers = list_incident_types_with_http_info(opts) + # @see #get_incident_with_http_info + def get_incident(incident_id, opts = {}) + data, _status_code, _headers = get_incident_with_http_info(incident_id, opts) data end - # Get a list of incident types. + # Get the details of an incident. # - # Get all incident types. + # Get the details of an incident by `incident_id`. # + # @param incident_id [String] The UUID of the incident. # @param opts [Hash] the optional parameters - # @option opts [Boolean] :include_deleted Include deleted incident types in the response. - # @return [Array<(IncidentTypeListResponse, Integer, Hash)>] IncidentTypeListResponse data, response status code and response headers - def list_incident_types_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_types".to_sym] + # @option opts [Array] :include Specifies which types of related objects should be included in the response. + # @return [Array<(IncidentResponse, Integer, Hash)>] IncidentResponse data, response status code and response headers + def get_incident_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_types") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_types")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_types ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident" end # resource path - local_var_path = '/api/v2/incidents/config/types' + local_var_path = '/api/v2/incidents/{incident_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include_deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil? + query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} @@ -3144,13 +3351,13 @@ def list_incident_types_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'IncidentTypeListResponse' + return_type = opts[:debug_return_type] || 'IncidentResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_incident_types, + :operation => :get_incident, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3162,80 +3369,3491 @@ def list_incident_types_with_http_info(opts = {}) 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: IncidentsAPI#list_incident_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#get_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Get a list of incident user-defined fields. + # Get incident automation data. # - # @see #list_incident_user_defined_fields_with_http_info - def list_incident_user_defined_fields(opts = {}) - data, _status_code, _headers = list_incident_user_defined_fields_with_http_info(opts) + # @see #get_incident_automation_data_with_http_info + def get_incident_automation_data(incident_id, key, opts = {}) + data, _status_code, _headers = get_incident_automation_data_with_http_info(incident_id, key, opts) data end - # Get a list of incident user-defined fields. + # Get incident automation data. # - # Get a list of all incident user-defined fields. + # Get automation data for a given incident and key. # + # @param incident_id [String] The UUID of the incident. + # @param key [String] The automation data key. # @param opts [Hash] the optional parameters - # @option opts [Integer] :page_size The number of results to return per page. Must be between 0 and 1000. - # @option opts [Integer] :page_number The page number to retrieve, starting at 0. - # @option opts [Boolean] :include_deleted When true, include soft-deleted fields in the response. - # @option opts [String] :filter_incident_type Filter results to fields associated with the given incident type UUID. - # @option opts [String] :include Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". - # @return [Array<(IncidentUserDefinedFieldListResponse, Integer, Hash)>] IncidentUserDefinedFieldListResponse data, response status code and response headers - def list_incident_user_defined_fields_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_user_defined_fields".to_sym] + # @option opts [String] :include Specifies which related objects to include in the response. + # @return [Array<(IncidentAutomationDataResponse, Integer, Hash)>] IncidentAutomationDataResponse data, response status code and response headers + def get_incident_automation_data_with_http_info(incident_id, key, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_automation_data".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_user_defined_fields") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_automation_data") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_user_defined_fields")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_automation_data")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_user_defined_fields ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_automation_data ...' end - if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 - fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IncidentsAPI.list_incident_user_defined_fields, must be smaller than or equal to 1000.' + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident_automation_data" end - if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0 - fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IncidentsAPI.list_incident_user_defined_fields, must be greater than or equal to 0.' + # verify the required parameter 'key' is set + if @api_client.config.client_side_validation && key.nil? + fail ArgumentError, "Missing the required parameter 'key' when calling IncidentsAPI.get_incident_automation_data" end - if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0 - fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling IncidentsAPI.list_incident_user_defined_fields, must be greater than or equal to 0.' + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/automation-data/{key}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{key}', CGI.escape(key.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].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] || 'IncidentAutomationDataResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_automation_data, + :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: IncidentsAPI#get_incident_automation_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get incident case source link. + # + # @see #get_incident_case_source_link_with_http_info + def get_incident_case_source_link(incident_id, opts = {}) + data, _status_code, _headers = get_incident_case_source_link_with_http_info(incident_id, opts) + data + end + + # Get incident case source link. + # + # Get the source link for a case associated with an incident. + # + # @param incident_id [String] The UUID of the incident. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentCaseLinkResponse, Integer, Hash)>] IncidentCaseLinkResponse data, response status code and response headers + def get_incident_case_source_link_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_case_source_link".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_case_source_link") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_case_source_link")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_case_source_link ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident_case_source_link" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/cases/source-link'.sub('{incident_id}', CGI.escape(incident_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] || 'IncidentCaseLinkResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_case_source_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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_case_source_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an incident communication. + # + # @see #get_incident_communication_with_http_info + def get_incident_communication(incident_id, communication_id, opts = {}) + data, _status_code, _headers = get_incident_communication_with_http_info(incident_id, communication_id, opts) + data + end + + # Get an incident communication. + # + # Get the details of a communication for a given incident. + # + # @param incident_id [String] The UUID of the incident. + # @param communication_id [UUID] The ID of the communication. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentCommunicationResponse, Integer, Hash)>] IncidentCommunicationResponse data, response status code and response headers + def get_incident_communication_with_http_info(incident_id, communication_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_communication".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_communication") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_communication")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_communication ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident_communication" + end + # verify the required parameter 'communication_id' is set + if @api_client.config.client_side_validation && communication_id.nil? + fail ArgumentError, "Missing the required parameter 'communication_id' when calling IncidentsAPI.get_incident_communication" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/communications/{communication_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{communication_id}', CGI.escape(communication_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] || 'IncidentCommunicationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_communication, + :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: IncidentsAPI#get_incident_communication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get incident integration metadata details. + # + # @see #get_incident_integration_with_http_info + def get_incident_integration(incident_id, integration_metadata_id, opts = {}) + data, _status_code, _headers = get_incident_integration_with_http_info(incident_id, integration_metadata_id, opts) + data + end + + # Get incident integration metadata details. + # + # Get incident integration metadata details. + # + # @param incident_id [String] The UUID of the incident. + # @param integration_metadata_id [String] The UUID of the incident integration metadata. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentIntegrationMetadataResponse, Integer, Hash)>] IncidentIntegrationMetadataResponse data, response status code and response headers + def get_incident_integration_with_http_info(incident_id, integration_metadata_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_integration".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_integration") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_integration")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_integration ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident_integration" + end + # verify the required parameter 'integration_metadata_id' is set + if @api_client.config.client_side_validation && integration_metadata_id.nil? + fail ArgumentError, "Missing the required parameter 'integration_metadata_id' when calling IncidentsAPI.get_incident_integration" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{integration_metadata_id}', CGI.escape(integration_metadata_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] || 'IncidentIntegrationMetadataResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_integration, + :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: IncidentsAPI#get_incident_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an incident Jira template. + # + # @see #get_incident_jira_template_with_http_info + def get_incident_jira_template(template_id, opts = {}) + data, _status_code, _headers = get_incident_jira_template_with_http_info(template_id, opts) + data + end + + # Get an incident Jira template. + # + # Get the details of an incident Jira template by its identifier. + # + # @param template_id [UUID] The ID of the Jira template. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentJiraTemplateResponse, Integer, Hash)>] IncidentJiraTemplateResponse data, response status code and response headers + def get_incident_jira_template_with_http_info(template_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_jira_template".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_jira_template") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_jira_template")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_jira_template ...' + end + # verify the required parameter 'template_id' is set + if @api_client.config.client_side_validation && template_id.nil? + fail ArgumentError, "Missing the required parameter 'template_id' when calling IncidentsAPI.get_incident_jira_template" + end + # resource path + local_var_path = '/api/v2/incidents/config/jira-templates/{template_id}'.sub('{template_id}', CGI.escape(template_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] || 'IncidentJiraTemplateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_jira_template, + :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: IncidentsAPI#get_incident_jira_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an incident notification rule. + # + # @see #get_incident_notification_rule_with_http_info + def get_incident_notification_rule(id, opts = {}) + data, _status_code, _headers = get_incident_notification_rule_with_http_info(id, opts) + data + end + + # Get an incident notification rule. + # + # Retrieves a specific notification rule by its ID. + # + # @param id [UUID] The ID of the notification rule. + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` + # @return [Array<(IncidentNotificationRule, Integer, Hash)>] IncidentNotificationRule data, response status code and response headers + def get_incident_notification_rule_with_http_info(id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_notification_rule".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_notification_rule") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_notification_rule")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_notification_rule ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.get_incident_notification_rule" + end + # resource path + local_var_path = '/api/v2/incidents/config/notification-rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].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] || 'IncidentNotificationRule' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get incident notification template. + # + # @see #get_incident_notification_template_with_http_info + def get_incident_notification_template(id, opts = {}) + data, _status_code, _headers = get_incident_notification_template_with_http_info(id, opts) + data + end + + # Get incident notification template. + # + # Retrieves a specific notification template by its ID. + # + # @param id [UUID] The ID of the notification template. + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` + # @return [Array<(IncidentNotificationTemplate, Integer, Hash)>] IncidentNotificationTemplate data, response status code and response headers + def get_incident_notification_template_with_http_info(id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_notification_template".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_notification_template") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_notification_template")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_notification_template ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.get_incident_notification_template" + end + # resource path + local_var_path = '/api/v2/incidents/config/notification-templates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].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] || 'IncidentNotificationTemplate' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_notification_template, + :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: IncidentsAPI#get_incident_notification_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get PagerDuty related incidents. + # + # @see #get_incident_pagerduty_related_incidents_with_http_info + def get_incident_pagerduty_related_incidents(pagerduty_incident_id, opts = {}) + data, _status_code, _headers = get_incident_pagerduty_related_incidents_with_http_info(pagerduty_incident_id, opts) + data + end + + # Get PagerDuty related incidents. + # + # Get the list of Datadog incidents attached to a PagerDuty incident. + # + # @param pagerduty_incident_id [String] The PagerDuty incident identifier. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentPagerdutyRelatedIncidentsResponse, Integer, Hash)>] IncidentPagerdutyRelatedIncidentsResponse data, response status code and response headers + def get_incident_pagerduty_related_incidents_with_http_info(pagerduty_incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_pagerduty_related_incidents".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_pagerduty_related_incidents") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_pagerduty_related_incidents")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_pagerduty_related_incidents ...' + end + # verify the required parameter 'pagerduty_incident_id' is set + if @api_client.config.client_side_validation && pagerduty_incident_id.nil? + fail ArgumentError, "Missing the required parameter 'pagerduty_incident_id' when calling IncidentsAPI.get_incident_pagerduty_related_incidents" + end + # resource path + local_var_path = '/api/v2/incidents/pagerduty/{pagerduty_incident_id}/relationships/incidents'.sub('{pagerduty_incident_id}', CGI.escape(pagerduty_incident_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] || 'IncidentPagerdutyRelatedIncidentsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_pagerduty_related_incidents, + :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: IncidentsAPI#get_incident_pagerduty_related_incidents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get incident page source link. + # + # @see #get_incident_page_source_link_with_http_info + def get_incident_page_source_link(incident_id, opts = {}) + data, _status_code, _headers = get_incident_page_source_link_with_http_info(incident_id, opts) + data + end + + # Get incident page source link. + # + # Get the source link for a page associated with an incident. + # + # @param incident_id [String] The UUID of the incident. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentCaseLinkResponse, Integer, Hash)>] IncidentCaseLinkResponse data, response status code and response headers + def get_incident_page_source_link_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_page_source_link".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_page_source_link") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_page_source_link")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_page_source_link ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident_page_source_link" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/pages/source-link'.sub('{incident_id}', CGI.escape(incident_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] || 'IncidentCaseLinkResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_page_source_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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_page_source_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get postmortem template. + # + # @see #get_incident_postmortem_template_with_http_info + def get_incident_postmortem_template(template_id, opts = {}) + data, _status_code, _headers = get_incident_postmortem_template_with_http_info(template_id, opts) + data + end + + # Get postmortem template. + # + # Retrieve details of a specific postmortem template. + # + # @param template_id [String] The ID of the postmortem template + # @param opts [Hash] the optional parameters + # @return [Array<(PostmortemTemplateResponse, Integer, Hash)>] PostmortemTemplateResponse data, response status code and response headers + def get_incident_postmortem_template_with_http_info(template_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_postmortem_template".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_postmortem_template") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_postmortem_template")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_postmortem_template ...' + end + # verify the required parameter 'template_id' is set + if @api_client.config.client_side_validation && template_id.nil? + fail ArgumentError, "Missing the required parameter 'template_id' when calling IncidentsAPI.get_incident_postmortem_template" + end + # resource path + local_var_path = '/api/v2/incidents/config/postmortem-templates/{template_id}'.sub('{template_id}', CGI.escape(template_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] || 'PostmortemTemplateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_incident_postmortem_template, + :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: IncidentsAPI#get_incident_postmortem_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an incident reserved role. + # + # @see #get_incident_reserved_role_with_http_info + def get_incident_reserved_role(role_id, opts = {}) + data, _status_code, _headers = get_incident_reserved_role_with_http_info(role_id, opts) + data + end + + # Get an incident reserved role. + # + # Get the details of a reserved role by its identifier. + # + # @param role_id [UUID] The ID of the reserved role. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentReservedRoleResponse, Integer, Hash)>] IncidentReservedRoleResponse data, response status code and response headers + def get_incident_reserved_role_with_http_info(role_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_reserved_role".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_reserved_role") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_reserved_role")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_reserved_role ...' + end + # verify the required parameter 'role_id' is set + if @api_client.config.client_side_validation && role_id.nil? + fail ArgumentError, "Missing the required parameter 'role_id' when calling IncidentsAPI.get_incident_reserved_role" + end + # resource path + local_var_path = '/api/v2/incidents/config/reserved-roles/{role_id}'.sub('{role_id}', CGI.escape(role_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] || 'IncidentReservedRoleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_reserved_role, + :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: IncidentsAPI#get_incident_reserved_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an incident role assignment. + # + # @see #get_incident_role_assignment_with_http_info + def get_incident_role_assignment(role_assignment_id, opts = {}) + data, _status_code, _headers = get_incident_role_assignment_with_http_info(role_assignment_id, opts) + data + end + + # Get an incident role assignment. + # + # Get the details of a role assignment by its identifier. + # + # @param role_assignment_id [UUID] The ID of the role assignment. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentRoleAssignmentResponse, Integer, Hash)>] IncidentRoleAssignmentResponse data, response status code and response headers + def get_incident_role_assignment_with_http_info(role_assignment_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_role_assignment".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_role_assignment") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_role_assignment")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_role_assignment ...' + end + # verify the required parameter 'role_assignment_id' is set + if @api_client.config.client_side_validation && role_assignment_id.nil? + fail ArgumentError, "Missing the required parameter 'role_assignment_id' when calling IncidentsAPI.get_incident_role_assignment" + end + # resource path + local_var_path = '/api/v2/incidents/role_assignments/{role_assignment_id}'.sub('{role_assignment_id}', CGI.escape(role_assignment_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] || 'IncidentRoleAssignmentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_role_assignment, + :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: IncidentsAPI#get_incident_role_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get incident status pages suggestion. + # + # @see #get_incident_status_pages_suggestion_with_http_info + def get_incident_status_pages_suggestion(incident_id, opts = {}) + data, _status_code, _headers = get_incident_status_pages_suggestion_with_http_info(incident_id, opts) + data + end + + # Get incident status pages suggestion. + # + # Get an AI-generated suggestion for a status page notice for a given incident. + # + # @param incident_id [String] The UUID of the incident. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentStatusPagesSuggestionResponse, Integer, Hash)>] IncidentStatusPagesSuggestionResponse data, response status code and response headers + def get_incident_status_pages_suggestion_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_status_pages_suggestion".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_status_pages_suggestion") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_status_pages_suggestion")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_status_pages_suggestion ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident_status_pages_suggestion" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/statuspages-suggestion'.sub('{incident_id}', CGI.escape(incident_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] || 'IncidentStatusPagesSuggestionResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_status_pages_suggestion, + :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: IncidentsAPI#get_incident_status_pages_suggestion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get incident timeline entry thread. + # + # @see #get_incident_timeline_entry_thread_with_http_info + def get_incident_timeline_entry_thread(incident_id, timeline_entry_id, opts = {}) + data, _status_code, _headers = get_incident_timeline_entry_thread_with_http_info(incident_id, timeline_entry_id, opts) + data + end + + # Get incident timeline entry thread. + # + # Get the thread entries for a given timeline entry. + # + # @param incident_id [String] The UUID of the incident. + # @param timeline_entry_id [UUID] The ID of the timeline entry. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentTimelineThreadResponse, Integer, Hash)>] IncidentTimelineThreadResponse data, response status code and response headers + def get_incident_timeline_entry_thread_with_http_info(incident_id, timeline_entry_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_timeline_entry_thread".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_timeline_entry_thread") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_timeline_entry_thread")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_timeline_entry_thread ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident_timeline_entry_thread" + end + # verify the required parameter 'timeline_entry_id' is set + if @api_client.config.client_side_validation && timeline_entry_id.nil? + fail ArgumentError, "Missing the required parameter 'timeline_entry_id' when calling IncidentsAPI.get_incident_timeline_entry_thread" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}/thread'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{timeline_entry_id}', CGI.escape(timeline_entry_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] || 'IncidentTimelineThreadResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_timeline_entry_thread, + :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: IncidentsAPI#get_incident_timeline_entry_thread\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get incident todo details. + # + # @see #get_incident_todo_with_http_info + def get_incident_todo(incident_id, todo_id, opts = {}) + data, _status_code, _headers = get_incident_todo_with_http_info(incident_id, todo_id, opts) + data + end + + # Get incident todo details. + # + # Get incident todo details. + # + # @param incident_id [String] The UUID of the incident. + # @param todo_id [String] The UUID of the incident todo. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentTodoResponse, Integer, Hash)>] IncidentTodoResponse data, response status code and response headers + def get_incident_todo_with_http_info(incident_id, todo_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_todo".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_todo") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_todo")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_todo ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.get_incident_todo" + end + # verify the required parameter 'todo_id' is set + if @api_client.config.client_side_validation && todo_id.nil? + fail ArgumentError, "Missing the required parameter 'todo_id' when calling IncidentsAPI.get_incident_todo" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{todo_id}', CGI.escape(todo_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] || 'IncidentTodoResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_todo, + :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: IncidentsAPI#get_incident_todo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get incident type details. + # + # @see #get_incident_type_with_http_info + def get_incident_type(incident_type_id, opts = {}) + data, _status_code, _headers = get_incident_type_with_http_info(incident_type_id, opts) + data + end + + # Get incident type details. + # + # Get incident type details. + # + # @param incident_type_id [String] The UUID of the incident type. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentTypeResponse, Integer, Hash)>] IncidentTypeResponse data, response status code and response headers + def get_incident_type_with_http_info(incident_type_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_type".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_type") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_type")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_type ...' + end + # verify the required parameter 'incident_type_id' is set + if @api_client.config.client_side_validation && incident_type_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_type_id' when calling IncidentsAPI.get_incident_type" + end + # resource path + local_var_path = '/api/v2/incidents/config/types/{incident_type_id}'.sub('{incident_type_id}', CGI.escape(incident_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']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'IncidentTypeResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_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::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IncidentsAPI#get_incident_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an incident user-defined field. + # + # @see #get_incident_user_defined_field_with_http_info + def get_incident_user_defined_field(field_id, opts = {}) + data, _status_code, _headers = get_incident_user_defined_field_with_http_info(field_id, opts) + data + end + + # Get an incident user-defined field. + # + # Get details of an incident user-defined field. + # + # @param field_id [String] The ID of the incident user-defined field. + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". + # @return [Array<(IncidentUserDefinedFieldResponse, Integer, Hash)>] IncidentUserDefinedFieldResponse data, response status code and response headers + def get_incident_user_defined_field_with_http_info(field_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_incident_user_defined_field".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_incident_user_defined_field") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_incident_user_defined_field")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_incident_user_defined_field ...' + end + # verify the required parameter 'field_id' is set + if @api_client.config.client_side_validation && field_id.nil? + fail ArgumentError, "Missing the required parameter 'field_id' when calling IncidentsAPI.get_incident_user_defined_field" + end + # resource path + local_var_path = '/api/v2/incidents/config/user-defined-fields/{field_id}'.sub('{field_id}', CGI.escape(field_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].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] || 'IncidentUserDefinedFieldResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_incident_user_defined_field, + :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: IncidentsAPI#get_incident_user_defined_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get status page subscription preferences. + # + # @see #get_statuspage_subscription_preferences_with_http_info + def get_statuspage_subscription_preferences(opts = {}) + data, _status_code, _headers = get_statuspage_subscription_preferences_with_http_info(opts) + data + end + + # Get status page subscription preferences. + # + # Get the subscription preferences for the current user. + # + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentStatuspagePreferencesResponse, Integer, Hash)>] IncidentStatuspagePreferencesResponse data, response status code and response headers + def get_statuspage_subscription_preferences_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_statuspage_subscription_preferences".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_statuspage_subscription_preferences") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_statuspage_subscription_preferences")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.get_statuspage_subscription_preferences ...' + end + # resource path + local_var_path = '/api/v2/statuspages/subscription/preferences' + + # 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] || 'IncidentStatuspagePreferencesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_statuspage_subscription_preferences, + :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: IncidentsAPI#get_statuspage_subscription_preferences\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Import an incident. + # + # @see #import_incident_with_http_info + def import_incident(body, opts = {}) + data, _status_code, _headers = import_incident_with_http_info(body, opts) + data + end + + # Import an incident. + # + # Import an incident from an external system. This endpoint allows you to create incidents with + # historical data such as custom timestamps for detection, declaration, and resolution. + # Imported incidents do not execute integrations or notification rules. + # + # @param body [IncidentImportRequest] Incident import payload. + # @param opts [Hash] the optional parameters + # @option opts [Array] :include Specifies which related object types to include in the response when importing an incident. + # @return [Array<(IncidentImportResponse, Integer, Hash)>] IncidentImportResponse data, response status code and response headers + def import_incident_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.import_incident".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.import_incident") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.import_incident")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.import_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 IncidentsAPI.import_incident" + end + # resource path + local_var_path = '/api/v2/incidents/import' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? + + # 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] || 'IncidentImportResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :import_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: IncidentsAPI#import_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List global incident handles. + # + # @see #list_global_incident_handles_with_http_info + def list_global_incident_handles(opts = {}) + data, _status_code, _headers = list_global_incident_handles_with_http_info(opts) + data + end + + # List global incident handles. + # + # Retrieve a list of global incident handles. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of related resources to include in the response + # @return [Array<(IncidentHandlesResponse, Integer, Hash)>] IncidentHandlesResponse data, response status code and response headers + def list_global_incident_handles_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_global_incident_handles".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_global_incident_handles") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_global_incident_handles")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_global_incident_handles ...' + end + # resource path + local_var_path = '/api/v2/incidents/config/global/incident-handles' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].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] || 'IncidentHandlesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_global_incident_handles, + :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: IncidentsAPI#list_global_incident_handles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List incident attachments. + # + # @see #list_incident_attachments_with_http_info + def list_incident_attachments(incident_id, opts = {}) + data, _status_code, _headers = list_incident_attachments_with_http_info(incident_id, opts) + data + end + + # List incident attachments. + # + # List incident attachments. + # + # @param incident_id [String] The UUID of the incident. + # @param opts [Hash] the optional parameters + # @option opts [String] :filter_attachment_type Filter attachments by type. Supported values are `1` (`postmortem`) and `2` (`link`). + # @option opts [String] :include Resource to include in the response. Supported value: `last_modified_by_user`. + # @return [Array<(AttachmentArray, Integer, Hash)>] AttachmentArray data, response status code and response headers + def list_incident_attachments_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_attachments".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_attachments") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_attachments")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_attachments ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_attachments" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/attachments'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[attachment_type]'] = opts[:'filter_attachment_type'] if !opts[:'filter_attachment_type'].nil? + query_params[:'include'] = opts[:'include'] if !opts[:'include'].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] || 'AttachmentArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_incident_attachments, + :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: IncidentsAPI#list_incident_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List incident communications. + # + # @see #list_incident_communications_with_http_info + def list_incident_communications(incident_id, opts = {}) + data, _status_code, _headers = list_incident_communications_with_http_info(incident_id, opts) + data + end + + # List incident communications. + # + # List all communications for a given incident. + # + # @param incident_id [String] The UUID of the incident. + # @param opts [Hash] the optional parameters + # @option opts [String] :filter_communication_type Filter by communication type. + # @return [Array<(IncidentCommunicationsResponse, Integer, Hash)>] IncidentCommunicationsResponse data, response status code and response headers + def list_incident_communications_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_communications".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_communications") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_communications")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_communications ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_communications" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/communications'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[communication_type]'] = opts[:'filter_communication_type'] if !opts[:'filter_communication_type'].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] || 'IncidentCommunicationsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_communications, + :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: IncidentsAPI#list_incident_communications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List an incident's impacts. + # + # @see #list_incident_impacts_with_http_info + def list_incident_impacts(incident_id, opts = {}) + data, _status_code, _headers = list_incident_impacts_with_http_info(incident_id, opts) + data + end + + # List an incident's impacts. + # + # Get all impacts for an incident. + # + # @param incident_id [String] The UUID of the incident. + # @param opts [Hash] the optional parameters + # @option opts [Array] :include Specifies which related resources should be included in the response. + # @return [Array<(IncidentImpactsResponse, Integer, Hash)>] IncidentImpactsResponse data, response status code and response headers + def list_incident_impacts_with_http_info(incident_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_impacts ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_impacts" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/impacts'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].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] || 'IncidentImpactsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_impacts, + :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: IncidentsAPI#list_incident_impacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a list of an incident's integration metadata. + # + # @see #list_incident_integrations_with_http_info + def list_incident_integrations(incident_id, opts = {}) + data, _status_code, _headers = list_incident_integrations_with_http_info(incident_id, opts) + data + end + + # Get a list of an incident's integration metadata. + # + # Get all integration metadata for an incident. + # + # @param incident_id [String] The UUID of the incident. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentIntegrationMetadataListResponse, Integer, Hash)>] IncidentIntegrationMetadataListResponse data, response status code and response headers + def list_incident_integrations_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_integrations".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_integrations") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_integrations")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_integrations ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_integrations" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/relationships/integrations'.sub('{incident_id}', CGI.escape(incident_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] || 'IncidentIntegrationMetadataListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_integrations, + :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: IncidentsAPI#list_incident_integrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List incident Jira templates. + # + # @see #list_incident_jira_templates_with_http_info + def list_incident_jira_templates(opts = {}) + data, _status_code, _headers = list_incident_jira_templates_with_http_info(opts) + data + end + + # List incident Jira templates. + # + # List all incident Jira templates for the organization. + # + # @param opts [Hash] the optional parameters + # @option opts [Boolean] :is_default Filter templates by default status. + # @option opts [UUID] :incident_type_id Filter templates by incident type identifier. + # @option opts [String] :template_type Filter templates by type. + # @return [Array<(IncidentJiraTemplatesResponse, Integer, Hash)>] IncidentJiraTemplatesResponse data, response status code and response headers + def list_incident_jira_templates_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_jira_templates".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_jira_templates") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_jira_templates")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_jira_templates ...' + end + # resource path + local_var_path = '/api/v2/incidents/config/jira-templates' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'isDefault'] = opts[:'is_default'] if !opts[:'is_default'].nil? + query_params[:'incidentTypeId'] = opts[:'incident_type_id'] if !opts[:'incident_type_id'].nil? + query_params[:'templateType'] = opts[:'template_type'] if !opts[:'template_type'].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] || 'IncidentJiraTemplatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_jira_templates, + :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: IncidentsAPI#list_incident_jira_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List incident notification rules. + # + # @see #list_incident_notification_rules_with_http_info + def list_incident_notification_rules(opts = {}) + data, _status_code, _headers = list_incident_notification_rules_with_http_info(opts) + data + end + + # List incident notification rules. + # + # Lists all notification rules for the organization. Optionally filter by incident type. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` + # @return [Array<(IncidentNotificationRuleArray, Integer, Hash)>] IncidentNotificationRuleArray data, response status code and response headers + def list_incident_notification_rules_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_notification_rules".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_notification_rules") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_notification_rules")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_notification_rules ...' + end + # resource path + local_var_path = '/api/v2/incidents/config/notification-rules' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].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] || 'IncidentNotificationRuleArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_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: IncidentsAPI#list_incident_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List incident notification templates. + # + # @see #list_incident_notification_templates_with_http_info + def list_incident_notification_templates(opts = {}) + data, _status_code, _headers = list_incident_notification_templates_with_http_info(opts) + data + end + + # List incident notification templates. + # + # Lists all notification templates. Optionally filter by incident type. + # + # @param opts [Hash] the optional parameters + # @option opts [UUID] :filter_incident_type Optional incident type ID filter. + # @option opts [String] :include Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` + # @return [Array<(IncidentNotificationTemplateArray, Integer, Hash)>] IncidentNotificationTemplateArray data, response status code and response headers + def list_incident_notification_templates_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_notification_templates".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_notification_templates") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_notification_templates")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_notification_templates ...' + end + # resource path + local_var_path = '/api/v2/incidents/config/notification-templates' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[incident-type]'] = opts[:'filter_incident_type'] if !opts[:'filter_incident_type'].nil? + query_params[:'include'] = opts[:'include'] if !opts[:'include'].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] || 'IncidentNotificationTemplateArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_notification_templates, + :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: IncidentsAPI#list_incident_notification_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List PagerDuty services. + # + # @see #list_incident_pagerduty_services_with_http_info + def list_incident_pagerduty_services(opts = {}) + data, _status_code, _headers = list_incident_pagerduty_services_with_http_info(opts) + data + end + + # List PagerDuty services. + # + # List all PagerDuty services configured for the organization. + # + # @param opts [Hash] the optional parameters + # @option opts [Boolean] :include_unresolved Whether to include unresolved PagerDuty services. + # @return [Array<(IncidentPagerdutyServicesResponse, Integer, Hash)>] IncidentPagerdutyServicesResponse data, response status code and response headers + def list_incident_pagerduty_services_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_pagerduty_services".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_pagerduty_services") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_pagerduty_services")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_pagerduty_services ...' + end + # resource path + local_var_path = '/api/v2/incidents/pagerduty/services' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include_unresolved'] = opts[:'include_unresolved'] if !opts[:'include_unresolved'].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] || 'IncidentPagerdutyServicesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_pagerduty_services, + :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: IncidentsAPI#list_incident_pagerduty_services\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List postmortem templates. + # + # @see #list_incident_postmortem_templates_with_http_info + def list_incident_postmortem_templates(opts = {}) + data, _status_code, _headers = list_incident_postmortem_templates_with_http_info(opts) + data + end + + # List postmortem templates. + # + # Retrieve a list of all postmortem templates for incidents. + # + # @param opts [Hash] the optional parameters + # @return [Array<(PostmortemTemplatesResponse, Integer, Hash)>] PostmortemTemplatesResponse data, response status code and response headers + def list_incident_postmortem_templates_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_postmortem_templates".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_postmortem_templates") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_postmortem_templates")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_postmortem_templates ...' + end + # resource path + local_var_path = '/api/v2/incidents/config/postmortem-templates' + + # 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] || 'PostmortemTemplatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_incident_postmortem_templates, + :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: IncidentsAPI#list_incident_postmortem_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List incident reserved roles. + # + # @see #list_incident_reserved_roles_with_http_info + def list_incident_reserved_roles(opts = {}) + data, _status_code, _headers = list_incident_reserved_roles_with_http_info(opts) + data + end + + # List incident reserved roles. + # + # List all reserved roles for incidents. + # + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentReservedRolesResponse, Integer, Hash)>] IncidentReservedRolesResponse data, response status code and response headers + def list_incident_reserved_roles_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_reserved_roles".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_reserved_roles") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_reserved_roles")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_reserved_roles ...' + end + # resource path + local_var_path = '/api/v2/incidents/config/reserved-roles' + + # 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] || 'IncidentReservedRolesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_reserved_roles, + :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: IncidentsAPI#list_incident_reserved_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List incident rule execution states. + # + # @see #list_incident_rule_execution_states_with_http_info + def list_incident_rule_execution_states(incident_id, opts = {}) + data, _status_code, _headers = list_incident_rule_execution_states_with_http_info(incident_id, opts) + data + end + + # List incident rule execution states. + # + # List all rule execution states for a given incident. + # + # @param incident_id [String] The UUID of the incident. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentRuleExecutionStatesResponse, Integer, Hash)>] IncidentRuleExecutionStatesResponse data, response status code and response headers + def list_incident_rule_execution_states_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_rule_execution_states".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_rule_execution_states") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_rule_execution_states")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_rule_execution_states ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_rule_execution_states" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/rule-execution-states'.sub('{incident_id}', CGI.escape(incident_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] || 'IncidentRuleExecutionStatesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_rule_execution_states, + :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: IncidentsAPI#list_incident_rule_execution_states\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a list of incidents. + # + # @see #list_incidents_with_http_info + def list_incidents(opts = {}) + data, _status_code, _headers = list_incidents_with_http_info(opts) + data + end + + # Get a list of incidents. + # + # Get all incidents for the user's organization. + # + # @param opts [Hash] the optional parameters + # @option opts [Array] :include Specifies which types of related objects should be included in the response. + # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. + # @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page. + # @return [Array<(IncidentsResponse, Integer, Hash)>] IncidentsResponse data, response status code and response headers + def list_incidents_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incidents".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incidents") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incidents")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incidents ...' + end + # resource path + local_var_path = '/api/v2/incidents' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].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] || 'IncidentsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incidents, + :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: IncidentsAPI#list_incidents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a list of incidents. + # + # Provide a paginated version of {#list_incidents}, returning all items. + # + # To use it you need to use a block: list_incidents_with_pagination { |item| p item } + # + # @yield [IncidentResponseData] Paginated items + def list_incidents_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) + while true do + response = list_incidents(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_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size) + end + end + + # List incident template variables. + # + # @see #list_incident_template_variables_with_http_info + def list_incident_template_variables(opts = {}) + data, _status_code, _headers = list_incident_template_variables_with_http_info(opts) + data + end + + # List incident template variables. + # + # List all available template variables for incident templates. + # + # @param opts [Hash] the optional parameters + # @option opts [UUID] :filter_incident_type Filter template variables by incident type. + # @option opts [Boolean] :include_follow_ups Whether to include follow-up template variables. + # @return [Array<(IncidentTemplateVariablesResponse, Integer, Hash)>] IncidentTemplateVariablesResponse data, response status code and response headers + def list_incident_template_variables_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_template_variables".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_template_variables") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_template_variables")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_template_variables ...' + end + # resource path + local_var_path = '/api/v2/incidents/config/template-variables' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'filter[incident-type]'] = opts[:'filter_incident_type'] if !opts[:'filter_incident_type'].nil? + query_params[:'includeFollowUps'] = opts[:'include_follow_ups'] if !opts[:'include_follow_ups'].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] || 'IncidentTemplateVariablesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_template_variables, + :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: IncidentsAPI#list_incident_template_variables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List incident timeline entries. + # + # @see #list_incident_timeline_entries_with_http_info + def list_incident_timeline_entries(incident_id, opts = {}) + data, _status_code, _headers = list_incident_timeline_entries_with_http_info(incident_id, opts) + data + end + + # List incident timeline entries. + # + # Get the timeline for a given incident. + # + # @param incident_id [String] The UUID of the incident. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentTimelineEntriesResponse, Integer, Hash)>] IncidentTimelineEntriesResponse data, response status code and response headers + def list_incident_timeline_entries_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_timeline_entries".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_timeline_entries") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_timeline_entries")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_timeline_entries ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_timeline_entries" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/timeline'.sub('{incident_id}', CGI.escape(incident_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] || 'IncidentTimelineEntriesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_timeline_entries, + :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: IncidentsAPI#list_incident_timeline_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a list of an incident's todos. + # + # @see #list_incident_todos_with_http_info + def list_incident_todos(incident_id, opts = {}) + data, _status_code, _headers = list_incident_todos_with_http_info(incident_id, opts) + data + end + + # Get a list of an incident's todos. + # + # Get all todos for an incident. + # + # @param incident_id [String] The UUID of the incident. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentTodoListResponse, Integer, Hash)>] IncidentTodoListResponse data, response status code and response headers + def list_incident_todos_with_http_info(incident_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_todos".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_todos") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_todos")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_todos ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.list_incident_todos" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/relationships/todos'.sub('{incident_id}', CGI.escape(incident_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] || 'IncidentTodoListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_todos, + :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: IncidentsAPI#list_incident_todos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a list of incident types. + # + # @see #list_incident_types_with_http_info + def list_incident_types(opts = {}) + data, _status_code, _headers = list_incident_types_with_http_info(opts) + data + end + + # Get a list of incident types. + # + # Get all incident types. + # + # @param opts [Hash] the optional parameters + # @option opts [Boolean] :include_deleted Include deleted incident types in the response. + # @return [Array<(IncidentTypeListResponse, Integer, Hash)>] IncidentTypeListResponse data, response status code and response headers + def list_incident_types_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_types".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_types") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_types")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_types ...' + end + # resource path + local_var_path = '/api/v2/incidents/config/types' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include_deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].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] || 'IncidentTypeListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_types, + :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: IncidentsAPI#list_incident_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a list of incident user-defined fields. + # + # @see #list_incident_user_defined_fields_with_http_info + def list_incident_user_defined_fields(opts = {}) + data, _status_code, _headers = list_incident_user_defined_fields_with_http_info(opts) + data + end + + # Get a list of incident user-defined fields. + # + # Get a list of all incident user-defined fields. + # + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_size The number of results to return per page. Must be between 0 and 1000. + # @option opts [Integer] :page_number The page number to retrieve, starting at 0. + # @option opts [Boolean] :include_deleted When true, include soft-deleted fields in the response. + # @option opts [String] :filter_incident_type Filter results to fields associated with the given incident type UUID. + # @option opts [String] :include Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". + # @return [Array<(IncidentUserDefinedFieldListResponse, Integer, Hash)>] IncidentUserDefinedFieldListResponse data, response status code and response headers + def list_incident_user_defined_fields_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_incident_user_defined_fields".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_incident_user_defined_fields") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_incident_user_defined_fields")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_incident_user_defined_fields ...' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IncidentsAPI.list_incident_user_defined_fields, must be smaller than or equal to 1000.' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 0 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling IncidentsAPI.list_incident_user_defined_fields, must be greater than or equal to 0.' + end + if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0 + fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling IncidentsAPI.list_incident_user_defined_fields, must be greater than or equal to 0.' + end + # resource path + local_var_path = '/api/v2/incidents/config/user-defined-fields' + + # 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[:'include-deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil? + query_params[:'filter[incident-type]'] = opts[:'filter_incident_type'] if !opts[:'filter_incident_type'].nil? + query_params[:'include'] = opts[:'include'] if !opts[:'include'].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] || 'IncidentUserDefinedFieldListResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_incident_user_defined_fields, + :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: IncidentsAPI#list_incident_user_defined_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List status page email subscriptions. + # + # @see #list_statuspage_email_subscriptions_with_http_info + def list_statuspage_email_subscriptions(page_id, opts = {}) + data, _status_code, _headers = list_statuspage_email_subscriptions_with_http_info(page_id, opts) + data + end + + # List status page email subscriptions. + # + # List all email subscriptions for a status page. + # + # @param page_id [String] The ID of the status page. + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentStatuspageSubscriptionsResponse, Integer, Hash)>] IncidentStatuspageSubscriptionsResponse data, response status code and response headers + def list_statuspage_email_subscriptions_with_http_info(page_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_statuspage_email_subscriptions".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_statuspage_email_subscriptions") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_statuspage_email_subscriptions")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.list_statuspage_email_subscriptions ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling IncidentsAPI.list_statuspage_email_subscriptions" + end + # resource path + local_var_path = '/api/v2/statuspages/{page_id}/subscriptions/email'.sub('{page_id}', CGI.escape(page_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] || 'IncidentStatuspageSubscriptionsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_statuspage_email_subscriptions, + :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: IncidentsAPI#list_statuspage_email_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Patch an incident notification rule. + # + # @see #patch_incident_notification_rule_with_http_info + def patch_incident_notification_rule(id, body, opts = {}) + data, _status_code, _headers = patch_incident_notification_rule_with_http_info(id, body, opts) + data + end + + # Patch an incident notification rule. + # + # Partially updates an existing notification rule. + # + # @param id [UUID] The ID of the notification rule. + # @param body [PutIncidentNotificationRuleRequest] + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` + # @return [Array<(IncidentNotificationRule, Integer, Hash)>] IncidentNotificationRule data, response status code and response headers + def patch_incident_notification_rule_with_http_info(id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.patch_incident_notification_rule".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.patch_incident_notification_rule") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.patch_incident_notification_rule")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.patch_incident_notification_rule ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.patch_incident_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 IncidentsAPI.patch_incident_notification_rule" + end + # resource path + local_var_path = '/api/v2/incidents/config/notification-rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # 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] || 'IncidentNotificationRule' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :patch_incident_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::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IncidentsAPI#patch_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Render an incident template. + # + # @see #render_incident_template_with_http_info + def render_incident_template(incident_id, body, opts = {}) + data, _status_code, _headers = render_incident_template_with_http_info(incident_id, body, opts) + data + end + + # Render an incident template. + # + # Render a template with incident-specific data. + # + # @param incident_id [String] The UUID of the incident. + # @param body [IncidentRenderTemplateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentRenderedTemplateResponse, Integer, Hash)>] IncidentRenderedTemplateResponse data, response status code and response headers + def render_incident_template_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.render_incident_template".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.render_incident_template") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.render_incident_template")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.render_incident_template ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.render_incident_template" + 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 IncidentsAPI.render_incident_template" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/render-template'.sub('{incident_id}', CGI.escape(incident_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] || 'IncidentRenderedTemplateResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :render_incident_template, + :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: IncidentsAPI#render_incident_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search for incidents. + # + # @see #search_incidents_with_http_info + def search_incidents(query, opts = {}) + data, _status_code, _headers = search_incidents_with_http_info(query, opts) + data + end + + # Search for incidents. + # + # Search for incidents matching a certain query. + # + # @param query [String] Specifies which incidents should be returned. The query can contain any number of incident facets joined by `ANDs`, along with multiple values for each of those facets joined by `OR`s. For example: `state:active AND severity:(SEV-2 OR SEV-1)`. + # @param opts [Hash] the optional parameters + # @option opts [IncidentRelatedObject] :include Specifies which types of related objects should be included in the response. + # @option opts [IncidentSearchSortOrder] :sort Specifies the order of returned incidents. + # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. + # @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page. + # @return [Array<(IncidentSearchResponse, Integer, Hash)>] IncidentSearchResponse data, response status code and response headers + def search_incidents_with_http_info(query, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.search_incidents".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.search_incidents") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.search_incidents")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.search_incidents ...' + end + allowable_values = ['users', 'attachments'] + if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include']) + fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}" + end + # verify the required parameter 'query' is set + if @api_client.config.client_side_validation && query.nil? + fail ArgumentError, "Missing the required parameter 'query' when calling IncidentsAPI.search_incidents" + end + allowable_values = ['created', '-created'] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/v2/incidents/search' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'query'] = query + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].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] || 'IncidentSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :search_incidents, + :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: IncidentsAPI#search_incidents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Search for incidents. + # + # Provide a paginated version of {#search_incidents}, returning all items. + # + # To use it you need to use a block: search_incidents_with_pagination { |item| p item } + # + # @yield [IncidentSearchResponseIncidentsData] Paginated items + def search_incidents_with_pagination(query, 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) + while true do + response = search_incidents(query, opts) + @api_client.get_attribute_from_path(response, "data.attributes.incidents").each { |item| yield(item) } + if @api_client.get_attribute_from_path(response, "data.attributes.incidents").length < page_size + break + end + @api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size) + end + end + + # Search incidents. + # + # @see #search_incidents_v2_with_http_info + def search_incidents_v2(opts = {}) + data, _status_code, _headers = search_incidents_v2_with_http_info(opts) + data + end + + # Search incidents. + # + # Search for incidents using advanced filtering and pagination. + # + # @param opts [Hash] the optional parameters + # @option opts [String] :query Specifies which incidents should be returned by the search. + # @option opts [IncidentSearchIncidentsSortOrder] :sort Specifies the order of returned incidents. + # @option opts [Boolean] :with_facets Whether to include facet data in the response. + # @option opts [Boolean] :filter_with_deleted Whether to include deleted incidents in the response. + # @option opts [String] :semantic_query A semantic search query. + # @option opts [String] :time_zone The timezone for date-based operations. + # @option opts [Array] :include Specifies which types of related objects to include. + # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. + # @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page. + # @return [Array<(IncidentSearchResponse, Integer, Hash)>] IncidentSearchResponse data, response status code and response headers + def search_incidents_v2_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.search_incidents_v2".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.search_incidents_v2") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.search_incidents_v2")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.search_incidents_v2 ...' + end + allowable_values = ['created', '-created', 'modified', '-modified'] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/v2/incidents/search-incidents' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + query_params[:'with_facets'] = opts[:'with_facets'] if !opts[:'with_facets'].nil? + query_params[:'filter[with_deleted]'] = opts[:'filter_with_deleted'] if !opts[:'filter_with_deleted'].nil? + query_params[:'semantic_query'] = opts[:'semantic_query'] if !opts[:'semantic_query'].nil? + query_params[:'timeZone'] = opts[:'time_zone'] if !opts[:'time_zone'].nil? + query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :multi) if !opts[:'include'].nil? + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].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] || 'IncidentSearchResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :search_incidents_v2, + :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" + ) + new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER + + 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: IncidentsAPI#search_incidents_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update global incident handle. + # + # @see #update_global_incident_handle_with_http_info + def update_global_incident_handle(body, opts = {}) + data, _status_code, _headers = update_global_incident_handle_with_http_info(body, opts) + data + end + + # Update global incident handle. + # + # Update an existing global incident handle. + # + # @param body [IncidentHandleRequest] + # @param opts [Hash] the optional parameters + # @option opts [String] :include Comma-separated list of related resources to include in the response + # @return [Array<(IncidentHandleResponse, Integer, Hash)>] IncidentHandleResponse data, response status code and response headers + def update_global_incident_handle_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_global_incident_handle".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_global_incident_handle") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_global_incident_handle")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_global_incident_handle ...' + 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 IncidentsAPI.update_global_incident_handle" + end + # resource path + local_var_path = '/api/v2/incidents/config/global/incident-handles' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # 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] || 'IncidentHandleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_global_incident_handle, + :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: IncidentsAPI#update_global_incident_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update global incident settings. + # + # @see #update_global_incident_settings_with_http_info + def update_global_incident_settings(body, opts = {}) + data, _status_code, _headers = update_global_incident_settings_with_http_info(body, opts) + data + end + + # Update global incident settings. + # + # Update global incident settings for the organization. + # + # @param body [GlobalIncidentSettingsRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(GlobalIncidentSettingsResponse, Integer, Hash)>] GlobalIncidentSettingsResponse data, response status code and response headers + def update_global_incident_settings_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_global_incident_settings".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_global_incident_settings") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_global_incident_settings")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_global_incident_settings ...' + 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 IncidentsAPI.update_global_incident_settings" + end + # resource path + local_var_path = '/api/v2/incidents/config/global/settings' + + # 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] || 'GlobalIncidentSettingsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_global_incident_settings, + :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: IncidentsAPI#update_global_incident_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update an existing incident. + # + # @see #update_incident_with_http_info + def update_incident(incident_id, body, opts = {}) + data, _status_code, _headers = update_incident_with_http_info(incident_id, body, opts) + data + end + + # Update an existing incident. + # + # Updates an incident. Provide only the attributes that should be updated as this request is a partial update. + # + # @param incident_id [String] The UUID of the incident. + # @param body [IncidentUpdateRequest] Incident Payload. + # @param opts [Hash] the optional parameters + # @option opts [Array] :include Specifies which types of related objects should be included in the response. + # @return [Array<(IncidentResponse, Integer, Hash)>] IncidentResponse data, response status code and response headers + def update_incident_with_http_info(incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_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 IncidentsAPI.update_incident" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? + + # 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] || 'IncidentResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_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::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update incident attachment. + # + # @see #update_incident_attachment_with_http_info + def update_incident_attachment(incident_id, attachment_id, body, opts = {}) + data, _status_code, _headers = update_incident_attachment_with_http_info(incident_id, attachment_id, body, opts) + data + end + + # Update incident attachment. + # @param incident_id [String] The UUID of the incident. + # @param attachment_id [String] The ID of the attachment. + # @param body [PatchAttachmentRequest] + # @param opts [Hash] the optional parameters + # @option opts [String] :include Resource to include in the response. Supported value: `last_modified_by_user`. + # @return [Array<(Attachment, Integer, Hash)>] Attachment data, response status code and response headers + def update_incident_attachment_with_http_info(incident_id, attachment_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_attachment".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_attachment") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_attachment")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_attachment ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_incident_attachment" + end + # verify the required parameter 'attachment_id' is set + if @api_client.config.client_side_validation && attachment_id.nil? + fail ArgumentError, "Missing the required parameter 'attachment_id' when calling IncidentsAPI.update_incident_attachment" + 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 IncidentsAPI.update_incident_attachment" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/attachments/{attachment_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{attachment_id}', CGI.escape(attachment_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # 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] || 'Attachment' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_incident_attachment, + :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: IncidentsAPI#update_incident_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update an incident communication. + # + # @see #update_incident_communication_with_http_info + def update_incident_communication(incident_id, communication_id, body, opts = {}) + data, _status_code, _headers = update_incident_communication_with_http_info(incident_id, communication_id, body, opts) + data + end + + # Update an incident communication. + # + # Update a communication for a given incident. + # + # @param incident_id [String] The UUID of the incident. + # @param communication_id [UUID] The ID of the communication. + # @param body [IncidentCommunicationRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(IncidentCommunicationResponse, Integer, Hash)>] IncidentCommunicationResponse data, response status code and response headers + def update_incident_communication_with_http_info(incident_id, communication_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_communication".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_communication") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_communication")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_communication ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_incident_communication" + end + # verify the required parameter 'communication_id' is set + if @api_client.config.client_side_validation && communication_id.nil? + fail ArgumentError, "Missing the required parameter 'communication_id' when calling IncidentsAPI.update_incident_communication" + 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 IncidentsAPI.update_incident_communication" end # resource path - local_var_path = '/api/v2/incidents/config/user-defined-fields' + local_var_path = '/api/v2/incidents/{incident_id}/communications/{communication_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{communication_id}', CGI.escape(communication_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[:'include-deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil? - query_params[:'filter[incident-type]'] = opts[:'filter_incident_type'] if !opts[:'filter_incident_type'].nil? - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # 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] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'IncidentUserDefinedFieldListResponse' + return_type = opts[:debug_return_type] || 'IncidentCommunicationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :list_incident_user_defined_fields, + :operation => :update_incident_communication, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3245,85 +6863,80 @@ def list_incident_user_defined_fields_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::Patch, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#list_incident_user_defined_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident_communication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Search for incidents. + # Update an existing incident integration metadata. # - # @see #search_incidents_with_http_info - def search_incidents(query, opts = {}) - data, _status_code, _headers = search_incidents_with_http_info(query, opts) + # @see #update_incident_integration_with_http_info + def update_incident_integration(incident_id, integration_metadata_id, body, opts = {}) + data, _status_code, _headers = update_incident_integration_with_http_info(incident_id, integration_metadata_id, body, opts) data end - # Search for incidents. + # Update an existing incident integration metadata. # - # Search for incidents matching a certain query. + # Update an existing incident integration metadata. # - # @param query [String] Specifies which incidents should be returned. The query can contain any number of incident facets joined by `ANDs`, along with multiple values for each of those facets joined by `OR`s. For example: `state:active AND severity:(SEV-2 OR SEV-1)`. + # @param incident_id [String] The UUID of the incident. + # @param integration_metadata_id [String] The UUID of the incident integration metadata. + # @param body [IncidentIntegrationMetadataPatchRequest] Incident integration metadata payload. # @param opts [Hash] the optional parameters - # @option opts [IncidentRelatedObject] :include Specifies which types of related objects should be included in the response. - # @option opts [IncidentSearchSortOrder] :sort Specifies the order of returned incidents. - # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100. - # @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page. - # @return [Array<(IncidentSearchResponse, Integer, Hash)>] IncidentSearchResponse data, response status code and response headers - def search_incidents_with_http_info(query, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.search_incidents".to_sym] + # @return [Array<(IncidentIntegrationMetadataResponse, Integer, Hash)>] IncidentIntegrationMetadataResponse data, response status code and response headers + def update_incident_integration_with_http_info(incident_id, integration_metadata_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_integration".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.search_incidents") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_integration") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.search_incidents")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_integration")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.search_incidents ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_integration ...' end - allowable_values = ['users', 'attachments'] - if @api_client.config.client_side_validation && opts[:'include'] && !allowable_values.include?(opts[:'include']) - fail ArgumentError, "invalid value for \"include\", must be one of #{allowable_values}" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_incident_integration" end - # verify the required parameter 'query' is set - if @api_client.config.client_side_validation && query.nil? - fail ArgumentError, "Missing the required parameter 'query' when calling IncidentsAPI.search_incidents" + # verify the required parameter 'integration_metadata_id' is set + if @api_client.config.client_side_validation && integration_metadata_id.nil? + fail ArgumentError, "Missing the required parameter 'integration_metadata_id' when calling IncidentsAPI.update_incident_integration" end - allowable_values = ['created', '-created'] - if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) - fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + # 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 IncidentsAPI.update_incident_integration" end # resource path - local_var_path = '/api/v2/incidents/search' + local_var_path = '/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{integration_metadata_id}', CGI.escape(integration_metadata_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'query'] = query - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? - query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? - query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? - query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil? # 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] + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'IncidentSearchResponse' + return_type = opts[:debug_return_type] || 'IncidentIntegrationMetadataResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :search_incidents, + :operation => :update_incident_integration, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3333,71 +6946,53 @@ def search_incidents_with_http_info(query, 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::Patch, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#search_incidents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Search for incidents. - # - # Provide a paginated version of {#search_incidents}, returning all items. - # - # To use it you need to use a block: search_incidents_with_pagination { |item| p item } - # - # @yield [IncidentSearchResponseIncidentsData] Paginated items - def search_incidents_with_pagination(query, 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) - while true do - response = search_incidents(query, opts) - @api_client.get_attribute_from_path(response, "data.attributes.incidents").each { |item| yield(item) } - if @api_client.get_attribute_from_path(response, "data.attributes.incidents").length < page_size - break - end - @api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size) - end - end - - # Update global incident handle. + # Update an incident Jira template. # - # @see #update_global_incident_handle_with_http_info - def update_global_incident_handle(body, opts = {}) - data, _status_code, _headers = update_global_incident_handle_with_http_info(body, opts) + # @see #update_incident_jira_template_with_http_info + def update_incident_jira_template(template_id, body, opts = {}) + data, _status_code, _headers = update_incident_jira_template_with_http_info(template_id, body, opts) data end - # Update global incident handle. + # Update an incident Jira template. # - # Update an existing global incident handle. + # Update an existing incident Jira template. # - # @param body [IncidentHandleRequest] + # @param template_id [UUID] The ID of the Jira template. + # @param body [IncidentJiraTemplateRequest] # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of related resources to include in the response - # @return [Array<(IncidentHandleResponse, Integer, Hash)>] IncidentHandleResponse data, response status code and response headers - def update_global_incident_handle_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_global_incident_handle".to_sym] + # @return [Array<(IncidentJiraTemplateResponse, Integer, Hash)>] IncidentJiraTemplateResponse data, response status code and response headers + def update_incident_jira_template_with_http_info(template_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_jira_template".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_global_incident_handle") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_jira_template") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_global_incident_handle")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_jira_template")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_global_incident_handle ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_jira_template ...' + end + # verify the required parameter 'template_id' is set + if @api_client.config.client_side_validation && template_id.nil? + fail ArgumentError, "Missing the required parameter 'template_id' when calling IncidentsAPI.update_incident_jira_template" 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 IncidentsAPI.update_global_incident_handle" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.update_incident_jira_template" end # resource path - local_var_path = '/api/v2/incidents/config/global/incident-handles' + local_var_path = '/api/v2/incidents/config/jira-templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} @@ -3413,13 +7008,13 @@ def update_global_incident_handle_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] || 'IncidentHandleResponse' + return_type = opts[:debug_return_type] || 'IncidentJiraTemplateResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_global_incident_handle, + :operation => :update_incident_jira_template, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3431,46 +7026,53 @@ def update_global_incident_handle_with_http_info(body, opts = {}) 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: IncidentsAPI#update_global_incident_handle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident_jira_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update global incident settings. + # Update an incident Microsoft Teams configuration. # - # @see #update_global_incident_settings_with_http_info - def update_global_incident_settings(body, opts = {}) - data, _status_code, _headers = update_global_incident_settings_with_http_info(body, opts) + # @see #update_incident_microsoft_teams_configuration_with_http_info + def update_incident_microsoft_teams_configuration(configuration_id, body, opts = {}) + data, _status_code, _headers = update_incident_microsoft_teams_configuration_with_http_info(configuration_id, body, opts) data end - # Update global incident settings. + # Update an incident Microsoft Teams configuration. # - # Update global incident settings for the organization. + # Update a Microsoft Teams configuration for incidents. # - # @param body [GlobalIncidentSettingsRequest] + # @param configuration_id [UUID] The ID of the Microsoft Teams configuration. + # @param body [IncidentMicrosoftTeamsConfigurationRequest] # @param opts [Hash] the optional parameters - # @return [Array<(GlobalIncidentSettingsResponse, Integer, Hash)>] GlobalIncidentSettingsResponse data, response status code and response headers - def update_global_incident_settings_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_global_incident_settings".to_sym] + # @option opts [String] :include Specifies which related objects to include in the response. + # @return [Array<(IncidentMicrosoftTeamsConfigurationResponse, Integer, Hash)>] IncidentMicrosoftTeamsConfigurationResponse data, response status code and response headers + def update_incident_microsoft_teams_configuration_with_http_info(configuration_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_microsoft_teams_configuration".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_global_incident_settings") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_microsoft_teams_configuration") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_global_incident_settings")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_microsoft_teams_configuration")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_global_incident_settings ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_microsoft_teams_configuration ...' + end + # verify the required parameter 'configuration_id' is set + if @api_client.config.client_side_validation && configuration_id.nil? + fail ArgumentError, "Missing the required parameter 'configuration_id' when calling IncidentsAPI.update_incident_microsoft_teams_configuration" 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 IncidentsAPI.update_global_incident_settings" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.update_incident_microsoft_teams_configuration" end # resource path - local_var_path = '/api/v2/incidents/config/global/settings' + local_var_path = '/api/v2/incidents/config/microsoft-teams-configurations/{configuration_id}'.sub('{configuration_id}', CGI.escape(configuration_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} @@ -3486,13 +7088,13 @@ def update_global_incident_settings_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] || 'GlobalIncidentSettingsResponse' + return_type = opts[:debug_return_type] || 'IncidentMicrosoftTeamsConfigurationResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_global_incident_settings, + :operation => :update_incident_microsoft_teams_configuration, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3504,53 +7106,53 @@ def update_global_incident_settings_with_http_info(body, opts = {}) 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: IncidentsAPI#update_global_incident_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident_microsoft_teams_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update an existing incident. + # Update an incident notification rule. # - # @see #update_incident_with_http_info - def update_incident(incident_id, body, opts = {}) - data, _status_code, _headers = update_incident_with_http_info(incident_id, body, opts) + # @see #update_incident_notification_rule_with_http_info + def update_incident_notification_rule(id, body, opts = {}) + data, _status_code, _headers = update_incident_notification_rule_with_http_info(id, body, opts) data end - # Update an existing incident. + # Update an incident notification rule. # - # Updates an incident. Provide only the attributes that should be updated as this request is a partial update. + # Updates an existing notification rule with a complete replacement. # - # @param incident_id [String] The UUID of the incident. - # @param body [IncidentUpdateRequest] Incident Payload. + # @param id [UUID] The ID of the notification rule. + # @param body [PutIncidentNotificationRuleRequest] # @param opts [Hash] the optional parameters - # @option opts [Array] :include Specifies which types of related objects should be included in the response. - # @return [Array<(IncidentResponse, Integer, Hash)>] IncidentResponse data, response status code and response headers - def update_incident_with_http_info(incident_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_incident".to_sym] + # @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` + # @return [Array<(IncidentNotificationRule, Integer, Hash)>] IncidentNotificationRule data, response status code and response headers + def update_incident_notification_rule_with_http_info(id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_notification_rule".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_notification_rule") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_notification_rule")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_notification_rule ...' end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_incident" + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.update_incident_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 IncidentsAPI.update_incident" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.update_incident_notification_rule" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/notification-rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} @@ -3566,13 +7168,13 @@ def update_incident_with_http_info(incident_id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'IncidentResponse' + return_type = opts[:debug_return_type] || 'IncidentNotificationRule' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_incident, + :operation => :update_incident_notification_rule, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3582,53 +7184,51 @@ def update_incident_with_http_info(incident_id, body, opts = {}) :api_version => "V2" ) - data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: IncidentsAPI#update_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update incident attachment. + # Update incident notification template. # - # @see #update_incident_attachment_with_http_info - def update_incident_attachment(incident_id, attachment_id, body, opts = {}) - data, _status_code, _headers = update_incident_attachment_with_http_info(incident_id, attachment_id, body, opts) + # @see #update_incident_notification_template_with_http_info + def update_incident_notification_template(id, body, opts = {}) + data, _status_code, _headers = update_incident_notification_template_with_http_info(id, body, opts) data end - # Update incident attachment. - # @param incident_id [String] The UUID of the incident. - # @param attachment_id [String] The ID of the attachment. - # @param body [PatchAttachmentRequest] + # Update incident notification template. + # + # Updates an existing notification template's attributes. + # + # @param id [UUID] The ID of the notification template. + # @param body [PatchIncidentNotificationTemplateRequest] # @param opts [Hash] the optional parameters - # @option opts [String] :include Resource to include in the response. Supported value: `last_modified_by_user`. - # @return [Array<(Attachment, Integer, Hash)>] Attachment data, response status code and response headers - def update_incident_attachment_with_http_info(incident_id, attachment_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_attachment".to_sym] + # @option opts [String] :include Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` + # @return [Array<(IncidentNotificationTemplate, Integer, Hash)>] IncidentNotificationTemplate data, response status code and response headers + def update_incident_notification_template_with_http_info(id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_notification_template".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_attachment") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_notification_template") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_attachment")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_notification_template")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_attachment ...' - end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_incident_attachment" + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_notification_template ...' end - # verify the required parameter 'attachment_id' is set - if @api_client.config.client_side_validation && attachment_id.nil? - fail ArgumentError, "Missing the required parameter 'attachment_id' when calling IncidentsAPI.update_incident_attachment" + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.update_incident_notification_template" 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 IncidentsAPI.update_incident_attachment" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.update_incident_notification_template" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/attachments/{attachment_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{attachment_id}', CGI.escape(attachment_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/notification-templates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3648,13 +7248,13 @@ def update_incident_attachment_with_http_info(incident_id, attachment_id, body, post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'Attachment' + return_type = opts[:debug_return_type] || 'IncidentNotificationTemplate' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_incident_attachment, + :operation => :update_incident_notification_template, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3666,53 +7266,48 @@ def update_incident_attachment_with_http_info(incident_id, attachment_id, body, 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: IncidentsAPI#update_incident_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident_notification_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update an existing incident integration metadata. + # Update postmortem template. # - # @see #update_incident_integration_with_http_info - def update_incident_integration(incident_id, integration_metadata_id, body, opts = {}) - data, _status_code, _headers = update_incident_integration_with_http_info(incident_id, integration_metadata_id, body, opts) + # @see #update_incident_postmortem_template_with_http_info + def update_incident_postmortem_template(template_id, body, opts = {}) + data, _status_code, _headers = update_incident_postmortem_template_with_http_info(template_id, body, opts) data end - # Update an existing incident integration metadata. + # Update postmortem template. # - # Update an existing incident integration metadata. + # Update an existing postmortem template. # - # @param incident_id [String] The UUID of the incident. - # @param integration_metadata_id [String] The UUID of the incident integration metadata. - # @param body [IncidentIntegrationMetadataPatchRequest] Incident integration metadata payload. + # @param template_id [String] The ID of the postmortem template + # @param body [PostmortemTemplateRequest] # @param opts [Hash] the optional parameters - # @return [Array<(IncidentIntegrationMetadataResponse, Integer, Hash)>] IncidentIntegrationMetadataResponse data, response status code and response headers - def update_incident_integration_with_http_info(incident_id, integration_metadata_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_integration".to_sym] + # @return [Array<(PostmortemTemplateResponse, Integer, Hash)>] PostmortemTemplateResponse data, response status code and response headers + def update_incident_postmortem_template_with_http_info(template_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_postmortem_template".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_integration") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_postmortem_template") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_integration")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_postmortem_template")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_integration ...' - end - # verify the required parameter 'incident_id' is set - if @api_client.config.client_side_validation && incident_id.nil? - fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_incident_integration" + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_postmortem_template ...' end - # verify the required parameter 'integration_metadata_id' is set - if @api_client.config.client_side_validation && integration_metadata_id.nil? - fail ArgumentError, "Missing the required parameter 'integration_metadata_id' when calling IncidentsAPI.update_incident_integration" + # verify the required parameter 'template_id' is set + if @api_client.config.client_side_validation && template_id.nil? + fail ArgumentError, "Missing the required parameter 'template_id' when calling IncidentsAPI.update_incident_postmortem_template" 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 IncidentsAPI.update_incident_integration" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.update_incident_postmortem_template" end # resource path - local_var_path = '/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{integration_metadata_id}', CGI.escape(integration_metadata_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/config/postmortem-templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3731,13 +7326,13 @@ def update_incident_integration_with_http_info(incident_id, integration_metadata post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'IncidentIntegrationMetadataResponse' + return_type = opts[:debug_return_type] || 'PostmortemTemplateResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] new_options = opts.merge( - :operation => :update_incident_integration, + :operation => :update_incident_postmortem_template, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3749,53 +7344,61 @@ def update_incident_integration_with_http_info(incident_id, integration_metadata 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: IncidentsAPI#update_incident_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident_postmortem_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update an incident notification rule. + # Update an incident Statuspage incident. # - # @see #update_incident_notification_rule_with_http_info - def update_incident_notification_rule(id, body, opts = {}) - data, _status_code, _headers = update_incident_notification_rule_with_http_info(id, body, opts) + # @see #update_incident_statuspage_incident_with_http_info + def update_incident_statuspage_incident(incident_id, page_id, statuspage_incident_id, body, opts = {}) + data, _status_code, _headers = update_incident_statuspage_incident_with_http_info(incident_id, page_id, statuspage_incident_id, body, opts) data end - # Update an incident notification rule. + # Update an incident Statuspage incident. # - # Updates an existing notification rule with a complete replacement. + # Update a Statuspage incident linked to a Datadog incident. # - # @param id [UUID] The ID of the notification rule. - # @param body [PutIncidentNotificationRuleRequest] + # @param incident_id [String] The UUID of the incident. + # @param page_id [String] The ID of the Statuspage page. + # @param statuspage_incident_id [String] The ID of the Statuspage incident. + # @param body [IncidentStatuspageIncidentRequest] # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` - # @return [Array<(IncidentNotificationRule, Integer, Hash)>] IncidentNotificationRule data, response status code and response headers - def update_incident_notification_rule_with_http_info(id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_notification_rule".to_sym] + # @return [Array<(IncidentStatuspageIncidentResponse, Integer, Hash)>] IncidentStatuspageIncidentResponse data, response status code and response headers + def update_incident_statuspage_incident_with_http_info(incident_id, page_id, statuspage_incident_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_statuspage_incident".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_notification_rule") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_statuspage_incident") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_notification_rule")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_statuspage_incident")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_notification_rule ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_statuspage_incident ...' end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.update_incident_notification_rule" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_incident_statuspage_incident" + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling IncidentsAPI.update_incident_statuspage_incident" + end + # verify the required parameter 'statuspage_incident_id' is set + if @api_client.config.client_side_validation && statuspage_incident_id.nil? + fail ArgumentError, "Missing the required parameter 'statuspage_incident_id' when calling IncidentsAPI.update_incident_statuspage_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 IncidentsAPI.update_incident_notification_rule" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.update_incident_statuspage_incident" end # resource path - local_var_path = '/api/v2/incidents/config/notification-rules/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/statuspage/{incident_id}/statuspage-incidents/pages/{page_id}/incidents/{statuspage_incident_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')).sub('{statuspage_incident_id}', CGI.escape(statuspage_incident_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} @@ -3811,13 +7414,13 @@ def update_incident_notification_rule_with_http_info(id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'IncidentNotificationRule' + return_type = opts[:debug_return_type] || 'IncidentStatuspageIncidentResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_incident_notification_rule, + :operation => :update_incident_statuspage_incident, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3827,55 +7430,65 @@ def update_incident_notification_rule_with_http_info(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: IncidentsAPI#update_incident_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident_statuspage_incident\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update incident notification template. + # Update an incident status page notice. # - # @see #update_incident_notification_template_with_http_info - def update_incident_notification_template(id, body, opts = {}) - data, _status_code, _headers = update_incident_notification_template_with_http_info(id, body, opts) + # @see #update_incident_status_page_notice_with_http_info + def update_incident_status_page_notice(incident_id, statuspage_id, notice_id, body, opts = {}) + data, _status_code, _headers = update_incident_status_page_notice_with_http_info(incident_id, statuspage_id, notice_id, body, opts) data end - # Update incident notification template. + # Update an incident status page notice. # - # Updates an existing notification template's attributes. + # Update a status page notice for a given incident. # - # @param id [UUID] The ID of the notification template. - # @param body [PatchIncidentNotificationTemplateRequest] + # @param incident_id [String] The UUID of the incident. + # @param statuspage_id [UUID] The ID of the status page. + # @param notice_id [UUID] The ID of the status page notice. + # @param body [IncidentStatusPageNoticeUpdateRequest] # @param opts [Hash] the optional parameters - # @option opts [String] :include Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` - # @return [Array<(IncidentNotificationTemplate, Integer, Hash)>] IncidentNotificationTemplate data, response status code and response headers - def update_incident_notification_template_with_http_info(id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_notification_template".to_sym] + # @option opts [Boolean] :notify_subscribers Whether to notify subscribers about this notice. + # @return [Array<(IncidentStatusPageNoticeIntegrationResponse, Integer, Hash)>] IncidentStatusPageNoticeIntegrationResponse data, response status code and response headers + def update_incident_status_page_notice_with_http_info(incident_id, statuspage_id, notice_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_status_page_notice".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_notification_template") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_status_page_notice") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_notification_template")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_status_page_notice")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_notification_template ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_status_page_notice ...' end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling IncidentsAPI.update_incident_notification_template" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_incident_status_page_notice" + end + # verify the required parameter 'statuspage_id' is set + if @api_client.config.client_side_validation && statuspage_id.nil? + fail ArgumentError, "Missing the required parameter 'statuspage_id' when calling IncidentsAPI.update_incident_status_page_notice" + end + # verify the required parameter 'notice_id' is set + if @api_client.config.client_side_validation && notice_id.nil? + fail ArgumentError, "Missing the required parameter 'notice_id' when calling IncidentsAPI.update_incident_status_page_notice" 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 IncidentsAPI.update_incident_notification_template" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.update_incident_status_page_notice" end # resource path - local_var_path = '/api/v2/incidents/config/notification-templates/{id}'.sub('{id}', CGI.escape(id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/statuspages/{statuspage_id}/notices/{notice_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{statuspage_id}', CGI.escape(statuspage_id.to_s).gsub('%2F', '/')).sub('{notice_id}', CGI.escape(notice_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} - query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + query_params[:'notify_subscribers'] = opts[:'notify_subscribers'] if !opts[:'notify_subscribers'].nil? # header parameters header_params = opts[:header_params] || {} @@ -3891,13 +7504,13 @@ def update_incident_notification_template_with_http_info(id, body, opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'IncidentNotificationTemplate' + return_type = opts[:debug_return_type] || 'IncidentStatusPageNoticeIntegrationResponse' # auth_names auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_incident_notification_template, + :operation => :update_incident_status_page_notice, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3909,48 +7522,53 @@ def update_incident_notification_template_with_http_info(id, body, opts = {}) 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: IncidentsAPI#update_incident_notification_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident_status_page_notice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update postmortem template. + # Update an incident timeline entry. # - # @see #update_incident_postmortem_template_with_http_info - def update_incident_postmortem_template(template_id, body, opts = {}) - data, _status_code, _headers = update_incident_postmortem_template_with_http_info(template_id, body, opts) + # @see #update_incident_timeline_entry_with_http_info + def update_incident_timeline_entry(incident_id, timeline_entry_id, body, opts = {}) + data, _status_code, _headers = update_incident_timeline_entry_with_http_info(incident_id, timeline_entry_id, body, opts) data end - # Update postmortem template. + # Update an incident timeline entry. # - # Update an existing postmortem template. + # Update a timeline entry for a given incident. # - # @param template_id [String] The ID of the postmortem template - # @param body [PostmortemTemplateRequest] + # @param incident_id [String] The UUID of the incident. + # @param timeline_entry_id [UUID] The ID of the timeline entry. + # @param body [IncidentTimelineEntryRequest] # @param opts [Hash] the optional parameters - # @return [Array<(PostmortemTemplateResponse, Integer, Hash)>] PostmortemTemplateResponse data, response status code and response headers - def update_incident_postmortem_template_with_http_info(template_id, body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_postmortem_template".to_sym] + # @return [Array<(IncidentTimelineEntryResponse, Integer, Hash)>] IncidentTimelineEntryResponse data, response status code and response headers + def update_incident_timeline_entry_with_http_info(incident_id, timeline_entry_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_timeline_entry".to_sym] if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_postmortem_template") + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_timeline_entry") else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_postmortem_template")) + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_timeline_entry")) end if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_postmortem_template ...' + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_timeline_entry ...' end - # verify the required parameter 'template_id' is set - if @api_client.config.client_side_validation && template_id.nil? - fail ArgumentError, "Missing the required parameter 'template_id' when calling IncidentsAPI.update_incident_postmortem_template" + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.update_incident_timeline_entry" + end + # verify the required parameter 'timeline_entry_id' is set + if @api_client.config.client_side_validation && timeline_entry_id.nil? + fail ArgumentError, "Missing the required parameter 'timeline_entry_id' when calling IncidentsAPI.update_incident_timeline_entry" 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 IncidentsAPI.update_incident_postmortem_template" + fail ArgumentError, "Missing the required parameter 'body' when calling IncidentsAPI.update_incident_timeline_entry" end # resource path - local_var_path = '/api/v2/incidents/config/postmortem-templates/{template_id}'.sub('{template_id}', CGI.escape(template_id.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{timeline_entry_id}', CGI.escape(timeline_entry_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -3969,13 +7587,13 @@ def update_incident_postmortem_template_with_http_info(template_id, body, opts = post_body = opts[:debug_body] || @api_client.object_to_http_body(body) # return_type - return_type = opts[:debug_return_type] || 'PostmortemTemplateResponse' + return_type = opts[:debug_return_type] || 'IncidentTimelineEntryResponse' # auth_names - auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] new_options = opts.merge( - :operation => :update_incident_postmortem_template, + :operation => :update_incident_timeline_entry, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -3987,7 +7605,7 @@ def update_incident_postmortem_template_with_http_info(template_id, body, opts = 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: IncidentsAPI#update_incident_postmortem_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: IncidentsAPI#update_incident_timeline_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -4232,5 +7850,170 @@ def update_incident_user_defined_field_with_http_info(field_id, body, opts = {}) end return data, status_code, headers end + + # Update an incident Zoom configuration. + # + # @see #update_incident_zoom_configuration_with_http_info + def update_incident_zoom_configuration(configuration_id, body, opts = {}) + data, _status_code, _headers = update_incident_zoom_configuration_with_http_info(configuration_id, body, opts) + data + end + + # Update an incident Zoom configuration. + # + # Update a Zoom configuration for incidents. + # + # @param configuration_id [UUID] The ID of the Zoom configuration. + # @param body [IncidentZoomConfigurationRequest] + # @param opts [Hash] the optional parameters + # @option opts [String] :include Specifies which related objects to include in the response. + # @return [Array<(IncidentZoomConfigurationResponse, Integer, Hash)>] IncidentZoomConfigurationResponse data, response status code and response headers + def update_incident_zoom_configuration_with_http_info(configuration_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_incident_zoom_configuration".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_incident_zoom_configuration") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_incident_zoom_configuration")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.update_incident_zoom_configuration ...' + end + # verify the required parameter 'configuration_id' is set + if @api_client.config.client_side_validation && configuration_id.nil? + fail ArgumentError, "Missing the required parameter 'configuration_id' when calling IncidentsAPI.update_incident_zoom_configuration" + 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 IncidentsAPI.update_incident_zoom_configuration" + end + # resource path + local_var_path = '/api/v2/incidents/config/zoom-configurations/{configuration_id}'.sub('{configuration_id}', CGI.escape(configuration_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # 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] || 'IncidentZoomConfigurationResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_incident_zoom_configuration, + :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: IncidentsAPI#update_incident_zoom_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Upsert incident automation data. + # + # @see #upsert_incident_automation_data_with_http_info + def upsert_incident_automation_data(incident_id, key, body, opts = {}) + data, _status_code, _headers = upsert_incident_automation_data_with_http_info(incident_id, key, body, opts) + data + end + + # Upsert incident automation data. + # + # Create or update automation data for a given incident and key. + # + # @param incident_id [String] The UUID of the incident. + # @param key [String] The automation data key. + # @param body [IncidentAutomationDataRequest] + # @param opts [Hash] the optional parameters + # @option opts [String] :include Specifies which related objects to include in the response. + # @return [Array<(IncidentAutomationDataResponse, Integer, Hash)>] IncidentAutomationDataResponse data, response status code and response headers + def upsert_incident_automation_data_with_http_info(incident_id, key, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.upsert_incident_automation_data".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.upsert_incident_automation_data") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.upsert_incident_automation_data")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: IncidentsAPI.upsert_incident_automation_data ...' + end + # verify the required parameter 'incident_id' is set + if @api_client.config.client_side_validation && incident_id.nil? + fail ArgumentError, "Missing the required parameter 'incident_id' when calling IncidentsAPI.upsert_incident_automation_data" + end + # verify the required parameter 'key' is set + if @api_client.config.client_side_validation && key.nil? + fail ArgumentError, "Missing the required parameter 'key' when calling IncidentsAPI.upsert_incident_automation_data" + 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 IncidentsAPI.upsert_incident_automation_data" + end + # resource path + local_var_path = '/api/v2/incidents/{incident_id}/automation-data/{key}'.sub('{incident_id}', CGI.escape(incident_id.to_s).gsub('%2F', '/')).sub('{key}', CGI.escape(key.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? + + # 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] || 'IncidentAutomationDataResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :upsert_incident_automation_data, + :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: IncidentsAPI#upsert_incident_automation_data\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/incident_automation_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_automation_data_attributes_request.rb new file mode 100644 index 000000000000..c4cc38c3b238 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_automation_data_attributes_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for upserting automation data. + class IncidentAutomationDataAttributesRequest + include BaseGenericModel + + # The automation data 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::IncidentAutomationDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_automation_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_automation_data_attributes_response.rb new file mode 100644 index 000000000000..ff0a3e3aadab --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_automation_data_attributes_response.rb @@ -0,0 +1,207 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of incident automation data. + class IncidentAutomationDataAttributesResponse + include BaseGenericModel + + # Timestamp when the data was created. + attr_reader :created_at + + # The incident identifier. + attr_reader :incident_id + + # The automation data key. + attr_reader :key + + # Timestamp when the data was last updated. + attr_reader :updated_at + + # The automation data value. + attr_reader :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'incident_id' => :'incident_id', + :'key' => :'key', + :'updated_at' => :'updated_at', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'incident_id' => :'UUID', + :'key' => :'String', + :'updated_at' => :'Time', + :'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::IncidentAutomationDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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?(:'incident_id') + self.incident_id = attributes[:'incident_id'] + end + + if attributes.key?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + 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 @created_at.nil? + return false if @incident_id.nil? + return false if @key.nil? + return false if @updated_at.nil? + return false if @value.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 incident_id [Object] Object to be assigned + # @!visibility private + def incident_id=(incident_id) + if incident_id.nil? + fail ArgumentError, 'invalid value for "incident_id", incident_id cannot be nil.' + end + @incident_id = incident_id + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param updated_at [Object] Object to be assigned + # @!visibility private + def updated_at=(updated_at) + if updated_at.nil? + fail ArgumentError, 'invalid value for "updated_at", updated_at cannot be nil.' + end + @updated_at = updated_at + end + + # 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 && + created_at == o.created_at && + incident_id == o.incident_id && + key == o.key && + updated_at == o.updated_at && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, incident_id, key, updated_at, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_automation_data_data_request.rb b/lib/datadog_api_client/v2/models/incident_automation_data_data_request.rb new file mode 100644 index 000000000000..98f8d4e6bf57 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_automation_data_data_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Automation data for a request. + class IncidentAutomationDataDataRequest + include BaseGenericModel + + # Attributes for upserting automation data. + attr_reader :attributes + + # Incident automation data 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentAutomationDataAttributesRequest', + :'type' => :'IncidentAutomationDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAutomationDataDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_automation_data_data_response.rb b/lib/datadog_api_client/v2/models/incident_automation_data_data_response.rb new file mode 100644 index 000000000000..63076dea7317 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_automation_data_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Automation data in a response. + class IncidentAutomationDataDataResponse + include BaseGenericModel + + # Attributes of incident automation data. + attr_reader :attributes + + # The automation data identifier. + attr_reader :id + + # Incident automation data 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' => :'IncidentAutomationDataAttributesResponse', + :'id' => :'String', + :'type' => :'IncidentAutomationDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAutomationDataDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_automation_data_request.rb b/lib/datadog_api_client/v2/models/incident_automation_data_request.rb new file mode 100644 index 000000000000..2d2d76ea0550 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_automation_data_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to upsert automation data. + class IncidentAutomationDataRequest + include BaseGenericModel + + # Automation data for a request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentAutomationDataDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAutomationDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_automation_data_response.rb b/lib/datadog_api_client/v2/models/incident_automation_data_response.rb new file mode 100644 index 000000000000..9ca295e228ee --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_automation_data_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with automation data. + class IncidentAutomationDataResponse + include BaseGenericModel + + # Automation data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentAutomationDataDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentAutomationDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_automation_data_type.rb b/lib/datadog_api_client/v2/models/incident_automation_data_type.rb new file mode 100644 index 000000000000..c9c08f51781d --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_automation_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident automation data resource type. + class IncidentAutomationDataType + include BaseEnumModel + + INCIDENTS_AUTOMATION_DATA = "incidents_automation_data".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_data.rb b/lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_data.rb new file mode 100644 index 000000000000..fb757b6f3c8c --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for batch creating rule execution states. + class IncidentBatchCreateRuleExecutionStatesData + include BaseGenericModel + + # Attributes for batch creating rule execution states. + attr_reader :attributes + + # Incident rule execution state 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentBatchCreateRuleExecutionStatesDataAttributes', + :'type' => :'IncidentRuleExecutionStateType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentBatchCreateRuleExecutionStatesData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_batch_create_rule_execution_states_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_data_attributes.rb new file mode 100644 index 000000000000..7b2ff6855abe --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_data_attributes.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for batch creating rule execution states. + class IncidentBatchCreateRuleExecutionStatesDataAttributes + include BaseGenericModel + + # List of rules to create execution states for. + attr_reader :rules + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'rules' => :'rules' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'rules' => :'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::IncidentBatchCreateRuleExecutionStatesDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = 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 @rules.nil? + true + end + + # Custom attribute writer method with validation + # @param rules [Object] Object to be assigned + # @!visibility private + def rules=(rules) + if rules.nil? + fail ArgumentError, 'invalid value for "rules", rules cannot be nil.' + end + @rules = rules + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rules == o.rules && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [rules, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_request.rb b/lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_request.rb new file mode 100644 index 000000000000..c80dcd239641 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_batch_create_rule_execution_states_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to batch create rule execution states. + class IncidentBatchCreateRuleExecutionStatesRequest + include BaseGenericModel + + # Data for batch creating rule execution states. + 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' => :'IncidentBatchCreateRuleExecutionStatesData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentBatchCreateRuleExecutionStatesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_batch_update_rule_execution_states_data.rb b/lib/datadog_api_client/v2/models/incident_batch_update_rule_execution_states_data.rb new file mode 100644 index 000000000000..4c7147ded51e --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_batch_update_rule_execution_states_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for batch updating rule execution states. + class IncidentBatchUpdateRuleExecutionStatesData + include BaseGenericModel + + # Attributes for batch updating rule execution states. + attr_reader :attributes + + # Incident rule execution state 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentBatchUpdateRuleExecutionStatesDataAttributes', + :'type' => :'IncidentRuleExecutionStateType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentBatchUpdateRuleExecutionStatesData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_batch_update_rule_execution_states_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_batch_update_rule_execution_states_data_attributes.rb new file mode 100644 index 000000000000..a016488a2f58 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_batch_update_rule_execution_states_data_attributes.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for batch updating rule execution states. + class IncidentBatchUpdateRuleExecutionStatesDataAttributes + include BaseGenericModel + + # List of rules to update execution states for. + attr_reader :rules + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'rules' => :'rules' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'rules' => :'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::IncidentBatchUpdateRuleExecutionStatesDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'rules') + if (value = attributes[:'rules']).is_a?(Array) + self.rules = 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 @rules.nil? + true + end + + # Custom attribute writer method with validation + # @param rules [Object] Object to be assigned + # @!visibility private + def rules=(rules) + if rules.nil? + fail ArgumentError, 'invalid value for "rules", rules cannot be nil.' + end + @rules = rules + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rules == o.rules && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [rules, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_batch_update_rule_execution_states_request.rb b/lib/datadog_api_client/v2/models/incident_batch_update_rule_execution_states_request.rb new file mode 100644 index 000000000000..099bac5df5ba --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_batch_update_rule_execution_states_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to batch update rule execution states. + class IncidentBatchUpdateRuleExecutionStatesRequest + include BaseGenericModel + + # Data for batch updating rule execution states. + 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' => :'IncidentBatchUpdateRuleExecutionStatesData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentBatchUpdateRuleExecutionStatesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_case_link_data.rb b/lib/datadog_api_client/v2/models/incident_case_link_data.rb new file mode 100644 index 000000000000..9175f732cd43 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_case_link_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Case link data. + class IncidentCaseLinkData + include BaseGenericModel + + # Attributes of a case link. + attr_reader :attributes + + # The case link identifier. + attr_reader :id + + # Case link 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' => :'IncidentCaseLinkDataAttributes', + :'id' => :'String', + :'type' => :'IncidentCaseLinkType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCaseLinkData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_case_link_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_case_link_data_attributes.rb new file mode 100644 index 000000000000..0cb9dc23e764 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_case_link_data_attributes.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a case link. + class IncidentCaseLinkDataAttributes + include BaseGenericModel + + # The entity identifier. + attr_reader :entity_id + + # Whether this is a page link. + attr_reader :is_page + + # The relationship type. + attr_reader :relationship + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'entity_id' => :'entity_id', + :'is_page' => :'is_page', + :'relationship' => :'relationship' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'entity_id' => :'String', + :'is_page' => :'Boolean', + :'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::IncidentCaseLinkDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'entity_id') + self.entity_id = attributes[:'entity_id'] + end + + if attributes.key?(:'is_page') + self.is_page = attributes[:'is_page'] + 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 @entity_id.nil? + return false if @is_page.nil? + return false if @relationship.nil? + true + end + + # Custom attribute writer method with validation + # @param entity_id [Object] Object to be assigned + # @!visibility private + def entity_id=(entity_id) + if entity_id.nil? + fail ArgumentError, 'invalid value for "entity_id", entity_id cannot be nil.' + end + @entity_id = entity_id + end + + # Custom attribute writer method with validation + # @param is_page [Object] Object to be assigned + # @!visibility private + def is_page=(is_page) + if is_page.nil? + fail ArgumentError, 'invalid value for "is_page", is_page cannot be nil.' + end + @is_page = is_page + 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 && + entity_id == o.entity_id && + is_page == o.is_page && + relationship == o.relationship && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [entity_id, is_page, relationship, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_case_link_response.rb b/lib/datadog_api_client/v2/models/incident_case_link_response.rb new file mode 100644 index 000000000000..f4bb9e262df4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_case_link_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a case link. + class IncidentCaseLinkResponse + include BaseGenericModel + + # Case link data. + 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' => :'IncidentCaseLinkData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCaseLinkResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_case_link_type.rb b/lib/datadog_api_client/v2/models/incident_case_link_type.rb new file mode 100644 index 000000000000..998615d14c9c --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_case_link_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Case link resource type. + class IncidentCaseLinkType + include BaseEnumModel + + CASE_LINK = "case_link".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_communication_content.rb b/lib/datadog_api_client/v2/models/incident_communication_content.rb new file mode 100644 index 000000000000..69f17b157edc --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communication_content.rb @@ -0,0 +1,187 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 content of a communication. + class IncidentCommunicationContent + include BaseGenericModel + + # A key used for grouping communications. + attr_accessor :grouping_key + + # The list of handles the communication is sent to. + attr_reader :handles + + # The message body of the communication. + attr_reader :message + + # The status code of the communication. + attr_reader :status + + # The subject line of the communication. + attr_accessor :subject + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'grouping_key' => :'grouping_key', + :'handles' => :'handles', + :'message' => :'message', + :'status' => :'status', + :'subject' => :'subject' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'grouping_key' => :'String', + :'handles' => :'Array', + :'message' => :'String', + :'status' => :'Integer', + :'subject' => :'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::IncidentCommunicationContent` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'grouping_key') + self.grouping_key = attributes[:'grouping_key'] + end + + if attributes.key?(:'handles') + if (value = attributes[:'handles']).is_a?(Array) + self.handles = value + end + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'subject') + self.subject = attributes[:'subject'] + 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 @handles.nil? + return false if @message.nil? + return false if !@status.nil? && @status > 2147483647 + true + end + + # Custom attribute writer method with validation + # @param handles [Object] Object to be assigned + # @!visibility private + def handles=(handles) + if handles.nil? + fail ArgumentError, 'invalid value for "handles", handles cannot be nil.' + end + @handles = handles + end + + # Custom attribute writer method with validation + # @param message [Object] Object to be assigned + # @!visibility private + def message=(message) + if message.nil? + fail ArgumentError, 'invalid value for "message", message cannot be nil.' + end + @message = message + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if !status.nil? && status > 2147483647 + fail ArgumentError, 'invalid value for "status", must be smaller than or equal to 2147483647.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + grouping_key == o.grouping_key && + handles == o.handles && + message == o.message && + status == o.status && + subject == o.subject && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [grouping_key, handles, message, status, subject, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_communication_content_handle.rb b/lib/datadog_api_client/v2/models/incident_communication_content_handle.rb new file mode 100644 index 000000000000..11ef832acc00 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communication_content_handle.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 handle used for sending a communication. + class IncidentCommunicationContentHandle + include BaseGenericModel + + # Timestamp when the handle was added. + attr_accessor :created_at + + # The display name for the handle. + attr_accessor :display_name + + # The notification handle. + attr_reader :handle + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'display_name' => :'display_name', + :'handle' => :'handle' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'String', + :'display_name' => :'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::IncidentCommunicationContentHandle` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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?(:'display_name') + self.display_name = attributes[:'display_name'] + end + + if attributes.key?(:'handle') + self.handle = attributes[:'handle'] + 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 @handle.nil? + true + end + + # Custom attribute writer method with validation + # @param handle [Object] Object to be assigned + # @!visibility private + def handle=(handle) + if handle.nil? + fail ArgumentError, 'invalid value for "handle", handle cannot be nil.' + end + @handle = handle + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 && + display_name == o.display_name && + handle == o.handle && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, display_name, handle, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_communication_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_communication_data_attributes_request.rb new file mode 100644 index 000000000000..f46c2523c6f1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communication_data_attributes_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating or updating a communication. + class IncidentCommunicationDataAttributesRequest + include BaseGenericModel + + # The kind of communication. + attr_reader :communication_type + + # The content of a communication. + attr_reader :content + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'communication_type' => :'communication_type', + :'content' => :'content' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'communication_type' => :'IncidentCommunicationKind', + :'content' => :'IncidentCommunicationContent' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCommunicationDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'communication_type') + self.communication_type = attributes[:'communication_type'] + end + + if attributes.key?(:'content') + self.content = attributes[:'content'] + 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 @communication_type.nil? + return false if @content.nil? + true + end + + # Custom attribute writer method with validation + # @param communication_type [Object] Object to be assigned + # @!visibility private + def communication_type=(communication_type) + if communication_type.nil? + fail ArgumentError, 'invalid value for "communication_type", communication_type cannot be nil.' + end + @communication_type = communication_type + end + + # Custom attribute writer method with validation + # @param content [Object] Object to be assigned + # @!visibility private + def content=(content) + if content.nil? + fail ArgumentError, 'invalid value for "content", content cannot be nil.' + end + @content = content + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + communication_type == o.communication_type && + content == o.content && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [communication_type, content, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_communication_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_communication_data_attributes_response.rb new file mode 100644 index 000000000000..f52bd7192857 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communication_data_attributes_response.rb @@ -0,0 +1,207 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an incident communication response. + class IncidentCommunicationDataAttributesResponse + include BaseGenericModel + + # The kind of communication. + attr_reader :communication_type + + # The content of a communication. + attr_reader :content + + # Timestamp when the communication was created. + attr_reader :created + + # The incident identifier. + attr_reader :incident_id + + # Timestamp when the communication was last modified. + attr_reader :modified + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'communication_type' => :'communication_type', + :'content' => :'content', + :'created' => :'created', + :'incident_id' => :'incident_id', + :'modified' => :'modified' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'communication_type' => :'IncidentCommunicationKind', + :'content' => :'IncidentCommunicationContent', + :'created' => :'Time', + :'incident_id' => :'UUID', + :'modified' => :'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::IncidentCommunicationDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'communication_type') + self.communication_type = attributes[:'communication_type'] + end + + if attributes.key?(:'content') + self.content = attributes[:'content'] + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + end + + if attributes.key?(:'incident_id') + self.incident_id = attributes[:'incident_id'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + 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 @communication_type.nil? + return false if @content.nil? + return false if @created.nil? + return false if @incident_id.nil? + return false if @modified.nil? + true + end + + # Custom attribute writer method with validation + # @param communication_type [Object] Object to be assigned + # @!visibility private + def communication_type=(communication_type) + if communication_type.nil? + fail ArgumentError, 'invalid value for "communication_type", communication_type cannot be nil.' + end + @communication_type = communication_type + end + + # Custom attribute writer method with validation + # @param content [Object] Object to be assigned + # @!visibility private + def content=(content) + if content.nil? + fail ArgumentError, 'invalid value for "content", content cannot be nil.' + end + @content = content + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param incident_id [Object] Object to be assigned + # @!visibility private + def incident_id=(incident_id) + if incident_id.nil? + fail ArgumentError, 'invalid value for "incident_id", incident_id cannot be nil.' + end + @incident_id = incident_id + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + communication_type == o.communication_type && + content == o.content && + created == o.created && + incident_id == o.incident_id && + modified == o.modified && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [communication_type, content, created, incident_id, modified, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_communication_data_request.rb b/lib/datadog_api_client/v2/models/incident_communication_data_request.rb new file mode 100644 index 000000000000..2ef81565d1ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communication_data_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident communication data for a request. + class IncidentCommunicationDataRequest + include BaseGenericModel + + # Attributes for creating or updating a communication. + attr_reader :attributes + + # Incident communication 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentCommunicationDataAttributesRequest', + :'type' => :'IncidentCommunicationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCommunicationDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_communication_data_response.rb b/lib/datadog_api_client/v2/models/incident_communication_data_response.rb new file mode 100644 index 000000000000..81efe3b7a59f --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communication_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident communication data in a response. + class IncidentCommunicationDataResponse + include BaseGenericModel + + # Attributes of an incident communication response. + attr_reader :attributes + + # The communication identifier. + attr_reader :id + + # Incident communication 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' => :'IncidentCommunicationDataAttributesResponse', + :'id' => :'UUID', + :'type' => :'IncidentCommunicationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCommunicationDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_communication_kind.rb b/lib/datadog_api_client/v2/models/incident_communication_kind.rb new file mode 100644 index 000000000000..3f8cab7fcb6d --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communication_kind.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 kind of communication. + class IncidentCommunicationKind + include BaseEnumModel + + MANUAL = "manual".freeze + AUTOMATED = "automated".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_communication_request.rb b/lib/datadog_api_client/v2/models/incident_communication_request.rb new file mode 100644 index 000000000000..f6ec9046c29d --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communication_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create or update a communication. + class IncidentCommunicationRequest + include BaseGenericModel + + # Incident communication data for a request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentCommunicationDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCommunicationRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_communication_response.rb b/lib/datadog_api_client/v2/models/incident_communication_response.rb new file mode 100644 index 000000000000..8fda27e6752f --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communication_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a single communication. + class IncidentCommunicationResponse + include BaseGenericModel + + # Incident communication data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentCommunicationDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCommunicationResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_communication_type.rb b/lib/datadog_api_client/v2/models/incident_communication_type.rb new file mode 100644 index 000000000000..78395b8b1f8d --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communication_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident communication resource type. + class IncidentCommunicationType + include BaseEnumModel + + COMMUNICATION = "communication".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_communications_response.rb b/lib/datadog_api_client/v2/models/incident_communications_response.rb new file mode 100644 index 000000000000..f1a1a0a90146 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_communications_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a list of communications. + class IncidentCommunicationsResponse + include BaseGenericModel + + # List of communications. + 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::IncidentCommunicationsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_create_zoom_meeting_data.rb b/lib/datadog_api_client/v2/models/incident_create_zoom_meeting_data.rb new file mode 100644 index 000000000000..f8649e9d2c25 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_create_zoom_meeting_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for creating a Zoom meeting. + class IncidentCreateZoomMeetingData + include BaseGenericModel + + # Attributes for creating a Zoom meeting. + attr_reader :attributes + + # Incident integration 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentCreateZoomMeetingDataAttributes', + :'type' => :'IncidentZoomIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCreateZoomMeetingData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_create_zoom_meeting_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_create_zoom_meeting_data_attributes.rb new file mode 100644 index 000000000000..e384b15f6578 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_create_zoom_meeting_data_attributes.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating a Zoom meeting. + class IncidentCreateZoomMeetingDataAttributes + include BaseGenericModel + + # The topic of the Zoom meeting. + attr_reader :topic + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'topic' => :'topic' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'topic' => :'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::IncidentCreateZoomMeetingDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'topic') + self.topic = attributes[:'topic'] + 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 @topic.nil? + true + end + + # Custom attribute writer method with validation + # @param topic [Object] Object to be assigned + # @!visibility private + def topic=(topic) + if topic.nil? + fail ArgumentError, 'invalid value for "topic", topic cannot be nil.' + end + @topic = topic + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + topic == o.topic && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [topic, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_create_zoom_meeting_request.rb b/lib/datadog_api_client/v2/models/incident_create_zoom_meeting_request.rb new file mode 100644 index 000000000000..562d4f3f1391 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_create_zoom_meeting_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create a Zoom meeting for an incident. + class IncidentCreateZoomMeetingRequest + include BaseGenericModel + + # Data for creating a Zoom meeting. + 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' => :'IncidentCreateZoomMeetingData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentCreateZoomMeetingRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_google_meet_integration_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_google_meet_integration_data_attributes.rb new file mode 100644 index 000000000000..0c82af1c67b3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_google_meet_integration_data_attributes.rb @@ -0,0 +1,209 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 Google Meet integration metadata. + class IncidentGoogleMeetIntegrationDataAttributes + include BaseGenericModel + + # Timestamp when the integration was created. + attr_reader :created + + # The type of integration. + attr_reader :integration_type + + # Timestamp when the integration was last modified. + attr_reader :modified + + # List of Google Meet spaces. + attr_reader :spaces + + # The status of the integration. + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created' => :'created', + :'integration_type' => :'integration_type', + :'modified' => :'modified', + :'spaces' => :'spaces', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created' => :'Time', + :'integration_type' => :'String', + :'modified' => :'Time', + :'spaces' => :'Array', + :'status' => :'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::IncidentGoogleMeetIntegrationDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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') + self.created = attributes[:'created'] + end + + if attributes.key?(:'integration_type') + self.integration_type = attributes[:'integration_type'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'spaces') + if (value = attributes[:'spaces']).is_a?(Array) + self.spaces = value + end + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + 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.nil? + return false if @integration_type.nil? + return false if @modified.nil? + return false if @spaces.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param integration_type [Object] Object to be assigned + # @!visibility private + def integration_type=(integration_type) + if integration_type.nil? + fail ArgumentError, 'invalid value for "integration_type", integration_type cannot be nil.' + end + @integration_type = integration_type + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Custom attribute writer method with validation + # @param spaces [Object] Object to be assigned + # @!visibility private + def spaces=(spaces) + if spaces.nil? + fail ArgumentError, 'invalid value for "spaces", spaces cannot be nil.' + end + @spaces = spaces + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 == o.created && + integration_type == o.integration_type && + modified == o.modified && + spaces == o.spaces && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created, integration_type, modified, spaces, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_google_meet_integration_data_response.rb b/lib/datadog_api_client/v2/models/incident_google_meet_integration_data_response.rb new file mode 100644 index 000000000000..128dfcb2009f --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_google_meet_integration_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Google Meet integration data in a response. + class IncidentGoogleMeetIntegrationDataResponse + include BaseGenericModel + + # Attributes of a Google Meet integration metadata. + attr_reader :attributes + + # The integration identifier. + attr_reader :id + + # Incident integration 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' => :'IncidentGoogleMeetIntegrationDataAttributes', + :'id' => :'UUID', + :'type' => :'IncidentGoogleMeetIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentGoogleMeetIntegrationDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_google_meet_integration_response.rb b/lib/datadog_api_client/v2/models/incident_google_meet_integration_response.rb new file mode 100644 index 000000000000..e7e57d8a7a8c --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_google_meet_integration_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with Google Meet integration metadata. + class IncidentGoogleMeetIntegrationResponse + include BaseGenericModel + + # Google Meet integration data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentGoogleMeetIntegrationDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentGoogleMeetIntegrationResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_google_meet_integration_type.rb b/lib/datadog_api_client/v2/models/incident_google_meet_integration_type.rb new file mode 100644 index 000000000000..d2e3571c2a9e --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_google_meet_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident integration resource type. + class IncidentGoogleMeetIntegrationType + include BaseEnumModel + + INCIDENT_INTEGRATIONS = "incident_integrations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_google_meet_space.rb b/lib/datadog_api_client/v2/models/incident_google_meet_space.rb new file mode 100644 index 000000000000..651082dab7f6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_google_meet_space.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A Google Meet space associated with an incident. + class IncidentGoogleMeetSpace + include BaseGenericModel + + # The URL to join the Google Meet space. + attr_reader :join_url + + # The meeting code for the space. + attr_reader :meeting_code + + # The name of the Google Meet space. + attr_reader :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'join_url' => :'join_url', + :'meeting_code' => :'meeting_code', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'join_url' => :'String', + :'meeting_code' => :'String', + :'name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentGoogleMeetSpace` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'join_url') + self.join_url = attributes[:'join_url'] + end + + if attributes.key?(:'meeting_code') + self.meeting_code = attributes[:'meeting_code'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @join_url.nil? + return false if @meeting_code.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param join_url [Object] Object to be assigned + # @!visibility private + def join_url=(join_url) + if join_url.nil? + fail ArgumentError, 'invalid value for "join_url", join_url cannot be nil.' + end + @join_url = join_url + end + + # Custom attribute writer method with validation + # @param meeting_code [Object] Object to be assigned + # @!visibility private + def meeting_code=(meeting_code) + if meeting_code.nil? + fail ArgumentError, 'invalid value for "meeting_code", meeting_code cannot be nil.' + end + @meeting_code = meeting_code + 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 + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + join_url == o.join_url && + meeting_code == o.meeting_code && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [join_url, meeting_code, name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_issue_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_jira_issue_data_attributes_request.rb new file mode 100644 index 000000000000..7a3c6cadd567 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_issue_data_attributes_request.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating a Jira issue from an incident. + class IncidentJiraIssueDataAttributesRequest + include BaseGenericModel + + # The Jira account identifier. + attr_reader :account_id + + # The Jira issue type identifier. + attr_reader :issue_type_id + + # The Jira project identifier. + attr_reader :project_id + + # The identifier of the Jira template to use. + attr_accessor :template_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_id' => :'account_id', + :'issue_type_id' => :'issue_type_id', + :'project_id' => :'project_id', + :'template_id' => :'template_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_id' => :'String', + :'issue_type_id' => :'String', + :'project_id' => :'String', + :'template_id' => :'UUID' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraIssueDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'issue_type_id') + self.issue_type_id = attributes[:'issue_type_id'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'template_id') + self.template_id = attributes[:'template_id'] + 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 @account_id.nil? + return false if @issue_type_id.nil? + return false if @project_id.nil? + true + end + + # Custom attribute writer method with validation + # @param account_id [Object] Object to be assigned + # @!visibility private + def account_id=(account_id) + if account_id.nil? + fail ArgumentError, 'invalid value for "account_id", account_id cannot be nil.' + end + @account_id = account_id + end + + # Custom attribute writer method with validation + # @param issue_type_id [Object] Object to be assigned + # @!visibility private + def issue_type_id=(issue_type_id) + if issue_type_id.nil? + fail ArgumentError, 'invalid value for "issue_type_id", issue_type_id cannot be nil.' + end + @issue_type_id = issue_type_id + 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 + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_id == o.account_id && + issue_type_id == o.issue_type_id && + project_id == o.project_id && + template_id == o.template_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_id, issue_type_id, project_id, template_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_issue_data_request.rb b/lib/datadog_api_client/v2/models/incident_jira_issue_data_request.rb new file mode 100644 index 000000000000..c35e8e5405a2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_issue_data_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Jira issue data for a request. + class IncidentJiraIssueDataRequest + include BaseGenericModel + + # Attributes for creating a Jira issue from an incident. + attr_reader :attributes + + # Incident Jira issue 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentJiraIssueDataAttributesRequest', + :'type' => :'IncidentJiraIssueType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraIssueDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_jira_issue_integration_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_jira_issue_integration_data_attributes.rb new file mode 100644 index 000000000000..3638af61f960 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_issue_integration_data_attributes.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Jira issue integration. + class IncidentJiraIssueIntegrationDataAttributes + include BaseGenericModel + + # Timestamp when the integration was created. + attr_reader :created + + # The type of integration. + attr_reader :integration_type + + # Timestamp when the integration was last modified. + attr_reader :modified + + # The status of the integration. + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created' => :'created', + :'integration_type' => :'integration_type', + :'modified' => :'modified', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created' => :'Time', + :'integration_type' => :'String', + :'modified' => :'Time', + :'status' => :'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::IncidentJiraIssueIntegrationDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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') + self.created = attributes[:'created'] + end + + if attributes.key?(:'integration_type') + self.integration_type = attributes[:'integration_type'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + 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.nil? + return false if @integration_type.nil? + return false if @modified.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param integration_type [Object] Object to be assigned + # @!visibility private + def integration_type=(integration_type) + if integration_type.nil? + fail ArgumentError, 'invalid value for "integration_type", integration_type cannot be nil.' + end + @integration_type = integration_type + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 == o.created && + integration_type == o.integration_type && + modified == o.modified && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created, integration_type, modified, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_issue_integration_data_response.rb b/lib/datadog_api_client/v2/models/incident_jira_issue_integration_data_response.rb new file mode 100644 index 000000000000..255e58c1fac3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_issue_integration_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Jira issue integration data in a response. + class IncidentJiraIssueIntegrationDataResponse + include BaseGenericModel + + # Attributes of a Jira issue integration. + attr_reader :attributes + + # The integration identifier. + attr_reader :id + + # Incident integration 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' => :'IncidentJiraIssueIntegrationDataAttributes', + :'id' => :'UUID', + :'type' => :'IncidentJiraIssueIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraIssueIntegrationDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_jira_issue_integration_response.rb b/lib/datadog_api_client/v2/models/incident_jira_issue_integration_response.rb new file mode 100644 index 000000000000..d594af4a989a --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_issue_integration_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with Jira issue integration metadata. + class IncidentJiraIssueIntegrationResponse + include BaseGenericModel + + # Jira issue integration data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentJiraIssueIntegrationDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraIssueIntegrationResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_jira_issue_integration_type.rb b/lib/datadog_api_client/v2/models/incident_jira_issue_integration_type.rb new file mode 100644 index 000000000000..80989bf865b3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_issue_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident integration resource type. + class IncidentJiraIssueIntegrationType + include BaseEnumModel + + INCIDENT_INTEGRATIONS = "incident_integrations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_issue_request.rb b/lib/datadog_api_client/v2/models/incident_jira_issue_request.rb new file mode 100644 index 000000000000..418cfe301b70 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_issue_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create a Jira issue from an incident. + class IncidentJiraIssueRequest + include BaseGenericModel + + # Jira issue data for a request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentJiraIssueDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraIssueRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_jira_issue_type.rb b/lib/datadog_api_client/v2/models/incident_jira_issue_type.rb new file mode 100644 index 000000000000..e8f9bd111cd9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_issue_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident Jira issue resource type. + class IncidentJiraIssueType + include BaseEnumModel + + INCIDENT_JIRA_ISSUES = "incident_jira_issues".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_template_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_jira_template_data_attributes_request.rb new file mode 100644 index 000000000000..42c089f0d1a7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_data_attributes_request.rb @@ -0,0 +1,268 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 creating or updating an incident Jira template. + class IncidentJiraTemplateDataAttributesRequest + include BaseGenericModel + + # The Jira account identifier. + attr_reader :account_id + + # Field configuration mappings. + attr_accessor :field_configurations + + # The Jira fields configuration. + attr_accessor :fields + + # Whether this is the default template. + attr_accessor :is_default + + # The Jira issue type identifier. + attr_reader :issue_id + + # The field mappings configuration. + attr_accessor :mappings + + # Additional metadata for the template. + attr_accessor :meta + + # The name of the template. + attr_accessor :name + + # The Jira project identifier. + attr_reader :project_id + + # The Jira project key. + attr_reader :project_key + + # Whether synchronization is enabled. + attr_accessor :sync_enabled + + # The type of the template. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_id' => :'account_id', + :'field_configurations' => :'field_configurations', + :'fields' => :'fields', + :'is_default' => :'is_default', + :'issue_id' => :'issue_id', + :'mappings' => :'mappings', + :'meta' => :'meta', + :'name' => :'name', + :'project_id' => :'project_id', + :'project_key' => :'project_key', + :'sync_enabled' => :'sync_enabled', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_id' => :'String', + :'field_configurations' => :'Array', + :'fields' => :'Hash', + :'is_default' => :'Boolean', + :'issue_id' => :'String', + :'mappings' => :'Hash', + :'meta' => :'Hash', + :'name' => :'String', + :'project_id' => :'String', + :'project_key' => :'String', + :'sync_enabled' => :'Boolean', + :'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::IncidentJiraTemplateDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'field_configurations') + if (value = attributes[:'field_configurations']).is_a?(Array) + self.field_configurations = value + end + end + + if attributes.key?(:'fields') + self.fields = attributes[:'fields'] + end + + if attributes.key?(:'is_default') + self.is_default = attributes[:'is_default'] + end + + if attributes.key?(:'issue_id') + self.issue_id = attributes[:'issue_id'] + end + + if attributes.key?(:'mappings') + self.mappings = attributes[:'mappings'] + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'project_key') + self.project_key = attributes[:'project_key'] + end + + if attributes.key?(:'sync_enabled') + self.sync_enabled = attributes[:'sync_enabled'] + 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 @account_id.nil? + return false if @issue_id.nil? + return false if @project_id.nil? + return false if @project_key.nil? + true + end + + # Custom attribute writer method with validation + # @param account_id [Object] Object to be assigned + # @!visibility private + def account_id=(account_id) + if account_id.nil? + fail ArgumentError, 'invalid value for "account_id", account_id cannot be nil.' + end + @account_id = account_id + end + + # Custom attribute writer method with validation + # @param issue_id [Object] Object to be assigned + # @!visibility private + def issue_id=(issue_id) + if issue_id.nil? + fail ArgumentError, 'invalid value for "issue_id", issue_id cannot be nil.' + end + @issue_id = issue_id + 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 project_key [Object] Object to be assigned + # @!visibility private + def project_key=(project_key) + if project_key.nil? + fail ArgumentError, 'invalid value for "project_key", project_key cannot be nil.' + end + @project_key = project_key + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_id == o.account_id && + field_configurations == o.field_configurations && + fields == o.fields && + is_default == o.is_default && + issue_id == o.issue_id && + mappings == o.mappings && + meta == o.meta && + name == o.name && + project_id == o.project_id && + project_key == o.project_key && + sync_enabled == o.sync_enabled && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_id, field_configurations, fields, is_default, issue_id, mappings, meta, name, project_id, project_key, sync_enabled, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_template_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_jira_template_data_attributes_response.rb new file mode 100644 index 000000000000..577e66eaf276 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_data_attributes_response.rb @@ -0,0 +1,396 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an incident Jira template. + class IncidentJiraTemplateDataAttributesResponse + include BaseGenericModel + + # The Jira account identifier. + attr_reader :account_id + + # Timestamp when the template was created. + attr_reader :created + + # UUID of the user who created the template. + attr_reader :created_by_uuid + + # Field configuration mappings. + attr_accessor :field_configurations + + # The Jira fields configuration. + attr_accessor :fields + + # Whether this is the default template. + attr_reader :is_default + + # The Jira issue type identifier. + attr_reader :issue_id + + # UUID of the user who last modified the template. + attr_reader :last_modified_by_uuid + + # The field mappings configuration. + attr_accessor :mappings + + # Additional metadata for the template. + attr_accessor :meta + + # Timestamp when the template was last modified. + attr_reader :modified + + # The name of the template. + attr_reader :name + + # The Jira project identifier. + attr_reader :project_id + + # The Jira project key. + attr_reader :project_key + + # Whether synchronization is enabled. + attr_reader :sync_enabled + + # The type of the template. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_id' => :'account_id', + :'created' => :'created', + :'created_by_uuid' => :'created_by_uuid', + :'field_configurations' => :'field_configurations', + :'fields' => :'fields', + :'is_default' => :'is_default', + :'issue_id' => :'issue_id', + :'last_modified_by_uuid' => :'last_modified_by_uuid', + :'mappings' => :'mappings', + :'meta' => :'meta', + :'modified' => :'modified', + :'name' => :'name', + :'project_id' => :'project_id', + :'project_key' => :'project_key', + :'sync_enabled' => :'sync_enabled', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_id' => :'String', + :'created' => :'Time', + :'created_by_uuid' => :'UUID', + :'field_configurations' => :'Array', + :'fields' => :'Hash', + :'is_default' => :'Boolean', + :'issue_id' => :'String', + :'last_modified_by_uuid' => :'UUID', + :'mappings' => :'Hash', + :'meta' => :'Hash', + :'modified' => :'Time', + :'name' => :'String', + :'project_id' => :'String', + :'project_key' => :'String', + :'sync_enabled' => :'Boolean', + :'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::IncidentJiraTemplateDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + end + + if attributes.key?(:'created_by_uuid') + self.created_by_uuid = attributes[:'created_by_uuid'] + end + + if attributes.key?(:'field_configurations') + if (value = attributes[:'field_configurations']).is_a?(Array) + self.field_configurations = value + end + end + + if attributes.key?(:'fields') + self.fields = attributes[:'fields'] + end + + if attributes.key?(:'is_default') + self.is_default = attributes[:'is_default'] + end + + if attributes.key?(:'issue_id') + self.issue_id = attributes[:'issue_id'] + end + + if attributes.key?(:'last_modified_by_uuid') + self.last_modified_by_uuid = attributes[:'last_modified_by_uuid'] + end + + if attributes.key?(:'mappings') + self.mappings = attributes[:'mappings'] + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + + if attributes.key?(:'project_key') + self.project_key = attributes[:'project_key'] + end + + if attributes.key?(:'sync_enabled') + self.sync_enabled = attributes[:'sync_enabled'] + 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 @account_id.nil? + return false if @created.nil? + return false if @created_by_uuid.nil? + return false if @is_default.nil? + return false if @issue_id.nil? + return false if @last_modified_by_uuid.nil? + return false if @modified.nil? + return false if @name.nil? + return false if @project_id.nil? + return false if @project_key.nil? + return false if @sync_enabled.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param account_id [Object] Object to be assigned + # @!visibility private + def account_id=(account_id) + if account_id.nil? + fail ArgumentError, 'invalid value for "account_id", account_id cannot be nil.' + end + @account_id = account_id + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param created_by_uuid [Object] Object to be assigned + # @!visibility private + def created_by_uuid=(created_by_uuid) + if created_by_uuid.nil? + fail ArgumentError, 'invalid value for "created_by_uuid", created_by_uuid cannot be nil.' + end + @created_by_uuid = created_by_uuid + end + + # Custom attribute writer method with validation + # @param is_default [Object] Object to be assigned + # @!visibility private + def is_default=(is_default) + if is_default.nil? + fail ArgumentError, 'invalid value for "is_default", is_default cannot be nil.' + end + @is_default = is_default + end + + # Custom attribute writer method with validation + # @param issue_id [Object] Object to be assigned + # @!visibility private + def issue_id=(issue_id) + if issue_id.nil? + fail ArgumentError, 'invalid value for "issue_id", issue_id cannot be nil.' + end + @issue_id = issue_id + end + + # Custom attribute writer method with validation + # @param last_modified_by_uuid [Object] Object to be assigned + # @!visibility private + def last_modified_by_uuid=(last_modified_by_uuid) + if last_modified_by_uuid.nil? + fail ArgumentError, 'invalid value for "last_modified_by_uuid", last_modified_by_uuid cannot be nil.' + end + @last_modified_by_uuid = last_modified_by_uuid + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + 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 project_key [Object] Object to be assigned + # @!visibility private + def project_key=(project_key) + if project_key.nil? + fail ArgumentError, 'invalid value for "project_key", project_key cannot be nil.' + end + @project_key = project_key + end + + # Custom attribute writer method with validation + # @param sync_enabled [Object] Object to be assigned + # @!visibility private + def sync_enabled=(sync_enabled) + if sync_enabled.nil? + fail ArgumentError, 'invalid value for "sync_enabled", sync_enabled cannot be nil.' + end + @sync_enabled = sync_enabled + 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 && + account_id == o.account_id && + created == o.created && + created_by_uuid == o.created_by_uuid && + field_configurations == o.field_configurations && + fields == o.fields && + is_default == o.is_default && + issue_id == o.issue_id && + last_modified_by_uuid == o.last_modified_by_uuid && + mappings == o.mappings && + meta == o.meta && + modified == o.modified && + name == o.name && + project_id == o.project_id && + project_key == o.project_key && + sync_enabled == o.sync_enabled && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_id, created, created_by_uuid, field_configurations, fields, is_default, issue_id, last_modified_by_uuid, mappings, meta, modified, name, project_id, project_key, sync_enabled, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_template_data_request.rb b/lib/datadog_api_client/v2/models/incident_jira_template_data_request.rb new file mode 100644 index 000000000000..6bb298734e37 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_data_request.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident Jira template data for a create or update request. + class IncidentJiraTemplateDataRequest + include BaseGenericModel + + # Attributes for creating or updating an incident Jira template. + attr_reader :attributes + + # Relationships for an incident Jira template. + attr_accessor :relationships + + # Incident Jira template 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', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentJiraTemplateDataAttributesRequest', + :'relationships' => :'IncidentJiraTemplateRelationships', + :'type' => :'IncidentJiraTemplateType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraTemplateDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @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 && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_template_data_response.rb b/lib/datadog_api_client/v2/models/incident_jira_template_data_response.rb new file mode 100644 index 000000000000..338ea08834c1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_data_response.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident Jira template data in a response. + class IncidentJiraTemplateDataResponse + include BaseGenericModel + + # Attributes of an incident Jira template. + attr_reader :attributes + + # The template identifier. + attr_reader :id + + # Relationships for an incident Jira template. + attr_accessor :relationships + + # Incident Jira template 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', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentJiraTemplateDataAttributesResponse', + :'id' => :'UUID', + :'relationships' => :'IncidentJiraTemplateRelationships', + :'type' => :'IncidentJiraTemplateType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraTemplateDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_template_field_configuration.rb b/lib/datadog_api_client/v2/models/incident_jira_template_field_configuration.rb new file mode 100644 index 000000000000..ed1d91928c31 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_field_configuration.rb @@ -0,0 +1,193 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 a Jira field mapping. + class IncidentJiraTemplateFieldConfiguration + include BaseGenericModel + + # Custom value for outbound synchronization. + attr_accessor :custom_outbound_value + + # The incident field to map to. + attr_accessor :incident_field + + # The Jira field key. + attr_reader :jira_field_key + + # The type of the Jira field. + attr_accessor :jira_field_type + + # The direction of synchronization. + attr_reader :sync_direction + + # Mapping of values between incident and Jira fields. + attr_accessor :value_mapping + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'custom_outbound_value' => :'custom_outbound_value', + :'incident_field' => :'incident_field', + :'jira_field_key' => :'jira_field_key', + :'jira_field_type' => :'jira_field_type', + :'sync_direction' => :'sync_direction', + :'value_mapping' => :'value_mapping' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'custom_outbound_value' => :'Object', + :'incident_field' => :'String', + :'jira_field_key' => :'String', + :'jira_field_type' => :'String', + :'sync_direction' => :'String', + :'value_mapping' => :'Hash' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'incident_field', + :'jira_field_type', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraTemplateFieldConfiguration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'custom_outbound_value') + self.custom_outbound_value = attributes[:'custom_outbound_value'] + end + + if attributes.key?(:'incident_field') + self.incident_field = attributes[:'incident_field'] + end + + if attributes.key?(:'jira_field_key') + self.jira_field_key = attributes[:'jira_field_key'] + end + + if attributes.key?(:'jira_field_type') + self.jira_field_type = attributes[:'jira_field_type'] + end + + if attributes.key?(:'sync_direction') + self.sync_direction = attributes[:'sync_direction'] + end + + if attributes.key?(:'value_mapping') + self.value_mapping = attributes[:'value_mapping'] + 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 @jira_field_key.nil? + return false if @sync_direction.nil? + true + end + + # Custom attribute writer method with validation + # @param jira_field_key [Object] Object to be assigned + # @!visibility private + def jira_field_key=(jira_field_key) + if jira_field_key.nil? + fail ArgumentError, 'invalid value for "jira_field_key", jira_field_key cannot be nil.' + end + @jira_field_key = jira_field_key + end + + # Custom attribute writer method with validation + # @param sync_direction [Object] Object to be assigned + # @!visibility private + def sync_direction=(sync_direction) + if sync_direction.nil? + fail ArgumentError, 'invalid value for "sync_direction", sync_direction cannot be nil.' + end + @sync_direction = sync_direction + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + custom_outbound_value == o.custom_outbound_value && + incident_field == o.incident_field && + jira_field_key == o.jira_field_key && + jira_field_type == o.jira_field_type && + sync_direction == o.sync_direction && + value_mapping == o.value_mapping && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [custom_outbound_value, incident_field, jira_field_key, jira_field_type, sync_direction, value_mapping, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_template_incident_type_relationship.rb b/lib/datadog_api_client/v2/models/incident_jira_template_incident_type_relationship.rb new file mode 100644 index 000000000000..21eb5b779ced --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_incident_type_relationship.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationship to an incident type. + class IncidentJiraTemplateIncidentTypeRelationship + include BaseGenericModel + + # Incident type relationship data. + 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' => :'IncidentJiraTemplateIncidentTypeRelationshipData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraTemplateIncidentTypeRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_jira_template_incident_type_relationship_data.rb b/lib/datadog_api_client/v2/models/incident_jira_template_incident_type_relationship_data.rb new file mode 100644 index 000000000000..6b2022208ee1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_incident_type_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident type relationship data. + class IncidentJiraTemplateIncidentTypeRelationshipData + include BaseGenericModel + + # The incident type identifier. + attr_reader :id + + # The incident type 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 + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'UUID', + :'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::IncidentJiraTemplateIncidentTypeRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_jira_template_relationships.rb b/lib/datadog_api_client/v2/models/incident_jira_template_relationships.rb new file mode 100644 index 000000000000..5ce00ed0580f --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_relationships.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationships for an incident Jira template. + class IncidentJiraTemplateRelationships + include BaseGenericModel + + # Relationship to an incident type. + attr_accessor :incident_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'incident_type' => :'incident_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'incident_type' => :'IncidentJiraTemplateIncidentTypeRelationship' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraTemplateRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'incident_type') + self.incident_type = attributes[:'incident_type'] + 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 && + incident_type == o.incident_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [incident_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_template_request.rb b/lib/datadog_api_client/v2/models/incident_jira_template_request.rb new file mode 100644 index 000000000000..5ae10b3060e1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Create or update request for an incident Jira template. + class IncidentJiraTemplateRequest + include BaseGenericModel + + # Incident Jira template data for a create or update request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentJiraTemplateDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraTemplateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_jira_template_response.rb b/lib/datadog_api_client/v2/models/incident_jira_template_response.rb new file mode 100644 index 000000000000..cda2629d17b9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a single incident Jira template. + class IncidentJiraTemplateResponse + include BaseGenericModel + + # Incident Jira template data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentJiraTemplateDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentJiraTemplateResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_jira_template_type.rb b/lib/datadog_api_client/v2/models/incident_jira_template_type.rb new file mode 100644 index 000000000000..facb301899bd --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_template_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident Jira template resource type. + class IncidentJiraTemplateType + include BaseEnumModel + + INCIDENTS_JIRA_TEMPLATES = "incidents_jira_templates".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_jira_templates_response.rb b/lib/datadog_api_client/v2/models/incident_jira_templates_response.rb new file mode 100644 index 000000000000..fcfc36cfda60 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_jira_templates_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a list of incident Jira templates. + class IncidentJiraTemplatesResponse + include BaseGenericModel + + # List of incident Jira templates. + 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::IncidentJiraTemplatesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_microsoft_teams_configuration_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_attributes_request.rb new file mode 100644 index 000000000000..9e44c325360d --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_attributes_request.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating or updating a Microsoft Teams configuration. + class IncidentMicrosoftTeamsConfigurationDataAttributesRequest + include BaseGenericModel + + # Whether manual meeting creation is enabled. + attr_accessor :manual_meeting_creation + + # Whether post-meeting summary is enabled. + attr_accessor :post_meeting_summary + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'manual_meeting_creation' => :'manual_meeting_creation', + :'post_meeting_summary' => :'post_meeting_summary' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'manual_meeting_creation' => :'Boolean', + :'post_meeting_summary' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'manual_meeting_creation') + self.manual_meeting_creation = attributes[:'manual_meeting_creation'] + end + + if attributes.key?(:'post_meeting_summary') + self.post_meeting_summary = attributes[:'post_meeting_summary'] + 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 && + manual_meeting_creation == o.manual_meeting_creation && + post_meeting_summary == o.post_meeting_summary && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [manual_meeting_creation, post_meeting_summary, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_attributes_response.rb new file mode 100644 index 000000000000..c7559a7dadfb --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_attributes_response.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Microsoft Teams configuration. + class IncidentMicrosoftTeamsConfigurationDataAttributesResponse + include BaseGenericModel + + # Timestamp when the configuration was created. + attr_reader :created_at + + # Whether manual meeting creation is enabled. + attr_reader :manual_meeting_creation + + # Timestamp when the configuration was last modified. + attr_reader :modified_at + + # Whether post-meeting summary is enabled. + attr_reader :post_meeting_summary + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'manual_meeting_creation' => :'manual_meeting_creation', + :'modified_at' => :'modified_at', + :'post_meeting_summary' => :'post_meeting_summary' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'manual_meeting_creation' => :'Boolean', + :'modified_at' => :'Time', + :'post_meeting_summary' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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?(:'manual_meeting_creation') + self.manual_meeting_creation = attributes[:'manual_meeting_creation'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'post_meeting_summary') + self.post_meeting_summary = attributes[:'post_meeting_summary'] + 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 @manual_meeting_creation.nil? + return false if @modified_at.nil? + return false if @post_meeting_summary.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 manual_meeting_creation [Object] Object to be assigned + # @!visibility private + def manual_meeting_creation=(manual_meeting_creation) + if manual_meeting_creation.nil? + fail ArgumentError, 'invalid value for "manual_meeting_creation", manual_meeting_creation cannot be nil.' + end + @manual_meeting_creation = manual_meeting_creation + end + + # Custom attribute writer method with validation + # @param modified_at [Object] Object to be assigned + # @!visibility private + def modified_at=(modified_at) + if modified_at.nil? + fail ArgumentError, 'invalid value for "modified_at", modified_at cannot be nil.' + end + @modified_at = modified_at + end + + # Custom attribute writer method with validation + # @param post_meeting_summary [Object] Object to be assigned + # @!visibility private + def post_meeting_summary=(post_meeting_summary) + if post_meeting_summary.nil? + fail ArgumentError, 'invalid value for "post_meeting_summary", post_meeting_summary cannot be nil.' + end + @post_meeting_summary = post_meeting_summary + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 && + manual_meeting_creation == o.manual_meeting_creation && + modified_at == o.modified_at && + post_meeting_summary == o.post_meeting_summary && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, manual_meeting_creation, modified_at, post_meeting_summary, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_request.rb b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_request.rb new file mode 100644 index 000000000000..ae36ef6b61ad --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Microsoft Teams configuration data for a request. + class IncidentMicrosoftTeamsConfigurationDataRequest + include BaseGenericModel + + # Attributes for creating or updating a Microsoft Teams configuration. + attr_reader :attributes + + # Microsoft Teams configuration 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentMicrosoftTeamsConfigurationDataAttributesRequest', + :'type' => :'IncidentMicrosoftTeamsConfigurationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_microsoft_teams_configuration_data_response.rb b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_response.rb new file mode 100644 index 000000000000..66e3bde8d36f --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Microsoft Teams configuration data in a response. + class IncidentMicrosoftTeamsConfigurationDataResponse + include BaseGenericModel + + # Attributes of a Microsoft Teams configuration. + attr_reader :attributes + + # The configuration identifier. + attr_reader :id + + # Microsoft Teams configuration 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' => :'IncidentMicrosoftTeamsConfigurationDataAttributesResponse', + :'id' => :'UUID', + :'type' => :'IncidentMicrosoftTeamsConfigurationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_microsoft_teams_configuration_request.rb b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_request.rb new file mode 100644 index 000000000000..e6b0f541dc71 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create or update a Microsoft Teams configuration. + class IncidentMicrosoftTeamsConfigurationRequest + include BaseGenericModel + + # Microsoft Teams configuration data for a request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentMicrosoftTeamsConfigurationDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_microsoft_teams_configuration_response.rb b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_response.rb new file mode 100644 index 000000000000..852b27859ecb --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a Microsoft Teams configuration. + class IncidentMicrosoftTeamsConfigurationResponse + include BaseGenericModel + + # Microsoft Teams configuration data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentMicrosoftTeamsConfigurationDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentMicrosoftTeamsConfigurationResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_microsoft_teams_configuration_type.rb b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_type.rb new file mode 100644 index 000000000000..137c9725c35e --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_microsoft_teams_configuration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Microsoft Teams configuration resource type. + class IncidentMicrosoftTeamsConfigurationType + include BaseEnumModel + + MICROSOFT_TEAMS_CONFIGURATIONS = "microsoft_teams_configurations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_microsoft_teams_integration_type.rb b/lib/datadog_api_client/v2/models/incident_microsoft_teams_integration_type.rb new file mode 100644 index 000000000000..9203e6d32ed3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_microsoft_teams_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident integration resource type. + class IncidentMicrosoftTeamsIntegrationType + include BaseEnumModel + + INCIDENT_INTEGRATIONS = "incident_integrations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_ms_teams_channel.rb b/lib/datadog_api_client/v2/models/incident_ms_teams_channel.rb new file mode 100644 index 000000000000..52c61e54baaf --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_ms_teams_channel.rb @@ -0,0 +1,184 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 Microsoft Teams channel associated with an incident. + class IncidentMSTeamsChannel + include BaseGenericModel + + # The Teams channel identifier. + attr_reader :ms_channel_id + + # The name of the Teams channel. + attr_reader :ms_channel_name + + # The Teams team identifier. + attr_accessor :ms_team_id + + # The Teams tenant identifier. + attr_accessor :ms_tenant_id + + # The redirect URL for the channel. + attr_accessor :redirect_url + + # The name of the Teams team. + attr_accessor :team_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'ms_channel_id' => :'ms_channel_id', + :'ms_channel_name' => :'ms_channel_name', + :'ms_team_id' => :'ms_team_id', + :'ms_tenant_id' => :'ms_tenant_id', + :'redirect_url' => :'redirect_url', + :'team_name' => :'team_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'ms_channel_id' => :'String', + :'ms_channel_name' => :'String', + :'ms_team_id' => :'String', + :'ms_tenant_id' => :'String', + :'redirect_url' => :'String', + :'team_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::IncidentMSTeamsChannel` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'ms_channel_id') + self.ms_channel_id = attributes[:'ms_channel_id'] + end + + if attributes.key?(:'ms_channel_name') + self.ms_channel_name = attributes[:'ms_channel_name'] + end + + if attributes.key?(:'ms_team_id') + self.ms_team_id = attributes[:'ms_team_id'] + end + + if attributes.key?(:'ms_tenant_id') + self.ms_tenant_id = attributes[:'ms_tenant_id'] + end + + if attributes.key?(:'redirect_url') + self.redirect_url = attributes[:'redirect_url'] + end + + if attributes.key?(:'team_name') + self.team_name = attributes[:'team_name'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @ms_channel_id.nil? + return false if @ms_channel_name.nil? + true + end + + # Custom attribute writer method with validation + # @param ms_channel_id [Object] Object to be assigned + # @!visibility private + def ms_channel_id=(ms_channel_id) + if ms_channel_id.nil? + fail ArgumentError, 'invalid value for "ms_channel_id", ms_channel_id cannot be nil.' + end + @ms_channel_id = ms_channel_id + end + + # Custom attribute writer method with validation + # @param ms_channel_name [Object] Object to be assigned + # @!visibility private + def ms_channel_name=(ms_channel_name) + if ms_channel_name.nil? + fail ArgumentError, 'invalid value for "ms_channel_name", ms_channel_name cannot be nil.' + end + @ms_channel_name = ms_channel_name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ms_channel_id == o.ms_channel_id && + ms_channel_name == o.ms_channel_name && + ms_team_id == o.ms_team_id && + ms_tenant_id == o.ms_tenant_id && + redirect_url == o.redirect_url && + team_name == o.team_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [ms_channel_id, ms_channel_name, ms_team_id, ms_tenant_id, redirect_url, team_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_ms_teams_integration_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_ms_teams_integration_data_attributes.rb new file mode 100644 index 000000000000..add83db4fcc7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_ms_teams_integration_data_attributes.rb @@ -0,0 +1,209 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 Microsoft Teams integration metadata. + class IncidentMSTeamsIntegrationDataAttributes + include BaseGenericModel + + # Timestamp when the integration was created. + attr_reader :created + + # The type of integration. + attr_reader :integration_type + + # Timestamp when the integration was last modified. + attr_reader :modified + + # The status of the integration. + attr_reader :status + + # List of Microsoft Teams channels. + attr_reader :teams + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created' => :'created', + :'integration_type' => :'integration_type', + :'modified' => :'modified', + :'status' => :'status', + :'teams' => :'teams' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created' => :'Time', + :'integration_type' => :'String', + :'modified' => :'Time', + :'status' => :'String', + :'teams' => :'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::IncidentMSTeamsIntegrationDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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') + self.created = attributes[:'created'] + end + + if attributes.key?(:'integration_type') + self.integration_type = attributes[:'integration_type'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'teams') + if (value = attributes[:'teams']).is_a?(Array) + self.teams = 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 @created.nil? + return false if @integration_type.nil? + return false if @modified.nil? + return false if @status.nil? + return false if @teams.nil? + true + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param integration_type [Object] Object to be assigned + # @!visibility private + def integration_type=(integration_type) + if integration_type.nil? + fail ArgumentError, 'invalid value for "integration_type", integration_type cannot be nil.' + end + @integration_type = integration_type + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Custom attribute writer method with validation + # @param teams [Object] Object to be assigned + # @!visibility private + def teams=(teams) + if teams.nil? + fail ArgumentError, 'invalid value for "teams", teams cannot be nil.' + end + @teams = teams + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 == o.created && + integration_type == o.integration_type && + modified == o.modified && + status == o.status && + teams == o.teams && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created, integration_type, modified, status, teams, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_ms_teams_integration_data_response.rb b/lib/datadog_api_client/v2/models/incident_ms_teams_integration_data_response.rb new file mode 100644 index 000000000000..9a536f8563d5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_ms_teams_integration_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Microsoft Teams integration data in a response. + class IncidentMSTeamsIntegrationDataResponse + include BaseGenericModel + + # Attributes of a Microsoft Teams integration metadata. + attr_reader :attributes + + # The integration identifier. + attr_reader :id + + # Incident integration 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' => :'IncidentMSTeamsIntegrationDataAttributes', + :'id' => :'UUID', + :'type' => :'IncidentMicrosoftTeamsIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentMSTeamsIntegrationDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_ms_teams_integration_response.rb b/lib/datadog_api_client/v2/models/incident_ms_teams_integration_response.rb new file mode 100644 index 000000000000..c09361b58754 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_ms_teams_integration_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with Microsoft Teams integration metadata. + class IncidentMSTeamsIntegrationResponse + include BaseGenericModel + + # Microsoft Teams integration data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentMSTeamsIntegrationDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentMSTeamsIntegrationResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_pagerduty_incident_data_response.rb b/lib/datadog_api_client/v2/models/incident_pagerduty_incident_data_response.rb new file mode 100644 index 000000000000..ab7d9a8e0be5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_pagerduty_incident_data_response.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident data related to a PagerDuty incident. + class IncidentPagerdutyIncidentDataResponse + include BaseGenericModel + + # The Datadog incident identifier. + attr_reader :id + + # The incident 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 + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'UUID', + :'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::IncidentPagerdutyIncidentDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_pagerduty_related_incidents_response.rb b/lib/datadog_api_client/v2/models/incident_pagerduty_related_incidents_response.rb new file mode 100644 index 000000000000..0c0d2c51dc40 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_pagerduty_related_incidents_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a list of Datadog incidents related to a PagerDuty incident. + class IncidentPagerdutyRelatedIncidentsResponse + include BaseGenericModel + + # List of related Datadog incidents. + 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::IncidentPagerdutyRelatedIncidentsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_pagerduty_service_data.rb b/lib/datadog_api_client/v2/models/incident_pagerduty_service_data.rb new file mode 100644 index 000000000000..59ef42518371 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_pagerduty_service_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # PagerDuty service data. + class IncidentPagerdutyServiceData + include BaseGenericModel + + # Attributes of a PagerDuty service. + attr_reader :attributes + + # The PagerDuty service identifier. + attr_reader :id + + # PagerDuty service 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' => :'IncidentPagerdutyServiceDataAttributes', + :'id' => :'String', + :'type' => :'IncidentPagerdutyServiceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentPagerdutyServiceData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_pagerduty_service_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_pagerduty_service_data_attributes.rb new file mode 100644 index 000000000000..5539e3d8b288 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_pagerduty_service_data_attributes.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a PagerDuty service. + class IncidentPagerdutyServiceDataAttributes + include BaseGenericModel + + # The handle for the PagerDuty service. + attr_reader :handle + + # The name of the PagerDuty service. + attr_reader :name + + # The PagerDuty service identifier. + attr_reader :service_id + + # Whether webhooks are enabled for this service. + attr_reader :webhooks_enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'handle' => :'handle', + :'name' => :'name', + :'service_id' => :'service_id', + :'webhooks_enabled' => :'webhooks_enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'handle' => :'String', + :'name' => :'String', + :'service_id' => :'String', + :'webhooks_enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentPagerdutyServiceDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'handle') + self.handle = attributes[:'handle'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'service_id') + self.service_id = attributes[:'service_id'] + end + + if attributes.key?(:'webhooks_enabled') + self.webhooks_enabled = attributes[:'webhooks_enabled'] + 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 @handle.nil? + return false if @name.nil? + return false if @service_id.nil? + return false if @webhooks_enabled.nil? + true + end + + # Custom attribute writer method with validation + # @param handle [Object] Object to be assigned + # @!visibility private + def handle=(handle) + if handle.nil? + fail ArgumentError, 'invalid value for "handle", handle cannot be nil.' + end + @handle = handle + 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 service_id [Object] Object to be assigned + # @!visibility private + def service_id=(service_id) + if service_id.nil? + fail ArgumentError, 'invalid value for "service_id", service_id cannot be nil.' + end + @service_id = service_id + end + + # Custom attribute writer method with validation + # @param webhooks_enabled [Object] Object to be assigned + # @!visibility private + def webhooks_enabled=(webhooks_enabled) + if webhooks_enabled.nil? + fail ArgumentError, 'invalid value for "webhooks_enabled", webhooks_enabled cannot be nil.' + end + @webhooks_enabled = webhooks_enabled + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + handle == o.handle && + name == o.name && + service_id == o.service_id && + webhooks_enabled == o.webhooks_enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [handle, name, service_id, webhooks_enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_pagerduty_service_type.rb b/lib/datadog_api_client/v2/models/incident_pagerduty_service_type.rb new file mode 100644 index 000000000000..e9f846e04bc8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_pagerduty_service_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # PagerDuty service resource type. + class IncidentPagerdutyServiceType + include BaseEnumModel + + PAGERDUTY_SERVICE = "pagerduty_service".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_pagerduty_services_response.rb b/lib/datadog_api_client/v2/models/incident_pagerduty_services_response.rb new file mode 100644 index 000000000000..c9ac9cd4f5bd --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_pagerduty_services_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a list of PagerDuty services. + class IncidentPagerdutyServicesResponse + include BaseGenericModel + + # List of PagerDuty services. + 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::IncidentPagerdutyServicesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_render_template_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_render_template_data_attributes_request.rb new file mode 100644 index 000000000000..de796361c75e --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_render_template_data_attributes_request.rb @@ -0,0 +1,172 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 rendering a template. + class IncidentRenderTemplateDataAttributesRequest + include BaseGenericModel + + # The template content to render. + attr_reader :content + + # The date-time format to use for rendering. + attr_accessor :datetime_format + + # The timezone to use for rendering. + attr_accessor :timezone + + # Whether to validate links in the rendered template. + attr_accessor :validate_links + + # Whether to validate variables in the template. + attr_accessor :validate_variables + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'content' => :'content', + :'datetime_format' => :'datetime_format', + :'timezone' => :'timezone', + :'validate_links' => :'validate_links', + :'validate_variables' => :'validate_variables' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'content' => :'String', + :'datetime_format' => :'String', + :'timezone' => :'String', + :'validate_links' => :'Boolean', + :'validate_variables' => :'Boolean' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'validate_links', + :'validate_variables', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRenderTemplateDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'content') + self.content = attributes[:'content'] + end + + if attributes.key?(:'datetime_format') + self.datetime_format = attributes[:'datetime_format'] + end + + if attributes.key?(:'timezone') + self.timezone = attributes[:'timezone'] + end + + if attributes.key?(:'validate_links') + self.validate_links = attributes[:'validate_links'] + end + + if attributes.key?(:'validate_variables') + self.validate_variables = attributes[:'validate_variables'] + 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 @content.nil? + true + end + + # Custom attribute writer method with validation + # @param content [Object] Object to be assigned + # @!visibility private + def content=(content) + if content.nil? + fail ArgumentError, 'invalid value for "content", content cannot be nil.' + end + @content = content + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + content == o.content && + datetime_format == o.datetime_format && + timezone == o.timezone && + validate_links == o.validate_links && + validate_variables == o.validate_variables && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [content, datetime_format, timezone, validate_links, validate_variables, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_render_template_data_request.rb b/lib/datadog_api_client/v2/models/incident_render_template_data_request.rb new file mode 100644 index 000000000000..8fba4ec9146f --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_render_template_data_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for rendering a template. + class IncidentRenderTemplateDataRequest + include BaseGenericModel + + # Attributes for rendering a template. + attr_reader :attributes + + # Rendered template 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentRenderTemplateDataAttributesRequest', + :'type' => :'IncidentRenderedTemplateType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRenderTemplateDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_render_template_request.rb b/lib/datadog_api_client/v2/models/incident_render_template_request.rb new file mode 100644 index 000000000000..add8408be4ab --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_render_template_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to render a template. + class IncidentRenderTemplateRequest + include BaseGenericModel + + # Data for rendering a template. + 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' => :'IncidentRenderTemplateDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRenderTemplateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_rendered_template_data.rb b/lib/datadog_api_client/v2/models/incident_rendered_template_data.rb new file mode 100644 index 000000000000..b19b83d7b53f --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_rendered_template_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Rendered template data. + class IncidentRenderedTemplateData + include BaseGenericModel + + # Attributes of a rendered template. + attr_reader :attributes + + # The rendered template identifier. + attr_reader :id + + # Rendered template 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' => :'IncidentRenderedTemplateDataAttributes', + :'id' => :'UUID', + :'type' => :'IncidentRenderedTemplateType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRenderedTemplateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_rendered_template_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_rendered_template_data_attributes.rb new file mode 100644 index 000000000000..e6562c8deb6a --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_rendered_template_data_attributes.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a rendered template. + class IncidentRenderedTemplateDataAttributes + include BaseGenericModel + + # The rendered template content. + attr_reader :rendered_content + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'rendered_content' => :'rendered_content' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'rendered_content' => :'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::IncidentRenderedTemplateDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'rendered_content') + self.rendered_content = attributes[:'rendered_content'] + 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 @rendered_content.nil? + true + end + + # Custom attribute writer method with validation + # @param rendered_content [Object] Object to be assigned + # @!visibility private + def rendered_content=(rendered_content) + if rendered_content.nil? + fail ArgumentError, 'invalid value for "rendered_content", rendered_content cannot be nil.' + end + @rendered_content = rendered_content + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + rendered_content == o.rendered_content && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [rendered_content, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_rendered_template_response.rb b/lib/datadog_api_client/v2/models/incident_rendered_template_response.rb new file mode 100644 index 000000000000..c4a5c57a66a7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_rendered_template_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a rendered template. + class IncidentRenderedTemplateResponse + include BaseGenericModel + + # Rendered template data. + 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' => :'IncidentRenderedTemplateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRenderedTemplateResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_rendered_template_type.rb b/lib/datadog_api_client/v2/models/incident_rendered_template_type.rb new file mode 100644 index 000000000000..d9c026b7b096 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_rendered_template_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Rendered template resource type. + class IncidentRenderedTemplateType + include BaseEnumModel + + RENDERED_TEMPLATES = "rendered_templates".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_reserved_role_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_reserved_role_data_attributes_response.rb new file mode 100644 index 000000000000..6a102d724cd3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_reserved_role_data_attributes_response.rb @@ -0,0 +1,204 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 reserved role. + class IncidentReservedRoleDataAttributesResponse + include BaseGenericModel + + # Timestamp when the role was created. + attr_reader :created + + # A description of the reserved role. + attr_accessor :description + + # Timestamp when the role was last modified. + attr_reader :modified + + # The name of the reserved role. + attr_reader :name + + # Policy for a reserved role. + attr_reader :policy + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created' => :'created', + :'description' => :'description', + :'modified' => :'modified', + :'name' => :'name', + :'policy' => :'policy' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created' => :'Time', + :'description' => :'String', + :'modified' => :'Time', + :'name' => :'String', + :'policy' => :'IncidentReservedRolePolicy' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'description', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentReservedRoleDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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') + self.created = attributes[:'created'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'policy') + self.policy = attributes[:'policy'] + 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.nil? + return false if @modified.nil? + return false if @name.nil? + return false if @policy.nil? + true + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + 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 policy [Object] Object to be assigned + # @!visibility private + def policy=(policy) + if policy.nil? + fail ArgumentError, 'invalid value for "policy", policy cannot be nil.' + end + @policy = policy + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 == o.created && + description == o.description && + modified == o.modified && + name == o.name && + policy == o.policy && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created, description, modified, name, policy, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_reserved_role_data_response.rb b/lib/datadog_api_client/v2/models/incident_reserved_role_data_response.rb new file mode 100644 index 000000000000..af88f1ad80d7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_reserved_role_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reserved role data in a response. + class IncidentReservedRoleDataResponse + include BaseGenericModel + + # Attributes of a reserved role. + attr_reader :attributes + + # The reserved role identifier. + attr_reader :id + + # Incident reserved role 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' => :'IncidentReservedRoleDataAttributesResponse', + :'id' => :'UUID', + :'type' => :'IncidentReservedRoleType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentReservedRoleDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_reserved_role_policy.rb b/lib/datadog_api_client/v2/models/incident_reserved_role_policy.rb new file mode 100644 index 000000000000..bae99187f492 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_reserved_role_policy.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Policy for a reserved role. + class IncidentReservedRolePolicy + include BaseGenericModel + + # Whether this role can only be assigned to a single responder. + attr_reader :is_single + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'is_single' => :'is_single' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'is_single' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentReservedRolePolicy` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'is_single') + self.is_single = attributes[:'is_single'] + 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 @is_single.nil? + true + end + + # Custom attribute writer method with validation + # @param is_single [Object] Object to be assigned + # @!visibility private + def is_single=(is_single) + if is_single.nil? + fail ArgumentError, 'invalid value for "is_single", is_single cannot be nil.' + end + @is_single = is_single + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + is_single == o.is_single && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [is_single, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_reserved_role_response.rb b/lib/datadog_api_client/v2/models/incident_reserved_role_response.rb new file mode 100644 index 000000000000..32fe51a80071 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_reserved_role_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a single reserved role. + class IncidentReservedRoleResponse + include BaseGenericModel + + # Reserved role data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentReservedRoleDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentReservedRoleResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_reserved_role_type.rb b/lib/datadog_api_client/v2/models/incident_reserved_role_type.rb new file mode 100644 index 000000000000..aa748e28f7a7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_reserved_role_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident reserved role resource type. + class IncidentReservedRoleType + include BaseEnumModel + + INCIDENT_RESERVED_ROLES = "incident_reserved_roles".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_reserved_roles_response.rb b/lib/datadog_api_client/v2/models/incident_reserved_roles_response.rb new file mode 100644 index 000000000000..6521cbaeb65a --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_reserved_roles_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a list of reserved roles. + class IncidentReservedRolesResponse + include BaseGenericModel + + # List of reserved roles. + 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::IncidentReservedRolesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_role_assignment_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_data_attributes_request.rb new file mode 100644 index 000000000000..48fbf24498f1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_data_attributes_request.rb @@ -0,0 +1,113 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 creating a role assignment. + class IncidentRoleAssignmentDataAttributesRequest + include BaseGenericModel + + # The name of the role to assign. + attr_accessor :role + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'role' => :'role' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'role' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'role', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRoleAssignmentDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'role') + self.role = attributes[:'role'] + 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 && + role == o.role && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [role, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_role_assignment_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_data_attributes_response.rb new file mode 100644 index 000000000000..ad9bce3ae003 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_data_attributes_response.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an incident role assignment. + class IncidentRoleAssignmentDataAttributesResponse + include BaseGenericModel + + # Timestamp when the role assignment was created. + attr_reader :created + + # Timestamp when the role assignment was last modified. + attr_reader :modified + + # The type of the responder. + attr_reader :responder_type + + # The name of the assigned role. + attr_reader :role + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created' => :'created', + :'modified' => :'modified', + :'responder_type' => :'responder_type', + :'role' => :'role' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created' => :'Time', + :'modified' => :'Time', + :'responder_type' => :'String', + :'role' => :'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::IncidentRoleAssignmentDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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') + self.created = attributes[:'created'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'responder_type') + self.responder_type = attributes[:'responder_type'] + end + + if attributes.key?(:'role') + self.role = attributes[:'role'] + 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.nil? + return false if @modified.nil? + return false if @responder_type.nil? + return false if @role.nil? + true + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Custom attribute writer method with validation + # @param responder_type [Object] Object to be assigned + # @!visibility private + def responder_type=(responder_type) + if responder_type.nil? + fail ArgumentError, 'invalid value for "responder_type", responder_type cannot be nil.' + end + @responder_type = responder_type + end + + # Custom attribute writer method with validation + # @param role [Object] Object to be assigned + # @!visibility private + def role=(role) + if role.nil? + fail ArgumentError, 'invalid value for "role", role cannot be nil.' + end + @role = role + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 == o.created && + modified == o.modified && + responder_type == o.responder_type && + role == o.role && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created, modified, responder_type, role, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_role_assignment_data_request.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_data_request.rb new file mode 100644 index 000000000000..b532670ca07d --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_data_request.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Role assignment data for a request. + class IncidentRoleAssignmentDataRequest + include BaseGenericModel + + # Attributes for creating a role assignment. + attr_accessor :attributes + + # Relationships for creating a role assignment. + attr_reader :relationships + + # Incident role assignment 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', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentRoleAssignmentDataAttributesRequest', + :'relationships' => :'IncidentRoleAssignmentRelationshipsRequest', + :'type' => :'IncidentRoleAssignmentType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRoleAssignmentDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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?(:'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 @relationships.nil? + return false if @type.nil? + true + 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 && + attributes == o.attributes && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_role_assignment_data_response.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_data_response.rb new file mode 100644 index 000000000000..6e593afebf0a --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_data_response.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Role assignment data in a response. + class IncidentRoleAssignmentDataResponse + include BaseGenericModel + + # Attributes of an incident role assignment. + attr_reader :attributes + + # The role assignment identifier. + attr_reader :id + + # Relationships of a role assignment. + attr_accessor :relationships + + # Incident role assignment 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', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentRoleAssignmentDataAttributesResponse', + :'id' => :'UUID', + :'relationships' => :'IncidentRoleAssignmentRelationshipsResponse', + :'type' => :'IncidentRoleAssignmentType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRoleAssignmentDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_role_assignment_relationships_request.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_relationships_request.rb new file mode 100644 index 000000000000..c6f82ed6ff5d --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_relationships_request.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 creating a role assignment. + class IncidentRoleAssignmentRelationshipsRequest + include BaseGenericModel + + # Relationship to a role. + attr_accessor :reserved_role + + # Relationship to a responder. + attr_reader :responder + + # Relationship to a role. + attr_accessor :user_defined_role + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'reserved_role' => :'reserved_role', + :'responder' => :'responder', + :'user_defined_role' => :'user_defined_role' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'reserved_role' => :'IncidentRoleAssignmentRoleRelationship', + :'responder' => :'IncidentRoleAssignmentResponderRelationship', + :'user_defined_role' => :'IncidentRoleAssignmentRoleRelationship' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRoleAssignmentRelationshipsRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'reserved_role') + self.reserved_role = attributes[:'reserved_role'] + end + + if attributes.key?(:'responder') + self.responder = attributes[:'responder'] + end + + if attributes.key?(:'user_defined_role') + self.user_defined_role = attributes[:'user_defined_role'] + 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 @responder.nil? + true + end + + # Custom attribute writer method with validation + # @param responder [Object] Object to be assigned + # @!visibility private + def responder=(responder) + if responder.nil? + fail ArgumentError, 'invalid value for "responder", responder cannot be nil.' + end + @responder = responder + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reserved_role == o.reserved_role && + responder == o.responder && + user_defined_role == o.user_defined_role && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [reserved_role, responder, user_defined_role, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_role_assignment_relationships_response.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_relationships_response.rb new file mode 100644 index 000000000000..04436335b81f --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_relationships_response.rb @@ -0,0 +1,163 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 of a role assignment. + class IncidentRoleAssignmentRelationshipsResponse + include BaseGenericModel + + # Relationship to a responder. + attr_accessor :created_by_user + + # Relationship to a responder. + attr_accessor :last_modified_by_user + + # Relationship to a role. + attr_accessor :reserved_role + + # Relationship to a responder. + attr_reader :responder + + # Relationship to a role. + attr_accessor :user_defined_role + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_by_user' => :'created_by_user', + :'last_modified_by_user' => :'last_modified_by_user', + :'reserved_role' => :'reserved_role', + :'responder' => :'responder', + :'user_defined_role' => :'user_defined_role' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_by_user' => :'IncidentRoleAssignmentResponderRelationship', + :'last_modified_by_user' => :'IncidentRoleAssignmentResponderRelationship', + :'reserved_role' => :'IncidentRoleAssignmentRoleRelationship', + :'responder' => :'IncidentRoleAssignmentResponderRelationship', + :'user_defined_role' => :'IncidentRoleAssignmentRoleRelationship' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRoleAssignmentRelationshipsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_user') + self.created_by_user = attributes[:'created_by_user'] + end + + if attributes.key?(:'last_modified_by_user') + self.last_modified_by_user = attributes[:'last_modified_by_user'] + end + + if attributes.key?(:'reserved_role') + self.reserved_role = attributes[:'reserved_role'] + end + + if attributes.key?(:'responder') + self.responder = attributes[:'responder'] + end + + if attributes.key?(:'user_defined_role') + self.user_defined_role = attributes[:'user_defined_role'] + 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 @responder.nil? + true + end + + # Custom attribute writer method with validation + # @param responder [Object] Object to be assigned + # @!visibility private + def responder=(responder) + if responder.nil? + fail ArgumentError, 'invalid value for "responder", responder cannot be nil.' + end + @responder = responder + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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_user == o.created_by_user && + last_modified_by_user == o.last_modified_by_user && + reserved_role == o.reserved_role && + responder == o.responder && + user_defined_role == o.user_defined_role && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_by_user, last_modified_by_user, reserved_role, responder, user_defined_role, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_role_assignment_request.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_request.rb new file mode 100644 index 000000000000..8e4bb999f8f9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create a role assignment. + class IncidentRoleAssignmentRequest + include BaseGenericModel + + # Role assignment data for a request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentRoleAssignmentDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRoleAssignmentRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_role_assignment_responder_relationship.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_responder_relationship.rb new file mode 100644 index 000000000000..afb64205ae70 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_responder_relationship.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationship to a responder. + class IncidentRoleAssignmentResponderRelationship + include BaseGenericModel + + # Responder relationship data. + 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' => :'IncidentRoleAssignmentResponderRelationshipData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRoleAssignmentResponderRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_role_assignment_responder_relationship_data.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_responder_relationship_data.rb new file mode 100644 index 000000000000..70298f6fa30b --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_responder_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Responder relationship data. + class IncidentRoleAssignmentResponderRelationshipData + include BaseGenericModel + + # The responder identifier. + attr_reader :id + + # The responder 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 + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'UUID', + :'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::IncidentRoleAssignmentResponderRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_role_assignment_response.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_response.rb new file mode 100644 index 000000000000..fae2cc7b1795 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a single role assignment. + class IncidentRoleAssignmentResponse + include BaseGenericModel + + # Role assignment data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentRoleAssignmentDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRoleAssignmentResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_role_assignment_role_relationship.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_role_relationship.rb new file mode 100644 index 000000000000..4832e7e4b0b0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_role_relationship.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationship to a role. + class IncidentRoleAssignmentRoleRelationship + include BaseGenericModel + + # Role relationship data. + attr_accessor :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' => :'IncidentRoleAssignmentRoleRelationshipData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRoleAssignmentRoleRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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 + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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/incident_role_assignment_role_relationship_data.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_role_relationship_data.rb new file mode 100644 index 000000000000..8f8f63a8b6b7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_role_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Role relationship data. + class IncidentRoleAssignmentRoleRelationshipData + include BaseGenericModel + + # The role identifier. + attr_reader :id + + # The role 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 + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'UUID', + :'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::IncidentRoleAssignmentRoleRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_role_assignment_type.rb b/lib/datadog_api_client/v2/models/incident_role_assignment_type.rb new file mode 100644 index 000000000000..7fa53f027c39 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_role_assignment_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident role assignment resource type. + class IncidentRoleAssignmentType + include BaseEnumModel + + INCIDENT_ROLE_ASSIGNMENTS = "incident_role_assignments".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_rule_execution_state_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_rule_execution_state_data_attributes_response.rb new file mode 100644 index 000000000000..7f0c9cc21ea6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_rule_execution_state_data_attributes_response.rb @@ -0,0 +1,204 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an incident rule execution state. + class IncidentRuleExecutionStateDataAttributesResponse + include BaseGenericModel + + # Timestamp when the state was created. + attr_reader :created + + # The incident identifier. + attr_reader :incident_uuid + + # Timestamp of the last rule execution. + attr_accessor :last_executed_at + + # Timestamp when the state was last modified. + attr_reader :modified + + # The rule identifier. + attr_reader :rule_uuid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created' => :'created', + :'incident_uuid' => :'incident_uuid', + :'last_executed_at' => :'last_executed_at', + :'modified' => :'modified', + :'rule_uuid' => :'rule_uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created' => :'Time', + :'incident_uuid' => :'UUID', + :'last_executed_at' => :'Time', + :'modified' => :'Time', + :'rule_uuid' => :'UUID' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'last_executed_at', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRuleExecutionStateDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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') + self.created = attributes[:'created'] + end + + if attributes.key?(:'incident_uuid') + self.incident_uuid = attributes[:'incident_uuid'] + end + + if attributes.key?(:'last_executed_at') + self.last_executed_at = attributes[:'last_executed_at'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'rule_uuid') + self.rule_uuid = attributes[:'rule_uuid'] + 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.nil? + return false if @incident_uuid.nil? + return false if @modified.nil? + return false if @rule_uuid.nil? + true + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param incident_uuid [Object] Object to be assigned + # @!visibility private + def incident_uuid=(incident_uuid) + if incident_uuid.nil? + fail ArgumentError, 'invalid value for "incident_uuid", incident_uuid cannot be nil.' + end + @incident_uuid = incident_uuid + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Custom attribute writer method with validation + # @param rule_uuid [Object] Object to be assigned + # @!visibility private + def rule_uuid=(rule_uuid) + if rule_uuid.nil? + fail ArgumentError, 'invalid value for "rule_uuid", rule_uuid cannot be nil.' + end + @rule_uuid = rule_uuid + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 == o.created && + incident_uuid == o.incident_uuid && + last_executed_at == o.last_executed_at && + modified == o.modified && + rule_uuid == o.rule_uuid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created, incident_uuid, last_executed_at, modified, rule_uuid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_rule_execution_state_data_response.rb b/lib/datadog_api_client/v2/models/incident_rule_execution_state_data_response.rb new file mode 100644 index 000000000000..5be9f4673100 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_rule_execution_state_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Rule execution state data in a response. + class IncidentRuleExecutionStateDataResponse + include BaseGenericModel + + # Attributes of an incident rule execution state. + attr_reader :attributes + + # The rule execution state identifier. + attr_reader :id + + # Incident rule execution state 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' => :'IncidentRuleExecutionStateDataAttributesResponse', + :'id' => :'UUID', + :'type' => :'IncidentRuleExecutionStateType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRuleExecutionStateDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_rule_execution_state_rule.rb b/lib/datadog_api_client/v2/models/incident_rule_execution_state_rule.rb new file mode 100644 index 000000000000..b1e6a31063fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_rule_execution_state_rule.rb @@ -0,0 +1,141 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 rule in a batch request. + class IncidentRuleExecutionStateRule + include BaseGenericModel + + # Timestamp of the last rule execution. + attr_accessor :last_executed_at + + # The rule identifier. + attr_reader :rule_uuid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'last_executed_at' => :'last_executed_at', + :'rule_uuid' => :'rule_uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'last_executed_at' => :'Time', + :'rule_uuid' => :'UUID' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'last_executed_at', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentRuleExecutionStateRule` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'last_executed_at') + self.last_executed_at = attributes[:'last_executed_at'] + end + + if attributes.key?(:'rule_uuid') + self.rule_uuid = attributes[:'rule_uuid'] + 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 @rule_uuid.nil? + true + end + + # Custom attribute writer method with validation + # @param rule_uuid [Object] Object to be assigned + # @!visibility private + def rule_uuid=(rule_uuid) + if rule_uuid.nil? + fail ArgumentError, 'invalid value for "rule_uuid", rule_uuid cannot be nil.' + end + @rule_uuid = rule_uuid + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + last_executed_at == o.last_executed_at && + rule_uuid == o.rule_uuid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [last_executed_at, rule_uuid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_rule_execution_state_type.rb b/lib/datadog_api_client/v2/models/incident_rule_execution_state_type.rb new file mode 100644 index 000000000000..24ff4ac916de --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_rule_execution_state_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident rule execution state resource type. + class IncidentRuleExecutionStateType + include BaseEnumModel + + INCIDENT_RULE_EXECUTION_STATES = "incident_rule_execution_states".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_rule_execution_states_response.rb b/lib/datadog_api_client/v2/models/incident_rule_execution_states_response.rb new file mode 100644 index 000000000000..2dc6199a2fc7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_rule_execution_states_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a list of rule execution states. + class IncidentRuleExecutionStatesResponse + include BaseGenericModel + + # List of rule execution states. + 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::IncidentRuleExecutionStatesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_search_incidents_export_request.rb b/lib/datadog_api_client/v2/models/incident_search_incidents_export_request.rb new file mode 100644 index 000000000000..c4d26f4ff5d4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_search_incidents_export_request.rb @@ -0,0 +1,146 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to export incidents as CSV. + class IncidentSearchIncidentsExportRequest + include BaseGenericModel + + # The list of fields to include in the export. + attr_reader :fields + + # The search query to filter incidents for export. + attr_reader :query + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'fields' => :'fields', + :'query' => :'query' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'fields' => :'Array', + :'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::IncidentSearchIncidentsExportRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'fields') + if (value = attributes[:'fields']).is_a?(Array) + self.fields = value + end + 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 @fields.nil? + return false if @query.nil? + true + end + + # Custom attribute writer method with validation + # @param fields [Object] Object to be assigned + # @!visibility private + def fields=(fields) + if fields.nil? + fail ArgumentError, 'invalid value for "fields", fields cannot be nil.' + end + @fields = fields + 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 && + fields == o.fields && + query == o.query && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [fields, query, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_search_incidents_include_type.rb b/lib/datadog_api_client/v2/models/incident_search_incidents_include_type.rb new file mode 100644 index 000000000000..07c32cdb977a --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_search_incidents_include_type.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Types of related objects to include. + class IncidentSearchIncidentsIncludeType + include BaseEnumModel + + INCIDENT_TYPE = "incident_type".freeze + IMPACTS = "impacts".freeze + USERS = "users".freeze + RESPONDERS = "responders".freeze + INTEGRATIONS = "integrations".freeze + ATTACHMENTS = "attachments".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_search_incidents_sort_order.rb b/lib/datadog_api_client/v2/models/incident_search_incidents_sort_order.rb new file mode 100644 index 000000000000..c2f16db23d0e --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_search_incidents_sort_order.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The ways searched incidents can be sorted. + class IncidentSearchIncidentsSortOrder + include BaseEnumModel + + CREATED_ASCENDING = "created".freeze + CREATED_DESCENDING = "-created".freeze + MODIFIED_ASCENDING = "modified".freeze + MODIFIED_DESCENDING = "-modified".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_status_page_notice_create_data.rb b/lib/datadog_api_client/v2/models/incident_status_page_notice_create_data.rb new file mode 100644 index 000000000000..95de5e0c0a31 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_page_notice_create_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for publishing a status page notice. + class IncidentStatusPageNoticeCreateData + include BaseGenericModel + + # Attributes for publishing a status page notice. + attr_reader :attributes + + # Incident integration 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentStatusPageNoticeCreateDataAttributes', + :'type' => :'IncidentStatusPageNoticeIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatusPageNoticeCreateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_status_page_notice_create_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_status_page_notice_create_data_attributes.rb new file mode 100644 index 000000000000..d13d97786cef --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_page_notice_create_data_attributes.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for publishing a status page notice. + class IncidentStatusPageNoticeCreateDataAttributes + include BaseGenericModel + + # Map of component identifiers to their status. + attr_accessor :components + + # The message body of the notice. + attr_accessor :message + + # The status of the notice. + attr_accessor :status + + # The title of the notice. + attr_accessor :title + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components' => :'components', + :'message' => :'message', + :'status' => :'status', + :'title' => :'title' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components' => :'Hash', + :'message' => :'String', + :'status' => :'String', + :'title' => :'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::IncidentStatusPageNoticeCreateDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components') + self.components = attributes[:'components'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + 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 && + components == o.components && + message == o.message && + status == o.status && + title == o.title && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components, message, status, title, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_status_page_notice_create_request.rb b/lib/datadog_api_client/v2/models/incident_status_page_notice_create_request.rb new file mode 100644 index 000000000000..482dd8bc7a1b --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_page_notice_create_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to publish a status page notice. + class IncidentStatusPageNoticeCreateRequest + include BaseGenericModel + + # Data for publishing a status page notice. + 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' => :'IncidentStatusPageNoticeCreateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatusPageNoticeCreateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_status_page_notice_integration_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_status_page_notice_integration_data_attributes.rb new file mode 100644 index 000000000000..84ec32fd01ca --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_page_notice_integration_data_attributes.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a status page notice integration. + class IncidentStatusPageNoticeIntegrationDataAttributes + include BaseGenericModel + + # Timestamp when the integration was created. + attr_reader :created + + # The type of integration. + attr_reader :integration_type + + # Timestamp when the integration was last modified. + attr_reader :modified + + # The status of the integration. + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created' => :'created', + :'integration_type' => :'integration_type', + :'modified' => :'modified', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created' => :'Time', + :'integration_type' => :'String', + :'modified' => :'Time', + :'status' => :'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::IncidentStatusPageNoticeIntegrationDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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') + self.created = attributes[:'created'] + end + + if attributes.key?(:'integration_type') + self.integration_type = attributes[:'integration_type'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + 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.nil? + return false if @integration_type.nil? + return false if @modified.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param integration_type [Object] Object to be assigned + # @!visibility private + def integration_type=(integration_type) + if integration_type.nil? + fail ArgumentError, 'invalid value for "integration_type", integration_type cannot be nil.' + end + @integration_type = integration_type + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 == o.created && + integration_type == o.integration_type && + modified == o.modified && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created, integration_type, modified, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_status_page_notice_integration_data_response.rb b/lib/datadog_api_client/v2/models/incident_status_page_notice_integration_data_response.rb new file mode 100644 index 000000000000..74d64ab64525 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_page_notice_integration_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Status page notice integration data in a response. + class IncidentStatusPageNoticeIntegrationDataResponse + include BaseGenericModel + + # Attributes of a status page notice integration. + attr_reader :attributes + + # The integration identifier. + attr_reader :id + + # Incident integration 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' => :'IncidentStatusPageNoticeIntegrationDataAttributes', + :'id' => :'UUID', + :'type' => :'IncidentStatusPageNoticeIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatusPageNoticeIntegrationDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_status_page_notice_integration_response.rb b/lib/datadog_api_client/v2/models/incident_status_page_notice_integration_response.rb new file mode 100644 index 000000000000..bc1adbd76a72 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_page_notice_integration_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with status page notice integration metadata. + class IncidentStatusPageNoticeIntegrationResponse + include BaseGenericModel + + # Status page notice integration data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentStatusPageNoticeIntegrationDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatusPageNoticeIntegrationResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_status_page_notice_integration_type.rb b/lib/datadog_api_client/v2/models/incident_status_page_notice_integration_type.rb new file mode 100644 index 000000000000..a760a28f3182 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_page_notice_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident integration resource type. + class IncidentStatusPageNoticeIntegrationType + include BaseEnumModel + + INCIDENT_INTEGRATIONS = "incident_integrations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_status_page_notice_update_data.rb b/lib/datadog_api_client/v2/models/incident_status_page_notice_update_data.rb new file mode 100644 index 000000000000..9e3826638a51 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_page_notice_update_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for updating a status page notice. + class IncidentStatusPageNoticeUpdateData + include BaseGenericModel + + # Attributes for updating a status page notice. + attr_reader :attributes + + # Incident integration 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentStatusPageNoticeUpdateDataAttributes', + :'type' => :'IncidentStatusPageNoticeIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatusPageNoticeUpdateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_status_page_notice_update_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_status_page_notice_update_data_attributes.rb new file mode 100644 index 000000000000..9a4f7e2382f6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_page_notice_update_data_attributes.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for updating a status page notice. + class IncidentStatusPageNoticeUpdateDataAttributes + include BaseGenericModel + + # Map of component identifiers to their status. + attr_accessor :components + + # The message body of the notice. + attr_accessor :message + + # The status of the notice. + attr_accessor :status + + # The title of the notice. + attr_accessor :title + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'components' => :'components', + :'message' => :'message', + :'status' => :'status', + :'title' => :'title' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'components' => :'Hash', + :'message' => :'String', + :'status' => :'String', + :'title' => :'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::IncidentStatusPageNoticeUpdateDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'components') + self.components = attributes[:'components'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + 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 && + components == o.components && + message == o.message && + status == o.status && + title == o.title && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [components, message, status, title, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_status_page_notice_update_request.rb b/lib/datadog_api_client/v2/models/incident_status_page_notice_update_request.rb new file mode 100644 index 000000000000..8d87236061c6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_page_notice_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to update a status page notice. + class IncidentStatusPageNoticeUpdateRequest + include BaseGenericModel + + # Data for updating a status page notice. + 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' => :'IncidentStatusPageNoticeUpdateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatusPageNoticeUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_status_pages_suggestion_data.rb b/lib/datadog_api_client/v2/models/incident_status_pages_suggestion_data.rb new file mode 100644 index 000000000000..b4ed93eb2e5b --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_pages_suggestion_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Status pages suggestion data. + class IncidentStatusPagesSuggestionData + include BaseGenericModel + + # Attributes of a status pages suggestion. + attr_reader :attributes + + # The suggestion title. + attr_reader :id + + # Incident status pages suggestion 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' => :'IncidentStatusPagesSuggestionDataAttributes', + :'id' => :'String', + :'type' => :'IncidentStatusPagesSuggestionType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatusPagesSuggestionData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_status_pages_suggestion_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_status_pages_suggestion_data_attributes.rb new file mode 100644 index 000000000000..d2b4298d44ff --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_pages_suggestion_data_attributes.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a status pages suggestion. + class IncidentStatusPagesSuggestionDataAttributes + include BaseGenericModel + + # The suggested status for the status page. + attr_reader :status + + # The suggested update text for the status page notice. + attr_reader :update_text + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'status' => :'status', + :'update_text' => :'update_text' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'status' => :'String', + :'update_text' => :'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::IncidentStatusPagesSuggestionDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'update_text') + self.update_text = attributes[:'update_text'] + 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 @status.nil? + return false if @update_text.nil? + true + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Custom attribute writer method with validation + # @param update_text [Object] Object to be assigned + # @!visibility private + def update_text=(update_text) + if update_text.nil? + fail ArgumentError, 'invalid value for "update_text", update_text cannot be nil.' + end + @update_text = update_text + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + status == o.status && + update_text == o.update_text && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [status, update_text, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_status_pages_suggestion_response.rb b/lib/datadog_api_client/v2/models/incident_status_pages_suggestion_response.rb new file mode 100644 index 000000000000..88e1b904a484 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_pages_suggestion_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a status pages suggestion. + class IncidentStatusPagesSuggestionResponse + include BaseGenericModel + + # Status pages suggestion data. + 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' => :'IncidentStatusPagesSuggestionData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatusPagesSuggestionResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_status_pages_suggestion_type.rb b/lib/datadog_api_client/v2/models/incident_status_pages_suggestion_type.rb new file mode 100644 index 000000000000..fcfdda6bcf0b --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_status_pages_suggestion_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident status pages suggestion resource type. + class IncidentStatusPagesSuggestionType + include BaseEnumModel + + INCIDENT_STATUSPAGES_SUGGESTION = "incident_statuspages_suggestion".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_attributes_request.rb new file mode 100644 index 000000000000..36cfffc6a788 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_attributes_request.rb @@ -0,0 +1,177 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 creating or updating a Statuspage incident. + class IncidentStatuspageIncidentDataAttributesRequest + include BaseGenericModel + + # The body text of the Statuspage incident. + attr_accessor :body + + # Map of component identifiers to their status. + attr_accessor :components + + # Whether to deliver notifications. + attr_accessor :deliver_notifications + + # The impact level of the incident. + attr_accessor :impact + + # The name of the Statuspage incident. + attr_accessor :name + + # The Statuspage page identifier. + attr_accessor :page_id + + # The status of the Statuspage incident. + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'body' => :'body', + :'components' => :'components', + :'deliver_notifications' => :'deliver_notifications', + :'impact' => :'impact', + :'name' => :'name', + :'page_id' => :'page_id', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'body' => :'String', + :'components' => :'Hash', + :'deliver_notifications' => :'Boolean', + :'impact' => :'String', + :'name' => :'String', + :'page_id' => :'String', + :'status' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'body', + :'deliver_notifications', + :'impact', + :'name', + :'status', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspageIncidentDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'body') + self.body = attributes[:'body'] + end + + if attributes.key?(:'components') + self.components = attributes[:'components'] + end + + if attributes.key?(:'deliver_notifications') + self.deliver_notifications = attributes[:'deliver_notifications'] + end + + if attributes.key?(:'impact') + self.impact = attributes[:'impact'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'page_id') + self.page_id = attributes[:'page_id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + 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 && + body == o.body && + components == o.components && + deliver_notifications == o.deliver_notifications && + impact == o.impact && + name == o.name && + page_id == o.page_id && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [body, components, deliver_notifications, impact, name, page_id, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_attributes_response.rb new file mode 100644 index 000000000000..8670a65ad1c0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_attributes_response.rb @@ -0,0 +1,198 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 Statuspage incident integration. + class IncidentStatuspageIncidentDataAttributesResponse + include BaseGenericModel + + # Timestamp when the integration was created. + attr_reader :created + + # List of Statuspage incidents. + attr_accessor :incidents + + # The type of integration. + attr_reader :integration_type + + # Timestamp when the integration was last modified. + attr_reader :modified + + # The status of the integration. + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created' => :'created', + :'incidents' => :'incidents', + :'integration_type' => :'integration_type', + :'modified' => :'modified', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created' => :'Time', + :'incidents' => :'Array', + :'integration_type' => :'String', + :'modified' => :'Time', + :'status' => :'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::IncidentStatuspageIncidentDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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') + self.created = attributes[:'created'] + end + + if attributes.key?(:'incidents') + if (value = attributes[:'incidents']).is_a?(Array) + self.incidents = value + end + end + + if attributes.key?(:'integration_type') + self.integration_type = attributes[:'integration_type'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + 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.nil? + return false if @integration_type.nil? + return false if @modified.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param integration_type [Object] Object to be assigned + # @!visibility private + def integration_type=(integration_type) + if integration_type.nil? + fail ArgumentError, 'invalid value for "integration_type", integration_type cannot be nil.' + end + @integration_type = integration_type + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 == o.created && + incidents == o.incidents && + integration_type == o.integration_type && + modified == o.modified && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created, incidents, integration_type, modified, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_request.rb b/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_request.rb new file mode 100644 index 000000000000..7deae33f28e0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Statuspage incident data for a request. + class IncidentStatuspageIncidentDataRequest + include BaseGenericModel + + # Attributes for creating or updating a Statuspage incident. + attr_reader :attributes + + # Statuspage incident integration 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentStatuspageIncidentDataAttributesRequest', + :'type' => :'IncidentStatuspageIncidentType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspageIncidentDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_statuspage_incident_data_response.rb b/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_response.rb new file mode 100644 index 000000000000..d7fa944a0a61 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_incident_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Statuspage incident data in a response. + class IncidentStatuspageIncidentDataResponse + include BaseGenericModel + + # Attributes of a Statuspage incident integration. + attr_reader :attributes + + # The integration identifier. + attr_reader :id + + # Statuspage incident integration 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' => :'IncidentStatuspageIncidentDataAttributesResponse', + :'id' => :'UUID', + :'type' => :'IncidentStatuspageIncidentType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspageIncidentDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_statuspage_incident_entry.rb b/lib/datadog_api_client/v2/models/incident_statuspage_incident_entry.rb new file mode 100644 index 000000000000..1af9713cb29c --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_incident_entry.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 Statuspage incident entry. + class IncidentStatuspageIncidentEntry + include BaseGenericModel + + # The Datadog incident identifier. + attr_reader :incident_id + + # The Statuspage page identifier. + attr_reader :page_id + + # The URL of the Statuspage incident. + attr_accessor :redirect_url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'incident_id' => :'incident_id', + :'page_id' => :'page_id', + :'redirect_url' => :'redirect_url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'incident_id' => :'String', + :'page_id' => :'String', + :'redirect_url' => :'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::IncidentStatuspageIncidentEntry` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'incident_id') + self.incident_id = attributes[:'incident_id'] + end + + if attributes.key?(:'page_id') + self.page_id = attributes[:'page_id'] + end + + if attributes.key?(:'redirect_url') + self.redirect_url = attributes[:'redirect_url'] + 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 @incident_id.nil? + return false if @page_id.nil? + true + end + + # Custom attribute writer method with validation + # @param incident_id [Object] Object to be assigned + # @!visibility private + def incident_id=(incident_id) + if incident_id.nil? + fail ArgumentError, 'invalid value for "incident_id", incident_id cannot be nil.' + end + @incident_id = incident_id + end + + # Custom attribute writer method with validation + # @param page_id [Object] Object to be assigned + # @!visibility private + def page_id=(page_id) + if page_id.nil? + fail ArgumentError, 'invalid value for "page_id", page_id cannot be nil.' + end + @page_id = page_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + incident_id == o.incident_id && + page_id == o.page_id && + redirect_url == o.redirect_url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [incident_id, page_id, redirect_url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_statuspage_incident_request.rb b/lib/datadog_api_client/v2/models/incident_statuspage_incident_request.rb new file mode 100644 index 000000000000..43bed356ae9b --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_incident_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create or update a Statuspage incident. + class IncidentStatuspageIncidentRequest + include BaseGenericModel + + # Statuspage incident data for a request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentStatuspageIncidentDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspageIncidentRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_statuspage_incident_response.rb b/lib/datadog_api_client/v2/models/incident_statuspage_incident_response.rb new file mode 100644 index 000000000000..b13319e42750 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_incident_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with Statuspage incident integration metadata. + class IncidentStatuspageIncidentResponse + include BaseGenericModel + + # Statuspage incident data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentStatuspageIncidentDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspageIncidentResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_statuspage_incident_type.rb b/lib/datadog_api_client/v2/models/incident_statuspage_incident_type.rb new file mode 100644 index 000000000000..4516a44de91f --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_incident_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Statuspage incident integration resource type. + class IncidentStatuspageIncidentType + include BaseEnumModel + + INCIDENT_INTEGRATIONS = "incident_integrations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_statuspage_preferences_data.rb b/lib/datadog_api_client/v2/models/incident_statuspage_preferences_data.rb new file mode 100644 index 000000000000..3f2b66153fbb --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_preferences_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Subscription preferences data. + class IncidentStatuspagePreferencesData + include BaseGenericModel + + # Attributes of subscription preferences. + attr_reader :attributes + + # The preferences identifier. + attr_reader :id + + # Subscription preferences 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' => :'IncidentStatuspagePreferencesDataAttributes', + :'id' => :'String', + :'type' => :'IncidentStatuspagePreferencesType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspagePreferencesData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_statuspage_preferences_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_statuspage_preferences_data_attributes.rb new file mode 100644 index 000000000000..7fe91df4f139 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_preferences_data_attributes.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of subscription preferences. + class IncidentStatuspagePreferencesDataAttributes + include BaseGenericModel + + # Whether the user is subscribed. + attr_reader :subscribed + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'subscribed' => :'subscribed' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'subscribed' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspagePreferencesDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'subscribed') + self.subscribed = attributes[:'subscribed'] + 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 @subscribed.nil? + true + end + + # Custom attribute writer method with validation + # @param subscribed [Object] Object to be assigned + # @!visibility private + def subscribed=(subscribed) + if subscribed.nil? + fail ArgumentError, 'invalid value for "subscribed", subscribed cannot be nil.' + end + @subscribed = subscribed + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + subscribed == o.subscribed && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [subscribed, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_statuspage_preferences_response.rb b/lib/datadog_api_client/v2/models/incident_statuspage_preferences_response.rb new file mode 100644 index 000000000000..a50770bb0712 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_preferences_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with subscription preferences. + class IncidentStatuspagePreferencesResponse + include BaseGenericModel + + # Subscription preferences data. + 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' => :'IncidentStatuspagePreferencesData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspagePreferencesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_statuspage_preferences_type.rb b/lib/datadog_api_client/v2/models/incident_statuspage_preferences_type.rb new file mode 100644 index 000000000000..1ef8c6e9f60a --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_preferences_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Subscription preferences resource type. + class IncidentStatuspagePreferencesType + include BaseEnumModel + + STATUSPAGE_SUBSCRIPTION_PREFERENCES = "statuspage_subscription_preferences".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_attributes_request.rb new file mode 100644 index 000000000000..4e2aea144eff --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_attributes_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating an email subscription. + class IncidentStatuspageSubscriptionDataAttributesRequest + include BaseGenericModel + + # The email address to subscribe. + attr_reader :email + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'email' => :'email' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'email' => :'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::IncidentStatuspageSubscriptionDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'email') + self.email = attributes[:'email'] + 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 @email.nil? + true + end + + # Custom attribute writer method with validation + # @param email [Object] Object to be assigned + # @!visibility private + def email=(email) + if email.nil? + fail ArgumentError, 'invalid value for "email", email cannot be nil.' + end + @email = email + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + email == o.email && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [email, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_attributes_response.rb new file mode 100644 index 000000000000..bd9df9130d42 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_attributes_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an email subscription. + class IncidentStatuspageSubscriptionDataAttributesResponse + include BaseGenericModel + + # Whether the subscription has been confirmed. + attr_reader :confirmed + + # Timestamp when the subscription was created. + attr_reader :created_at + + # The subscribed email address. + attr_reader :email + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'confirmed' => :'confirmed', + :'created_at' => :'created_at', + :'email' => :'email' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'confirmed' => :'Boolean', + :'created_at' => :'Time', + :'email' => :'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::IncidentStatuspageSubscriptionDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'confirmed') + self.confirmed = attributes[:'confirmed'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + 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 @confirmed.nil? + return false if @created_at.nil? + return false if @email.nil? + true + end + + # Custom attribute writer method with validation + # @param confirmed [Object] Object to be assigned + # @!visibility private + def confirmed=(confirmed) + if confirmed.nil? + fail ArgumentError, 'invalid value for "confirmed", confirmed cannot be nil.' + end + @confirmed = confirmed + 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 email [Object] Object to be assigned + # @!visibility private + def email=(email) + if email.nil? + fail ArgumentError, 'invalid value for "email", email cannot be nil.' + end + @email = email + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + confirmed == o.confirmed && + created_at == o.created_at && + email == o.email && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [confirmed, created_at, email, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_request.rb b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_request.rb new file mode 100644 index 000000000000..4fd81fddbfd5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Subscription data for a request. + class IncidentStatuspageSubscriptionDataRequest + include BaseGenericModel + + # Attributes for creating an email subscription. + attr_reader :attributes + + # Statuspage email subscription 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentStatuspageSubscriptionDataAttributesRequest', + :'type' => :'IncidentStatuspageSubscriptionType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspageSubscriptionDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_statuspage_subscription_data_response.rb b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_response.rb new file mode 100644 index 000000000000..3db6a461cf3e --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Email subscription data in a response. + class IncidentStatuspageSubscriptionDataResponse + include BaseGenericModel + + # Attributes of an email subscription. + attr_reader :attributes + + # The subscription identifier. + attr_reader :id + + # Statuspage email subscription 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' => :'IncidentStatuspageSubscriptionDataAttributesResponse', + :'id' => :'String', + :'type' => :'IncidentStatuspageSubscriptionType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspageSubscriptionDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_statuspage_subscription_request.rb b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_request.rb new file mode 100644 index 000000000000..6955326c6c5b --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create an email subscription. + class IncidentStatuspageSubscriptionRequest + include BaseGenericModel + + # Subscription data for a request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentStatuspageSubscriptionDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspageSubscriptionRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_statuspage_subscription_response.rb b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_response.rb new file mode 100644 index 000000000000..cb127bc16d02 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a single email subscription. + class IncidentStatuspageSubscriptionResponse + include BaseGenericModel + + # Email subscription data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentStatuspageSubscriptionDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentStatuspageSubscriptionResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_statuspage_subscription_type.rb b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_type.rb new file mode 100644 index 000000000000..51c0a359b869 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_subscription_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Statuspage email subscription resource type. + class IncidentStatuspageSubscriptionType + include BaseEnumModel + + STATUSPAGE_EMAIL_SUBSCRIPTION = "statuspage_email_subscription".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_statuspage_subscriptions_response.rb b/lib/datadog_api_client/v2/models/incident_statuspage_subscriptions_response.rb new file mode 100644 index 000000000000..e03c86a3554b --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_statuspage_subscriptions_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a list of email subscriptions. + class IncidentStatuspageSubscriptionsResponse + include BaseGenericModel + + # List of email subscriptions. + 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::IncidentStatuspageSubscriptionsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_template_variable_data.rb b/lib/datadog_api_client/v2/models/incident_template_variable_data.rb new file mode 100644 index 000000000000..19d0c89e241b --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_template_variable_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Template variable data. + class IncidentTemplateVariableData + include BaseGenericModel + + # Attributes of a template variable. + attr_reader :attributes + + # The template variable identifier. + attr_reader :id + + # Template variable 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' => :'IncidentTemplateVariableDataAttributes', + :'id' => :'String', + :'type' => :'IncidentTemplateVariableType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTemplateVariableData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_template_variable_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_template_variable_data_attributes.rb new file mode 100644 index 000000000000..45d16332d108 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_template_variable_data_attributes.rb @@ -0,0 +1,186 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a template variable. + class IncidentTemplateVariableDataAttributes + include BaseGenericModel + + # A description of the template variable. + attr_reader :description + + # The display name of the template variable. + attr_reader :display_name + + # The domain of the template variable. + attr_reader :domain + + # The variable name used in templates. + attr_reader :variable + + 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', + :'domain' => :'domain', + :'variable' => :'variable' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'display_name' => :'String', + :'domain' => :'String', + :'variable' => :'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::IncidentTemplateVariableDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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?(:'domain') + self.domain = attributes[:'domain'] + end + + if attributes.key?(:'variable') + self.variable = attributes[:'variable'] + 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 @description.nil? + return false if @display_name.nil? + return false if @domain.nil? + return false if @variable.nil? + true + end + + # Custom attribute writer method with validation + # @param description [Object] Object to be assigned + # @!visibility private + def description=(description) + if description.nil? + fail ArgumentError, 'invalid value for "description", description cannot be nil.' + end + @description = description + end + + # Custom attribute writer method with validation + # @param display_name [Object] Object to be assigned + # @!visibility private + def display_name=(display_name) + if display_name.nil? + fail ArgumentError, 'invalid value for "display_name", display_name cannot be nil.' + end + @display_name = display_name + end + + # Custom attribute writer method with validation + # @param domain [Object] Object to be assigned + # @!visibility private + def domain=(domain) + if domain.nil? + fail ArgumentError, 'invalid value for "domain", domain cannot be nil.' + end + @domain = domain + end + + # Custom attribute writer method with validation + # @param variable [Object] Object to be assigned + # @!visibility private + def variable=(variable) + if variable.nil? + fail ArgumentError, 'invalid value for "variable", variable cannot be nil.' + end + @variable = variable + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 && + domain == o.domain && + variable == o.variable && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, display_name, domain, variable, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_template_variable_type.rb b/lib/datadog_api_client/v2/models/incident_template_variable_type.rb new file mode 100644 index 000000000000..477e7da434c7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_template_variable_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Template variable resource type. + class IncidentTemplateVariableType + include BaseEnumModel + + TEMPLATE_VARIABLES = "template_variables".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_template_variables_response.rb b/lib/datadog_api_client/v2/models/incident_template_variables_response.rb new file mode 100644 index 000000000000..befa420a8391 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_template_variables_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a list of template variables. + class IncidentTemplateVariablesResponse + include BaseGenericModel + + # List of template variables. + 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::IncidentTemplateVariablesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_timeline_cell_source.rb b/lib/datadog_api_client/v2/models/incident_timeline_cell_source.rb new file mode 100644 index 000000000000..4095d28be5d3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_cell_source.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The source of a timeline cell. + class IncidentTimelineCellSource + include BaseEnumModel + + SLACK = "slack".freeze + MICROSOFT_TEAMS = "microsoft_teams".freeze + DATADOG = "datadog".freeze + API = "api".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_timeline_cell_type.rb b/lib/datadog_api_client/v2/models/incident_timeline_cell_type.rb new file mode 100644 index 000000000000..3e98f68532a5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_cell_type.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 type of a timeline cell. + class IncidentTimelineCellType + include BaseEnumModel + + MARKDOWN = "markdown".freeze + INCIDENT_STATUS_CHANGE = "incident_status_change".freeze + TIMESTAMP_CHANGE = "timestamp_change".freeze + MEETING_SUMMARY = "meeting_summary".freeze + MEETING_CHAT = "meeting_chat".freeze + ROLE_ASSIGNMENT_CHANGE = "role_assignment_change".freeze + POSTMORTEM_CHANGE = "postmortem_change".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_timeline_entries_response.rb b/lib/datadog_api_client/v2/models/incident_timeline_entries_response.rb new file mode 100644 index 000000000000..84bf68005bab --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_entries_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a list of timeline entries. + class IncidentTimelineEntriesResponse + include BaseGenericModel + + # List of timeline entries. + 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::IncidentTimelineEntriesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_timeline_entry_content.rb b/lib/datadog_api_client/v2/models/incident_timeline_entry_content.rb new file mode 100644 index 000000000000..9d7fd186646e --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_entry_content.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The content of a timeline entry. + class IncidentTimelineEntryContent + include BaseGenericModel + + # The markdown message content. + attr_accessor :message + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'message' => :'message' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'message' => :'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::IncidentTimelineEntryContent` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'message') + self.message = attributes[:'message'] + 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 && + message == o.message && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [message, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_timeline_entry_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_timeline_entry_data_attributes_request.rb new file mode 100644 index 000000000000..29fa55ac6708 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_entry_data_attributes_request.rb @@ -0,0 +1,164 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 creating or updating a timeline entry. + class IncidentTimelineEntryDataAttributesRequest + include BaseGenericModel + + # The type of a timeline cell. + attr_reader :cell_type + + # The content of a timeline entry. + attr_reader :content + + # The display time for this timeline entry. + attr_accessor :display_time + + # Whether this timeline entry is marked as important. + attr_accessor :important + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cell_type' => :'cell_type', + :'content' => :'content', + :'display_time' => :'display_time', + :'important' => :'important' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cell_type' => :'IncidentTimelineCellType', + :'content' => :'IncidentTimelineEntryContent', + :'display_time' => :'Time', + :'important' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTimelineEntryDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'cell_type') + self.cell_type = attributes[:'cell_type'] + end + + if attributes.key?(:'content') + self.content = attributes[:'content'] + end + + if attributes.key?(:'display_time') + self.display_time = attributes[:'display_time'] + end + + if attributes.key?(:'important') + self.important = attributes[:'important'] + 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 @cell_type.nil? + return false if @content.nil? + true + end + + # Custom attribute writer method with validation + # @param cell_type [Object] Object to be assigned + # @!visibility private + def cell_type=(cell_type) + if cell_type.nil? + fail ArgumentError, 'invalid value for "cell_type", cell_type cannot be nil.' + end + @cell_type = cell_type + end + + # Custom attribute writer method with validation + # @param content [Object] Object to be assigned + # @!visibility private + def content=(content) + if content.nil? + fail ArgumentError, 'invalid value for "content", content cannot be nil.' + end + @content = content + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cell_type == o.cell_type && + content == o.content && + display_time == o.display_time && + important == o.important && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cell_type, content, display_time, important, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_timeline_entry_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_timeline_entry_data_attributes_response.rb new file mode 100644 index 000000000000..ce0d51223a18 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_entry_data_attributes_response.rb @@ -0,0 +1,288 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 timeline entry. + class IncidentTimelineEntryDataAttributesResponse + include BaseGenericModel + + # The type of a timeline cell. + attr_reader :cell_type + + # The content of a timeline entry. + attr_reader :content + + # Timestamp when the entry was created. + attr_reader :created + + # The display time for this timeline entry. + attr_reader :display_time + + # Whether this timeline entry is marked as important. + attr_reader :important + + # The incident identifier. + attr_reader :incident_id + + # Timestamp when the entry was last modified. + attr_reader :modified + + # UUID of the parent timeline entry. + attr_accessor :parent_uuid + + # The source of a timeline cell. + attr_reader :source + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cell_type' => :'cell_type', + :'content' => :'content', + :'created' => :'created', + :'display_time' => :'display_time', + :'important' => :'important', + :'incident_id' => :'incident_id', + :'modified' => :'modified', + :'parent_uuid' => :'parent_uuid', + :'source' => :'source' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cell_type' => :'IncidentTimelineCellType', + :'content' => :'IncidentTimelineEntryContent', + :'created' => :'Time', + :'display_time' => :'Time', + :'important' => :'Boolean', + :'incident_id' => :'String', + :'modified' => :'Time', + :'parent_uuid' => :'String', + :'source' => :'IncidentTimelineCellSource' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'parent_uuid', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTimelineEntryDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'cell_type') + self.cell_type = attributes[:'cell_type'] + end + + if attributes.key?(:'content') + self.content = attributes[:'content'] + end + + if attributes.key?(:'created') + self.created = attributes[:'created'] + end + + if attributes.key?(:'display_time') + self.display_time = attributes[:'display_time'] + end + + if attributes.key?(:'important') + self.important = attributes[:'important'] + end + + if attributes.key?(:'incident_id') + self.incident_id = attributes[:'incident_id'] + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'parent_uuid') + self.parent_uuid = attributes[:'parent_uuid'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + 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 @cell_type.nil? + return false if @content.nil? + return false if @created.nil? + return false if @display_time.nil? + return false if @important.nil? + return false if @incident_id.nil? + return false if @modified.nil? + return false if @source.nil? + true + end + + # Custom attribute writer method with validation + # @param cell_type [Object] Object to be assigned + # @!visibility private + def cell_type=(cell_type) + if cell_type.nil? + fail ArgumentError, 'invalid value for "cell_type", cell_type cannot be nil.' + end + @cell_type = cell_type + end + + # Custom attribute writer method with validation + # @param content [Object] Object to be assigned + # @!visibility private + def content=(content) + if content.nil? + fail ArgumentError, 'invalid value for "content", content cannot be nil.' + end + @content = content + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param display_time [Object] Object to be assigned + # @!visibility private + def display_time=(display_time) + if display_time.nil? + fail ArgumentError, 'invalid value for "display_time", display_time cannot be nil.' + end + @display_time = display_time + end + + # Custom attribute writer method with validation + # @param important [Object] Object to be assigned + # @!visibility private + def important=(important) + if important.nil? + fail ArgumentError, 'invalid value for "important", important cannot be nil.' + end + @important = important + end + + # Custom attribute writer method with validation + # @param incident_id [Object] Object to be assigned + # @!visibility private + def incident_id=(incident_id) + if incident_id.nil? + fail ArgumentError, 'invalid value for "incident_id", incident_id cannot be nil.' + end + @incident_id = incident_id + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Custom attribute writer method with validation + # @param source [Object] Object to be assigned + # @!visibility private + def source=(source) + if source.nil? + fail ArgumentError, 'invalid value for "source", source cannot be nil.' + end + @source = source + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cell_type == o.cell_type && + content == o.content && + created == o.created && + display_time == o.display_time && + important == o.important && + incident_id == o.incident_id && + modified == o.modified && + parent_uuid == o.parent_uuid && + source == o.source && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cell_type, content, created, display_time, important, incident_id, modified, parent_uuid, source, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_timeline_entry_data_request.rb b/lib/datadog_api_client/v2/models/incident_timeline_entry_data_request.rb new file mode 100644 index 000000000000..15ed78f05600 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_entry_data_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Timeline entry data for a request. + class IncidentTimelineEntryDataRequest + include BaseGenericModel + + # Attributes for creating or updating a timeline entry. + attr_reader :attributes + + # Incident timeline entry 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentTimelineEntryDataAttributesRequest', + :'type' => :'IncidentTimelineEntryType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTimelineEntryDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_timeline_entry_data_response.rb b/lib/datadog_api_client/v2/models/incident_timeline_entry_data_response.rb new file mode 100644 index 000000000000..cf58375c5a2c --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_entry_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Timeline entry data in a response. + class IncidentTimelineEntryDataResponse + include BaseGenericModel + + # Attributes of a timeline entry. + attr_reader :attributes + + # The timeline entry identifier. + attr_reader :id + + # Incident timeline entry 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' => :'IncidentTimelineEntryDataAttributesResponse', + :'id' => :'UUID', + :'type' => :'IncidentTimelineEntryType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTimelineEntryDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_timeline_entry_request.rb b/lib/datadog_api_client/v2/models/incident_timeline_entry_request.rb new file mode 100644 index 000000000000..b7de74b111dc --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_entry_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create or update a timeline entry. + class IncidentTimelineEntryRequest + include BaseGenericModel + + # Timeline entry data for a request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentTimelineEntryDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTimelineEntryRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_timeline_entry_response.rb b/lib/datadog_api_client/v2/models/incident_timeline_entry_response.rb new file mode 100644 index 000000000000..f1795833faac --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_entry_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a single timeline entry. + class IncidentTimelineEntryResponse + include BaseGenericModel + + # Timeline entry data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentTimelineEntryDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTimelineEntryResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_timeline_entry_type.rb b/lib/datadog_api_client/v2/models/incident_timeline_entry_type.rb new file mode 100644 index 000000000000..44ba6d3f5800 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_entry_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident timeline entry resource type. + class IncidentTimelineEntryType + include BaseEnumModel + + INCIDENT_TIMELINE_CELLS = "incident_timeline_cells".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_timeline_thread_data_response.rb b/lib/datadog_api_client/v2/models/incident_timeline_thread_data_response.rb new file mode 100644 index 000000000000..671be68dc5fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_thread_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Thread data for a timeline entry. + class IncidentTimelineThreadDataResponse + include BaseGenericModel + + # Attributes of a timeline entry. + attr_reader :attributes + + # The thread entry identifier. + attr_reader :id + + # Incident timeline entry 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' => :'IncidentTimelineEntryDataAttributesResponse', + :'id' => :'UUID', + :'type' => :'IncidentTimelineEntryType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentTimelineThreadDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_timeline_thread_response.rb b/lib/datadog_api_client/v2/models/incident_timeline_thread_response.rb new file mode 100644 index 000000000000..254409bc26fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_timeline_thread_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with thread entries for a timeline entry. + class IncidentTimelineThreadResponse + include BaseGenericModel + + # List of thread entries. + 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::IncidentTimelineThreadResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_zoom_configuration_data_attributes_request.rb b/lib/datadog_api_client/v2/models/incident_zoom_configuration_data_attributes_request.rb new file mode 100644 index 000000000000..cb68553a4029 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_configuration_data_attributes_request.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes for creating or updating a Zoom configuration. + class IncidentZoomConfigurationDataAttributesRequest + include BaseGenericModel + + # Whether manual meeting creation is enabled. + attr_accessor :manual_meeting_creation + + # Whether meeting chat timeline sync is enabled. + attr_accessor :meeting_chat_timeline_sync + + # Whether post-meeting summary is enabled. + attr_accessor :post_meeting_summary + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'manual_meeting_creation' => :'manual_meeting_creation', + :'meeting_chat_timeline_sync' => :'meeting_chat_timeline_sync', + :'post_meeting_summary' => :'post_meeting_summary' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'manual_meeting_creation' => :'Boolean', + :'meeting_chat_timeline_sync' => :'Boolean', + :'post_meeting_summary' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentZoomConfigurationDataAttributesRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'manual_meeting_creation') + self.manual_meeting_creation = attributes[:'manual_meeting_creation'] + end + + if attributes.key?(:'meeting_chat_timeline_sync') + self.meeting_chat_timeline_sync = attributes[:'meeting_chat_timeline_sync'] + end + + if attributes.key?(:'post_meeting_summary') + self.post_meeting_summary = attributes[:'post_meeting_summary'] + 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 && + manual_meeting_creation == o.manual_meeting_creation && + meeting_chat_timeline_sync == o.meeting_chat_timeline_sync && + post_meeting_summary == o.post_meeting_summary && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [manual_meeting_creation, meeting_chat_timeline_sync, post_meeting_summary, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_zoom_configuration_data_attributes_response.rb b/lib/datadog_api_client/v2/models/incident_zoom_configuration_data_attributes_response.rb new file mode 100644 index 000000000000..2a9da8aae9b3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_configuration_data_attributes_response.rb @@ -0,0 +1,207 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Zoom configuration. + class IncidentZoomConfigurationDataAttributesResponse + include BaseGenericModel + + # Timestamp when the configuration was created. + attr_reader :created_at + + # Whether manual meeting creation is enabled. + attr_reader :manual_meeting_creation + + # Whether meeting chat timeline sync is enabled. + attr_reader :meeting_chat_timeline_sync + + # Timestamp when the configuration was last modified. + attr_reader :modified_at + + # Whether post-meeting summary is enabled. + attr_reader :post_meeting_summary + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created_at' => :'created_at', + :'manual_meeting_creation' => :'manual_meeting_creation', + :'meeting_chat_timeline_sync' => :'meeting_chat_timeline_sync', + :'modified_at' => :'modified_at', + :'post_meeting_summary' => :'post_meeting_summary' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created_at' => :'Time', + :'manual_meeting_creation' => :'Boolean', + :'meeting_chat_timeline_sync' => :'Boolean', + :'modified_at' => :'Time', + :'post_meeting_summary' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentZoomConfigurationDataAttributesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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?(:'manual_meeting_creation') + self.manual_meeting_creation = attributes[:'manual_meeting_creation'] + end + + if attributes.key?(:'meeting_chat_timeline_sync') + self.meeting_chat_timeline_sync = attributes[:'meeting_chat_timeline_sync'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'post_meeting_summary') + self.post_meeting_summary = attributes[:'post_meeting_summary'] + 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 @manual_meeting_creation.nil? + return false if @meeting_chat_timeline_sync.nil? + return false if @modified_at.nil? + return false if @post_meeting_summary.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 manual_meeting_creation [Object] Object to be assigned + # @!visibility private + def manual_meeting_creation=(manual_meeting_creation) + if manual_meeting_creation.nil? + fail ArgumentError, 'invalid value for "manual_meeting_creation", manual_meeting_creation cannot be nil.' + end + @manual_meeting_creation = manual_meeting_creation + end + + # Custom attribute writer method with validation + # @param meeting_chat_timeline_sync [Object] Object to be assigned + # @!visibility private + def meeting_chat_timeline_sync=(meeting_chat_timeline_sync) + if meeting_chat_timeline_sync.nil? + fail ArgumentError, 'invalid value for "meeting_chat_timeline_sync", meeting_chat_timeline_sync cannot be nil.' + end + @meeting_chat_timeline_sync = meeting_chat_timeline_sync + end + + # Custom attribute writer method with validation + # @param modified_at [Object] Object to be assigned + # @!visibility private + def modified_at=(modified_at) + if modified_at.nil? + fail ArgumentError, 'invalid value for "modified_at", modified_at cannot be nil.' + end + @modified_at = modified_at + end + + # Custom attribute writer method with validation + # @param post_meeting_summary [Object] Object to be assigned + # @!visibility private + def post_meeting_summary=(post_meeting_summary) + if post_meeting_summary.nil? + fail ArgumentError, 'invalid value for "post_meeting_summary", post_meeting_summary cannot be nil.' + end + @post_meeting_summary = post_meeting_summary + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 && + manual_meeting_creation == o.manual_meeting_creation && + meeting_chat_timeline_sync == o.meeting_chat_timeline_sync && + modified_at == o.modified_at && + post_meeting_summary == o.post_meeting_summary && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created_at, manual_meeting_creation, meeting_chat_timeline_sync, modified_at, post_meeting_summary, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_zoom_configuration_data_request.rb b/lib/datadog_api_client/v2/models/incident_zoom_configuration_data_request.rb new file mode 100644 index 000000000000..93b752353a01 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_configuration_data_request.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Zoom configuration data for a request. + class IncidentZoomConfigurationDataRequest + include BaseGenericModel + + # Attributes for creating or updating a Zoom configuration. + attr_reader :attributes + + # Zoom configuration 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', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'IncidentZoomConfigurationDataAttributesRequest', + :'type' => :'IncidentZoomConfigurationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentZoomConfigurationDataRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_zoom_configuration_data_response.rb b/lib/datadog_api_client/v2/models/incident_zoom_configuration_data_response.rb new file mode 100644 index 000000000000..1412485dcaa3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_configuration_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Zoom configuration data in a response. + class IncidentZoomConfigurationDataResponse + include BaseGenericModel + + # Attributes of a Zoom configuration. + attr_reader :attributes + + # The configuration identifier. + attr_reader :id + + # Zoom configuration 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' => :'IncidentZoomConfigurationDataAttributesResponse', + :'id' => :'UUID', + :'type' => :'IncidentZoomConfigurationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentZoomConfigurationDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_zoom_configuration_request.rb b/lib/datadog_api_client/v2/models/incident_zoom_configuration_request.rb new file mode 100644 index 000000000000..76b7e5f02f97 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_configuration_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request to create or update a Zoom configuration. + class IncidentZoomConfigurationRequest + include BaseGenericModel + + # Zoom configuration data for a request. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentZoomConfigurationDataRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentZoomConfigurationRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_zoom_configuration_response.rb b/lib/datadog_api_client/v2/models/incident_zoom_configuration_response.rb new file mode 100644 index 000000000000..b69e3e682e56 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_configuration_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with a Zoom configuration. + class IncidentZoomConfigurationResponse + include BaseGenericModel + + # Zoom configuration data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentZoomConfigurationDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentZoomConfigurationResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_zoom_configuration_type.rb b/lib/datadog_api_client/v2/models/incident_zoom_configuration_type.rb new file mode 100644 index 000000000000..f46536d9f796 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_configuration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Zoom configuration resource type. + class IncidentZoomConfigurationType + include BaseEnumModel + + ZOOM_CONFIGURATIONS = "zoom_configurations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_zoom_integration_data_attributes.rb b/lib/datadog_api_client/v2/models/incident_zoom_integration_data_attributes.rb new file mode 100644 index 000000000000..749b1767d8dc --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_integration_data_attributes.rb @@ -0,0 +1,209 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 Zoom integration metadata. + class IncidentZoomIntegrationDataAttributes + include BaseGenericModel + + # Timestamp when the integration was created. + attr_reader :created + + # The type of integration. + attr_reader :integration_type + + # List of Zoom meetings. + attr_reader :meetings + + # Timestamp when the integration was last modified. + attr_reader :modified + + # The status of the integration. + attr_reader :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'created' => :'created', + :'integration_type' => :'integration_type', + :'meetings' => :'meetings', + :'modified' => :'modified', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'created' => :'Time', + :'integration_type' => :'String', + :'meetings' => :'Array', + :'modified' => :'Time', + :'status' => :'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::IncidentZoomIntegrationDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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') + self.created = attributes[:'created'] + end + + if attributes.key?(:'integration_type') + self.integration_type = attributes[:'integration_type'] + end + + if attributes.key?(:'meetings') + if (value = attributes[:'meetings']).is_a?(Array) + self.meetings = value + end + end + + if attributes.key?(:'modified') + self.modified = attributes[:'modified'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + 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.nil? + return false if @integration_type.nil? + return false if @meetings.nil? + return false if @modified.nil? + return false if @status.nil? + true + end + + # Custom attribute writer method with validation + # @param created [Object] Object to be assigned + # @!visibility private + def created=(created) + if created.nil? + fail ArgumentError, 'invalid value for "created", created cannot be nil.' + end + @created = created + end + + # Custom attribute writer method with validation + # @param integration_type [Object] Object to be assigned + # @!visibility private + def integration_type=(integration_type) + if integration_type.nil? + fail ArgumentError, 'invalid value for "integration_type", integration_type cannot be nil.' + end + @integration_type = integration_type + end + + # Custom attribute writer method with validation + # @param meetings [Object] Object to be assigned + # @!visibility private + def meetings=(meetings) + if meetings.nil? + fail ArgumentError, 'invalid value for "meetings", meetings cannot be nil.' + end + @meetings = meetings + end + + # Custom attribute writer method with validation + # @param modified [Object] Object to be assigned + # @!visibility private + def modified=(modified) + if modified.nil? + fail ArgumentError, 'invalid value for "modified", modified cannot be nil.' + end + @modified = modified + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by 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 == o.created && + integration_type == o.integration_type && + meetings == o.meetings && + modified == o.modified && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [created, integration_type, meetings, modified, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/incident_zoom_integration_data_response.rb b/lib/datadog_api_client/v2/models/incident_zoom_integration_data_response.rb new file mode 100644 index 000000000000..4755808593b1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_integration_data_response.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Zoom integration data in a response. + class IncidentZoomIntegrationDataResponse + include BaseGenericModel + + # Attributes of a Zoom integration metadata. + attr_reader :attributes + + # The integration identifier. + attr_reader :id + + # Incident integration 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' => :'IncidentZoomIntegrationDataAttributes', + :'id' => :'UUID', + :'type' => :'IncidentZoomIntegrationType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentZoomIntegrationDataResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_zoom_integration_response.rb b/lib/datadog_api_client/v2/models/incident_zoom_integration_response.rb new file mode 100644 index 000000000000..8988fe851eb7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_integration_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response with Zoom integration metadata. + class IncidentZoomIntegrationResponse + include BaseGenericModel + + # Zoom integration data in a response. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'IncidentZoomIntegrationDataResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IncidentZoomIntegrationResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/incident_zoom_integration_type.rb b/lib/datadog_api_client/v2/models/incident_zoom_integration_type.rb new file mode 100644 index 000000000000..3bc3701268db --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_integration_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident integration resource type. + class IncidentZoomIntegrationType + include BaseEnumModel + + INCIDENT_INTEGRATIONS = "incident_integrations".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/incident_zoom_meeting.rb b/lib/datadog_api_client/v2/models/incident_zoom_meeting.rb new file mode 100644 index 000000000000..e1ddeb2b8717 --- /dev/null +++ b/lib/datadog_api_client/v2/models/incident_zoom_meeting.rb @@ -0,0 +1,174 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + 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 Zoom meeting associated with an incident. + class IncidentZoomMeeting + include BaseGenericModel + + # The Zoom host identifier. + attr_accessor :host_id + + # The URL to join the meeting. + attr_reader :join_url + + # The Zoom meeting identifier. + attr_reader :meeting_id + + # The meeting password. + attr_accessor :password + + # The URL of the meeting recording. + attr_accessor :recording_url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'host_id' => :'host_id', + :'join_url' => :'join_url', + :'meeting_id' => :'meeting_id', + :'password' => :'password', + :'recording_url' => :'recording_url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'host_id' => :'String', + :'join_url' => :'String', + :'meeting_id' => :'Integer', + :'password' => :'String', + :'recording_url' => :'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::IncidentZoomMeeting` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'host_id') + self.host_id = attributes[:'host_id'] + end + + if attributes.key?(:'join_url') + self.join_url = attributes[:'join_url'] + end + + if attributes.key?(:'meeting_id') + self.meeting_id = attributes[:'meeting_id'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'recording_url') + self.recording_url = attributes[:'recording_url'] + 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 @join_url.nil? + return false if @meeting_id.nil? + true + end + + # Custom attribute writer method with validation + # @param join_url [Object] Object to be assigned + # @!visibility private + def join_url=(join_url) + if join_url.nil? + fail ArgumentError, 'invalid value for "join_url", join_url cannot be nil.' + end + @join_url = join_url + end + + # Custom attribute writer method with validation + # @param meeting_id [Object] Object to be assigned + # @!visibility private + def meeting_id=(meeting_id) + if meeting_id.nil? + fail ArgumentError, 'invalid value for "meeting_id", meeting_id cannot be nil.' + end + @meeting_id = meeting_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + host_id == o.host_id && + join_url == o.join_url && + meeting_id == o.meeting_id && + password == o.password && + recording_url == o.recording_url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [host_id, join_url, meeting_id, password, recording_url, additional_properties].hash + end + end +end