From 4d63ec9610d72825213c892ac43eb1a6d36ce0f2 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 27 Oct 2026 08:31:13 +0000 Subject: [PATCH] Regenerate client from commit a717a08 of spec repo --- .generator/schemas/v2/openapi.yaml | 901 +++++++++++++++++- .../on-call-paging/AcknowledgeOnCallPage.py | 2 +- .../v2/on-call-paging/CreateOnCallPage.py | 2 +- .../v2/on-call-paging/EscalateOnCallPage.py | 2 +- .../v2/on-call-paging/ResolveOnCallPage.py | 2 +- examples/v2/on-call/GetOnCallPage.py | 17 + examples/v2/on-call/ListOnCallPages.py | 17 + .../v2/on-call/ListOnCallPages_785978425.py | 15 + src/datadog_api_client/v2/api/on_call_api.py | 174 ++++ .../model/create_notification_channel_data.py | 2 +- ..._on_call_notification_rule_request_data.py | 2 +- .../v2/model/create_override_request_data.py | 2 +- .../v2/model/notification_channel_data.py | 2 +- .../v2/model/notification_channel_type.py | 2 +- ...fication_rule_channel_relationship_data.py | 2 +- .../model/on_call_notification_rule_data.py | 2 +- .../model/on_call_notification_rule_type.py | 2 +- .../on_call_notification_rules_included.py | 2 +- .../model/on_call_page_author_relationship.py | 43 + .../on_call_page_author_relationship_data.py | 42 + .../v2/model/on_call_page_data.py | 74 ++ .../v2/model/on_call_page_data_attributes.py | 179 ++++ .../model/on_call_page_data_relationships.py | 136 +++ .../v2/model/on_call_page_data_type.py | 35 + .../on_call_page_jira_issue_relationship.py | 46 + ..._call_page_jira_issue_relationship_data.py | 46 + .../v2/model/on_call_page_jira_issue_type.py | 35 + .../v2/model/on_call_page_link.py | 65 ++ .../v2/model/on_call_page_link_attributes.py | 76 ++ .../v2/model/on_call_page_link_entity_type.py | 44 + .../on_call_page_link_relationship_data.py | 46 + .../on_call_page_link_relationship_type.py | 56 ++ .../v2/model/on_call_page_link_type.py | 35 + .../model/on_call_page_links_relationship.py | 42 + .../v2/model/on_call_page_live_call.py | 42 + .../model/on_call_page_live_call_outcome.py | 47 + .../v2/model/on_call_page_live_call_over.py | 55 ++ .../v2/model/on_call_page_release_origin.py | 44 + .../on_call_page_responders_relationship.py | 42 + .../v2/model/on_call_page_response.py | 63 ++ .../v2/model/on_call_page_scheduled_action.py | 79 ++ ...n_call_page_scheduled_action_attributes.py | 59 ++ ...l_page_scheduled_action_attributes_type.py | 44 + ...call_page_scheduled_action_relationship.py | 47 + ...page_scheduled_action_relationship_data.py | 48 + ...all_page_scheduled_action_relationships.py | 64 ++ ...cheduled_action_relationships_schedules.py | 48 + ...led_action_relationships_schedules_data.py | 46 + ...ge_scheduled_action_relationships_users.py | 42 + .../on_call_page_scheduled_action_type.py | 35 + ..._page_service_now_incident_relationship.py | 46 + ..._service_now_incident_relationship_data.py | 46 + .../on_call_page_service_now_incident_type.py | 35 + .../v2/model/on_call_page_status.py | 41 + .../model/on_call_page_target_relationship.py | 43 + .../on_call_page_target_relationship_data.py | 52 + ...call_page_target_relationship_data_type.py | 41 + ...all_page_team_routing_rule_relationship.py | 46 + ...age_team_routing_rule_relationship_data.py | 50 + .../on_call_page_user_relationship_data.py | 46 + .../v2/model/on_call_pages_included.py | 53 ++ .../v2/model/on_call_pages_response.py | 73 ++ .../v2/model/on_call_pages_sort.py | 56 ++ .../v2/model/override_data.py | 2 +- .../v2/model/override_data_type.py | 2 +- .../override_relationships_schedule_data.py | 2 +- ...erride_relationships_schedule_data_type.py | 2 +- .../model/override_relationships_user_data.py | 2 +- .../override_relationships_user_data_type.py | 2 +- .../routing_rule_relationships_policy_data.py | 2 +- ...ing_rule_relationships_policy_data_type.py | 2 +- src/datadog_api_client/v2/model/schedules.py | 2 +- .../v2/model/schedules_response_meta.py | 4 +- .../v2/model/schedules_response_meta_page.py | 2 +- src/datadog_api_client/v2/model/shift_data.py | 2 +- .../shift_data_relationships_user_data.py | 2 +- ...shift_data_relationships_user_data_type.py | 2 +- .../v2/model/shift_data_type.py | 2 +- ...les_data_relationships_rules_data_items.py | 2 +- ...ata_relationships_rules_data_items_type.py | 2 +- ..._on_call_notification_rule_request_data.py | 2 +- src/datadog_api_client/v2/models/__init__.py | 110 +++ .../test-runner-data/manifest.json | 21 + ...-call-page-returns-not-found-response.json | 35 + .../get-on-call-page-returns-ok-response.json | 35 + ...ist-on-call-pages-returns-ok-response.json | 35 + .../test-server-data/v2/on-call.json | 98 ++ tests/v2/features/on-call.feature | 43 + tests/v2/features/on-call_paging.feature | 16 +- tests/v2/features/undo.json | 12 + 90 files changed, 3967 insertions(+), 59 deletions(-) create mode 100644 examples/v2/on-call/GetOnCallPage.py create mode 100644 examples/v2/on-call/ListOnCallPages.py create mode 100644 examples/v2/on-call/ListOnCallPages_785978425.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_author_relationship.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_author_relationship_data.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_data.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_data_attributes.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_data_relationships.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_data_type.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_jira_issue_relationship.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_jira_issue_relationship_data.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_jira_issue_type.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_link.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_link_attributes.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_link_entity_type.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_link_relationship_data.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_link_relationship_type.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_link_type.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_links_relationship.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_live_call.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_live_call_outcome.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_live_call_over.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_release_origin.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_responders_relationship.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_response.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_scheduled_action.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_scheduled_action_attributes.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_scheduled_action_attributes_type.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationship.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationship_data.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_schedules.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_schedules_data.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_users.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_scheduled_action_type.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_service_now_incident_relationship.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_service_now_incident_relationship_data.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_service_now_incident_type.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_status.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_target_relationship.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_target_relationship_data.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_target_relationship_data_type.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_team_routing_rule_relationship.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_team_routing_rule_relationship_data.py create mode 100644 src/datadog_api_client/v2/model/on_call_page_user_relationship_data.py create mode 100644 src/datadog_api_client/v2/model/on_call_pages_included.py create mode 100644 src/datadog_api_client/v2/model/on_call_pages_response.py create mode 100644 src/datadog_api_client/v2/model/on_call_pages_sort.py create mode 100644 tests/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-not-found-response.json create mode 100644 tests/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-ok-response.json create mode 100644 tests/generated-test/test-runner-data/v2/on-call/list-on-call-pages-returns-ok-response.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 382c60bc59..6483c05996 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -83625,7 +83625,7 @@ components: - PUSH NotificationChannelType: default: notification_channels - description: "Indicates that the resource is of type 'notification_channels'." + description: "Indicates that the resource is of type `notification_channels`." enum: - notification_channels example: notification_channels @@ -91725,7 +91725,7 @@ components: type: object OnCallNotificationRuleType: default: notification_rules - description: "Indicates that the resource is of type 'notification_rules'." + description: "Indicates that the resource is of type `notification_rules`." enum: - notification_rules example: notification_rules @@ -91736,6 +91736,557 @@ components: description: Represents additional included resources for a on-call notification rules oneOf: - $ref: "#/components/schemas/NotificationChannelData" + OnCallPageAuthorRelationship: + description: Reference to the entity that performed an action on the page. + properties: + data: + $ref: "#/components/schemas/OnCallPageAuthorRelationshipData" + type: object + OnCallPageAuthorRelationshipData: + description: Reference to the author of a page action. + nullable: true + properties: + id: + description: The ID of the author. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + description: |- + The resource type of the author, for example `users`, `monitors`, + `incident_authors`, or `security_signal`. + example: users + type: string + required: + - id + - type + type: object + OnCallPageData: + description: An On-Call Page. + properties: + attributes: + $ref: "#/components/schemas/OnCallPageDataAttributes" + id: + description: The unique ID of the page. + example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + format: uuid + type: string + relationships: + $ref: "#/components/schemas/OnCallPageDataRelationships" + type: + $ref: "#/components/schemas/OnCallPageDataType" + required: + - id + - type + type: object + OnCallPageDataAttributes: + description: The attributes of an On-Call Page. + properties: + acknowledged_at: + description: The time when the page was first acknowledged. + example: "2026-01-01T10:05:00Z" + format: date-time + type: string + closed_at: + description: The time when the page was resolved. + example: "2026-01-01T10:30:00Z" + format: date-time + type: string + comment_count: + description: The number of comments on the page. + example: 2 + format: int64 + type: integer + created_at: + description: The time when the page was created. + example: "2026-01-01T10:00:00Z" + format: date-time + type: string + description: + description: A short summary of the issue or context. + example: Page details. + type: string + escalation_policy_uuid: + description: The ID of the escalation policy used to route the page. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + key: + description: An alternative numeric identifier of the page, as displayed in the Datadog UI. + example: "25137717" + type: string + live_call: + $ref: "#/components/schemas/OnCallPageLiveCall" + modified_at: + description: The time when the page was last modified. + example: "2026-01-01T10:30:00Z" + format: date-time + type: string + release_at: + description: The time when the snooze ends. Only set while the page is snoozed, together with `release_origin`. + example: "2026-01-01T11:00:00Z" + format: date-time + type: string + release_origin: + $ref: "#/components/schemas/OnCallPageReleaseOrigin" + responders_added_at: + description: The time when responders were first added to the page. + example: "2026-01-01T10:01:00Z" + format: date-time + type: string + services: + description: The services associated with the page. + example: + - service-a + items: + description: A service name. + type: string + type: array + status: + $ref: "#/components/schemas/OnCallPageStatus" + tags: + description: Tags associated with the page. + example: + - service:test + items: + description: A tag. + type: string + type: array + title: + description: The title of the page. + example: "Service: Test is down" + type: string + urgency: + $ref: "#/components/schemas/PageUrgency" + required: + - title + - key + - status + - description + - tags + - urgency + - created_at + type: object + OnCallPageDataRelationships: + description: The relationships of an On-Call Page. + properties: + author: + $ref: "#/components/schemas/OnCallPageAuthorRelationship" + closed_by: + $ref: "#/components/schemas/OnCallPageAuthorRelationship" + jira_issue: + $ref: "#/components/schemas/OnCallPageJiraIssueRelationship" + links: + $ref: "#/components/schemas/OnCallPageLinksRelationship" + responders: + $ref: "#/components/schemas/OnCallPageRespondersRelationship" + scheduled_action: + $ref: "#/components/schemas/OnCallPageScheduledActionRelationship" + service_now_incident: + $ref: "#/components/schemas/OnCallPageServiceNowIncidentRelationship" + target: + $ref: "#/components/schemas/OnCallPageTargetRelationship" + team_routing_rule: + $ref: "#/components/schemas/OnCallPageTeamRoutingRuleRelationship" + type: object + OnCallPageDataType: + default: pages + description: "Indicates that the resource is of type `pages`." + enum: + - pages + example: pages + type: string + x-enum-varnames: + - PAGES + OnCallPageJiraIssueRelationship: + description: The Jira issue linked to the page. + properties: + data: + $ref: "#/components/schemas/OnCallPageJiraIssueRelationshipData" + type: object + OnCallPageJiraIssueRelationshipData: + description: Reference to a Jira issue. + properties: + id: + description: The ID of the Jira issue, in the form `:`. + example: "123456:10001" + type: string + type: + $ref: "#/components/schemas/OnCallPageJiraIssueType" + required: + - id + - type + type: object + OnCallPageJiraIssueType: + default: jira_issues + description: Jira issue resource type. + enum: + - jira_issues + example: jira_issues + type: string + x-enum-varnames: + - JIRA_ISSUES + OnCallPageLink: + description: A link between a page and another Datadog resource, such as an incident. + properties: + attributes: + $ref: "#/components/schemas/OnCallPageLinkAttributes" + id: + description: The ID of the link. + example: 00000000-0000-0000-0000-000000000003 + type: string + type: + $ref: "#/components/schemas/OnCallPageLinkType" + required: + - id + - type + type: object + OnCallPageLinkAttributes: + description: |- + The attributes of a page link. A page can be the child of another Datadog resource + (for example, when an incident triggers it), or the parent of one (for example, when the + page is escalated to an incident). + properties: + child_entity_id: + description: The ID of the child resource. + example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + type: string + child_entity_type: + $ref: "#/components/schemas/OnCallPageLinkEntityType" + parent_entity_id: + description: The ID of the parent resource. + example: 00000000-0000-0000-0000-000000000002 + type: string + parent_entity_type: + $ref: "#/components/schemas/OnCallPageLinkEntityType" + relationship: + $ref: "#/components/schemas/OnCallPageLinkRelationshipType" + required: + - child_entity_id + - child_entity_type + - parent_entity_id + - parent_entity_type + - relationship + type: object + OnCallPageLinkEntityType: + description: The type of a resource linked to a page. + enum: + - case + - incident + - page + - agent_conversation + example: page + type: string + x-enum-varnames: + - CASE + - INCIDENT + - PAGE + - AGENT_CONVERSATION + OnCallPageLinkRelationshipData: + description: Reference to a page link. + properties: + id: + description: The ID of the link. + example: 00000000-0000-0000-0000-000000000003 + type: string + type: + $ref: "#/components/schemas/OnCallPageLinkType" + required: + - id + - type + type: object + OnCallPageLinkRelationshipType: + description: How the parent resource relates to the child resource. + enum: + - relates_to + - causes + - blocks + - duplicates + - parent_of + - successor_of + - escalates_to + - pages + example: pages + type: string + x-enum-varnames: + - RELATES_TO + - CAUSES + - BLOCKS + - DUPLICATES + - PARENT_OF + - SUCCESSOR_OF + - ESCALATES_TO + - PAGES + OnCallPageLinkType: + default: links + description: Page link resource type. + enum: + - links + example: links + type: string + x-enum-varnames: + - LINKS + OnCallPageLinksRelationship: + description: Links between the page and other Datadog resources, such as incidents. Always empty when listing pages. + properties: + data: + description: The list of page links. + items: + $ref: "#/components/schemas/OnCallPageLinkRelationshipData" + type: array + type: object + OnCallPageLiveCall: + description: Live call information for a page triggered by a live call route. + properties: + call_over: + $ref: "#/components/schemas/OnCallPageLiveCallOver" + type: object + OnCallPageLiveCallOutcome: + description: The outcome of a live call that has ended. + enum: + - success_call_answered + - failure_no_responder + - failure_caller_abandoned + - failure_outside_support_hours + - failure_internal_error + example: success_call_answered + type: string + x-enum-varnames: + - SUCCESS_CALL_ANSWERED + - FAILURE_NO_RESPONDER + - FAILURE_CALLER_ABANDONED + - FAILURE_OUTSIDE_SUPPORT_HOURS + - FAILURE_INTERNAL_ERROR + OnCallPageLiveCallOver: + description: Information about a live call that has ended. + properties: + outcome: + $ref: "#/components/schemas/OnCallPageLiveCallOutcome" + support_hours_start_at: + description: When support hours start, if the call was placed outside support hours. + example: "2026-01-01T09:00:00Z" + format: date-time + type: string + type: object + OnCallPageReleaseOrigin: + description: |- + What snoozed the page. Only set while the page is snoozed, together with `release_at`. + `ack_timeout`: the acknowledgment timeout. `team_rules_active_hours`: the page was + triggered outside of the active hours of the team's routing rules. `manual_snooze`: + a user snoozed the page. + enum: + - ack_timeout + - team_rules_active_hours + - manual_snooze + example: manual_snooze + type: string + x-enum-varnames: + - ACK_TIMEOUT + - TEAM_RULES_ACTIVE_HOURS + - MANUAL_SNOOZE + OnCallPageRespondersRelationship: + description: The users responding to the page. + properties: + data: + description: The list of responders. + items: + $ref: "#/components/schemas/OnCallPageUserRelationshipData" + type: array + type: object + OnCallPageResponse: + description: A single On-Call Page with its related included resources. + properties: + data: + $ref: "#/components/schemas/OnCallPageData" + included: + description: Resources related to the page, such as users, teams, scheduled actions, and links. + items: + $ref: "#/components/schemas/OnCallPagesIncluded" + type: array + required: + - data + type: object + OnCallPageScheduledAction: + description: The next action scheduled on a page, such as an escalation or an automatic resolution. + properties: + attributes: + $ref: "#/components/schemas/OnCallPageScheduledActionAttributes" + id: + description: The ID of the scheduled action. Equal to the page ID. + example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + type: string + relationships: + $ref: "#/components/schemas/OnCallPageScheduledActionRelationships" + type: + $ref: "#/components/schemas/OnCallPageScheduledActionType" + required: + - id + - type + type: object + OnCallPageScheduledActionAttributes: + description: The attributes of a scheduled action. + properties: + at: + description: The time when the action is scheduled to run. + example: "2026-01-01T10:15:00Z" + format: date-time + type: string + type: + $ref: "#/components/schemas/OnCallPageScheduledActionAttributesType" + type: object + OnCallPageScheduledActionAttributesType: + description: The kind of action that is scheduled. + enum: + - escalate + - resolve + - release + - retrigger + example: escalate + type: string + x-enum-varnames: + - ESCALATE + - RESOLVE + - RELEASE + - RETRIGGER + OnCallPageScheduledActionRelationship: + description: The next action scheduled on the page, such as an escalation. + properties: + data: + $ref: "#/components/schemas/OnCallPageScheduledActionRelationshipData" + type: object + OnCallPageScheduledActionRelationshipData: + description: Reference to the next scheduled action on the page. + nullable: true + properties: + id: + description: The ID of the scheduled action. Equal to the page ID. + example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + type: string + type: + $ref: "#/components/schemas/OnCallPageScheduledActionType" + required: + - id + - type + type: object + OnCallPageScheduledActionRelationships: + description: The relationships of a scheduled action. + properties: + schedules: + $ref: "#/components/schemas/OnCallPageScheduledActionRelationshipsSchedules" + users: + $ref: "#/components/schemas/OnCallPageScheduledActionRelationshipsUsers" + type: object + OnCallPageScheduledActionRelationshipsSchedules: + description: The schedules the action escalates to. + properties: + data: + description: The list of schedules. + items: + $ref: "#/components/schemas/OnCallPageScheduledActionRelationshipsSchedulesData" + type: array + type: object + OnCallPageScheduledActionRelationshipsSchedulesData: + description: Reference to a schedule. + properties: + id: + description: The schedule ID. + example: 3653d3c6-0c75-11ea-ad28-fb5701eabc7d + type: string + type: + $ref: "#/components/schemas/ScheduleDataType" + required: + - id + - type + type: object + OnCallPageScheduledActionRelationshipsUsers: + description: The users the action escalates to. + properties: + data: + description: The list of users. + items: + $ref: "#/components/schemas/OnCallPageUserRelationshipData" + type: array + type: object + OnCallPageScheduledActionType: + default: scheduled_actions + description: Scheduled action resource type. + enum: + - scheduled_actions + example: scheduled_actions + type: string + x-enum-varnames: + - SCHEDULED_ACTIONS + OnCallPageServiceNowIncidentRelationship: + description: The ServiceNow incident linked to the page. + properties: + data: + $ref: "#/components/schemas/OnCallPageServiceNowIncidentRelationshipData" + type: object + OnCallPageServiceNowIncidentRelationshipData: + description: Reference to a ServiceNow incident. + properties: + id: + description: The ID of the ServiceNow incident. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/OnCallPageServiceNowIncidentType" + required: + - id + - type + type: object + OnCallPageServiceNowIncidentType: + default: service_now_incidents + description: ServiceNow incident resource type. + enum: + - service_now_incidents + example: service_now_incidents + type: string + x-enum-varnames: + - SERVICE_NOW_INCIDENTS + OnCallPageStatus: + description: The current status of the On-Call Page. + enum: + - triggered + - acknowledged + - resolved + example: triggered + type: string + x-enum-varnames: + - TRIGGERED + - ACKNOWLEDGED + - RESOLVED + OnCallPageTargetRelationship: + description: The team, user, or cross-organization handle that was paged. + properties: + data: + $ref: "#/components/schemas/OnCallPageTargetRelationshipData" + type: object + OnCallPageTargetRelationshipData: + description: Reference to the target of the page. + nullable: true + properties: + id: + description: The ID of the target. + example: 00000000-da3a-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/OnCallPageTargetRelationshipDataType" + required: + - id + - type + type: object + OnCallPageTargetRelationshipDataType: + description: The resource type of the page target. + enum: + - teams + - users + - cross_org_handles + example: teams + type: string + x-enum-varnames: + - TEAMS + - USERS + - CROSS_ORG_HANDLES OnCallPageTargetType: description: The kind of target, `team_id` | `team_handle` | `user_id`. enum: @@ -91748,6 +92299,85 @@ components: - TEAM_ID - TEAM_HANDLE - USER_ID + OnCallPageTeamRoutingRuleRelationship: + description: The team routing rule that matched the page. + properties: + data: + $ref: "#/components/schemas/OnCallPageTeamRoutingRuleRelationshipData" + type: object + OnCallPageTeamRoutingRuleRelationshipData: + description: Reference to a team routing rule. + properties: + id: + description: The ID of the team routing rule. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/TeamRoutingRulesDataRelationshipsRulesDataItemsType" + required: + - id + - type + type: object + OnCallPageUserRelationshipData: + description: Reference to a user. + properties: + id: + description: The user ID. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: "#/components/schemas/ScheduleUserType" + required: + - id + - type + type: object + OnCallPagesIncluded: + description: A resource related to a page. + oneOf: + - $ref: "#/components/schemas/ScheduleUser" + - $ref: "#/components/schemas/TeamReference" + - $ref: "#/components/schemas/OnCallPageScheduledAction" + - $ref: "#/components/schemas/OnCallPageLink" + OnCallPagesResponse: + description: A list of On-Call Pages with pagination metadata and related included resources. + properties: + data: + description: A list of pages. + items: + $ref: "#/components/schemas/OnCallPageData" + type: array + included: + description: Resources related to the pages, such as users, teams, and scheduled actions. + items: + $ref: "#/components/schemas/OnCallPagesIncluded" + type: array + meta: + $ref: "#/components/schemas/SchedulesResponseMeta" + required: + - data + type: object + OnCallPagesSort: + default: created_at + description: Sorting options for pages. Prefix a field with `-` to sort in descending order. + enum: + - created_at + - -created_at + - modified_at + - -modified_at + - status + - -status + - priority + - -priority + type: string + x-enum-varnames: + - CREATED_AT_ASCENDING + - CREATED_AT_DESCENDING + - MODIFIED_AT_ASCENDING + - MODIFIED_AT_DESCENDING + - STATUS_ASCENDING + - STATUS_DESCENDING + - PRIORITY_ASCENDING + - PRIORITY_DESCENDING OnCallPhoneNotificationRuleMethod: description: "Specifies the method in which a phone is used in a notification rule" enum: @@ -94392,7 +95022,7 @@ components: type: object OverrideDataType: default: overrides - description: "Indicates that the resource is of type 'overrides'." + description: "Indicates that the resource is of type `overrides`." enum: - overrides example: overrides @@ -94436,7 +95066,7 @@ components: type: object OverrideRelationshipsScheduleDataType: default: schedules - description: "Indicates that the related resource is of type 'schedules'." + description: "Indicates that the related resource is of type `schedules`." enum: - schedules example: schedules @@ -94467,7 +95097,7 @@ components: type: object OverrideRelationshipsUserDataType: default: users - description: "Indicates that the related resource is of type 'users'." + description: "Indicates that the related resource is of type `users`." enum: - users example: users @@ -106502,7 +107132,7 @@ components: type: object RoutingRuleRelationshipsPolicyDataType: default: policies - description: "Indicates that the resource is of type 'policies'." + description: "Indicates that the resource is of type `policies`." enum: - policies example: policies @@ -112121,13 +112751,13 @@ components: $ref: "#/components/schemas/SchedulesResponseMeta" type: object SchedulesResponseMeta: - description: Metadata that is included in the response when listing schedules. + description: Metadata that is included in the response when listing On-Call resources. properties: page: $ref: "#/components/schemas/SchedulesResponseMetaPage" type: object SchedulesResponseMetaPage: - description: Metadata related to paging information that is included in the response when listing schedules. + description: Metadata related to pagination information that is included in the response when listing On-Call resources. properties: first_number: description: First page number. @@ -123019,7 +123649,7 @@ components: type: object ShiftDataRelationshipsUserDataType: default: users - description: "Indicates that the related resource is of type 'users'." + description: "Indicates that the related resource is of type `users`." enum: - users example: users @@ -123028,7 +123658,7 @@ components: - USERS ShiftDataType: default: shifts - description: "Indicates that the resource is of type 'shifts'." + description: "Indicates that the resource is of type `shifts`." enum: - shifts example: shifts @@ -134046,7 +134676,7 @@ components: type: object TeamRoutingRulesDataRelationshipsRulesDataItemsType: default: team_routing_rules - description: "Indicates that the resource is of type 'team_routing_rules'." + description: "Indicates that the resource is of type `team_routing_rules`." enum: - team_routing_rules example: team_routing_rules @@ -207807,6 +208437,139 @@ paths: permissions: - on_call_write /api/v2/on-call/pages: + get: + description: Retrieve a paginated list of On-Call pages, optionally filtered by a search query and sorted. + operationId: ListOnCallPages + parameters: + - description: Number of On-Call Pages to return per page of results. The maximum allowed value is 1000. + in: query + name: page[size] + required: false + schema: + default: 100 + example: 100 + format: int64 + maximum: 1000 + type: integer + - description: Page of results to return, starting at 0. `page[number]` multiplied by `page[size]` must be less than 50000. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 0 + format: int64 + minimum: 0 + type: integer + - description: "Search query to filter pages. Supports filters such as `status`, `urgency`, `team`, `service`, and `tags`, for example `status:triggered`." + in: query + name: filter[query] + required: false + schema: + example: "status:triggered" + type: string + - description: Sort pages by the given field. Only one field is allowed. + in: query + name: sort + required: false + schema: + $ref: "#/components/schemas/OnCallPagesSort" + responses: + "200": + content: + "application/json": + examples: + default: + value: + data: + - attributes: + created_at: "2026-01-01T10:00:00Z" + description: Page details. + key: "25137717" + status: triggered + tags: + - service:test + title: "Service: Test is down" + urgency: high + id: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + relationships: + author: + data: + id: 00000000-0000-0000-0000-000000000001 + type: users + closed_by: + data: + responders: + data: + - id: 00000000-0000-0000-0000-000000000001 + type: users + scheduled_action: + data: + target: + data: + id: 00000000-da3a-0000-0000-000000000000 + type: teams + type: pages + included: + - attributes: + email: jane.doe@example.com + name: Jane Doe + status: active + id: 00000000-0000-0000-0000-000000000001 + type: users + - attributes: + avatar: "" + description: "" + handle: my-team + name: My Team + id: 00000000-da3a-0000-0000-000000000000 + type: teams + meta: + page: + first_number: 0 + last_number: 0 + next_number: + number: 0 + prev_number: + size: 100 + total: 1 + type: number_size + schema: + $ref: "#/components/schemas/OnCallPagesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: List On-Call pages + tags: + - On-Call + x-pagination: + limitParam: page[size] + pageParam: page[number] + resultsPath: data + "x-permission": + operator: AND + permissions: + - on_call_read post: description: |- Trigger a new On-Call Page. @@ -207832,7 +208595,7 @@ paths: $ref: "#/components/schemas/CreatePageRequest" required: true responses: - "200": + "201": content: application/json: examples: @@ -207843,7 +208606,7 @@ paths: type: pages schema: $ref: "#/components/schemas/CreatePageResponse" - description: OK. + description: Created. "429": $ref: "#/components/responses/TooManyRequestsResponse" security: @@ -207929,6 +208692,106 @@ paths: summary: Create On-Call Page tags: - On-Call Paging + /api/v2/on-call/pages/{page_id}: + get: + description: Get the details of an On-Call page. + operationId: GetOnCallPage + parameters: + - description: The ID of the page, or its key. + in: path + name: page_id + required: true + schema: + example: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + type: string + responses: + "200": + content: + "application/json": + examples: + default: + value: + data: + attributes: + created_at: "2026-01-01T10:00:00Z" + description: Page details. + key: "25137717" + status: triggered + tags: + - service:test + title: "Service: Test is down" + urgency: high + id: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + relationships: + author: + data: + id: 00000000-0000-0000-0000-000000000001 + type: users + closed_by: + data: + links: + data: + - id: 00000000-0000-0000-0000-000000000003 + type: links + responders: + data: + - id: 00000000-0000-0000-0000-000000000001 + type: users + scheduled_action: + data: + target: + data: + id: 00000000-da3a-0000-0000-000000000000 + type: teams + type: pages + included: + - attributes: + email: jane.doe@example.com + name: Jane Doe + status: active + id: 00000000-0000-0000-0000-000000000001 + type: users + - attributes: + avatar: "" + description: "" + handle: my-team + name: My Team + id: 00000000-da3a-0000-0000-000000000000 + type: teams + - attributes: + child_entity_id: 15e74b8b-f865-48d0-bcc5-453323ed2c8f + child_entity_type: page + parent_entity_id: 00000000-0000-0000-0000-000000000002 + parent_entity_type: case + relationship: pages + id: 00000000-0000-0000-0000-000000000003 + type: links + schema: + $ref: "#/components/schemas/OnCallPageResponse" + description: OK + "401": + $ref: "#/components/responses/UnauthorizedResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Get On-Call page + tags: + - On-Call + "x-permission": + operator: AND + permissions: + - on_call_read /api/v2/on-call/pages/{page_id}/acknowledge: post: description: |- @@ -207944,8 +208807,8 @@ paths: format: uuid type: string responses: - "202": - description: Accepted. + "204": + description: No Content. "429": $ref: "#/components/responses/TooManyRequestsResponse" security: @@ -208046,8 +208909,8 @@ paths: format: uuid type: string responses: - "202": - description: Accepted. + "204": + description: No Content. "429": $ref: "#/components/responses/TooManyRequestsResponse" security: @@ -208148,8 +209011,8 @@ paths: format: uuid type: string responses: - "202": - description: Accepted. + "204": + description: No Content. "429": $ref: "#/components/responses/TooManyRequestsResponse" security: diff --git a/examples/v2/on-call-paging/AcknowledgeOnCallPage.py b/examples/v2/on-call-paging/AcknowledgeOnCallPage.py index 89c75793f8..ac8f659466 100644 --- a/examples/v2/on-call-paging/AcknowledgeOnCallPage.py +++ b/examples/v2/on-call-paging/AcknowledgeOnCallPage.py @@ -1,5 +1,5 @@ """ -Acknowledge On-Call Page returns "Accepted." response +Acknowledge On-Call Page returns "No Content." response """ from os import environ diff --git a/examples/v2/on-call-paging/CreateOnCallPage.py b/examples/v2/on-call-paging/CreateOnCallPage.py index 8e9ebe51f4..702daba437 100644 --- a/examples/v2/on-call-paging/CreateOnCallPage.py +++ b/examples/v2/on-call-paging/CreateOnCallPage.py @@ -1,5 +1,5 @@ """ -Create On-Call Page returns "OK." response +Create On-Call Page returns "Created." response """ from os import environ diff --git a/examples/v2/on-call-paging/EscalateOnCallPage.py b/examples/v2/on-call-paging/EscalateOnCallPage.py index 9b7db46538..da4b11ba27 100644 --- a/examples/v2/on-call-paging/EscalateOnCallPage.py +++ b/examples/v2/on-call-paging/EscalateOnCallPage.py @@ -1,5 +1,5 @@ """ -Escalate On-Call Page returns "Accepted." response +Escalate On-Call Page returns "No Content." response """ from os import environ diff --git a/examples/v2/on-call-paging/ResolveOnCallPage.py b/examples/v2/on-call-paging/ResolveOnCallPage.py index a508ef9ada..961eff41e8 100644 --- a/examples/v2/on-call-paging/ResolveOnCallPage.py +++ b/examples/v2/on-call-paging/ResolveOnCallPage.py @@ -1,5 +1,5 @@ """ -Resolve On-Call Page returns "Accepted." response +Resolve On-Call Page returns "No Content." response """ from os import environ diff --git a/examples/v2/on-call/GetOnCallPage.py b/examples/v2/on-call/GetOnCallPage.py new file mode 100644 index 0000000000..805c178512 --- /dev/null +++ b/examples/v2/on-call/GetOnCallPage.py @@ -0,0 +1,17 @@ +""" +Get On-Call page returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.on_call_api import OnCallApi + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +with ApiClient(configuration) as api_client: + api_instance = OnCallApi(api_client) + response = api_instance.get_on_call_page( + page_id="f63eb677-07ce-46ab-b2e0-80ca1ffe91bf", + ) + + print(response) diff --git a/examples/v2/on-call/ListOnCallPages.py b/examples/v2/on-call/ListOnCallPages.py new file mode 100644 index 0000000000..6d8bc54fe5 --- /dev/null +++ b/examples/v2/on-call/ListOnCallPages.py @@ -0,0 +1,17 @@ +""" +List On-Call pages returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.on_call_api import OnCallApi + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +with ApiClient(configuration) as api_client: + api_instance = OnCallApi(api_client) + response = api_instance.list_on_call_pages( + filter_query="key:1", + ) + + print(response) diff --git a/examples/v2/on-call/ListOnCallPages_785978425.py b/examples/v2/on-call/ListOnCallPages_785978425.py new file mode 100644 index 0000000000..ed4238950e --- /dev/null +++ b/examples/v2/on-call/ListOnCallPages_785978425.py @@ -0,0 +1,15 @@ +""" +List On-Call pages returns "OK" response with pagination +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.on_call_api import OnCallApi + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +with ApiClient(configuration) as api_client: + api_instance = OnCallApi(api_client) + items = api_instance.list_on_call_pages_with_pagination() + for item in items: + print(item) diff --git a/src/datadog_api_client/v2/api/on_call_api.py b/src/datadog_api_client/v2/api/on_call_api.py index eac7798b15..7cb321050c 100644 --- a/src/datadog_api_client/v2/api/on_call_api.py +++ b/src/datadog_api_client/v2/api/on_call_api.py @@ -21,6 +21,10 @@ from datadog_api_client.v2.model.escalation_policy import EscalationPolicy from datadog_api_client.v2.model.escalation_policy_create_request import EscalationPolicyCreateRequest from datadog_api_client.v2.model.escalation_policy_update_request import EscalationPolicyUpdateRequest +from datadog_api_client.v2.model.on_call_pages_response import OnCallPagesResponse +from datadog_api_client.v2.model.on_call_pages_sort import OnCallPagesSort +from datadog_api_client.v2.model.on_call_page_data import OnCallPageData +from datadog_api_client.v2.model.on_call_page_response import OnCallPageResponse from datadog_api_client.v2.model.schedules import Schedules from datadog_api_client.v2.model.schedule_list_item import ScheduleListItem from datadog_api_client.v2.model.schedule import Schedule @@ -349,6 +353,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_on_call_page_endpoint = _Endpoint( + settings={ + "response_type": (OnCallPageResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/on-call/pages/{page_id}", + "operation_id": "get_on_call_page", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "page_id": { + "required": True, + "openapi_types": (str,), + "attribute": "page_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_on_call_schedule_endpoint = _Endpoint( settings={ "response_type": (Schedule,), @@ -632,6 +659,49 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_on_call_pages_endpoint = _Endpoint( + settings={ + "response_type": (OnCallPagesResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/on-call/pages", + "operation_id": "list_on_call_pages", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "page_size": { + "validation": { + "inclusive_maximum": 1000, + }, + "openapi_types": (int,), + "attribute": "page[size]", + "location": "query", + }, + "page_number": { + "validation": { + "inclusive_minimum": 0, + }, + "openapi_types": (int,), + "attribute": "page[number]", + "location": "query", + }, + "filter_query": { + "openapi_types": (str,), + "attribute": "filter[query]", + "location": "query", + }, + "sort": { + "openapi_types": (OnCallPagesSort,), + "attribute": "sort", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_on_call_schedules_endpoint = _Endpoint( settings={ "response_type": (Schedules,), @@ -1143,6 +1213,23 @@ def get_on_call_escalation_policy( return self._get_on_call_escalation_policy_endpoint.call_with_http_info(**kwargs) + def get_on_call_page( + self, + page_id: str, + ) -> OnCallPageResponse: + """Get On-Call page. + + Get the details of an On-Call page. + + :param page_id: The ID of the page, or its key. + :type page_id: str + :rtype: OnCallPageResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["page_id"] = page_id + + return self._get_on_call_page_endpoint.call_with_http_info(**kwargs) + def get_on_call_schedule( self, schedule_id: str, @@ -1480,6 +1567,93 @@ def list_on_call_escalation_policies_with_pagination( } return endpoint.call_with_http_info_paginated(pagination) + def list_on_call_pages( + self, + *, + page_size: Union[int, UnsetType] = unset, + page_number: Union[int, UnsetType] = unset, + filter_query: Union[str, UnsetType] = unset, + sort: Union[OnCallPagesSort, UnsetType] = unset, + ) -> OnCallPagesResponse: + """List On-Call pages. + + Retrieve a paginated list of On-Call pages, optionally filtered by a search query and sorted. + + :param page_size: Number of On-Call Pages to return per page of results. The maximum allowed value is 1000. + :type page_size: int, optional + :param page_number: Page of results to return, starting at 0. ``page[number]`` multiplied by ``page[size]`` must be less than 50000. + :type page_number: int, optional + :param filter_query: Search query to filter pages. Supports filters such as ``status`` , ``urgency`` , ``team`` , ``service`` , and ``tags`` , for example ``status:triggered``. + :type filter_query: str, optional + :param sort: Sort pages by the given field. Only one field is allowed. + :type sort: OnCallPagesSort, optional + :rtype: OnCallPagesResponse + """ + kwargs: Dict[str, Any] = {} + if page_size is not unset: + kwargs["page_size"] = page_size + + if page_number is not unset: + kwargs["page_number"] = page_number + + if filter_query is not unset: + kwargs["filter_query"] = filter_query + + if sort is not unset: + kwargs["sort"] = sort + + return self._list_on_call_pages_endpoint.call_with_http_info(**kwargs) + + def list_on_call_pages_with_pagination( + self, + *, + page_size: Union[int, UnsetType] = unset, + page_number: Union[int, UnsetType] = unset, + filter_query: Union[str, UnsetType] = unset, + sort: Union[OnCallPagesSort, UnsetType] = unset, + ) -> collections.abc.Iterable[OnCallPageData]: + """List On-Call pages. + + Provide a paginated version of :meth:`list_on_call_pages`, returning all items. + + :param page_size: Number of On-Call Pages to return per page of results. The maximum allowed value is 1000. + :type page_size: int, optional + :param page_number: Page of results to return, starting at 0. ``page[number]`` multiplied by ``page[size]`` must be less than 50000. + :type page_number: int, optional + :param filter_query: Search query to filter pages. Supports filters such as ``status`` , ``urgency`` , ``team`` , ``service`` , and ``tags`` , for example ``status:triggered``. + :type filter_query: str, optional + :param sort: Sort pages by the given field. Only one field is allowed. + :type sort: OnCallPagesSort, optional + + :return: A generator of paginated results. + :rtype: collections.abc.Iterable[OnCallPageData] + """ + kwargs: Dict[str, Any] = {} + if page_size is not unset: + kwargs["page_size"] = page_size + + if page_number is not unset: + kwargs["page_number"] = page_number + + if filter_query is not unset: + kwargs["filter_query"] = filter_query + + if sort is not unset: + kwargs["sort"] = sort + + local_page_size = get_attribute_from_path(kwargs, "page_size", 100) + endpoint = self._list_on_call_pages_endpoint + set_attribute_from_path(kwargs, "page_size", local_page_size, endpoint.params_map) + pagination = { + "limit_value": local_page_size, + "results_path": "data", + "page_param": "page_number", + "page_start": 0, + "endpoint": endpoint, + "kwargs": kwargs, + } + return endpoint.call_with_http_info_paginated(pagination) + def list_on_call_schedules( self, *, diff --git a/src/datadog_api_client/v2/model/create_notification_channel_data.py b/src/datadog_api_client/v2/model/create_notification_channel_data.py index e6275c232b..52dfd1d297 100644 --- a/src/datadog_api_client/v2/model/create_notification_channel_data.py +++ b/src/datadog_api_client/v2/model/create_notification_channel_data.py @@ -48,7 +48,7 @@ def __init__( :param attributes: Attributes for creating an on-call notification channel. :type attributes: CreateNotificationChannelAttributes, optional - :param type: Indicates that the resource is of type 'notification_channels'. + :param type: Indicates that the resource is of type ``notification_channels``. :type type: NotificationChannelType """ if attributes is not unset: diff --git a/src/datadog_api_client/v2/model/create_on_call_notification_rule_request_data.py b/src/datadog_api_client/v2/model/create_on_call_notification_rule_request_data.py index 0fa9a3ac48..a86b7be318 100644 --- a/src/datadog_api_client/v2/model/create_on_call_notification_rule_request_data.py +++ b/src/datadog_api_client/v2/model/create_on_call_notification_rule_request_data.py @@ -60,7 +60,7 @@ def __init__( :param relationships: Relationship object for creating a notification rule :type relationships: OnCallNotificationRuleRelationships, optional - :param type: Indicates that the resource is of type 'notification_rules'. + :param type: Indicates that the resource is of type ``notification_rules``. :type type: OnCallNotificationRuleType """ if attributes is not unset: diff --git a/src/datadog_api_client/v2/model/create_override_request_data.py b/src/datadog_api_client/v2/model/create_override_request_data.py index ed53aa1cce..05063d8400 100644 --- a/src/datadog_api_client/v2/model/create_override_request_data.py +++ b/src/datadog_api_client/v2/model/create_override_request_data.py @@ -54,7 +54,7 @@ def __init__( :param relationships: Relationships to set when creating an on-call schedule override. :type relationships: CreateOverrideRequestRelationships, optional - :param type: Indicates that the resource is of type 'overrides'. + :param type: Indicates that the resource is of type ``overrides``. :type type: OverrideDataType """ if relationships is not unset: diff --git a/src/datadog_api_client/v2/model/notification_channel_data.py b/src/datadog_api_client/v2/model/notification_channel_data.py index 210b251de9..2ce15a35d1 100644 --- a/src/datadog_api_client/v2/model/notification_channel_data.py +++ b/src/datadog_api_client/v2/model/notification_channel_data.py @@ -52,7 +52,7 @@ def __init__( :param id: Unique identifier for the channel :type id: str, optional - :param type: Indicates that the resource is of type 'notification_channels'. + :param type: Indicates that the resource is of type ``notification_channels``. :type type: NotificationChannelType """ if attributes is not unset: diff --git a/src/datadog_api_client/v2/model/notification_channel_type.py b/src/datadog_api_client/v2/model/notification_channel_type.py index 4e3f72148c..610c393eb4 100644 --- a/src/datadog_api_client/v2/model/notification_channel_type.py +++ b/src/datadog_api_client/v2/model/notification_channel_type.py @@ -14,7 +14,7 @@ class NotificationChannelType(ModelSimple): """ - Indicates that the resource is of type 'notification_channels'. + Indicates that the resource is of type `notification_channels`. :param value: If omitted defaults to "notification_channels". Must be one of ["notification_channels"]. :type value: str diff --git a/src/datadog_api_client/v2/model/on_call_notification_rule_channel_relationship_data.py b/src/datadog_api_client/v2/model/on_call_notification_rule_channel_relationship_data.py index cf6cdfe68c..9dcfe038d5 100644 --- a/src/datadog_api_client/v2/model/on_call_notification_rule_channel_relationship_data.py +++ b/src/datadog_api_client/v2/model/on_call_notification_rule_channel_relationship_data.py @@ -41,7 +41,7 @@ def __init__( :param id: ID of the notification channel :type id: str, optional - :param type: Indicates that the resource is of type 'notification_channels'. + :param type: Indicates that the resource is of type ``notification_channels``. :type type: NotificationChannelType, optional """ if id is not unset: diff --git a/src/datadog_api_client/v2/model/on_call_notification_rule_data.py b/src/datadog_api_client/v2/model/on_call_notification_rule_data.py index b6c6be6bbd..3edbe3bf22 100644 --- a/src/datadog_api_client/v2/model/on_call_notification_rule_data.py +++ b/src/datadog_api_client/v2/model/on_call_notification_rule_data.py @@ -62,7 +62,7 @@ def __init__( :param relationships: Relationship object for creating a notification rule :type relationships: OnCallNotificationRuleRelationships, optional - :param type: Indicates that the resource is of type 'notification_rules'. + :param type: Indicates that the resource is of type ``notification_rules``. :type type: OnCallNotificationRuleType """ if attributes is not unset: diff --git a/src/datadog_api_client/v2/model/on_call_notification_rule_type.py b/src/datadog_api_client/v2/model/on_call_notification_rule_type.py index 9c02bc25d7..b08c3fd619 100644 --- a/src/datadog_api_client/v2/model/on_call_notification_rule_type.py +++ b/src/datadog_api_client/v2/model/on_call_notification_rule_type.py @@ -14,7 +14,7 @@ class OnCallNotificationRuleType(ModelSimple): """ - Indicates that the resource is of type 'notification_rules'. + Indicates that the resource is of type `notification_rules`. :param value: If omitted defaults to "notification_rules". Must be one of ["notification_rules"]. :type value: str diff --git a/src/datadog_api_client/v2/model/on_call_notification_rules_included.py b/src/datadog_api_client/v2/model/on_call_notification_rules_included.py index 8cd1327fa9..11ed0d16b7 100644 --- a/src/datadog_api_client/v2/model/on_call_notification_rules_included.py +++ b/src/datadog_api_client/v2/model/on_call_notification_rules_included.py @@ -21,7 +21,7 @@ def __init__(self, **kwargs): :param id: Unique identifier for the channel :type id: str, optional - :param type: Indicates that the resource is of type 'notification_channels'. + :param type: Indicates that the resource is of type `notification_channels`. :type type: NotificationChannelType """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_author_relationship.py b/src/datadog_api_client/v2/model/on_call_page_author_relationship.py new file mode 100644 index 0000000000..75b881342a --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_author_relationship.py @@ -0,0 +1,43 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_author_relationship_data import OnCallPageAuthorRelationshipData + + +class OnCallPageAuthorRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_author_relationship_data import OnCallPageAuthorRelationshipData + + return { + "data": (OnCallPageAuthorRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[OnCallPageAuthorRelationshipData, none_type, UnsetType] = unset, **kwargs): + """ + Reference to the entity that performed an action on the page. + + :param data: Reference to the author of a page action. + :type data: OnCallPageAuthorRelationshipData, none_type, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_author_relationship_data.py b/src/datadog_api_client/v2/model/on_call_page_author_relationship_data.py new file mode 100644 index 0000000000..8c9afcff23 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_author_relationship_data.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class OnCallPageAuthorRelationshipData(ModelNormal): + _nullable = True + + @cached_property + def openapi_types(_): + return { + "id": (str,), + "type": (str,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: str, **kwargs): + """ + Reference to the author of a page action. + + :param id: The ID of the author. + :type id: str + + :param type: The resource type of the author, for example ``users`` , ``monitors`` , + ``incident_authors`` , or ``security_signal``. + :type type: str + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_data.py b/src/datadog_api_client/v2/model/on_call_page_data.py new file mode 100644 index 0000000000..533f4bc005 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_data.py @@ -0,0 +1,74 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_data_attributes import OnCallPageDataAttributes + from datadog_api_client.v2.model.on_call_page_data_relationships import OnCallPageDataRelationships + from datadog_api_client.v2.model.on_call_page_data_type import OnCallPageDataType + + +class OnCallPageData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_data_attributes import OnCallPageDataAttributes + from datadog_api_client.v2.model.on_call_page_data_relationships import OnCallPageDataRelationships + from datadog_api_client.v2.model.on_call_page_data_type import OnCallPageDataType + + return { + "attributes": (OnCallPageDataAttributes,), + "id": (UUID,), + "relationships": (OnCallPageDataRelationships,), + "type": (OnCallPageDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + id: UUID, + type: OnCallPageDataType, + attributes: Union[OnCallPageDataAttributes, UnsetType] = unset, + relationships: Union[OnCallPageDataRelationships, UnsetType] = unset, + **kwargs, + ): + """ + An On-Call Page. + + :param attributes: The attributes of an On-Call Page. + :type attributes: OnCallPageDataAttributes, optional + + :param id: The unique ID of the page. + :type id: UUID + + :param relationships: The relationships of an On-Call Page. + :type relationships: OnCallPageDataRelationships, optional + + :param type: Indicates that the resource is of type ``pages``. + :type type: OnCallPageDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if relationships is not unset: + kwargs["relationships"] = relationships + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_data_attributes.py b/src/datadog_api_client/v2/model/on_call_page_data_attributes.py new file mode 100644 index 0000000000..3140e7c8fc --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_data_attributes.py @@ -0,0 +1,179 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_live_call import OnCallPageLiveCall + from datadog_api_client.v2.model.on_call_page_release_origin import OnCallPageReleaseOrigin + from datadog_api_client.v2.model.on_call_page_status import OnCallPageStatus + from datadog_api_client.v2.model.page_urgency import PageUrgency + + +class OnCallPageDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_live_call import OnCallPageLiveCall + from datadog_api_client.v2.model.on_call_page_release_origin import OnCallPageReleaseOrigin + from datadog_api_client.v2.model.on_call_page_status import OnCallPageStatus + from datadog_api_client.v2.model.page_urgency import PageUrgency + + return { + "acknowledged_at": (datetime,), + "closed_at": (datetime,), + "comment_count": (int,), + "created_at": (datetime,), + "description": (str,), + "escalation_policy_uuid": (UUID,), + "key": (str,), + "live_call": (OnCallPageLiveCall,), + "modified_at": (datetime,), + "release_at": (datetime,), + "release_origin": (OnCallPageReleaseOrigin,), + "responders_added_at": (datetime,), + "services": ([str],), + "status": (OnCallPageStatus,), + "tags": ([str],), + "title": (str,), + "urgency": (PageUrgency,), + } + + attribute_map = { + "acknowledged_at": "acknowledged_at", + "closed_at": "closed_at", + "comment_count": "comment_count", + "created_at": "created_at", + "description": "description", + "escalation_policy_uuid": "escalation_policy_uuid", + "key": "key", + "live_call": "live_call", + "modified_at": "modified_at", + "release_at": "release_at", + "release_origin": "release_origin", + "responders_added_at": "responders_added_at", + "services": "services", + "status": "status", + "tags": "tags", + "title": "title", + "urgency": "urgency", + } + + def __init__( + self_, + created_at: datetime, + description: str, + key: str, + status: OnCallPageStatus, + tags: List[str], + title: str, + urgency: PageUrgency, + acknowledged_at: Union[datetime, UnsetType] = unset, + closed_at: Union[datetime, UnsetType] = unset, + comment_count: Union[int, UnsetType] = unset, + escalation_policy_uuid: Union[UUID, UnsetType] = unset, + live_call: Union[OnCallPageLiveCall, UnsetType] = unset, + modified_at: Union[datetime, UnsetType] = unset, + release_at: Union[datetime, UnsetType] = unset, + release_origin: Union[OnCallPageReleaseOrigin, UnsetType] = unset, + responders_added_at: Union[datetime, UnsetType] = unset, + services: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + The attributes of an On-Call Page. + + :param acknowledged_at: The time when the page was first acknowledged. + :type acknowledged_at: datetime, optional + + :param closed_at: The time when the page was resolved. + :type closed_at: datetime, optional + + :param comment_count: The number of comments on the page. + :type comment_count: int, optional + + :param created_at: The time when the page was created. + :type created_at: datetime + + :param description: A short summary of the issue or context. + :type description: str + + :param escalation_policy_uuid: The ID of the escalation policy used to route the page. + :type escalation_policy_uuid: UUID, optional + + :param key: An alternative numeric identifier of the page, as displayed in the Datadog UI. + :type key: str + + :param live_call: Live call information for a page triggered by a live call route. + :type live_call: OnCallPageLiveCall, optional + + :param modified_at: The time when the page was last modified. + :type modified_at: datetime, optional + + :param release_at: The time when the snooze ends. Only set while the page is snoozed, together with ``release_origin``. + :type release_at: datetime, optional + + :param release_origin: What snoozed the page. Only set while the page is snoozed, together with ``release_at``. + `ack_timeout`: the acknowledgment timeout. `team_rules_active_hours`: the page was + triggered outside of the active hours of the team's routing rules. ``manual_snooze`` : + a user snoozed the page. + :type release_origin: OnCallPageReleaseOrigin, optional + + :param responders_added_at: The time when responders were first added to the page. + :type responders_added_at: datetime, optional + + :param services: The services associated with the page. + :type services: [str], optional + + :param status: The current status of the On-Call Page. + :type status: OnCallPageStatus + + :param tags: Tags associated with the page. + :type tags: [str] + + :param title: The title of the page. + :type title: str + + :param urgency: On-Call Page urgency level. + :type urgency: PageUrgency + """ + if acknowledged_at is not unset: + kwargs["acknowledged_at"] = acknowledged_at + if closed_at is not unset: + kwargs["closed_at"] = closed_at + if comment_count is not unset: + kwargs["comment_count"] = comment_count + if escalation_policy_uuid is not unset: + kwargs["escalation_policy_uuid"] = escalation_policy_uuid + if live_call is not unset: + kwargs["live_call"] = live_call + if modified_at is not unset: + kwargs["modified_at"] = modified_at + if release_at is not unset: + kwargs["release_at"] = release_at + if release_origin is not unset: + kwargs["release_origin"] = release_origin + if responders_added_at is not unset: + kwargs["responders_added_at"] = responders_added_at + if services is not unset: + kwargs["services"] = services + super().__init__(kwargs) + + self_.created_at = created_at + self_.description = description + self_.key = key + self_.status = status + self_.tags = tags + self_.title = title + self_.urgency = urgency diff --git a/src/datadog_api_client/v2/model/on_call_page_data_relationships.py b/src/datadog_api_client/v2/model/on_call_page_data_relationships.py new file mode 100644 index 0000000000..303b20087a --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_data_relationships.py @@ -0,0 +1,136 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_author_relationship import OnCallPageAuthorRelationship + from datadog_api_client.v2.model.on_call_page_jira_issue_relationship import OnCallPageJiraIssueRelationship + from datadog_api_client.v2.model.on_call_page_links_relationship import OnCallPageLinksRelationship + from datadog_api_client.v2.model.on_call_page_responders_relationship import OnCallPageRespondersRelationship + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationship import ( + OnCallPageScheduledActionRelationship, + ) + from datadog_api_client.v2.model.on_call_page_service_now_incident_relationship import ( + OnCallPageServiceNowIncidentRelationship, + ) + from datadog_api_client.v2.model.on_call_page_target_relationship import OnCallPageTargetRelationship + from datadog_api_client.v2.model.on_call_page_team_routing_rule_relationship import ( + OnCallPageTeamRoutingRuleRelationship, + ) + + +class OnCallPageDataRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_author_relationship import OnCallPageAuthorRelationship + from datadog_api_client.v2.model.on_call_page_jira_issue_relationship import OnCallPageJiraIssueRelationship + from datadog_api_client.v2.model.on_call_page_links_relationship import OnCallPageLinksRelationship + from datadog_api_client.v2.model.on_call_page_responders_relationship import OnCallPageRespondersRelationship + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationship import ( + OnCallPageScheduledActionRelationship, + ) + from datadog_api_client.v2.model.on_call_page_service_now_incident_relationship import ( + OnCallPageServiceNowIncidentRelationship, + ) + from datadog_api_client.v2.model.on_call_page_target_relationship import OnCallPageTargetRelationship + from datadog_api_client.v2.model.on_call_page_team_routing_rule_relationship import ( + OnCallPageTeamRoutingRuleRelationship, + ) + + return { + "author": (OnCallPageAuthorRelationship,), + "closed_by": (OnCallPageAuthorRelationship,), + "jira_issue": (OnCallPageJiraIssueRelationship,), + "links": (OnCallPageLinksRelationship,), + "responders": (OnCallPageRespondersRelationship,), + "scheduled_action": (OnCallPageScheduledActionRelationship,), + "service_now_incident": (OnCallPageServiceNowIncidentRelationship,), + "target": (OnCallPageTargetRelationship,), + "team_routing_rule": (OnCallPageTeamRoutingRuleRelationship,), + } + + attribute_map = { + "author": "author", + "closed_by": "closed_by", + "jira_issue": "jira_issue", + "links": "links", + "responders": "responders", + "scheduled_action": "scheduled_action", + "service_now_incident": "service_now_incident", + "target": "target", + "team_routing_rule": "team_routing_rule", + } + + def __init__( + self_, + author: Union[OnCallPageAuthorRelationship, UnsetType] = unset, + closed_by: Union[OnCallPageAuthorRelationship, UnsetType] = unset, + jira_issue: Union[OnCallPageJiraIssueRelationship, UnsetType] = unset, + links: Union[OnCallPageLinksRelationship, UnsetType] = unset, + responders: Union[OnCallPageRespondersRelationship, UnsetType] = unset, + scheduled_action: Union[OnCallPageScheduledActionRelationship, UnsetType] = unset, + service_now_incident: Union[OnCallPageServiceNowIncidentRelationship, UnsetType] = unset, + target: Union[OnCallPageTargetRelationship, UnsetType] = unset, + team_routing_rule: Union[OnCallPageTeamRoutingRuleRelationship, UnsetType] = unset, + **kwargs, + ): + """ + The relationships of an On-Call Page. + + :param author: Reference to the entity that performed an action on the page. + :type author: OnCallPageAuthorRelationship, optional + + :param closed_by: Reference to the entity that performed an action on the page. + :type closed_by: OnCallPageAuthorRelationship, optional + + :param jira_issue: The Jira issue linked to the page. + :type jira_issue: OnCallPageJiraIssueRelationship, optional + + :param links: Links between the page and other Datadog resources, such as incidents. Always empty when listing pages. + :type links: OnCallPageLinksRelationship, optional + + :param responders: The users responding to the page. + :type responders: OnCallPageRespondersRelationship, optional + + :param scheduled_action: The next action scheduled on the page, such as an escalation. + :type scheduled_action: OnCallPageScheduledActionRelationship, optional + + :param service_now_incident: The ServiceNow incident linked to the page. + :type service_now_incident: OnCallPageServiceNowIncidentRelationship, optional + + :param target: The team, user, or cross-organization handle that was paged. + :type target: OnCallPageTargetRelationship, optional + + :param team_routing_rule: The team routing rule that matched the page. + :type team_routing_rule: OnCallPageTeamRoutingRuleRelationship, optional + """ + if author is not unset: + kwargs["author"] = author + if closed_by is not unset: + kwargs["closed_by"] = closed_by + if jira_issue is not unset: + kwargs["jira_issue"] = jira_issue + if links is not unset: + kwargs["links"] = links + if responders is not unset: + kwargs["responders"] = responders + if scheduled_action is not unset: + kwargs["scheduled_action"] = scheduled_action + if service_now_incident is not unset: + kwargs["service_now_incident"] = service_now_incident + if target is not unset: + kwargs["target"] = target + if team_routing_rule is not unset: + kwargs["team_routing_rule"] = team_routing_rule + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_data_type.py b/src/datadog_api_client/v2/model/on_call_page_data_type.py new file mode 100644 index 0000000000..a215c09fa7 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_data_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageDataType(ModelSimple): + """ + Indicates that the resource is of type `pages`. + + :param value: If omitted defaults to "pages". Must be one of ["pages"]. + :type value: str + """ + + allowed_values = { + "pages", + } + PAGES: ClassVar["OnCallPageDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageDataType.PAGES = OnCallPageDataType("pages") diff --git a/src/datadog_api_client/v2/model/on_call_page_jira_issue_relationship.py b/src/datadog_api_client/v2/model/on_call_page_jira_issue_relationship.py new file mode 100644 index 0000000000..4ef98f3077 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_jira_issue_relationship.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_jira_issue_relationship_data import ( + OnCallPageJiraIssueRelationshipData, + ) + + +class OnCallPageJiraIssueRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_jira_issue_relationship_data import ( + OnCallPageJiraIssueRelationshipData, + ) + + return { + "data": (OnCallPageJiraIssueRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[OnCallPageJiraIssueRelationshipData, UnsetType] = unset, **kwargs): + """ + The Jira issue linked to the page. + + :param data: Reference to a Jira issue. + :type data: OnCallPageJiraIssueRelationshipData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_jira_issue_relationship_data.py b/src/datadog_api_client/v2/model/on_call_page_jira_issue_relationship_data.py new file mode 100644 index 0000000000..0c8eef4962 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_jira_issue_relationship_data.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_jira_issue_type import OnCallPageJiraIssueType + + +class OnCallPageJiraIssueRelationshipData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_jira_issue_type import OnCallPageJiraIssueType + + return { + "id": (str,), + "type": (OnCallPageJiraIssueType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: OnCallPageJiraIssueType, **kwargs): + """ + Reference to a Jira issue. + + :param id: The ID of the Jira issue, in the form ``:``. + :type id: str + + :param type: Jira issue resource type. + :type type: OnCallPageJiraIssueType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_jira_issue_type.py b/src/datadog_api_client/v2/model/on_call_page_jira_issue_type.py new file mode 100644 index 0000000000..e4855d7ab5 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_jira_issue_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageJiraIssueType(ModelSimple): + """ + Jira issue resource type. + + :param value: If omitted defaults to "jira_issues". Must be one of ["jira_issues"]. + :type value: str + """ + + allowed_values = { + "jira_issues", + } + JIRA_ISSUES: ClassVar["OnCallPageJiraIssueType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageJiraIssueType.JIRA_ISSUES = OnCallPageJiraIssueType("jira_issues") diff --git a/src/datadog_api_client/v2/model/on_call_page_link.py b/src/datadog_api_client/v2/model/on_call_page_link.py new file mode 100644 index 0000000000..ab772d2a39 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_link.py @@ -0,0 +1,65 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_link_attributes import OnCallPageLinkAttributes + from datadog_api_client.v2.model.on_call_page_link_type import OnCallPageLinkType + + +class OnCallPageLink(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_link_attributes import OnCallPageLinkAttributes + from datadog_api_client.v2.model.on_call_page_link_type import OnCallPageLinkType + + return { + "attributes": (OnCallPageLinkAttributes,), + "id": (str,), + "type": (OnCallPageLinkType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + id: str, + type: OnCallPageLinkType, + attributes: Union[OnCallPageLinkAttributes, UnsetType] = unset, + **kwargs, + ): + """ + A link between a page and another Datadog resource, such as an incident. + + :param attributes: The attributes of a page link. A page can be the child of another Datadog resource + (for example, when an incident triggers it), or the parent of one (for example, when the + page is escalated to an incident). + :type attributes: OnCallPageLinkAttributes, optional + + :param id: The ID of the link. + :type id: str + + :param type: Page link resource type. + :type type: OnCallPageLinkType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_link_attributes.py b/src/datadog_api_client/v2/model/on_call_page_link_attributes.py new file mode 100644 index 0000000000..e514eb0a0a --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_link_attributes.py @@ -0,0 +1,76 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_link_entity_type import OnCallPageLinkEntityType + from datadog_api_client.v2.model.on_call_page_link_relationship_type import OnCallPageLinkRelationshipType + + +class OnCallPageLinkAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_link_entity_type import OnCallPageLinkEntityType + from datadog_api_client.v2.model.on_call_page_link_relationship_type import OnCallPageLinkRelationshipType + + return { + "child_entity_id": (str,), + "child_entity_type": (OnCallPageLinkEntityType,), + "parent_entity_id": (str,), + "parent_entity_type": (OnCallPageLinkEntityType,), + "relationship": (OnCallPageLinkRelationshipType,), + } + + attribute_map = { + "child_entity_id": "child_entity_id", + "child_entity_type": "child_entity_type", + "parent_entity_id": "parent_entity_id", + "parent_entity_type": "parent_entity_type", + "relationship": "relationship", + } + + def __init__( + self_, + child_entity_id: str, + child_entity_type: OnCallPageLinkEntityType, + parent_entity_id: str, + parent_entity_type: OnCallPageLinkEntityType, + relationship: OnCallPageLinkRelationshipType, + **kwargs, + ): + """ + The attributes of a page link. A page can be the child of another Datadog resource + (for example, when an incident triggers it), or the parent of one (for example, when the + page is escalated to an incident). + + :param child_entity_id: The ID of the child resource. + :type child_entity_id: str + + :param child_entity_type: The type of a resource linked to a page. + :type child_entity_type: OnCallPageLinkEntityType + + :param parent_entity_id: The ID of the parent resource. + :type parent_entity_id: str + + :param parent_entity_type: The type of a resource linked to a page. + :type parent_entity_type: OnCallPageLinkEntityType + + :param relationship: How the parent resource relates to the child resource. + :type relationship: OnCallPageLinkRelationshipType + """ + super().__init__(kwargs) + + self_.child_entity_id = child_entity_id + self_.child_entity_type = child_entity_type + self_.parent_entity_id = parent_entity_id + self_.parent_entity_type = parent_entity_type + self_.relationship = relationship diff --git a/src/datadog_api_client/v2/model/on_call_page_link_entity_type.py b/src/datadog_api_client/v2/model/on_call_page_link_entity_type.py new file mode 100644 index 0000000000..1339a829df --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_link_entity_type.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageLinkEntityType(ModelSimple): + """ + The type of a resource linked to a page. + + :param value: Must be one of ["case", "incident", "page", "agent_conversation"]. + :type value: str + """ + + allowed_values = { + "case", + "incident", + "page", + "agent_conversation", + } + CASE: ClassVar["OnCallPageLinkEntityType"] + INCIDENT: ClassVar["OnCallPageLinkEntityType"] + PAGE: ClassVar["OnCallPageLinkEntityType"] + AGENT_CONVERSATION: ClassVar["OnCallPageLinkEntityType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageLinkEntityType.CASE = OnCallPageLinkEntityType("case") +OnCallPageLinkEntityType.INCIDENT = OnCallPageLinkEntityType("incident") +OnCallPageLinkEntityType.PAGE = OnCallPageLinkEntityType("page") +OnCallPageLinkEntityType.AGENT_CONVERSATION = OnCallPageLinkEntityType("agent_conversation") diff --git a/src/datadog_api_client/v2/model/on_call_page_link_relationship_data.py b/src/datadog_api_client/v2/model/on_call_page_link_relationship_data.py new file mode 100644 index 0000000000..7e86117215 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_link_relationship_data.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_link_type import OnCallPageLinkType + + +class OnCallPageLinkRelationshipData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_link_type import OnCallPageLinkType + + return { + "id": (str,), + "type": (OnCallPageLinkType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: OnCallPageLinkType, **kwargs): + """ + Reference to a page link. + + :param id: The ID of the link. + :type id: str + + :param type: Page link resource type. + :type type: OnCallPageLinkType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_link_relationship_type.py b/src/datadog_api_client/v2/model/on_call_page_link_relationship_type.py new file mode 100644 index 0000000000..6691874222 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_link_relationship_type.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageLinkRelationshipType(ModelSimple): + """ + How the parent resource relates to the child resource. + + :param value: Must be one of ["relates_to", "causes", "blocks", "duplicates", "parent_of", "successor_of", "escalates_to", "pages"]. + :type value: str + """ + + allowed_values = { + "relates_to", + "causes", + "blocks", + "duplicates", + "parent_of", + "successor_of", + "escalates_to", + "pages", + } + RELATES_TO: ClassVar["OnCallPageLinkRelationshipType"] + CAUSES: ClassVar["OnCallPageLinkRelationshipType"] + BLOCKS: ClassVar["OnCallPageLinkRelationshipType"] + DUPLICATES: ClassVar["OnCallPageLinkRelationshipType"] + PARENT_OF: ClassVar["OnCallPageLinkRelationshipType"] + SUCCESSOR_OF: ClassVar["OnCallPageLinkRelationshipType"] + ESCALATES_TO: ClassVar["OnCallPageLinkRelationshipType"] + PAGES: ClassVar["OnCallPageLinkRelationshipType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageLinkRelationshipType.RELATES_TO = OnCallPageLinkRelationshipType("relates_to") +OnCallPageLinkRelationshipType.CAUSES = OnCallPageLinkRelationshipType("causes") +OnCallPageLinkRelationshipType.BLOCKS = OnCallPageLinkRelationshipType("blocks") +OnCallPageLinkRelationshipType.DUPLICATES = OnCallPageLinkRelationshipType("duplicates") +OnCallPageLinkRelationshipType.PARENT_OF = OnCallPageLinkRelationshipType("parent_of") +OnCallPageLinkRelationshipType.SUCCESSOR_OF = OnCallPageLinkRelationshipType("successor_of") +OnCallPageLinkRelationshipType.ESCALATES_TO = OnCallPageLinkRelationshipType("escalates_to") +OnCallPageLinkRelationshipType.PAGES = OnCallPageLinkRelationshipType("pages") diff --git a/src/datadog_api_client/v2/model/on_call_page_link_type.py b/src/datadog_api_client/v2/model/on_call_page_link_type.py new file mode 100644 index 0000000000..8e6179cbee --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_link_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageLinkType(ModelSimple): + """ + Page link resource type. + + :param value: If omitted defaults to "links". Must be one of ["links"]. + :type value: str + """ + + allowed_values = { + "links", + } + LINKS: ClassVar["OnCallPageLinkType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageLinkType.LINKS = OnCallPageLinkType("links") diff --git a/src/datadog_api_client/v2/model/on_call_page_links_relationship.py b/src/datadog_api_client/v2/model/on_call_page_links_relationship.py new file mode 100644 index 0000000000..29be5e780c --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_links_relationship.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_link_relationship_data import OnCallPageLinkRelationshipData + + +class OnCallPageLinksRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_link_relationship_data import OnCallPageLinkRelationshipData + + return { + "data": ([OnCallPageLinkRelationshipData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[OnCallPageLinkRelationshipData], UnsetType] = unset, **kwargs): + """ + Links between the page and other Datadog resources, such as incidents. Always empty when listing pages. + + :param data: The list of page links. + :type data: [OnCallPageLinkRelationshipData], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_live_call.py b/src/datadog_api_client/v2/model/on_call_page_live_call.py new file mode 100644 index 0000000000..0ac1fcb7df --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_live_call.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_live_call_over import OnCallPageLiveCallOver + + +class OnCallPageLiveCall(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_live_call_over import OnCallPageLiveCallOver + + return { + "call_over": (OnCallPageLiveCallOver,), + } + + attribute_map = { + "call_over": "call_over", + } + + def __init__(self_, call_over: Union[OnCallPageLiveCallOver, UnsetType] = unset, **kwargs): + """ + Live call information for a page triggered by a live call route. + + :param call_over: Information about a live call that has ended. + :type call_over: OnCallPageLiveCallOver, optional + """ + if call_over is not unset: + kwargs["call_over"] = call_over + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_live_call_outcome.py b/src/datadog_api_client/v2/model/on_call_page_live_call_outcome.py new file mode 100644 index 0000000000..3ce4d5c58a --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_live_call_outcome.py @@ -0,0 +1,47 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageLiveCallOutcome(ModelSimple): + """ + The outcome of a live call that has ended. + + :param value: Must be one of ["success_call_answered", "failure_no_responder", "failure_caller_abandoned", "failure_outside_support_hours", "failure_internal_error"]. + :type value: str + """ + + allowed_values = { + "success_call_answered", + "failure_no_responder", + "failure_caller_abandoned", + "failure_outside_support_hours", + "failure_internal_error", + } + SUCCESS_CALL_ANSWERED: ClassVar["OnCallPageLiveCallOutcome"] + FAILURE_NO_RESPONDER: ClassVar["OnCallPageLiveCallOutcome"] + FAILURE_CALLER_ABANDONED: ClassVar["OnCallPageLiveCallOutcome"] + FAILURE_OUTSIDE_SUPPORT_HOURS: ClassVar["OnCallPageLiveCallOutcome"] + FAILURE_INTERNAL_ERROR: ClassVar["OnCallPageLiveCallOutcome"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageLiveCallOutcome.SUCCESS_CALL_ANSWERED = OnCallPageLiveCallOutcome("success_call_answered") +OnCallPageLiveCallOutcome.FAILURE_NO_RESPONDER = OnCallPageLiveCallOutcome("failure_no_responder") +OnCallPageLiveCallOutcome.FAILURE_CALLER_ABANDONED = OnCallPageLiveCallOutcome("failure_caller_abandoned") +OnCallPageLiveCallOutcome.FAILURE_OUTSIDE_SUPPORT_HOURS = OnCallPageLiveCallOutcome("failure_outside_support_hours") +OnCallPageLiveCallOutcome.FAILURE_INTERNAL_ERROR = OnCallPageLiveCallOutcome("failure_internal_error") diff --git a/src/datadog_api_client/v2/model/on_call_page_live_call_over.py b/src/datadog_api_client/v2/model/on_call_page_live_call_over.py new file mode 100644 index 0000000000..9d5225dce8 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_live_call_over.py @@ -0,0 +1,55 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_live_call_outcome import OnCallPageLiveCallOutcome + + +class OnCallPageLiveCallOver(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_live_call_outcome import OnCallPageLiveCallOutcome + + return { + "outcome": (OnCallPageLiveCallOutcome,), + "support_hours_start_at": (datetime,), + } + + attribute_map = { + "outcome": "outcome", + "support_hours_start_at": "support_hours_start_at", + } + + def __init__( + self_, + outcome: Union[OnCallPageLiveCallOutcome, UnsetType] = unset, + support_hours_start_at: Union[datetime, UnsetType] = unset, + **kwargs, + ): + """ + Information about a live call that has ended. + + :param outcome: The outcome of a live call that has ended. + :type outcome: OnCallPageLiveCallOutcome, optional + + :param support_hours_start_at: When support hours start, if the call was placed outside support hours. + :type support_hours_start_at: datetime, optional + """ + if outcome is not unset: + kwargs["outcome"] = outcome + if support_hours_start_at is not unset: + kwargs["support_hours_start_at"] = support_hours_start_at + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_release_origin.py b/src/datadog_api_client/v2/model/on_call_page_release_origin.py new file mode 100644 index 0000000000..81fc498ff0 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_release_origin.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageReleaseOrigin(ModelSimple): + """ + What snoozed the page. Only set while the page is snoozed, together with `release_at`. + `ack_timeout`: the acknowledgment timeout. `team_rules_active_hours`: the page was + triggered outside of the active hours of the team's routing rules. `manual_snooze`: + a user snoozed the page. + + :param value: Must be one of ["ack_timeout", "team_rules_active_hours", "manual_snooze"]. + :type value: str + """ + + allowed_values = { + "ack_timeout", + "team_rules_active_hours", + "manual_snooze", + } + ACK_TIMEOUT: ClassVar["OnCallPageReleaseOrigin"] + TEAM_RULES_ACTIVE_HOURS: ClassVar["OnCallPageReleaseOrigin"] + MANUAL_SNOOZE: ClassVar["OnCallPageReleaseOrigin"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageReleaseOrigin.ACK_TIMEOUT = OnCallPageReleaseOrigin("ack_timeout") +OnCallPageReleaseOrigin.TEAM_RULES_ACTIVE_HOURS = OnCallPageReleaseOrigin("team_rules_active_hours") +OnCallPageReleaseOrigin.MANUAL_SNOOZE = OnCallPageReleaseOrigin("manual_snooze") diff --git a/src/datadog_api_client/v2/model/on_call_page_responders_relationship.py b/src/datadog_api_client/v2/model/on_call_page_responders_relationship.py new file mode 100644 index 0000000000..6b3497cb90 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_responders_relationship.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_user_relationship_data import OnCallPageUserRelationshipData + + +class OnCallPageRespondersRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_user_relationship_data import OnCallPageUserRelationshipData + + return { + "data": ([OnCallPageUserRelationshipData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[OnCallPageUserRelationshipData], UnsetType] = unset, **kwargs): + """ + The users responding to the page. + + :param data: The list of responders. + :type data: [OnCallPageUserRelationshipData], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_response.py b/src/datadog_api_client/v2/model/on_call_page_response.py new file mode 100644 index 0000000000..2e99b1e733 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_response.py @@ -0,0 +1,63 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_data import OnCallPageData + from datadog_api_client.v2.model.on_call_pages_included import OnCallPagesIncluded + from datadog_api_client.v2.model.schedule_user import ScheduleUser + from datadog_api_client.v2.model.team_reference import TeamReference + from datadog_api_client.v2.model.on_call_page_scheduled_action import OnCallPageScheduledAction + from datadog_api_client.v2.model.on_call_page_link import OnCallPageLink + + +class OnCallPageResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_data import OnCallPageData + from datadog_api_client.v2.model.on_call_pages_included import OnCallPagesIncluded + + return { + "data": (OnCallPageData,), + "included": ([OnCallPagesIncluded],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__( + self_, + data: OnCallPageData, + included: Union[ + List[Union[OnCallPagesIncluded, ScheduleUser, TeamReference, OnCallPageScheduledAction, OnCallPageLink]], + UnsetType, + ] = unset, + **kwargs, + ): + """ + A single On-Call Page with its related included resources. + + :param data: An On-Call Page. + :type data: OnCallPageData + + :param included: Resources related to the page, such as users, teams, scheduled actions, and links. + :type included: [OnCallPagesIncluded], optional + """ + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/on_call_page_scheduled_action.py b/src/datadog_api_client/v2/model/on_call_page_scheduled_action.py new file mode 100644 index 0000000000..1e2e81f876 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_scheduled_action.py @@ -0,0 +1,79 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_scheduled_action_attributes import OnCallPageScheduledActionAttributes + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships import ( + OnCallPageScheduledActionRelationships, + ) + from datadog_api_client.v2.model.on_call_page_scheduled_action_type import OnCallPageScheduledActionType + + +class OnCallPageScheduledAction(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_scheduled_action_attributes import ( + OnCallPageScheduledActionAttributes, + ) + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships import ( + OnCallPageScheduledActionRelationships, + ) + from datadog_api_client.v2.model.on_call_page_scheduled_action_type import OnCallPageScheduledActionType + + return { + "attributes": (OnCallPageScheduledActionAttributes,), + "id": (str,), + "relationships": (OnCallPageScheduledActionRelationships,), + "type": (OnCallPageScheduledActionType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + id: str, + type: OnCallPageScheduledActionType, + attributes: Union[OnCallPageScheduledActionAttributes, UnsetType] = unset, + relationships: Union[OnCallPageScheduledActionRelationships, UnsetType] = unset, + **kwargs, + ): + """ + The next action scheduled on a page, such as an escalation or an automatic resolution. + + :param attributes: The attributes of a scheduled action. + :type attributes: OnCallPageScheduledActionAttributes, optional + + :param id: The ID of the scheduled action. Equal to the page ID. + :type id: str + + :param relationships: The relationships of a scheduled action. + :type relationships: OnCallPageScheduledActionRelationships, optional + + :param type: Scheduled action resource type. + :type type: OnCallPageScheduledActionType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if relationships is not unset: + kwargs["relationships"] = relationships + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_scheduled_action_attributes.py b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_attributes.py new file mode 100644 index 0000000000..983429de54 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_attributes.py @@ -0,0 +1,59 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_scheduled_action_attributes_type import ( + OnCallPageScheduledActionAttributesType, + ) + + +class OnCallPageScheduledActionAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_scheduled_action_attributes_type import ( + OnCallPageScheduledActionAttributesType, + ) + + return { + "at": (datetime,), + "type": (OnCallPageScheduledActionAttributesType,), + } + + attribute_map = { + "at": "at", + "type": "type", + } + + def __init__( + self_, + at: Union[datetime, UnsetType] = unset, + type: Union[OnCallPageScheduledActionAttributesType, UnsetType] = unset, + **kwargs, + ): + """ + The attributes of a scheduled action. + + :param at: The time when the action is scheduled to run. + :type at: datetime, optional + + :param type: The kind of action that is scheduled. + :type type: OnCallPageScheduledActionAttributesType, optional + """ + if at is not unset: + kwargs["at"] = at + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_scheduled_action_attributes_type.py b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_attributes_type.py new file mode 100644 index 0000000000..b364c32c05 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_attributes_type.py @@ -0,0 +1,44 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageScheduledActionAttributesType(ModelSimple): + """ + The kind of action that is scheduled. + + :param value: Must be one of ["escalate", "resolve", "release", "retrigger"]. + :type value: str + """ + + allowed_values = { + "escalate", + "resolve", + "release", + "retrigger", + } + ESCALATE: ClassVar["OnCallPageScheduledActionAttributesType"] + RESOLVE: ClassVar["OnCallPageScheduledActionAttributesType"] + RELEASE: ClassVar["OnCallPageScheduledActionAttributesType"] + RETRIGGER: ClassVar["OnCallPageScheduledActionAttributesType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageScheduledActionAttributesType.ESCALATE = OnCallPageScheduledActionAttributesType("escalate") +OnCallPageScheduledActionAttributesType.RESOLVE = OnCallPageScheduledActionAttributesType("resolve") +OnCallPageScheduledActionAttributesType.RELEASE = OnCallPageScheduledActionAttributesType("release") +OnCallPageScheduledActionAttributesType.RETRIGGER = OnCallPageScheduledActionAttributesType("retrigger") diff --git a/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationship.py b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationship.py new file mode 100644 index 0000000000..350c4fcc23 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationship.py @@ -0,0 +1,47 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationship_data import ( + OnCallPageScheduledActionRelationshipData, + ) + + +class OnCallPageScheduledActionRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationship_data import ( + OnCallPageScheduledActionRelationshipData, + ) + + return { + "data": (OnCallPageScheduledActionRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[OnCallPageScheduledActionRelationshipData, none_type, UnsetType] = unset, **kwargs): + """ + The next action scheduled on the page, such as an escalation. + + :param data: Reference to the next scheduled action on the page. + :type data: OnCallPageScheduledActionRelationshipData, none_type, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationship_data.py b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationship_data.py new file mode 100644 index 0000000000..a4b5d82d1e --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationship_data.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_scheduled_action_type import OnCallPageScheduledActionType + + +class OnCallPageScheduledActionRelationshipData(ModelNormal): + _nullable = True + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_scheduled_action_type import OnCallPageScheduledActionType + + return { + "id": (str,), + "type": (OnCallPageScheduledActionType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: OnCallPageScheduledActionType, **kwargs): + """ + Reference to the next scheduled action on the page. + + :param id: The ID of the scheduled action. Equal to the page ID. + :type id: str + + :param type: Scheduled action resource type. + :type type: OnCallPageScheduledActionType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships.py b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships.py new file mode 100644 index 0000000000..55e60f5a61 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships_schedules import ( + OnCallPageScheduledActionRelationshipsSchedules, + ) + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships_users import ( + OnCallPageScheduledActionRelationshipsUsers, + ) + + +class OnCallPageScheduledActionRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships_schedules import ( + OnCallPageScheduledActionRelationshipsSchedules, + ) + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships_users import ( + OnCallPageScheduledActionRelationshipsUsers, + ) + + return { + "schedules": (OnCallPageScheduledActionRelationshipsSchedules,), + "users": (OnCallPageScheduledActionRelationshipsUsers,), + } + + attribute_map = { + "schedules": "schedules", + "users": "users", + } + + def __init__( + self_, + schedules: Union[OnCallPageScheduledActionRelationshipsSchedules, UnsetType] = unset, + users: Union[OnCallPageScheduledActionRelationshipsUsers, UnsetType] = unset, + **kwargs, + ): + """ + The relationships of a scheduled action. + + :param schedules: The schedules the action escalates to. + :type schedules: OnCallPageScheduledActionRelationshipsSchedules, optional + + :param users: The users the action escalates to. + :type users: OnCallPageScheduledActionRelationshipsUsers, optional + """ + if schedules is not unset: + kwargs["schedules"] = schedules + if users is not unset: + kwargs["users"] = users + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_schedules.py b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_schedules.py new file mode 100644 index 0000000000..f0d8430f5e --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_schedules.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships_schedules_data import ( + OnCallPageScheduledActionRelationshipsSchedulesData, + ) + + +class OnCallPageScheduledActionRelationshipsSchedules(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships_schedules_data import ( + OnCallPageScheduledActionRelationshipsSchedulesData, + ) + + return { + "data": ([OnCallPageScheduledActionRelationshipsSchedulesData],), + } + + attribute_map = { + "data": "data", + } + + def __init__( + self_, data: Union[List[OnCallPageScheduledActionRelationshipsSchedulesData], UnsetType] = unset, **kwargs + ): + """ + The schedules the action escalates to. + + :param data: The list of schedules. + :type data: [OnCallPageScheduledActionRelationshipsSchedulesData], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_schedules_data.py b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_schedules_data.py new file mode 100644 index 0000000000..a60dafa5c0 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_schedules_data.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.schedule_data_type import ScheduleDataType + + +class OnCallPageScheduledActionRelationshipsSchedulesData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.schedule_data_type import ScheduleDataType + + return { + "id": (str,), + "type": (ScheduleDataType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: ScheduleDataType, **kwargs): + """ + Reference to a schedule. + + :param id: The schedule ID. + :type id: str + + :param type: Schedules resource type. + :type type: ScheduleDataType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_users.py b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_users.py new file mode 100644 index 0000000000..1d81ac573c --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_relationships_users.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_user_relationship_data import OnCallPageUserRelationshipData + + +class OnCallPageScheduledActionRelationshipsUsers(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_user_relationship_data import OnCallPageUserRelationshipData + + return { + "data": ([OnCallPageUserRelationshipData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[List[OnCallPageUserRelationshipData], UnsetType] = unset, **kwargs): + """ + The users the action escalates to. + + :param data: The list of users. + :type data: [OnCallPageUserRelationshipData], optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_scheduled_action_type.py b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_type.py new file mode 100644 index 0000000000..346a5b2c50 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_scheduled_action_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageScheduledActionType(ModelSimple): + """ + Scheduled action resource type. + + :param value: If omitted defaults to "scheduled_actions". Must be one of ["scheduled_actions"]. + :type value: str + """ + + allowed_values = { + "scheduled_actions", + } + SCHEDULED_ACTIONS: ClassVar["OnCallPageScheduledActionType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageScheduledActionType.SCHEDULED_ACTIONS = OnCallPageScheduledActionType("scheduled_actions") diff --git a/src/datadog_api_client/v2/model/on_call_page_service_now_incident_relationship.py b/src/datadog_api_client/v2/model/on_call_page_service_now_incident_relationship.py new file mode 100644 index 0000000000..f44ddd6f42 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_service_now_incident_relationship.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_service_now_incident_relationship_data import ( + OnCallPageServiceNowIncidentRelationshipData, + ) + + +class OnCallPageServiceNowIncidentRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_service_now_incident_relationship_data import ( + OnCallPageServiceNowIncidentRelationshipData, + ) + + return { + "data": (OnCallPageServiceNowIncidentRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[OnCallPageServiceNowIncidentRelationshipData, UnsetType] = unset, **kwargs): + """ + The ServiceNow incident linked to the page. + + :param data: Reference to a ServiceNow incident. + :type data: OnCallPageServiceNowIncidentRelationshipData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_service_now_incident_relationship_data.py b/src/datadog_api_client/v2/model/on_call_page_service_now_incident_relationship_data.py new file mode 100644 index 0000000000..50b26c256d --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_service_now_incident_relationship_data.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_service_now_incident_type import OnCallPageServiceNowIncidentType + + +class OnCallPageServiceNowIncidentRelationshipData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_service_now_incident_type import OnCallPageServiceNowIncidentType + + return { + "id": (str,), + "type": (OnCallPageServiceNowIncidentType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: OnCallPageServiceNowIncidentType, **kwargs): + """ + Reference to a ServiceNow incident. + + :param id: The ID of the ServiceNow incident. + :type id: str + + :param type: ServiceNow incident resource type. + :type type: OnCallPageServiceNowIncidentType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_service_now_incident_type.py b/src/datadog_api_client/v2/model/on_call_page_service_now_incident_type.py new file mode 100644 index 0000000000..d11320d6d9 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_service_now_incident_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageServiceNowIncidentType(ModelSimple): + """ + ServiceNow incident resource type. + + :param value: If omitted defaults to "service_now_incidents". Must be one of ["service_now_incidents"]. + :type value: str + """ + + allowed_values = { + "service_now_incidents", + } + SERVICE_NOW_INCIDENTS: ClassVar["OnCallPageServiceNowIncidentType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageServiceNowIncidentType.SERVICE_NOW_INCIDENTS = OnCallPageServiceNowIncidentType("service_now_incidents") diff --git a/src/datadog_api_client/v2/model/on_call_page_status.py b/src/datadog_api_client/v2/model/on_call_page_status.py new file mode 100644 index 0000000000..d2b5e98d6f --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_status.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageStatus(ModelSimple): + """ + The current status of the On-Call Page. + + :param value: Must be one of ["triggered", "acknowledged", "resolved"]. + :type value: str + """ + + allowed_values = { + "triggered", + "acknowledged", + "resolved", + } + TRIGGERED: ClassVar["OnCallPageStatus"] + ACKNOWLEDGED: ClassVar["OnCallPageStatus"] + RESOLVED: ClassVar["OnCallPageStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageStatus.TRIGGERED = OnCallPageStatus("triggered") +OnCallPageStatus.ACKNOWLEDGED = OnCallPageStatus("acknowledged") +OnCallPageStatus.RESOLVED = OnCallPageStatus("resolved") diff --git a/src/datadog_api_client/v2/model/on_call_page_target_relationship.py b/src/datadog_api_client/v2/model/on_call_page_target_relationship.py new file mode 100644 index 0000000000..9991e64616 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_target_relationship.py @@ -0,0 +1,43 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_target_relationship_data import OnCallPageTargetRelationshipData + + +class OnCallPageTargetRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_target_relationship_data import OnCallPageTargetRelationshipData + + return { + "data": (OnCallPageTargetRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[OnCallPageTargetRelationshipData, none_type, UnsetType] = unset, **kwargs): + """ + The team, user, or cross-organization handle that was paged. + + :param data: Reference to the target of the page. + :type data: OnCallPageTargetRelationshipData, none_type, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_target_relationship_data.py b/src/datadog_api_client/v2/model/on_call_page_target_relationship_data.py new file mode 100644 index 0000000000..69fae9b074 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_target_relationship_data.py @@ -0,0 +1,52 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_target_relationship_data_type import ( + OnCallPageTargetRelationshipDataType, + ) + + +class OnCallPageTargetRelationshipData(ModelNormal): + _nullable = True + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_target_relationship_data_type import ( + OnCallPageTargetRelationshipDataType, + ) + + return { + "id": (str,), + "type": (OnCallPageTargetRelationshipDataType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: OnCallPageTargetRelationshipDataType, **kwargs): + """ + Reference to the target of the page. + + :param id: The ID of the target. + :type id: str + + :param type: The resource type of the page target. + :type type: OnCallPageTargetRelationshipDataType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_target_relationship_data_type.py b/src/datadog_api_client/v2/model/on_call_page_target_relationship_data_type.py new file mode 100644 index 0000000000..7b476dc8de --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_target_relationship_data_type.py @@ -0,0 +1,41 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPageTargetRelationshipDataType(ModelSimple): + """ + The resource type of the page target. + + :param value: Must be one of ["teams", "users", "cross_org_handles"]. + :type value: str + """ + + allowed_values = { + "teams", + "users", + "cross_org_handles", + } + TEAMS: ClassVar["OnCallPageTargetRelationshipDataType"] + USERS: ClassVar["OnCallPageTargetRelationshipDataType"] + CROSS_ORG_HANDLES: ClassVar["OnCallPageTargetRelationshipDataType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPageTargetRelationshipDataType.TEAMS = OnCallPageTargetRelationshipDataType("teams") +OnCallPageTargetRelationshipDataType.USERS = OnCallPageTargetRelationshipDataType("users") +OnCallPageTargetRelationshipDataType.CROSS_ORG_HANDLES = OnCallPageTargetRelationshipDataType("cross_org_handles") diff --git a/src/datadog_api_client/v2/model/on_call_page_team_routing_rule_relationship.py b/src/datadog_api_client/v2/model/on_call_page_team_routing_rule_relationship.py new file mode 100644 index 0000000000..4ba7f71fca --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_team_routing_rule_relationship.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_team_routing_rule_relationship_data import ( + OnCallPageTeamRoutingRuleRelationshipData, + ) + + +class OnCallPageTeamRoutingRuleRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_team_routing_rule_relationship_data import ( + OnCallPageTeamRoutingRuleRelationshipData, + ) + + return { + "data": (OnCallPageTeamRoutingRuleRelationshipData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[OnCallPageTeamRoutingRuleRelationshipData, UnsetType] = unset, **kwargs): + """ + The team routing rule that matched the page. + + :param data: Reference to a team routing rule. + :type data: OnCallPageTeamRoutingRuleRelationshipData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/on_call_page_team_routing_rule_relationship_data.py b/src/datadog_api_client/v2/model/on_call_page_team_routing_rule_relationship_data.py new file mode 100644 index 0000000000..1913466ac0 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_team_routing_rule_relationship_data.py @@ -0,0 +1,50 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_routing_rules_data_relationships_rules_data_items_type import ( + TeamRoutingRulesDataRelationshipsRulesDataItemsType, + ) + + +class OnCallPageTeamRoutingRuleRelationshipData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_routing_rules_data_relationships_rules_data_items_type import ( + TeamRoutingRulesDataRelationshipsRulesDataItemsType, + ) + + return { + "id": (str,), + "type": (TeamRoutingRulesDataRelationshipsRulesDataItemsType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: TeamRoutingRulesDataRelationshipsRulesDataItemsType, **kwargs): + """ + Reference to a team routing rule. + + :param id: The ID of the team routing rule. + :type id: str + + :param type: Indicates that the resource is of type ``team_routing_rules``. + :type type: TeamRoutingRulesDataRelationshipsRulesDataItemsType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_page_user_relationship_data.py b/src/datadog_api_client/v2/model/on_call_page_user_relationship_data.py new file mode 100644 index 0000000000..5a18934725 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_page_user_relationship_data.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.schedule_user_type import ScheduleUserType + + +class OnCallPageUserRelationshipData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.schedule_user_type import ScheduleUserType + + return { + "id": (str,), + "type": (ScheduleUserType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: ScheduleUserType, **kwargs): + """ + Reference to a user. + + :param id: The user ID. + :type id: str + + :param type: Users resource type. + :type type: ScheduleUserType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/on_call_pages_included.py b/src/datadog_api_client/v2/model/on_call_pages_included.py new file mode 100644 index 0000000000..66e24ab63b --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_pages_included.py @@ -0,0 +1,53 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class OnCallPagesIncluded(ModelComposed): + def __init__(self, **kwargs): + """ + A resource related to a page. + + :param attributes: Provides basic user information for a schedule, including a name and email address. + :type attributes: ScheduleUserAttributes, optional + + :param id: The unique user identifier. + :type id: str + + :param type: Users resource type. + :type type: ScheduleUserType + + :param relationships: The relationships of a scheduled action. + :type relationships: OnCallPageScheduledActionRelationships, optional + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.schedule_user import ScheduleUser + from datadog_api_client.v2.model.team_reference import TeamReference + from datadog_api_client.v2.model.on_call_page_scheduled_action import OnCallPageScheduledAction + from datadog_api_client.v2.model.on_call_page_link import OnCallPageLink + + return { + "oneOf": [ + ScheduleUser, + TeamReference, + OnCallPageScheduledAction, + OnCallPageLink, + ], + } diff --git a/src/datadog_api_client/v2/model/on_call_pages_response.py b/src/datadog_api_client/v2/model/on_call_pages_response.py new file mode 100644 index 0000000000..452c3bec40 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_pages_response.py @@ -0,0 +1,73 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.on_call_page_data import OnCallPageData + from datadog_api_client.v2.model.on_call_pages_included import OnCallPagesIncluded + from datadog_api_client.v2.model.schedules_response_meta import SchedulesResponseMeta + from datadog_api_client.v2.model.schedule_user import ScheduleUser + from datadog_api_client.v2.model.team_reference import TeamReference + from datadog_api_client.v2.model.on_call_page_scheduled_action import OnCallPageScheduledAction + from datadog_api_client.v2.model.on_call_page_link import OnCallPageLink + + +class OnCallPagesResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.on_call_page_data import OnCallPageData + from datadog_api_client.v2.model.on_call_pages_included import OnCallPagesIncluded + from datadog_api_client.v2.model.schedules_response_meta import SchedulesResponseMeta + + return { + "data": ([OnCallPageData],), + "included": ([OnCallPagesIncluded],), + "meta": (SchedulesResponseMeta,), + } + + attribute_map = { + "data": "data", + "included": "included", + "meta": "meta", + } + + def __init__( + self_, + data: List[OnCallPageData], + included: Union[ + List[Union[OnCallPagesIncluded, ScheduleUser, TeamReference, OnCallPageScheduledAction, OnCallPageLink]], + UnsetType, + ] = unset, + meta: Union[SchedulesResponseMeta, UnsetType] = unset, + **kwargs, + ): + """ + A list of On-Call Pages with pagination metadata and related included resources. + + :param data: A list of pages. + :type data: [OnCallPageData] + + :param included: Resources related to the pages, such as users, teams, and scheduled actions. + :type included: [OnCallPagesIncluded], optional + + :param meta: Metadata that is included in the response when listing On-Call resources. + :type meta: SchedulesResponseMeta, optional + """ + if included is not unset: + kwargs["included"] = included + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/on_call_pages_sort.py b/src/datadog_api_client/v2/model/on_call_pages_sort.py new file mode 100644 index 0000000000..3c8c63f345 --- /dev/null +++ b/src/datadog_api_client/v2/model/on_call_pages_sort.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OnCallPagesSort(ModelSimple): + """ + Sorting options for pages. Prefix a field with `-` to sort in descending order. + + :param value: If omitted defaults to "created_at". Must be one of ["created_at", "-created_at", "modified_at", "-modified_at", "status", "-status", "priority", "-priority"]. + :type value: str + """ + + allowed_values = { + "created_at", + "-created_at", + "modified_at", + "-modified_at", + "status", + "-status", + "priority", + "-priority", + } + CREATED_AT_ASCENDING: ClassVar["OnCallPagesSort"] + CREATED_AT_DESCENDING: ClassVar["OnCallPagesSort"] + MODIFIED_AT_ASCENDING: ClassVar["OnCallPagesSort"] + MODIFIED_AT_DESCENDING: ClassVar["OnCallPagesSort"] + STATUS_ASCENDING: ClassVar["OnCallPagesSort"] + STATUS_DESCENDING: ClassVar["OnCallPagesSort"] + PRIORITY_ASCENDING: ClassVar["OnCallPagesSort"] + PRIORITY_DESCENDING: ClassVar["OnCallPagesSort"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OnCallPagesSort.CREATED_AT_ASCENDING = OnCallPagesSort("created_at") +OnCallPagesSort.CREATED_AT_DESCENDING = OnCallPagesSort("-created_at") +OnCallPagesSort.MODIFIED_AT_ASCENDING = OnCallPagesSort("modified_at") +OnCallPagesSort.MODIFIED_AT_DESCENDING = OnCallPagesSort("-modified_at") +OnCallPagesSort.STATUS_ASCENDING = OnCallPagesSort("status") +OnCallPagesSort.STATUS_DESCENDING = OnCallPagesSort("-status") +OnCallPagesSort.PRIORITY_ASCENDING = OnCallPagesSort("priority") +OnCallPagesSort.PRIORITY_DESCENDING = OnCallPagesSort("-priority") diff --git a/src/datadog_api_client/v2/model/override_data.py b/src/datadog_api_client/v2/model/override_data.py index 749436a838..4f8a3c132d 100644 --- a/src/datadog_api_client/v2/model/override_data.py +++ b/src/datadog_api_client/v2/model/override_data.py @@ -60,7 +60,7 @@ def __init__( :param relationships: Relationships for an on-call schedule override. :type relationships: OverrideRelationships, optional - :param type: Indicates that the resource is of type 'overrides'. + :param type: Indicates that the resource is of type ``overrides``. :type type: OverrideDataType """ if attributes is not unset: diff --git a/src/datadog_api_client/v2/model/override_data_type.py b/src/datadog_api_client/v2/model/override_data_type.py index 6517b50a30..8fcff8dccb 100644 --- a/src/datadog_api_client/v2/model/override_data_type.py +++ b/src/datadog_api_client/v2/model/override_data_type.py @@ -14,7 +14,7 @@ class OverrideDataType(ModelSimple): """ - Indicates that the resource is of type 'overrides'. + Indicates that the resource is of type `overrides`. :param value: If omitted defaults to "overrides". Must be one of ["overrides"]. :type value: str diff --git a/src/datadog_api_client/v2/model/override_relationships_schedule_data.py b/src/datadog_api_client/v2/model/override_relationships_schedule_data.py index a5d497f976..6a212a433d 100644 --- a/src/datadog_api_client/v2/model/override_relationships_schedule_data.py +++ b/src/datadog_api_client/v2/model/override_relationships_schedule_data.py @@ -41,7 +41,7 @@ def __init__(self_, id: str, type: OverrideRelationshipsScheduleDataType, **kwar :param id: The unique identifier of the schedule. :type id: str - :param type: Indicates that the related resource is of type 'schedules'. + :param type: Indicates that the related resource is of type ``schedules``. :type type: OverrideRelationshipsScheduleDataType """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/override_relationships_schedule_data_type.py b/src/datadog_api_client/v2/model/override_relationships_schedule_data_type.py index 7230aac42b..bac7ce961a 100644 --- a/src/datadog_api_client/v2/model/override_relationships_schedule_data_type.py +++ b/src/datadog_api_client/v2/model/override_relationships_schedule_data_type.py @@ -14,7 +14,7 @@ class OverrideRelationshipsScheduleDataType(ModelSimple): """ - Indicates that the related resource is of type 'schedules'. + Indicates that the related resource is of type `schedules`. :param value: If omitted defaults to "schedules". Must be one of ["schedules"]. :type value: str diff --git a/src/datadog_api_client/v2/model/override_relationships_user_data.py b/src/datadog_api_client/v2/model/override_relationships_user_data.py index ad63f4a837..6aa6caf5e6 100644 --- a/src/datadog_api_client/v2/model/override_relationships_user_data.py +++ b/src/datadog_api_client/v2/model/override_relationships_user_data.py @@ -37,7 +37,7 @@ def __init__(self_, id: str, type: OverrideRelationshipsUserDataType, **kwargs): :param id: The unique identifier of the user. :type id: str - :param type: Indicates that the related resource is of type 'users'. + :param type: Indicates that the related resource is of type ``users``. :type type: OverrideRelationshipsUserDataType """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/override_relationships_user_data_type.py b/src/datadog_api_client/v2/model/override_relationships_user_data_type.py index ba95543fd2..9c5b6bcf53 100644 --- a/src/datadog_api_client/v2/model/override_relationships_user_data_type.py +++ b/src/datadog_api_client/v2/model/override_relationships_user_data_type.py @@ -14,7 +14,7 @@ class OverrideRelationshipsUserDataType(ModelSimple): """ - Indicates that the related resource is of type 'users'. + Indicates that the related resource is of type `users`. :param value: If omitted defaults to "users". Must be one of ["users"]. :type value: str diff --git a/src/datadog_api_client/v2/model/routing_rule_relationships_policy_data.py b/src/datadog_api_client/v2/model/routing_rule_relationships_policy_data.py index 0b8dedd49a..ae2e84135a 100644 --- a/src/datadog_api_client/v2/model/routing_rule_relationships_policy_data.py +++ b/src/datadog_api_client/v2/model/routing_rule_relationships_policy_data.py @@ -41,7 +41,7 @@ def __init__(self_, id: str, type: RoutingRuleRelationshipsPolicyDataType, **kwa :param id: Specifies the unique identifier of the policy. :type id: str - :param type: Indicates that the resource is of type 'policies'. + :param type: Indicates that the resource is of type ``policies``. :type type: RoutingRuleRelationshipsPolicyDataType """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/routing_rule_relationships_policy_data_type.py b/src/datadog_api_client/v2/model/routing_rule_relationships_policy_data_type.py index 5bcd0a9ed4..5f22f22d3d 100644 --- a/src/datadog_api_client/v2/model/routing_rule_relationships_policy_data_type.py +++ b/src/datadog_api_client/v2/model/routing_rule_relationships_policy_data_type.py @@ -14,7 +14,7 @@ class RoutingRuleRelationshipsPolicyDataType(ModelSimple): """ - Indicates that the resource is of type 'policies'. + Indicates that the resource is of type `policies`. :param value: If omitted defaults to "policies". Must be one of ["policies"]. :type value: str diff --git a/src/datadog_api_client/v2/model/schedules.py b/src/datadog_api_client/v2/model/schedules.py index 26e19ebee5..227de84a28 100644 --- a/src/datadog_api_client/v2/model/schedules.py +++ b/src/datadog_api_client/v2/model/schedules.py @@ -54,7 +54,7 @@ def __init__( :param included: Any additional resources related to the schedules, such as teams. :type included: [TeamReference], optional - :param meta: Metadata that is included in the response when listing schedules. + :param meta: Metadata that is included in the response when listing On-Call resources. :type meta: SchedulesResponseMeta, optional """ if data is not unset: diff --git a/src/datadog_api_client/v2/model/schedules_response_meta.py b/src/datadog_api_client/v2/model/schedules_response_meta.py index c421c5ef9c..f13b046581 100644 --- a/src/datadog_api_client/v2/model/schedules_response_meta.py +++ b/src/datadog_api_client/v2/model/schedules_response_meta.py @@ -32,9 +32,9 @@ def openapi_types(_): def __init__(self_, page: Union[SchedulesResponseMetaPage, UnsetType] = unset, **kwargs): """ - Metadata that is included in the response when listing schedules. + Metadata that is included in the response when listing On-Call resources. - :param page: Metadata related to paging information that is included in the response when listing schedules. + :param page: Metadata related to pagination information that is included in the response when listing On-Call resources. :type page: SchedulesResponseMetaPage, optional """ if page is not unset: diff --git a/src/datadog_api_client/v2/model/schedules_response_meta_page.py b/src/datadog_api_client/v2/model/schedules_response_meta_page.py index 2b7aa36ff4..9698017373 100644 --- a/src/datadog_api_client/v2/model/schedules_response_meta_page.py +++ b/src/datadog_api_client/v2/model/schedules_response_meta_page.py @@ -52,7 +52,7 @@ def __init__( **kwargs, ): """ - Metadata related to paging information that is included in the response when listing schedules. + Metadata related to pagination information that is included in the response when listing On-Call resources. :param first_number: First page number. :type first_number: int, optional diff --git a/src/datadog_api_client/v2/model/shift_data.py b/src/datadog_api_client/v2/model/shift_data.py index 64418976e1..6207ae88ae 100644 --- a/src/datadog_api_client/v2/model/shift_data.py +++ b/src/datadog_api_client/v2/model/shift_data.py @@ -60,7 +60,7 @@ def __init__( :param relationships: Relationships for an on-call shift. :type relationships: ShiftDataRelationships, optional - :param type: Indicates that the resource is of type 'shifts'. + :param type: Indicates that the resource is of type ``shifts``. :type type: ShiftDataType """ if attributes is not unset: diff --git a/src/datadog_api_client/v2/model/shift_data_relationships_user_data.py b/src/datadog_api_client/v2/model/shift_data_relationships_user_data.py index a7f7933499..94398b4d18 100644 --- a/src/datadog_api_client/v2/model/shift_data_relationships_user_data.py +++ b/src/datadog_api_client/v2/model/shift_data_relationships_user_data.py @@ -39,7 +39,7 @@ def __init__(self_, id: str, type: ShiftDataRelationshipsUserDataType, **kwargs) :param id: Specifies the unique identifier of the user. :type id: str - :param type: Indicates that the related resource is of type 'users'. + :param type: Indicates that the related resource is of type ``users``. :type type: ShiftDataRelationshipsUserDataType """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/shift_data_relationships_user_data_type.py b/src/datadog_api_client/v2/model/shift_data_relationships_user_data_type.py index 98747a83cb..65f68db134 100644 --- a/src/datadog_api_client/v2/model/shift_data_relationships_user_data_type.py +++ b/src/datadog_api_client/v2/model/shift_data_relationships_user_data_type.py @@ -14,7 +14,7 @@ class ShiftDataRelationshipsUserDataType(ModelSimple): """ - Indicates that the related resource is of type 'users'. + Indicates that the related resource is of type `users`. :param value: If omitted defaults to "users". Must be one of ["users"]. :type value: str diff --git a/src/datadog_api_client/v2/model/shift_data_type.py b/src/datadog_api_client/v2/model/shift_data_type.py index 3066ff6233..0f3d8d53fe 100644 --- a/src/datadog_api_client/v2/model/shift_data_type.py +++ b/src/datadog_api_client/v2/model/shift_data_type.py @@ -14,7 +14,7 @@ class ShiftDataType(ModelSimple): """ - Indicates that the resource is of type 'shifts'. + Indicates that the resource is of type `shifts`. :param value: If omitted defaults to "shifts". Must be one of ["shifts"]. :type value: str diff --git a/src/datadog_api_client/v2/model/team_routing_rules_data_relationships_rules_data_items.py b/src/datadog_api_client/v2/model/team_routing_rules_data_relationships_rules_data_items.py index 2571ea3128..3c766d6e2c 100644 --- a/src/datadog_api_client/v2/model/team_routing_rules_data_relationships_rules_data_items.py +++ b/src/datadog_api_client/v2/model/team_routing_rules_data_relationships_rules_data_items.py @@ -41,7 +41,7 @@ def __init__(self_, id: str, type: TeamRoutingRulesDataRelationshipsRulesDataIte :param id: Specifies the unique identifier for the related routing rule. :type id: str - :param type: Indicates that the resource is of type 'team_routing_rules'. + :param type: Indicates that the resource is of type ``team_routing_rules``. :type type: TeamRoutingRulesDataRelationshipsRulesDataItemsType """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/team_routing_rules_data_relationships_rules_data_items_type.py b/src/datadog_api_client/v2/model/team_routing_rules_data_relationships_rules_data_items_type.py index 539cb10c58..bb3cb82b4d 100644 --- a/src/datadog_api_client/v2/model/team_routing_rules_data_relationships_rules_data_items_type.py +++ b/src/datadog_api_client/v2/model/team_routing_rules_data_relationships_rules_data_items_type.py @@ -14,7 +14,7 @@ class TeamRoutingRulesDataRelationshipsRulesDataItemsType(ModelSimple): """ - Indicates that the resource is of type 'team_routing_rules'. + Indicates that the resource is of type `team_routing_rules`. :param value: If omitted defaults to "team_routing_rules". Must be one of ["team_routing_rules"]. :type value: str diff --git a/src/datadog_api_client/v2/model/update_on_call_notification_rule_request_data.py b/src/datadog_api_client/v2/model/update_on_call_notification_rule_request_data.py index 348b6f5449..61bdd1599b 100644 --- a/src/datadog_api_client/v2/model/update_on_call_notification_rule_request_data.py +++ b/src/datadog_api_client/v2/model/update_on_call_notification_rule_request_data.py @@ -66,7 +66,7 @@ def __init__( :param relationships: Relationship object for creating a notification rule :type relationships: OnCallNotificationRuleRelationships, optional - :param type: Indicates that the resource is of type 'notification_rules'. + :param type: Indicates that the resource is of type ``notification_rules``. :type type: OnCallNotificationRuleType """ if attributes is not unset: diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index cc2306552d..48d5344b19 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -7938,7 +7938,72 @@ ) from datadog_api_client.v2.model.on_call_notification_rule_type import OnCallNotificationRuleType from datadog_api_client.v2.model.on_call_notification_rules_included import OnCallNotificationRulesIncluded +from datadog_api_client.v2.model.on_call_page_author_relationship import OnCallPageAuthorRelationship +from datadog_api_client.v2.model.on_call_page_author_relationship_data import OnCallPageAuthorRelationshipData +from datadog_api_client.v2.model.on_call_page_data import OnCallPageData +from datadog_api_client.v2.model.on_call_page_data_attributes import OnCallPageDataAttributes +from datadog_api_client.v2.model.on_call_page_data_relationships import OnCallPageDataRelationships +from datadog_api_client.v2.model.on_call_page_data_type import OnCallPageDataType +from datadog_api_client.v2.model.on_call_page_jira_issue_relationship import OnCallPageJiraIssueRelationship +from datadog_api_client.v2.model.on_call_page_jira_issue_relationship_data import OnCallPageJiraIssueRelationshipData +from datadog_api_client.v2.model.on_call_page_jira_issue_type import OnCallPageJiraIssueType +from datadog_api_client.v2.model.on_call_page_link import OnCallPageLink +from datadog_api_client.v2.model.on_call_page_link_attributes import OnCallPageLinkAttributes +from datadog_api_client.v2.model.on_call_page_link_entity_type import OnCallPageLinkEntityType +from datadog_api_client.v2.model.on_call_page_link_relationship_data import OnCallPageLinkRelationshipData +from datadog_api_client.v2.model.on_call_page_link_relationship_type import OnCallPageLinkRelationshipType +from datadog_api_client.v2.model.on_call_page_link_type import OnCallPageLinkType +from datadog_api_client.v2.model.on_call_page_links_relationship import OnCallPageLinksRelationship +from datadog_api_client.v2.model.on_call_page_live_call import OnCallPageLiveCall +from datadog_api_client.v2.model.on_call_page_live_call_outcome import OnCallPageLiveCallOutcome +from datadog_api_client.v2.model.on_call_page_live_call_over import OnCallPageLiveCallOver +from datadog_api_client.v2.model.on_call_page_release_origin import OnCallPageReleaseOrigin +from datadog_api_client.v2.model.on_call_page_responders_relationship import OnCallPageRespondersRelationship +from datadog_api_client.v2.model.on_call_page_response import OnCallPageResponse +from datadog_api_client.v2.model.on_call_page_scheduled_action import OnCallPageScheduledAction +from datadog_api_client.v2.model.on_call_page_scheduled_action_attributes import OnCallPageScheduledActionAttributes +from datadog_api_client.v2.model.on_call_page_scheduled_action_attributes_type import ( + OnCallPageScheduledActionAttributesType, +) +from datadog_api_client.v2.model.on_call_page_scheduled_action_relationship import OnCallPageScheduledActionRelationship +from datadog_api_client.v2.model.on_call_page_scheduled_action_relationship_data import ( + OnCallPageScheduledActionRelationshipData, +) +from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships import ( + OnCallPageScheduledActionRelationships, +) +from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships_schedules import ( + OnCallPageScheduledActionRelationshipsSchedules, +) +from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships_schedules_data import ( + OnCallPageScheduledActionRelationshipsSchedulesData, +) +from datadog_api_client.v2.model.on_call_page_scheduled_action_relationships_users import ( + OnCallPageScheduledActionRelationshipsUsers, +) +from datadog_api_client.v2.model.on_call_page_scheduled_action_type import OnCallPageScheduledActionType +from datadog_api_client.v2.model.on_call_page_service_now_incident_relationship import ( + OnCallPageServiceNowIncidentRelationship, +) +from datadog_api_client.v2.model.on_call_page_service_now_incident_relationship_data import ( + OnCallPageServiceNowIncidentRelationshipData, +) +from datadog_api_client.v2.model.on_call_page_service_now_incident_type import OnCallPageServiceNowIncidentType +from datadog_api_client.v2.model.on_call_page_status import OnCallPageStatus +from datadog_api_client.v2.model.on_call_page_target_relationship import OnCallPageTargetRelationship +from datadog_api_client.v2.model.on_call_page_target_relationship_data import OnCallPageTargetRelationshipData +from datadog_api_client.v2.model.on_call_page_target_relationship_data_type import OnCallPageTargetRelationshipDataType from datadog_api_client.v2.model.on_call_page_target_type import OnCallPageTargetType +from datadog_api_client.v2.model.on_call_page_team_routing_rule_relationship import ( + OnCallPageTeamRoutingRuleRelationship, +) +from datadog_api_client.v2.model.on_call_page_team_routing_rule_relationship_data import ( + OnCallPageTeamRoutingRuleRelationshipData, +) +from datadog_api_client.v2.model.on_call_page_user_relationship_data import OnCallPageUserRelationshipData +from datadog_api_client.v2.model.on_call_pages_included import OnCallPagesIncluded +from datadog_api_client.v2.model.on_call_pages_response import OnCallPagesResponse +from datadog_api_client.v2.model.on_call_pages_sort import OnCallPagesSort from datadog_api_client.v2.model.on_call_phone_notification_rule_method import OnCallPhoneNotificationRuleMethod from datadog_api_client.v2.model.on_call_phone_notification_rule_settings import OnCallPhoneNotificationRuleSettings from datadog_api_client.v2.model.on_call_shift_change_trigger import OnCallShiftChangeTrigger @@ -18221,7 +18286,52 @@ "OnCallNotificationRuleRequestAttributes", "OnCallNotificationRuleType", "OnCallNotificationRulesIncluded", + "OnCallPageAuthorRelationship", + "OnCallPageAuthorRelationshipData", + "OnCallPageData", + "OnCallPageDataAttributes", + "OnCallPageDataRelationships", + "OnCallPageDataType", + "OnCallPageJiraIssueRelationship", + "OnCallPageJiraIssueRelationshipData", + "OnCallPageJiraIssueType", + "OnCallPageLink", + "OnCallPageLinkAttributes", + "OnCallPageLinkEntityType", + "OnCallPageLinkRelationshipData", + "OnCallPageLinkRelationshipType", + "OnCallPageLinkType", + "OnCallPageLinksRelationship", + "OnCallPageLiveCall", + "OnCallPageLiveCallOutcome", + "OnCallPageLiveCallOver", + "OnCallPageReleaseOrigin", + "OnCallPageRespondersRelationship", + "OnCallPageResponse", + "OnCallPageScheduledAction", + "OnCallPageScheduledActionAttributes", + "OnCallPageScheduledActionAttributesType", + "OnCallPageScheduledActionRelationship", + "OnCallPageScheduledActionRelationshipData", + "OnCallPageScheduledActionRelationships", + "OnCallPageScheduledActionRelationshipsSchedules", + "OnCallPageScheduledActionRelationshipsSchedulesData", + "OnCallPageScheduledActionRelationshipsUsers", + "OnCallPageScheduledActionType", + "OnCallPageServiceNowIncidentRelationship", + "OnCallPageServiceNowIncidentRelationshipData", + "OnCallPageServiceNowIncidentType", + "OnCallPageStatus", + "OnCallPageTargetRelationship", + "OnCallPageTargetRelationshipData", + "OnCallPageTargetRelationshipDataType", "OnCallPageTargetType", + "OnCallPageTeamRoutingRuleRelationship", + "OnCallPageTeamRoutingRuleRelationshipData", + "OnCallPageUserRelationshipData", + "OnCallPagesIncluded", + "OnCallPagesResponse", + "OnCallPagesSort", "OnCallPhoneNotificationRuleMethod", "OnCallPhoneNotificationRuleSettings", "OnCallShiftChangeTrigger", diff --git a/tests/generated-test/test-runner-data/manifest.json b/tests/generated-test/test-runner-data/manifest.json index bc9df54f15..52f1ab14e1 100644 --- a/tests/generated-test/test-runner-data/manifest.json +++ b/tests/generated-test/test-runner-data/manifest.json @@ -9016,6 +9016,20 @@ "scenario": "Get On-Call escalation policy returns \"OK\" response", "version": "v2" }, + { + "feature": "On-Call", + "feature_file": "../../v2/features/on-call.feature", + "file": "v2/on-call/get-on-call-page-returns-not-found-response.json", + "scenario": "Get On-Call page returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "On-Call", + "feature_file": "../../v2/features/on-call.feature", + "file": "v2/on-call/get-on-call-page-returns-ok-response.json", + "scenario": "Get On-Call page returns \"OK\" response", + "version": "v2" + }, { "feature": "On-Call", "feature_file": "../../v2/features/on-call.feature", @@ -9079,6 +9093,13 @@ "scenario": "List On-Call notification rules for a user returns \"OK\" response", "version": "v2" }, + { + "feature": "On-Call", + "feature_file": "../../v2/features/on-call.feature", + "file": "v2/on-call/list-on-call-pages-returns-ok-response.json", + "scenario": "List On-Call pages returns \"OK\" response", + "version": "v2" + }, { "feature": "On-Call", "feature_file": "../../v2/features/on-call.feature", diff --git a/tests/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-not-found-response.json b/tests/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-not-found-response.json new file mode 100644 index 0000000000..9f874f55eb --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-not-found-response.json @@ -0,0 +1,35 @@ +{ + "api": "On-Call", + "expected_status": 404, + "feature": "On-Call", + "id": "v2/On-Call/Get On-Call page returns \"Not Found\" response", + "operation_id": "GetOnCallPage", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "00000000-0000-0000-0000-000000000000" + }, + "style": null + } + ], + "path": "/api/v2/on-call/pages/{page_id}" + }, + "scenario": "Get On-Call page returns \"Not Found\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-ok-response.json new file mode 100644 index 0000000000..5054681a06 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-ok-response.json @@ -0,0 +1,35 @@ +{ + "api": "On-Call", + "expected_status": 200, + "feature": "On-Call", + "id": "v2/On-Call/Get On-Call page returns \"OK\" response", + "operation_id": "GetOnCallPage", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "page_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "f63eb677-07ce-46ab-b2e0-80ca1ffe91bf" + }, + "style": null + } + ], + "path": "/api/v2/on-call/pages/{page_id}" + }, + "scenario": "Get On-Call page returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/on-call/list-on-call-pages-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/on-call/list-on-call-pages-returns-ok-response.json new file mode 100644 index 0000000000..3666244b81 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/on-call/list-on-call-pages-returns-ok-response.json @@ -0,0 +1,35 @@ +{ + "api": "On-Call", + "expected_status": 200, + "feature": "On-Call", + "id": "v2/On-Call/List On-Call pages returns \"OK\" response", + "operation_id": "ListOnCallPages", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "query", + "name": "filter[query]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "key:1" + }, + "style": null + } + ], + "path": "/api/v2/on-call/pages" + }, + "scenario": "List On-Call pages returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-server-data/v2/on-call.json b/tests/generated-test/test-server-data/v2/on-call.json index a6fe6f6f7c..74b396ae06 100644 --- a/tests/generated-test/test-server-data/v2/on-call.json +++ b/tests/generated-test/test-server-data/v2/on-call.json @@ -2480,6 +2480,68 @@ "scenario": "Get On-Call escalation policy returns \"OK\" response", "version": "v2" }, + { + "feature": "On-Call", + "frozen_at": "2026-10-19T12:37:39.340Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/on-call/pages/00000000-0000-0000-0000-000000000000", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Get On-Call page returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "On-Call", + "frozen_at": "2026-10-19T14:39:38.375Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/on-call/pages/f63eb677-07ce-46ab-b2e0-80ca1ffe91bf", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"pages\",\"attributes\":{\"acknowledged_at\":\"2026-09-11T10:13:30.188151252Z\",\"created_at\":\"2026-09-11T10:13:30.043027Z\",\"description\":\"\",\"escalation_policy_uuid\":\"b3a7d0b9-536b-4949-be2b-dc6ec6bbb776\",\"key\":\"1\",\"modified_at\":\"2026-09-11T10:13:30.188151Z\",\"services\":[\"test\"],\"status\":\"acknowledged\",\"tags\":[\"service:test\"],\"title\":\"Test-Acknowledge_On_Call_Page_returns_Accepted_response-1789121607\",\"urgency\":\"low\"},\"relationships\":{\"author\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"closed_by\":{\"data\":null},\"links\":{\"data\":[]},\"responders\":{\"data\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}]},\"scheduled_action\":{\"data\":{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"scheduled_actions\"}},\"target\":{\"data\":{\"id\":\"8678409c-3645-48d3-b330-a9ab6d70c6ff\",\"type\":\"teams\"}},\"team_routing_rule\":{\"data\":{\"id\":\"b2a6c72b-fdb3-4ce7-b07b-dd84af0303e9\",\"type\":\"team_routing_rules\"}}}},\"included\":[{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"scheduled_actions\",\"attributes\":{\"type\":\"escalate\"},\"relationships\":{\"schedules\":{\"data\":[]},\"users\":{\"data\":[]}}},{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"status\":\"active\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "Get On-Call page returns \"OK\" response", + "version": "v2" + }, { "feature": "On-Call", "frozen_at": "2025-11-27T14:11:37.612Z", @@ -4290,6 +4352,42 @@ "scenario": "List On-Call notification rules for a user returns \"OK\" response", "version": "v2" }, + { + "feature": "On-Call", + "frozen_at": "2026-10-19T14:46:40.993Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/on-call/pages", + "query": [ + [ + "filter[query]", + "key:1" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"pages\",\"attributes\":{\"acknowledged_at\":\"2026-09-11T10:13:30.188151252Z\",\"created_at\":\"2026-09-11T10:13:30.043027Z\",\"description\":\"\",\"escalation_policy_uuid\":\"b3a7d0b9-536b-4949-be2b-dc6ec6bbb776\",\"key\":\"1\",\"modified_at\":\"2026-09-11T10:13:30.188151252Z\",\"services\":[\"test\"],\"status\":\"acknowledged\",\"tags\":[\"service:test\"],\"title\":\"Test-Acknowledge_On_Call_Page_returns_Accepted_response-1789121607\",\"urgency\":\"low\"},\"relationships\":{\"author\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}},\"closed_by\":{\"data\":null},\"links\":{\"data\":[]},\"responders\":{\"data\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\"}]},\"scheduled_action\":{\"data\":{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"scheduled_actions\"}},\"target\":{\"data\":{\"id\":\"8678409c-3645-48d3-b330-a9ab6d70c6ff\",\"type\":\"teams\"}},\"team_routing_rule\":{\"data\":{\"id\":\"b2a6c72b-fdb3-4ce7-b07b-dd84af0303e9\",\"type\":\"team_routing_rules\"}}}}],\"meta\":{\"page\":{\"type\":\"number_size\",\"number\":0,\"size\":100,\"total\":1,\"first_number\":0,\"prev_number\":null,\"next_number\":null,\"last_number\":0}},\"included\":[{\"id\":\"f63eb677-07ce-46ab-b2e0-80ca1ffe91bf\",\"type\":\"scheduled_actions\",\"attributes\":{\"type\":\"escalate\"},\"relationships\":{\"schedules\":{\"data\":[]},\"users\":{\"data\":[]}}},{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"users\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"name\":\"CI Account\",\"status\":\"active\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + } + ], + "scenario": "List On-Call pages returns \"OK\" response", + "version": "v2" + }, { "feature": "On-Call", "frozen_at": "2026-10-06T08:43:24.486Z", diff --git a/tests/v2/features/on-call.feature b/tests/v2/features/on-call.feature index f782b41d09..a791df40dc 100644 --- a/tests/v2/features/on-call.feature +++ b/tests/v2/features/on-call.feature @@ -272,6 +272,22 @@ Feature: On-Call When the request is sent Then the response status is 200 OK + @team:ddoghq/on-call + Scenario: Get On-Call page returns "Not Found" response + Given new "GetOnCallPage" request + And request contains "page_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:ddoghq/on-call + Scenario: Get On-Call page returns "OK" response + Given new "GetOnCallPage" request + And request contains "page_id" parameter with value "f63eb677-07ce-46ab-b2e0-80ca1ffe91bf" + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "f63eb677-07ce-46ab-b2e0-80ca1ffe91bf" + And the response "data.type" is equal to "pages" + @generated @skip @team:ddoghq/on-call Scenario: Get On-Call schedule returns "Not Found" response Given new "GetOnCallSchedule" request @@ -505,6 +521,33 @@ Feature: On-Call And the response "data" has length 1 And the response "included" has length 1 + @generated @skip @team:ddoghq/on-call + Scenario: List On-Call pages returns "Bad Request" response + Given new "ListOnCallPages" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:ddoghq/on-call + Scenario: List On-Call pages returns "Not Found" response + Given new "ListOnCallPages" request + When the request is sent + Then the response status is 404 Not Found + + @replay-only @team:ddoghq/on-call + Scenario: List On-Call pages returns "OK" response + Given new "ListOnCallPages" request + And request contains "filter[query]" parameter with value "key:1" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].id" is equal to "f63eb677-07ce-46ab-b2e0-80ca1ffe91bf" + + @generated @skip @team:ddoghq/on-call @with-pagination + Scenario: List On-Call pages returns "OK" response with pagination + Given new "ListOnCallPages" request + When the request with pagination is sent + Then the response status is 200 OK + @generated @skip @team:ddoghq/on-call Scenario: List On-Call schedule overrides returns "Bad Request" response Given new "ListScheduleOverrides" request diff --git a/tests/v2/features/on-call_paging.feature b/tests/v2/features/on-call_paging.feature index fc26fabd4c..472a4d9b29 100644 --- a/tests/v2/features/on-call_paging.feature +++ b/tests/v2/features/on-call_paging.feature @@ -10,29 +10,29 @@ Feature: On-Call Paging And an instance of "On-CallPaging" API @generated @skip @team:ddoghq/on-call - Scenario: Acknowledge On-Call Page returns "Accepted." response + Scenario: Acknowledge On-Call Page returns "No Content." response Given new "AcknowledgeOnCallPage" request And request contains "page_id" parameter from "REPLACE.ME" When the request is sent - Then the response status is 202 Accepted. + Then the response status is 204 No Content. @generated @skip @team:ddoghq/on-call - Scenario: Create On-Call Page returns "OK." response + Scenario: Create On-Call Page returns "Created." response Given new "CreateOnCallPage" request And body with value {"data": {"attributes": {"description": "Page details.", "tags": ["service:test"], "target": {"identifier": "my-team", "type": "team_handle"}, "title": "Page title", "urgency": "low"}, "type": "pages"}} When the request is sent - Then the response status is 200 OK. + Then the response status is 201 Created. @generated @skip @team:ddoghq/on-call - Scenario: Escalate On-Call Page returns "Accepted." response + Scenario: Escalate On-Call Page returns "No Content." response Given new "EscalateOnCallPage" request And request contains "page_id" parameter from "REPLACE.ME" When the request is sent - Then the response status is 202 Accepted. + Then the response status is 204 No Content. @generated @skip @team:ddoghq/on-call - Scenario: Resolve On-Call Page returns "Accepted." response + Scenario: Resolve On-Call Page returns "No Content." response Given new "ResolveOnCallPage" request And request contains "page_id" parameter from "REPLACE.ME" When the request is sent - Then the response status is 202 Accepted. + Then the response status is 204 No Content. diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index c4e28ffef4..d4f655d5c7 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -6756,6 +6756,12 @@ "type": "idempotent" } }, + "ListOnCallPages": { + "tag": "On-Call", + "undo": { + "type": "safe" + } + }, "CreateOnCallPage": { "tag": "On-Call Paging", "undo": { @@ -6763,6 +6769,12 @@ "type": "unsafe" } }, + "GetOnCallPage": { + "tag": "On-Call", + "undo": { + "type": "safe" + } + }, "AcknowledgeOnCallPage": { "tag": "On-Call Paging", "undo": {