From a83a58cac582ff07a5269ccad788eb108ec8fe1f Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 29 Oct 2026 17:05:42 +0000 Subject: [PATCH] Regenerate client from commit 6b4b72c of spec repo --- .generator/schemas/v2/openapi.yaml | 901 +++++++++++++++++- examples/v2/on-call/GetOnCallPage.rb | 8 + examples/v2/on-call/ListOnCallPages.rb | 11 + .../v2/on-call/ListOnCallPages_695800857.rb | 8 + features/scenarios_model_mapping.rb | 9 + features/v2/on-call.feature | 43 + features/v2/undo.json | 12 + generated-test/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 ++ lib/datadog_api_client/inflector.rb | 45 + lib/datadog_api_client/v2/api/on_call_api.rb | 165 ++++ .../create_notification_channel_data.rb | 2 +- ..._on_call_notification_rule_request_data.rb | 2 +- .../v2/models/create_override_request_data.rb | 2 +- ...n_policy_create_request_data_attributes.rb | 2 +- .../escalation_policy_data_attributes.rb | 2 +- ...n_policy_update_request_data_attributes.rb | 2 +- .../v2/models/notification_channel_data.rb | 2 +- .../v2/models/notification_channel_type.rb | 2 +- ...fication_rule_channel_relationship_data.rb | 2 +- .../models/on_call_notification_rule_data.rb | 2 +- .../models/on_call_notification_rule_type.rb | 2 +- .../on_call_page_author_relationship.rb | 113 +++ .../on_call_page_author_relationship_data.rb | 145 +++ .../v2/models/on_call_page_data.rb | 164 ++++ .../v2/models/on_call_page_data_attributes.rb | 356 +++++++ .../models/on_call_page_data_relationships.rb | 185 ++++ .../v2/models/on_call_page_data_type.rb | 26 + .../on_call_page_jira_issue_relationship.rb | 105 ++ ..._call_page_jira_issue_relationship_data.rb | 144 +++ .../v2/models/on_call_page_jira_issue_type.rb | 26 + .../v2/models/on_call_page_link.rb | 156 +++ .../v2/models/on_call_page_link_attributes.rb | 209 ++++ .../models/on_call_page_link_entity_type.rb | 29 + .../on_call_page_link_relationship_data.rb | 144 +++ .../on_call_page_link_relationship_type.rb | 33 + .../v2/models/on_call_page_link_type.rb | 26 + .../models/on_call_page_links_relationship.rb | 107 +++ .../v2/models/on_call_page_live_call.rb | 105 ++ .../models/on_call_page_live_call_outcome.rb | 30 + .../v2/models/on_call_page_live_call_over.rb | 115 +++ .../v2/models/on_call_page_release_origin.rb | 31 + .../on_call_page_responders_relationship.rb | 107 +++ .../v2/models/on_call_page_response.rb | 135 +++ .../models/on_call_page_scheduled_action.rb | 164 ++++ ...n_call_page_scheduled_action_attributes.rb | 115 +++ ...l_page_scheduled_action_attributes_type.rb | 29 + ...call_page_scheduled_action_relationship.rb | 113 +++ ...page_scheduled_action_relationship_data.rb | 144 +++ ...all_page_scheduled_action_relationships.rb | 115 +++ ...cheduled_action_relationships_schedules.rb | 107 +++ ...led_action_relationships_schedules_data.rb | 144 +++ ...ge_scheduled_action_relationships_users.rb | 107 +++ .../on_call_page_scheduled_action_type.rb | 26 + ..._page_service_now_incident_relationship.rb | 105 ++ ..._service_now_incident_relationship_data.rb | 144 +++ .../on_call_page_service_now_incident_type.rb | 26 + .../v2/models/on_call_page_status.rb | 28 + .../on_call_page_target_relationship.rb | 113 +++ .../on_call_page_target_relationship_data.rb | 144 +++ ...call_page_target_relationship_data_type.rb | 28 + ...all_page_team_routing_rule_relationship.rb | 105 ++ ...age_team_routing_rule_relationship_data.rb | 144 +++ .../on_call_page_user_relationship_data.rb | 144 +++ .../v2/models/on_call_pages_included.rb | 65 ++ .../v2/models/on_call_pages_response.rb | 147 +++ .../v2/models/on_call_pages_sort.rb | 33 + .../v2/models/override_data.rb | 2 +- .../v2/models/override_data_type.rb | 2 +- .../override_relationships_schedule_data.rb | 2 +- ...erride_relationships_schedule_data_type.rb | 2 +- .../override_relationships_user_data.rb | 2 +- .../override_relationships_user_data_type.rb | 2 +- .../routing_rule_escalation_policy_action.rb | 2 +- .../routing_rule_relationships_policy_data.rb | 2 +- ...ing_rule_relationships_policy_data_type.rb | 2 +- .../routing_rule_reroute_to_team_action.rb | 6 +- ...outing_rule_reroute_to_team_action_type.rb | 2 +- lib/datadog_api_client/v2/models/schedules.rb | 2 +- .../v2/models/schedules_response_meta.rb | 4 +- .../v2/models/schedules_response_meta_page.rb | 2 +- .../v2/models/shift_data.rb | 2 +- .../shift_data_relationships_user_data.rb | 2 +- ...shift_data_relationships_user_data_type.rb | 2 +- .../v2/models/shift_data_type.rb | 2 +- ...les_data_relationships_rules_data_items.rb | 2 +- ...ata_relationships_rules_data_items_type.rb | 2 +- ...m_routing_rules_request_data_attributes.rb | 2 +- ..._on_call_notification_rule_request_data.rb | 2 +- 92 files changed, 6224 insertions(+), 55 deletions(-) create mode 100644 examples/v2/on-call/GetOnCallPage.rb create mode 100644 examples/v2/on-call/ListOnCallPages.rb create mode 100644 examples/v2/on-call/ListOnCallPages_695800857.rb create mode 100644 generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-not-found-response.json create mode 100644 generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-ok-response.json create mode 100644 generated-test/test-runner-data/v2/on-call/list-on-call-pages-returns-ok-response.json create mode 100644 lib/datadog_api_client/v2/models/on_call_page_author_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_author_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_data.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_data_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_data_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_jira_issue_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_jira_issue_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_jira_issue_type.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_link.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_link_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_link_entity_type.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_link_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_link_relationship_type.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_link_type.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_links_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_live_call.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_live_call_outcome.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_live_call_over.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_release_origin.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_responders_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_response.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_scheduled_action.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_scheduled_action_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_scheduled_action_attributes_type.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_schedules.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_schedules_data.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_users.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_scheduled_action_type.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_service_now_incident_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_service_now_incident_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_service_now_incident_type.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_status.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_target_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_target_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_target_relationship_data_type.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_team_routing_rule_relationship.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_team_routing_rule_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_page_user_relationship_data.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_pages_included.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_pages_response.rb create mode 100644 lib/datadog_api_client/v2/models/on_call_pages_sort.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index f9b60ddf906b..ee3e8b873b6a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -40736,7 +40736,7 @@ components: minLength: 1 type: string resolve_page_on_policy_end: - description: "Indicates whether the page is automatically resolved when the policy ends." + description: "Indicates whether the Page is automatically resolved when the policy ends." type: boolean retries: description: "Specifies how many times the escalation sequence is retried if there is no response." @@ -40817,7 +40817,7 @@ components: minLength: 1 type: string resolve_page_on_policy_end: - description: "Indicates whether the page is automatically resolved when the policy ends." + description: "Indicates whether the Page is automatically resolved when the policy ends." type: boolean retries: description: "Specifies how many times the escalation sequence is retried if there is no response." @@ -41053,7 +41053,7 @@ components: minLength: 1 type: string resolve_page_on_policy_end: - description: "Indicates whether the page is automatically resolved when the policy ends." + description: "Indicates whether the Page is automatically resolved when the policy ends." type: boolean retries: description: "Specifies how many times the escalation sequence is retried if there is no response." @@ -84009,7 +84009,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 @@ -92287,7 +92287,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 @@ -92298,6 +92298,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: @@ -92310,6 +92861,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: @@ -94954,7 +95584,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 @@ -94998,7 +95628,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 @@ -95029,7 +95659,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 @@ -107091,7 +107721,7 @@ components: description: "Triggers an escalation policy." properties: ack_timeout_minutes: - description: "The number of minutes before an acknowledged page is re-triggered." + description: "The number of minutes before an acknowledged Page is re-triggered." example: 30 format: int64 type: integer @@ -107161,7 +107791,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 @@ -107169,10 +107799,10 @@ components: x-enum-varnames: - POLICIES RoutingRuleRerouteToTeamAction: - description: "Reroutes the page to another team, which then evaluates it against its own routing rules. Each routing rule can include this action only once. It can be combined only with `send_slack_message` and `send_teams_message` actions. It can't be used with `escalation_policy` or `workflow` actions, or when the routing rule sets `policy_id`." + description: "Reroutes the Page to another team, which then evaluates it against its own routing rules. Each routing rule can include this action only once. It can be combined only with `send_slack_message` and `send_teams_message` actions. It can't be used with `escalation_policy` or `workflow` actions, or when the routing rule sets `policy_id`." properties: destination_team_id: - description: "The ID of the team to reroute the page to." + description: "The ID of the team to reroute the Page to." example: "00000000-0000-0000-0000-000000000000" format: uuid type: string @@ -107184,7 +107814,7 @@ components: type: object RoutingRuleRerouteToTeamActionType: default: reroute_to_team - description: "Indicates that the action reroutes the page to another team's routing rules." + description: "Indicates that the action reroutes the Page to another team's routing rules." enum: - reroute_to_team example: reroute_to_team @@ -112780,13 +113410,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. @@ -123851,7 +124481,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 @@ -123860,7 +124490,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 @@ -134917,7 +135547,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 @@ -134989,7 +135619,7 @@ components: description: Represents the attributes of a request to update or create team routing rules. properties: rules: - description: A list of routing rule items that define how incoming pages should be handled. + description: A list of routing rule items that define how incoming Pages should be handled. items: $ref: "#/components/schemas/TeamRoutingRulesRequestRule" type: array @@ -208043,6 +208673,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 by a field. + 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. @@ -208165,6 +208928,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: |- diff --git a/examples/v2/on-call/GetOnCallPage.rb b/examples/v2/on-call/GetOnCallPage.rb new file mode 100644 index 000000000000..124dcdad9d4e --- /dev/null +++ b/examples/v2/on-call/GetOnCallPage.rb @@ -0,0 +1,8 @@ +# Get On-Call Page returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] +end +api_instance = DatadogAPIClient::V2::OnCallAPI.new +p api_instance.get_on_call_page("f63eb677-07ce-46ab-b2e0-80ca1ffe91bf") diff --git a/examples/v2/on-call/ListOnCallPages.rb b/examples/v2/on-call/ListOnCallPages.rb new file mode 100644 index 000000000000..a8d3b7293d0f --- /dev/null +++ b/examples/v2/on-call/ListOnCallPages.rb @@ -0,0 +1,11 @@ +# List On-Call Pages returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] +end +api_instance = DatadogAPIClient::V2::OnCallAPI.new +opts = { + filter_query: "key:1", +} +p api_instance.list_on_call_pages(opts) diff --git a/examples/v2/on-call/ListOnCallPages_695800857.rb b/examples/v2/on-call/ListOnCallPages_695800857.rb new file mode 100644 index 000000000000..0af0d9af2508 --- /dev/null +++ b/examples/v2/on-call/ListOnCallPages_695800857.rb @@ -0,0 +1,8 @@ +# List On-Call Pages returns "OK" response with pagination + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.access_token = ENV["DD_BEARER_TOKEN"] +end +api_instance = DatadogAPIClient::V2::OnCallAPI.new +api_instance.list_on_call_pages_with_pagination() { |item| puts item } diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index fee26a377f20..c934256606c1 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -5367,6 +5367,15 @@ "include" => "String", "body" => "EscalationPolicyUpdateRequest", }, + "v2.ListOnCallPages" => { + "page_size" => "Integer", + "page_number" => "Integer", + "filter_query" => "String", + "sort" => "OnCallPagesSort", + }, + "v2.GetOnCallPage" => { + "page_id" => "String", + }, "v2.ListOnCallSchedules" => { "page_size" => "Integer", "page_number" => "Integer", diff --git a/features/v2/on-call.feature b/features/v2/on-call.feature index f782b41d0915..01cc83122e41 100644 --- a/features/v2/on-call.feature +++ b/features/v2/on-call.feature @@ -246,6 +246,22 @@ Feature: On-Call When the request is sent Then the response status is 404 Not Found + @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 escalation policy returns "Bad Request" response Given new "GetOnCallEscalationPolicy" request @@ -426,6 +442,33 @@ Feature: On-Call When the request is sent Then the response status is 200 OK + @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 escalation policies returns "Bad Request" response Given new "ListOnCallEscalationPolicies" request diff --git a/features/v2/undo.json b/features/v2/undo.json index f78687679186..3736b4e845e3 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -6686,6 +6686,12 @@ "type": "idempotent" } }, + "ListOnCallPages": { + "tag": "On-Call", + "undo": { + "type": "safe" + } + }, "CreateOnCallPage": { "tag": "On-Call Paging", "undo": { @@ -6693,6 +6699,12 @@ "type": "unsafe" } }, + "GetOnCallPage": { + "tag": "On-Call", + "undo": { + "type": "safe" + } + }, "AcknowledgeOnCallPage": { "tag": "On-Call Paging", "undo": { diff --git a/generated-test/test-runner-data/manifest.json b/generated-test/test-runner-data/manifest.json index 23a28aaa5b4c..b4563d94e5f6 100644 --- a/generated-test/test-runner-data/manifest.json +++ b/generated-test/test-runner-data/manifest.json @@ -9072,6 +9072,20 @@ "scenario": "Delete an On-Call notification rule for a user returns \"No Content\" response", "version": "v2" }, + { + "feature": "On-Call", + "feature_file": "../../features/v2/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": "../../features/v2/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": "../../features/v2/on-call.feature", @@ -9121,6 +9135,13 @@ "scenario": "Get team on-call users returns \"OK\" response", "version": "v2" }, + { + "feature": "On-Call", + "feature_file": "../../features/v2/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": "../../features/v2/on-call.feature", diff --git a/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-not-found-response.json b/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-not-found-response.json new file mode 100644 index 000000000000..b6d568db08ff --- /dev/null +++ b/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/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-ok-response.json b/generated-test/test-runner-data/v2/on-call/get-on-call-page-returns-ok-response.json new file mode 100644 index 000000000000..44419c751de9 --- /dev/null +++ b/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/generated-test/test-runner-data/v2/on-call/list-on-call-pages-returns-ok-response.json b/generated-test/test-runner-data/v2/on-call/list-on-call-pages-returns-ok-response.json new file mode 100644 index 000000000000..556306443857 --- /dev/null +++ b/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/generated-test/test-server-data/v2/on-call.json b/generated-test/test-server-data/v2/on-call.json index a6fe6f6f7ccb..9325418b6172 100644 --- a/generated-test/test-server-data/v2/on-call.json +++ b/generated-test/test-server-data/v2/on-call.json @@ -2150,6 +2150,68 @@ "scenario": "Delete an On-Call notification rule for a user returns \"No Content\" 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:33.368Z", @@ -3674,6 +3736,42 @@ "scenario": "Get team on-call users 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-21T07:56:00.111Z", diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index c224973f2764..34b6a97c6459 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -6438,7 +6438,52 @@ def overrides "v2.on_call_notification_rule_request_attributes" => "OnCallNotificationRuleRequestAttributes", "v2.on_call_notification_rules_included" => "OnCallNotificationRulesIncluded", "v2.on_call_notification_rule_type" => "OnCallNotificationRuleType", + "v2.on_call_page_author_relationship" => "OnCallPageAuthorRelationship", + "v2.on_call_page_author_relationship_data" => "OnCallPageAuthorRelationshipData", + "v2.on_call_page_data" => "OnCallPageData", + "v2.on_call_page_data_attributes" => "OnCallPageDataAttributes", + "v2.on_call_page_data_relationships" => "OnCallPageDataRelationships", + "v2.on_call_page_data_type" => "OnCallPageDataType", + "v2.on_call_page_jira_issue_relationship" => "OnCallPageJiraIssueRelationship", + "v2.on_call_page_jira_issue_relationship_data" => "OnCallPageJiraIssueRelationshipData", + "v2.on_call_page_jira_issue_type" => "OnCallPageJiraIssueType", + "v2.on_call_page_link" => "OnCallPageLink", + "v2.on_call_page_link_attributes" => "OnCallPageLinkAttributes", + "v2.on_call_page_link_entity_type" => "OnCallPageLinkEntityType", + "v2.on_call_page_link_relationship_data" => "OnCallPageLinkRelationshipData", + "v2.on_call_page_link_relationship_type" => "OnCallPageLinkRelationshipType", + "v2.on_call_page_links_relationship" => "OnCallPageLinksRelationship", + "v2.on_call_page_link_type" => "OnCallPageLinkType", + "v2.on_call_page_live_call" => "OnCallPageLiveCall", + "v2.on_call_page_live_call_outcome" => "OnCallPageLiveCallOutcome", + "v2.on_call_page_live_call_over" => "OnCallPageLiveCallOver", + "v2.on_call_page_release_origin" => "OnCallPageReleaseOrigin", + "v2.on_call_page_responders_relationship" => "OnCallPageRespondersRelationship", + "v2.on_call_page_response" => "OnCallPageResponse", + "v2.on_call_page_scheduled_action" => "OnCallPageScheduledAction", + "v2.on_call_page_scheduled_action_attributes" => "OnCallPageScheduledActionAttributes", + "v2.on_call_page_scheduled_action_attributes_type" => "OnCallPageScheduledActionAttributesType", + "v2.on_call_page_scheduled_action_relationship" => "OnCallPageScheduledActionRelationship", + "v2.on_call_page_scheduled_action_relationship_data" => "OnCallPageScheduledActionRelationshipData", + "v2.on_call_page_scheduled_action_relationships" => "OnCallPageScheduledActionRelationships", + "v2.on_call_page_scheduled_action_relationships_schedules" => "OnCallPageScheduledActionRelationshipsSchedules", + "v2.on_call_page_scheduled_action_relationships_schedules_data" => "OnCallPageScheduledActionRelationshipsSchedulesData", + "v2.on_call_page_scheduled_action_relationships_users" => "OnCallPageScheduledActionRelationshipsUsers", + "v2.on_call_page_scheduled_action_type" => "OnCallPageScheduledActionType", + "v2.on_call_page_service_now_incident_relationship" => "OnCallPageServiceNowIncidentRelationship", + "v2.on_call_page_service_now_incident_relationship_data" => "OnCallPageServiceNowIncidentRelationshipData", + "v2.on_call_page_service_now_incident_type" => "OnCallPageServiceNowIncidentType", + "v2.on_call_pages_included" => "OnCallPagesIncluded", + "v2.on_call_pages_response" => "OnCallPagesResponse", + "v2.on_call_pages_sort" => "OnCallPagesSort", + "v2.on_call_page_status" => "OnCallPageStatus", + "v2.on_call_page_target_relationship" => "OnCallPageTargetRelationship", + "v2.on_call_page_target_relationship_data" => "OnCallPageTargetRelationshipData", + "v2.on_call_page_target_relationship_data_type" => "OnCallPageTargetRelationshipDataType", "v2.on_call_page_target_type" => "OnCallPageTargetType", + "v2.on_call_page_team_routing_rule_relationship" => "OnCallPageTeamRoutingRuleRelationship", + "v2.on_call_page_team_routing_rule_relationship_data" => "OnCallPageTeamRoutingRuleRelationshipData", + "v2.on_call_page_user_relationship_data" => "OnCallPageUserRelationshipData", "v2.on_call_phone_notification_rule_method" => "OnCallPhoneNotificationRuleMethod", "v2.on_call_phone_notification_rule_settings" => "OnCallPhoneNotificationRuleSettings", "v2.on_call_shift_change_trigger" => "OnCallShiftChangeTrigger", diff --git a/lib/datadog_api_client/v2/api/on_call_api.rb b/lib/datadog_api_client/v2/api/on_call_api.rb index 7abd55b3733c..f7eed7c5201b 100644 --- a/lib/datadog_api_client/v2/api/on_call_api.rb +++ b/lib/datadog_api_client/v2/api/on_call_api.rb @@ -786,6 +786,71 @@ def get_on_call_escalation_policy_with_http_info(policy_id, opts = {}) return data, status_code, headers end + # Get On-Call Page. + # + # @see #get_on_call_page_with_http_info + def get_on_call_page(page_id, opts = {}) + data, _status_code, _headers = get_on_call_page_with_http_info(page_id, opts) + data + end + + # Get On-Call Page. + # + # Get the details of an On-Call Page. + # + # @param page_id [String] The ID of the Page, or its key. + # @param opts [Hash] the optional parameters + # @return [Array<(OnCallPageResponse, Integer, Hash)>] OnCallPageResponse data, response status code and response headers + def get_on_call_page_with_http_info(page_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OnCallAPI.get_on_call_page ...' + end + # verify the required parameter 'page_id' is set + if @api_client.config.client_side_validation && page_id.nil? + fail ArgumentError, "Missing the required parameter 'page_id' when calling OnCallAPI.get_on_call_page" + end + # resource path + local_var_path = '/api/v2/on-call/pages/{page_id}'.sub('{page_id}', CGI.escape(page_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OnCallPageResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_on_call_page, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OnCallAPI#get_on_call_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get On-Call schedule. # # @see #get_on_call_schedule_with_http_info @@ -1375,6 +1440,106 @@ def list_on_call_escalation_policies_with_pagination(opts = {}) end end + # List On-Call Pages. + # + # @see #list_on_call_pages_with_http_info + def list_on_call_pages(opts = {}) + data, _status_code, _headers = list_on_call_pages_with_http_info(opts) + data + end + + # List On-Call Pages. + # + # Retrieve a paginated list of On-Call Pages, optionally filtered by a search query and sorted by a field. + # + # @param opts [Hash] the optional parameters + # @option opts [Integer] :page_size Number of On-Call Pages to return per page of results. The maximum allowed value is 1000. + # @option opts [Integer] :page_number Page of results to return, starting at 0. `page[number]` multiplied by `page[size]` must be less than 50000. + # @option opts [String] :filter_query Search query to filter Pages. Supports filters such as `status`, `urgency`, `team`, `service`, and `tags`, for example `status:triggered`. + # @option opts [OnCallPagesSort] :sort Sort Pages by the given field. Only one field is allowed. + # @return [Array<(OnCallPagesResponse, Integer, Hash)>] OnCallPagesResponse data, response status code and response headers + def list_on_call_pages_with_http_info(opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: OnCallAPI.list_on_call_pages ...' + end + if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000 + fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OnCallAPI.list_on_call_pages, must be smaller than or equal to 1000.' + end + if @api_client.config.client_side_validation && !opts[:'page_number'].nil? && opts[:'page_number'] < 0 + fail ArgumentError, 'invalid value for "opts[:"page_number"]" when calling OnCallAPI.list_on_call_pages, must be greater than or equal to 0.' + end + allowable_values = ['created_at', '-created_at', 'modified_at', '-modified_at', 'status', '-status', 'priority', '-priority'] + if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort']) + fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/v2/on-call/pages' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? + query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? + query_params[:'filter[query]'] = opts[:'filter_query'] if !opts[:'filter_query'].nil? + query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'OnCallPagesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_on_call_pages, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: OnCallAPI#list_on_call_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List On-Call Pages. + # + # Provide a paginated version of {#list_on_call_pages}, returning all items. + # + # To use it you need to use a block: list_on_call_pages_with_pagination { |item| p item } + # + # @yield [OnCallPageData] Paginated items + def list_on_call_pages_with_pagination(opts = {}) + api_version = "V2" + page_size = @api_client.get_attribute_from_path(opts, "page_size", 100) + @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size) + @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, 0) + while true do + response = list_on_call_pages(opts) + @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) } + if @api_client.get_attribute_from_path(response, "data").length < page_size + break + end + @api_client.set_attribute_from_path(api_version, opts, "page_number", Integer, @api_client.get_attribute_from_path(opts, "page_number", 0) + 1) + end + end + # List On-Call schedules. # # @see #list_on_call_schedules_with_http_info diff --git a/lib/datadog_api_client/v2/models/create_notification_channel_data.rb b/lib/datadog_api_client/v2/models/create_notification_channel_data.rb index bd4e46c4aa7b..b0f67f1650e5 100644 --- a/lib/datadog_api_client/v2/models/create_notification_channel_data.rb +++ b/lib/datadog_api_client/v2/models/create_notification_channel_data.rb @@ -24,7 +24,7 @@ class CreateNotificationChannelData # Attributes for creating an on-call notification channel. attr_accessor :attributes - # Indicates that the resource is of type 'notification_channels'. + # Indicates that the resource is of type `notification_channels`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request_data.rb b/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request_data.rb index 923861ee4e91..d6a9b1e45c4f 100644 --- a/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request_data.rb +++ b/lib/datadog_api_client/v2/models/create_on_call_notification_rule_request_data.rb @@ -27,7 +27,7 @@ class CreateOnCallNotificationRuleRequestData # Relationship object for creating a notification rule attr_accessor :relationships - # Indicates that the resource is of type 'notification_rules'. + # Indicates that the resource is of type `notification_rules`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/create_override_request_data.rb b/lib/datadog_api_client/v2/models/create_override_request_data.rb index e4c97fe6df37..a814a8db1ea1 100644 --- a/lib/datadog_api_client/v2/models/create_override_request_data.rb +++ b/lib/datadog_api_client/v2/models/create_override_request_data.rb @@ -27,7 +27,7 @@ class CreateOverrideRequestData # Relationships to set when creating an on-call schedule override. attr_accessor :relationships - # Indicates that the resource is of type 'overrides'. + # Indicates that the resource is of type `overrides`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb b/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb index 96f29b7ccf2d..b9041ebb7ba9 100644 --- a/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/escalation_policy_create_request_data_attributes.rb @@ -24,7 +24,7 @@ class EscalationPolicyCreateRequestDataAttributes # Specifies the name for the new escalation policy. attr_reader :name - # Indicates whether the page is automatically resolved when the policy ends. + # Indicates whether the Page is automatically resolved when the policy ends. attr_accessor :resolve_page_on_policy_end # Specifies how many times the escalation sequence is retried if there is no response. diff --git a/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb b/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb index 4b6982902280..8cd964c5100a 100644 --- a/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/escalation_policy_data_attributes.rb @@ -24,7 +24,7 @@ class EscalationPolicyDataAttributes # Specifies the name of the escalation policy. attr_reader :name - # Indicates whether the page is automatically resolved when the policy ends. + # Indicates whether the Page is automatically resolved when the policy ends. attr_accessor :resolve_page_on_policy_end # Specifies how many times the escalation sequence is retried if there is no response. diff --git a/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb b/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb index bfacc9aedc73..e7b7b58af6fe 100644 --- a/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/escalation_policy_update_request_data_attributes.rb @@ -24,7 +24,7 @@ class EscalationPolicyUpdateRequestDataAttributes # Specifies the name of the escalation policy. attr_reader :name - # Indicates whether the page is automatically resolved when the policy ends. + # Indicates whether the Page is automatically resolved when the policy ends. attr_accessor :resolve_page_on_policy_end # Specifies how many times the escalation sequence is retried if there is no response. diff --git a/lib/datadog_api_client/v2/models/notification_channel_data.rb b/lib/datadog_api_client/v2/models/notification_channel_data.rb index f6029c121722..e219de8a892d 100644 --- a/lib/datadog_api_client/v2/models/notification_channel_data.rb +++ b/lib/datadog_api_client/v2/models/notification_channel_data.rb @@ -27,7 +27,7 @@ class NotificationChannelData # Unique identifier for the channel attr_accessor :id - # Indicates that the resource is of type 'notification_channels'. + # Indicates that the resource is of type `notification_channels`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/notification_channel_type.rb b/lib/datadog_api_client/v2/models/notification_channel_type.rb index e40c0223f42b..9b9a5388d234 100644 --- a/lib/datadog_api_client/v2/models/notification_channel_type.rb +++ b/lib/datadog_api_client/v2/models/notification_channel_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Indicates that the resource is of type 'notification_channels'. + # Indicates that the resource is of type `notification_channels`. class NotificationChannelType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship_data.rb b/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship_data.rb index 44e3f2dc35bf..98bb6c3b1a32 100644 --- a/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship_data.rb +++ b/lib/datadog_api_client/v2/models/on_call_notification_rule_channel_relationship_data.rb @@ -24,7 +24,7 @@ class OnCallNotificationRuleChannelRelationshipData # ID of the notification channel attr_accessor :id - # Indicates that the resource is of type 'notification_channels'. + # Indicates that the resource is of type `notification_channels`. attr_accessor :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/on_call_notification_rule_data.rb b/lib/datadog_api_client/v2/models/on_call_notification_rule_data.rb index 43f6a95c691d..013970b6aff3 100644 --- a/lib/datadog_api_client/v2/models/on_call_notification_rule_data.rb +++ b/lib/datadog_api_client/v2/models/on_call_notification_rule_data.rb @@ -30,7 +30,7 @@ class OnCallNotificationRuleData # Relationship object for creating a notification rule attr_accessor :relationships - # Indicates that the resource is of type 'notification_rules'. + # Indicates that the resource is of type `notification_rules`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/on_call_notification_rule_type.rb b/lib/datadog_api_client/v2/models/on_call_notification_rule_type.rb index 46c3df313537..76bf5e96f44f 100644 --- a/lib/datadog_api_client/v2/models/on_call_notification_rule_type.rb +++ b/lib/datadog_api_client/v2/models/on_call_notification_rule_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Indicates that the resource is of type 'notification_rules'. + # Indicates that the resource is of type `notification_rules`. class OnCallNotificationRuleType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/on_call_page_author_relationship.rb b/lib/datadog_api_client/v2/models/on_call_page_author_relationship.rb new file mode 100644 index 000000000000..cb0f3b2e0ff8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_author_relationship.rb @@ -0,0 +1,113 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to the entity that performed an action on the Page. + class OnCallPageAuthorRelationship + include BaseGenericModel + + # Reference to the author of a Page action. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'OnCallPageAuthorRelationshipData' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'data', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageAuthorRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_author_relationship_data.rb b/lib/datadog_api_client/v2/models/on_call_page_author_relationship_data.rb new file mode 100644 index 000000000000..fd584622a16f --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_author_relationship_data.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to the author of a Page action. + class OnCallPageAuthorRelationshipData + include BaseGenericModel + + # The ID of the author. + attr_reader :id + + # The resource type of the author, for example `users`, `monitors`, + # `incident_authors`, or `security_signal`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageAuthorRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_data.rb b/lib/datadog_api_client/v2/models/on_call_page_data.rb new file mode 100644 index 000000000000..cccbfe13cbd8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_data.rb @@ -0,0 +1,164 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An On-Call Page. + class OnCallPageData + include BaseGenericModel + + # The attributes of an On-Call Page. + attr_accessor :attributes + + # The unique ID of the Page. + attr_reader :id + + # The relationships of an On-Call Page. + attr_accessor :relationships + + # Indicates that the resource is of type `pages`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'OnCallPageDataAttributes', + :'id' => :'UUID', + :'relationships' => :'OnCallPageDataRelationships', + :'type' => :'OnCallPageDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_data_attributes.rb b/lib/datadog_api_client/v2/models/on_call_page_data_attributes.rb new file mode 100644 index 000000000000..308185789962 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_data_attributes.rb @@ -0,0 +1,356 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The attributes of an On-Call Page. + class OnCallPageDataAttributes + include BaseGenericModel + + # The time when the Page was first acknowledged. + attr_accessor :acknowledged_at + + # The time when the Page was resolved. + attr_accessor :closed_at + + # The number of comments on the Page. + attr_accessor :comment_count + + # The time when the Page was created. + attr_reader :created_at + + # A short summary of the issue or context. + attr_reader :description + + # The ID of the escalation policy used to route the Page. + attr_accessor :escalation_policy_uuid + + # An alternative numeric identifier of the Page, as displayed in the Datadog UI. + attr_reader :key + + # Live call information for a Page triggered by a live call route. + attr_accessor :live_call + + # The time when the Page was last modified. + attr_accessor :modified_at + + # The time when the snooze ends. Only set while the Page is snoozed, together with `release_origin`. + attr_accessor :release_at + + # 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. + attr_accessor :release_origin + + # The time when responders were first added to the Page. + attr_accessor :responders_added_at + + # The services associated with the Page. + attr_accessor :services + + # The current status of the On-Call Page. + attr_reader :status + + # Tags associated with the Page. + attr_reader :tags + + # The title of the Page. + attr_reader :title + + # On-Call Page urgency level. + attr_reader :urgency + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'acknowledged_at' => :'Time', + :'closed_at' => :'Time', + :'comment_count' => :'Integer', + :'created_at' => :'Time', + :'description' => :'String', + :'escalation_policy_uuid' => :'UUID', + :'key' => :'String', + :'live_call' => :'OnCallPageLiveCall', + :'modified_at' => :'Time', + :'release_at' => :'Time', + :'release_origin' => :'OnCallPageReleaseOrigin', + :'responders_added_at' => :'Time', + :'services' => :'Array', + :'status' => :'OnCallPageStatus', + :'tags' => :'Array', + :'title' => :'String', + :'urgency' => :'PageUrgency' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'acknowledged_at') + self.acknowledged_at = attributes[:'acknowledged_at'] + end + + if attributes.key?(:'closed_at') + self.closed_at = attributes[:'closed_at'] + end + + if attributes.key?(:'comment_count') + self.comment_count = attributes[:'comment_count'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'escalation_policy_uuid') + self.escalation_policy_uuid = attributes[:'escalation_policy_uuid'] + end + + if attributes.key?(:'key') + self.key = attributes[:'key'] + end + + if attributes.key?(:'live_call') + self.live_call = attributes[:'live_call'] + end + + if attributes.key?(:'modified_at') + self.modified_at = attributes[:'modified_at'] + end + + if attributes.key?(:'release_at') + self.release_at = attributes[:'release_at'] + end + + if attributes.key?(:'release_origin') + self.release_origin = attributes[:'release_origin'] + end + + if attributes.key?(:'responders_added_at') + self.responders_added_at = attributes[:'responders_added_at'] + end + + if attributes.key?(:'services') + if (value = attributes[:'services']).is_a?(Array) + self.services = value + end + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'urgency') + self.urgency = attributes[:'urgency'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @created_at.nil? + return false if @description.nil? + return false if @key.nil? + return false if @status.nil? + return false if @tags.nil? + return false if @title.nil? + return false if @urgency.nil? + true + end + + # Custom attribute writer method with validation + # @param created_at [Object] Object to be assigned + # @!visibility private + def created_at=(created_at) + if created_at.nil? + fail ArgumentError, 'invalid value for "created_at", created_at cannot be nil.' + end + @created_at = created_at + end + + # Custom attribute writer method with validation + # @param description [Object] Object to be assigned + # @!visibility private + def description=(description) + if description.nil? + fail ArgumentError, 'invalid value for "description", description cannot be nil.' + end + @description = description + end + + # Custom attribute writer method with validation + # @param key [Object] Object to be assigned + # @!visibility private + def key=(key) + if key.nil? + fail ArgumentError, 'invalid value for "key", key cannot be nil.' + end + @key = key + end + + # Custom attribute writer method with validation + # @param status [Object] Object to be assigned + # @!visibility private + def status=(status) + if status.nil? + fail ArgumentError, 'invalid value for "status", status cannot be nil.' + end + @status = status + end + + # Custom attribute writer method with validation + # @param tags [Object] Object to be assigned + # @!visibility private + def tags=(tags) + if tags.nil? + fail ArgumentError, 'invalid value for "tags", tags cannot be nil.' + end + @tags = tags + end + + # Custom attribute writer method with validation + # @param title [Object] Object to be assigned + # @!visibility private + def title=(title) + if title.nil? + fail ArgumentError, 'invalid value for "title", title cannot be nil.' + end + @title = title + end + + # Custom attribute writer method with validation + # @param urgency [Object] Object to be assigned + # @!visibility private + def urgency=(urgency) + if urgency.nil? + fail ArgumentError, 'invalid value for "urgency", urgency cannot be nil.' + end + @urgency = urgency + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + acknowledged_at == o.acknowledged_at && + closed_at == o.closed_at && + comment_count == o.comment_count && + created_at == o.created_at && + description == o.description && + escalation_policy_uuid == o.escalation_policy_uuid && + key == o.key && + live_call == o.live_call && + modified_at == o.modified_at && + release_at == o.release_at && + release_origin == o.release_origin && + responders_added_at == o.responders_added_at && + services == o.services && + status == o.status && + tags == o.tags && + title == o.title && + urgency == o.urgency && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [acknowledged_at, closed_at, comment_count, created_at, description, escalation_policy_uuid, key, live_call, modified_at, release_at, release_origin, responders_added_at, services, status, tags, title, urgency, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_data_relationships.rb b/lib/datadog_api_client/v2/models/on_call_page_data_relationships.rb new file mode 100644 index 000000000000..373e6b240ace --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_data_relationships.rb @@ -0,0 +1,185 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The relationships of an On-Call Page. + class OnCallPageDataRelationships + include BaseGenericModel + + # Reference to the entity that performed an action on the Page. + attr_accessor :author + + # Reference to the entity that performed an action on the Page. + attr_accessor :closed_by + + # The Jira issue linked to the Page. + attr_accessor :jira_issue + + # Links between the Page and other Datadog resources, such as incidents. Always empty when listing Pages. + attr_accessor :links + + # The users responding to the Page. + attr_accessor :responders + + # The next action scheduled on the Page, such as an escalation. + attr_accessor :scheduled_action + + # The ServiceNow incident linked to the Page. + attr_accessor :service_now_incident + + # The team, user, or cross-organization handle that was paged. + attr_accessor :target + + # The team routing rule that matched the Page. + attr_accessor :team_routing_rule + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'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' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageDataRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'author') + self.author = attributes[:'author'] + end + + if attributes.key?(:'closed_by') + self.closed_by = attributes[:'closed_by'] + end + + if attributes.key?(:'jira_issue') + self.jira_issue = attributes[:'jira_issue'] + end + + if attributes.key?(:'links') + self.links = attributes[:'links'] + end + + if attributes.key?(:'responders') + self.responders = attributes[:'responders'] + end + + if attributes.key?(:'scheduled_action') + self.scheduled_action = attributes[:'scheduled_action'] + end + + if attributes.key?(:'service_now_incident') + self.service_now_incident = attributes[:'service_now_incident'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + end + + if attributes.key?(:'team_routing_rule') + self.team_routing_rule = attributes[:'team_routing_rule'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + author == o.author && + closed_by == o.closed_by && + jira_issue == o.jira_issue && + links == o.links && + responders == o.responders && + scheduled_action == o.scheduled_action && + service_now_incident == o.service_now_incident && + target == o.target && + team_routing_rule == o.team_routing_rule && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [author, closed_by, jira_issue, links, responders, scheduled_action, service_now_incident, target, team_routing_rule, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_data_type.rb b/lib/datadog_api_client/v2/models/on_call_page_data_type.rb new file mode 100644 index 000000000000..38c0376b372e --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Indicates that the resource is of type `pages`. + class OnCallPageDataType + include BaseEnumModel + + PAGES = "pages".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_jira_issue_relationship.rb b/lib/datadog_api_client/v2/models/on_call_page_jira_issue_relationship.rb new file mode 100644 index 000000000000..bfbd52bf9415 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_jira_issue_relationship.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The Jira issue linked to the Page. + class OnCallPageJiraIssueRelationship + include BaseGenericModel + + # Reference to a Jira issue. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'OnCallPageJiraIssueRelationshipData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageJiraIssueRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_jira_issue_relationship_data.rb b/lib/datadog_api_client/v2/models/on_call_page_jira_issue_relationship_data.rb new file mode 100644 index 000000000000..2e17aa8c8dad --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_jira_issue_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to a Jira issue. + class OnCallPageJiraIssueRelationshipData + include BaseGenericModel + + # The ID of the Jira issue, in the form `:`. + attr_reader :id + + # Jira issue resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'OnCallPageJiraIssueType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageJiraIssueRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_jira_issue_type.rb b/lib/datadog_api_client/v2/models/on_call_page_jira_issue_type.rb new file mode 100644 index 000000000000..96d1957cb137 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_jira_issue_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Jira issue resource type. + class OnCallPageJiraIssueType + include BaseEnumModel + + JIRA_ISSUES = "jira_issues".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_link.rb b/lib/datadog_api_client/v2/models/on_call_page_link.rb new file mode 100644 index 000000000000..e8bc390a74fc --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_link.rb @@ -0,0 +1,156 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A link between a Page and another Datadog resource, such as an incident. + class OnCallPageLink + include BaseGenericModel + + # 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). + attr_accessor :attributes + + # The ID of the link. + attr_reader :id + + # Page link resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'OnCallPageLinkAttributes', + :'id' => :'String', + :'type' => :'OnCallPageLinkType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageLink` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_link_attributes.rb b/lib/datadog_api_client/v2/models/on_call_page_link_attributes.rb new file mode 100644 index 000000000000..66e5a1aa5ca8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_link_attributes.rb @@ -0,0 +1,209 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # 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). + class OnCallPageLinkAttributes + include BaseGenericModel + + # The ID of the child resource. + attr_reader :child_entity_id + + # The type of a resource linked to a Page. + attr_reader :child_entity_type + + # The ID of the parent resource. + attr_reader :parent_entity_id + + # The type of a resource linked to a Page. + attr_reader :parent_entity_type + + # How the parent resource relates to the child resource. + attr_reader :relationship + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'child_entity_id' => :'child_entity_id', + :'child_entity_type' => :'child_entity_type', + :'parent_entity_id' => :'parent_entity_id', + :'parent_entity_type' => :'parent_entity_type', + :'relationship' => :'relationship' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'child_entity_id' => :'String', + :'child_entity_type' => :'OnCallPageLinkEntityType', + :'parent_entity_id' => :'String', + :'parent_entity_type' => :'OnCallPageLinkEntityType', + :'relationship' => :'OnCallPageLinkRelationshipType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageLinkAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'child_entity_id') + self.child_entity_id = attributes[:'child_entity_id'] + end + + if attributes.key?(:'child_entity_type') + self.child_entity_type = attributes[:'child_entity_type'] + end + + if attributes.key?(:'parent_entity_id') + self.parent_entity_id = attributes[:'parent_entity_id'] + end + + if attributes.key?(:'parent_entity_type') + self.parent_entity_type = attributes[:'parent_entity_type'] + end + + if attributes.key?(:'relationship') + self.relationship = attributes[:'relationship'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @child_entity_id.nil? + return false if @child_entity_type.nil? + return false if @parent_entity_id.nil? + return false if @parent_entity_type.nil? + return false if @relationship.nil? + true + end + + # Custom attribute writer method with validation + # @param child_entity_id [Object] Object to be assigned + # @!visibility private + def child_entity_id=(child_entity_id) + if child_entity_id.nil? + fail ArgumentError, 'invalid value for "child_entity_id", child_entity_id cannot be nil.' + end + @child_entity_id = child_entity_id + end + + # Custom attribute writer method with validation + # @param child_entity_type [Object] Object to be assigned + # @!visibility private + def child_entity_type=(child_entity_type) + if child_entity_type.nil? + fail ArgumentError, 'invalid value for "child_entity_type", child_entity_type cannot be nil.' + end + @child_entity_type = child_entity_type + end + + # Custom attribute writer method with validation + # @param parent_entity_id [Object] Object to be assigned + # @!visibility private + def parent_entity_id=(parent_entity_id) + if parent_entity_id.nil? + fail ArgumentError, 'invalid value for "parent_entity_id", parent_entity_id cannot be nil.' + end + @parent_entity_id = parent_entity_id + end + + # Custom attribute writer method with validation + # @param parent_entity_type [Object] Object to be assigned + # @!visibility private + def parent_entity_type=(parent_entity_type) + if parent_entity_type.nil? + fail ArgumentError, 'invalid value for "parent_entity_type", parent_entity_type cannot be nil.' + end + @parent_entity_type = parent_entity_type + end + + # Custom attribute writer method with validation + # @param relationship [Object] Object to be assigned + # @!visibility private + def relationship=(relationship) + if relationship.nil? + fail ArgumentError, 'invalid value for "relationship", relationship cannot be nil.' + end + @relationship = relationship + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + child_entity_id == o.child_entity_id && + child_entity_type == o.child_entity_type && + parent_entity_id == o.parent_entity_id && + parent_entity_type == o.parent_entity_type && + relationship == o.relationship && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [child_entity_id, child_entity_type, parent_entity_id, parent_entity_type, relationship, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_link_entity_type.rb b/lib/datadog_api_client/v2/models/on_call_page_link_entity_type.rb new file mode 100644 index 000000000000..b6f0257e7743 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_link_entity_type.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of a resource linked to a Page. + class OnCallPageLinkEntityType + include BaseEnumModel + + CASE = "case".freeze + INCIDENT = "incident".freeze + PAGE = "page".freeze + AGENT_CONVERSATION = "agent_conversation".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_link_relationship_data.rb b/lib/datadog_api_client/v2/models/on_call_page_link_relationship_data.rb new file mode 100644 index 000000000000..38da369a84e1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_link_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to a Page link. + class OnCallPageLinkRelationshipData + include BaseGenericModel + + # The ID of the link. + attr_reader :id + + # Page link resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'OnCallPageLinkType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageLinkRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_link_relationship_type.rb b/lib/datadog_api_client/v2/models/on_call_page_link_relationship_type.rb new file mode 100644 index 000000000000..2ca38ec8ae9f --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_link_relationship_type.rb @@ -0,0 +1,33 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # How the parent resource relates to the child resource. + class OnCallPageLinkRelationshipType + include BaseEnumModel + + RELATES_TO = "relates_to".freeze + CAUSES = "causes".freeze + BLOCKS = "blocks".freeze + DUPLICATES = "duplicates".freeze + PARENT_OF = "parent_of".freeze + SUCCESSOR_OF = "successor_of".freeze + ESCALATES_TO = "escalates_to".freeze + PAGES = "pages".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_link_type.rb b/lib/datadog_api_client/v2/models/on_call_page_link_type.rb new file mode 100644 index 000000000000..ed5fccd810ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_link_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Page link resource type. + class OnCallPageLinkType + include BaseEnumModel + + LINKS = "links".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_links_relationship.rb b/lib/datadog_api_client/v2/models/on_call_page_links_relationship.rb new file mode 100644 index 000000000000..071934f1e9d8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_links_relationship.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Links between the Page and other Datadog resources, such as incidents. Always empty when listing Pages. + class OnCallPageLinksRelationship + include BaseGenericModel + + # The list of Page links. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageLinksRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_live_call.rb b/lib/datadog_api_client/v2/models/on_call_page_live_call.rb new file mode 100644 index 000000000000..900c77b99f4d --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_live_call.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Live call information for a Page triggered by a live call route. + class OnCallPageLiveCall + include BaseGenericModel + + # Information about a live call that has ended. + attr_accessor :call_over + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'call_over' => :'call_over' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'call_over' => :'OnCallPageLiveCallOver' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageLiveCall` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'call_over') + self.call_over = attributes[:'call_over'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + call_over == o.call_over && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [call_over, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_live_call_outcome.rb b/lib/datadog_api_client/v2/models/on_call_page_live_call_outcome.rb new file mode 100644 index 000000000000..ba06538796b7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_live_call_outcome.rb @@ -0,0 +1,30 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The outcome of a live call that has ended. + class OnCallPageLiveCallOutcome + include BaseEnumModel + + SUCCESS_CALL_ANSWERED = "success_call_answered".freeze + FAILURE_NO_RESPONDER = "failure_no_responder".freeze + FAILURE_CALLER_ABANDONED = "failure_caller_abandoned".freeze + FAILURE_OUTSIDE_SUPPORT_HOURS = "failure_outside_support_hours".freeze + FAILURE_INTERNAL_ERROR = "failure_internal_error".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_live_call_over.rb b/lib/datadog_api_client/v2/models/on_call_page_live_call_over.rb new file mode 100644 index 000000000000..1f7caa593e50 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_live_call_over.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Information about a live call that has ended. + class OnCallPageLiveCallOver + include BaseGenericModel + + # The outcome of a live call that has ended. + attr_accessor :outcome + + # When support hours start, if the call was placed outside support hours. + attr_accessor :support_hours_start_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'outcome' => :'outcome', + :'support_hours_start_at' => :'support_hours_start_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'outcome' => :'OnCallPageLiveCallOutcome', + :'support_hours_start_at' => :'Time' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageLiveCallOver` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'outcome') + self.outcome = attributes[:'outcome'] + end + + if attributes.key?(:'support_hours_start_at') + self.support_hours_start_at = attributes[:'support_hours_start_at'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + outcome == o.outcome && + support_hours_start_at == o.support_hours_start_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [outcome, support_hours_start_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_release_origin.rb b/lib/datadog_api_client/v2/models/on_call_page_release_origin.rb new file mode 100644 index 000000000000..a78e1322638d --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_release_origin.rb @@ -0,0 +1,31 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # 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. + class OnCallPageReleaseOrigin + include BaseEnumModel + + ACK_TIMEOUT = "ack_timeout".freeze + TEAM_RULES_ACTIVE_HOURS = "team_rules_active_hours".freeze + MANUAL_SNOOZE = "manual_snooze".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_responders_relationship.rb b/lib/datadog_api_client/v2/models/on_call_page_responders_relationship.rb new file mode 100644 index 000000000000..5c42150732af --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_responders_relationship.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The users responding to the Page. + class OnCallPageRespondersRelationship + include BaseGenericModel + + # The list of responders. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageRespondersRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_response.rb b/lib/datadog_api_client/v2/models/on_call_page_response.rb new file mode 100644 index 000000000000..5e8ab85752f5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A single On-Call Page with its related included resources. + class OnCallPageResponse + include BaseGenericModel + + # An On-Call Page. + attr_reader :data + + # Resources related to the Page, such as users, teams, scheduled actions, and links. + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'OnCallPageData', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_scheduled_action.rb b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action.rb new file mode 100644 index 000000000000..85e7054ec958 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action.rb @@ -0,0 +1,164 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The next action scheduled on a Page, such as an escalation or an automatic resolution. + class OnCallPageScheduledAction + include BaseGenericModel + + # The attributes of a scheduled action. + attr_accessor :attributes + + # The ID of the scheduled action. Equal to the Page ID. + attr_reader :id + + # The relationships of a scheduled action. + attr_accessor :relationships + + # Scheduled action resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'OnCallPageScheduledActionAttributes', + :'id' => :'String', + :'relationships' => :'OnCallPageScheduledActionRelationships', + :'type' => :'OnCallPageScheduledActionType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageScheduledAction` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_attributes.rb b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_attributes.rb new file mode 100644 index 000000000000..eddaf85e0a3e --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_attributes.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The attributes of a scheduled action. + class OnCallPageScheduledActionAttributes + include BaseGenericModel + + # The time when the action is scheduled to run. + attr_accessor :at + + # The kind of action that is scheduled. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'at' => :'at', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'at' => :'Time', + :'type' => :'OnCallPageScheduledActionAttributesType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageScheduledActionAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'at') + self.at = attributes[:'at'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + at == o.at && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [at, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_attributes_type.rb b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_attributes_type.rb new file mode 100644 index 000000000000..4bf30759dc90 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_attributes_type.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The kind of action that is scheduled. + class OnCallPageScheduledActionAttributesType + include BaseEnumModel + + ESCALATE = "escalate".freeze + RESOLVE = "resolve".freeze + RELEASE = "release".freeze + RETRIGGER = "retrigger".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationship.rb b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationship.rb new file mode 100644 index 000000000000..e37939ee31f9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationship.rb @@ -0,0 +1,113 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The next action scheduled on the Page, such as an escalation. + class OnCallPageScheduledActionRelationship + include BaseGenericModel + + # Reference to the next scheduled action on the Page. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'OnCallPageScheduledActionRelationshipData' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'data', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageScheduledActionRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationship_data.rb b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationship_data.rb new file mode 100644 index 000000000000..8b1a20551070 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to the next scheduled action on the Page. + class OnCallPageScheduledActionRelationshipData + include BaseGenericModel + + # The ID of the scheduled action. Equal to the Page ID. + attr_reader :id + + # Scheduled action resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'OnCallPageScheduledActionType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageScheduledActionRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships.rb b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships.rb new file mode 100644 index 000000000000..68eb502bf47d --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The relationships of a scheduled action. + class OnCallPageScheduledActionRelationships + include BaseGenericModel + + # The schedules the action escalates to. + attr_accessor :schedules + + # The users the action escalates to. + attr_accessor :users + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'schedules' => :'schedules', + :'users' => :'users' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'schedules' => :'OnCallPageScheduledActionRelationshipsSchedules', + :'users' => :'OnCallPageScheduledActionRelationshipsUsers' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageScheduledActionRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'schedules') + self.schedules = attributes[:'schedules'] + end + + if attributes.key?(:'users') + self.users = attributes[:'users'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + schedules == o.schedules && + users == o.users && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [schedules, users, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_schedules.rb b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_schedules.rb new file mode 100644 index 000000000000..ef3c1697035a --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_schedules.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The schedules the action escalates to. + class OnCallPageScheduledActionRelationshipsSchedules + include BaseGenericModel + + # The list of schedules. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageScheduledActionRelationshipsSchedules` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_schedules_data.rb b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_schedules_data.rb new file mode 100644 index 000000000000..445f55cd7989 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_schedules_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to a schedule. + class OnCallPageScheduledActionRelationshipsSchedulesData + include BaseGenericModel + + # The schedule ID. + attr_reader :id + + # Schedules resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'ScheduleDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageScheduledActionRelationshipsSchedulesData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_users.rb b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_users.rb new file mode 100644 index 000000000000..10a07fc4194b --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_relationships_users.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The users the action escalates to. + class OnCallPageScheduledActionRelationshipsUsers + include BaseGenericModel + + # The list of users. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageScheduledActionRelationshipsUsers` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_type.rb b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_type.rb new file mode 100644 index 000000000000..fba975dd51f7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_scheduled_action_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Scheduled action resource type. + class OnCallPageScheduledActionType + include BaseEnumModel + + SCHEDULED_ACTIONS = "scheduled_actions".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_service_now_incident_relationship.rb b/lib/datadog_api_client/v2/models/on_call_page_service_now_incident_relationship.rb new file mode 100644 index 000000000000..12bb4804c24e --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_service_now_incident_relationship.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The ServiceNow incident linked to the Page. + class OnCallPageServiceNowIncidentRelationship + include BaseGenericModel + + # Reference to a ServiceNow incident. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'OnCallPageServiceNowIncidentRelationshipData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageServiceNowIncidentRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_service_now_incident_relationship_data.rb b/lib/datadog_api_client/v2/models/on_call_page_service_now_incident_relationship_data.rb new file mode 100644 index 000000000000..3c184eea143a --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_service_now_incident_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to a ServiceNow incident. + class OnCallPageServiceNowIncidentRelationshipData + include BaseGenericModel + + # The ID of the ServiceNow incident. + attr_reader :id + + # ServiceNow incident resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'OnCallPageServiceNowIncidentType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageServiceNowIncidentRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_service_now_incident_type.rb b/lib/datadog_api_client/v2/models/on_call_page_service_now_incident_type.rb new file mode 100644 index 000000000000..c344ef77baed --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_service_now_incident_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # ServiceNow incident resource type. + class OnCallPageServiceNowIncidentType + include BaseEnumModel + + SERVICE_NOW_INCIDENTS = "service_now_incidents".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_status.rb b/lib/datadog_api_client/v2/models/on_call_page_status.rb new file mode 100644 index 000000000000..851956b2aa9a --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_status.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The current status of the On-Call Page. + class OnCallPageStatus + include BaseEnumModel + + TRIGGERED = "triggered".freeze + ACKNOWLEDGED = "acknowledged".freeze + RESOLVED = "resolved".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_target_relationship.rb b/lib/datadog_api_client/v2/models/on_call_page_target_relationship.rb new file mode 100644 index 000000000000..5df68dad9c1e --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_target_relationship.rb @@ -0,0 +1,113 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The team, user, or cross-organization handle that was paged. + class OnCallPageTargetRelationship + include BaseGenericModel + + # Reference to the target of the Page. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'OnCallPageTargetRelationshipData' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'data', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageTargetRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_target_relationship_data.rb b/lib/datadog_api_client/v2/models/on_call_page_target_relationship_data.rb new file mode 100644 index 000000000000..1be2bfd8c6b1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_target_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to the target of the Page. + class OnCallPageTargetRelationshipData + include BaseGenericModel + + # The ID of the target. + attr_reader :id + + # The resource type of the Page target. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'OnCallPageTargetRelationshipDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageTargetRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_target_relationship_data_type.rb b/lib/datadog_api_client/v2/models/on_call_page_target_relationship_data_type.rb new file mode 100644 index 000000000000..15b4d905a862 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_target_relationship_data_type.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The resource type of the Page target. + class OnCallPageTargetRelationshipDataType + include BaseEnumModel + + TEAMS = "teams".freeze + USERS = "users".freeze + CROSS_ORG_HANDLES = "cross_org_handles".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_team_routing_rule_relationship.rb b/lib/datadog_api_client/v2/models/on_call_page_team_routing_rule_relationship.rb new file mode 100644 index 000000000000..0d54d6f919ad --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_team_routing_rule_relationship.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The team routing rule that matched the Page. + class OnCallPageTeamRoutingRuleRelationship + include BaseGenericModel + + # Reference to a team routing rule. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'OnCallPageTeamRoutingRuleRelationshipData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageTeamRoutingRuleRelationship` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_team_routing_rule_relationship_data.rb b/lib/datadog_api_client/v2/models/on_call_page_team_routing_rule_relationship_data.rb new file mode 100644 index 000000000000..5f5cbf7285f5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_team_routing_rule_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to a team routing rule. + class OnCallPageTeamRoutingRuleRelationshipData + include BaseGenericModel + + # The ID of the team routing rule. + attr_reader :id + + # Indicates that the resource is of type `team_routing_rules`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'TeamRoutingRulesDataRelationshipsRulesDataItemsType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageTeamRoutingRuleRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_page_user_relationship_data.rb b/lib/datadog_api_client/v2/models/on_call_page_user_relationship_data.rb new file mode 100644 index 000000000000..7f18ee852098 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_page_user_relationship_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to a user. + class OnCallPageUserRelationshipData + include BaseGenericModel + + # The user ID. + attr_reader :id + + # Users resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'ScheduleUserType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPageUserRelationshipData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_pages_included.rb b/lib/datadog_api_client/v2/models/on_call_pages_included.rb new file mode 100644 index 000000000000..5a2c9ffc9ff1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_pages_included.rb @@ -0,0 +1,65 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A resource related to a Page. + module OnCallPagesIncluded + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ScheduleUser', + :'TeamReference', + :'OnCallPageScheduledAction', + :'OnCallPageLink' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_pages_response.rb b/lib/datadog_api_client/v2/models/on_call_pages_response.rb new file mode 100644 index 000000000000..480242836af2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_pages_response.rb @@ -0,0 +1,147 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A list of On-Call Pages with pagination metadata and related included resources. + class OnCallPagesResponse + include BaseGenericModel + + # A list of Pages. + attr_reader :data + + # Resources related to the Pages, such as users, teams, and scheduled actions. + attr_accessor :included + + # Metadata that is included in the response when listing On-Call resources. + attr_accessor :meta + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included', + :'meta' => :'meta' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'included' => :'Array', + :'meta' => :'SchedulesResponseMeta' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::OnCallPagesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + meta == o.meta && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, meta, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/on_call_pages_sort.rb b/lib/datadog_api_client/v2/models/on_call_pages_sort.rb new file mode 100644 index 000000000000..a460299f4760 --- /dev/null +++ b/lib/datadog_api_client/v2/models/on_call_pages_sort.rb @@ -0,0 +1,33 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Sorting options for Pages. Prefix a field with `-` to sort in descending order. + class OnCallPagesSort + include BaseEnumModel + + CREATED_AT_ASCENDING = "created_at".freeze + CREATED_AT_DESCENDING = "-created_at".freeze + MODIFIED_AT_ASCENDING = "modified_at".freeze + MODIFIED_AT_DESCENDING = "-modified_at".freeze + STATUS_ASCENDING = "status".freeze + STATUS_DESCENDING = "-status".freeze + PRIORITY_ASCENDING = "priority".freeze + PRIORITY_DESCENDING = "-priority".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/override_data.rb b/lib/datadog_api_client/v2/models/override_data.rb index bedb0a283cb1..4668f41b2f9b 100644 --- a/lib/datadog_api_client/v2/models/override_data.rb +++ b/lib/datadog_api_client/v2/models/override_data.rb @@ -30,7 +30,7 @@ class OverrideData # Relationships for an on-call schedule override. attr_accessor :relationships - # Indicates that the resource is of type 'overrides'. + # Indicates that the resource is of type `overrides`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/override_data_type.rb b/lib/datadog_api_client/v2/models/override_data_type.rb index 873676489d4d..fc9529183437 100644 --- a/lib/datadog_api_client/v2/models/override_data_type.rb +++ b/lib/datadog_api_client/v2/models/override_data_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Indicates that the resource is of type 'overrides'. + # Indicates that the resource is of type `overrides`. class OverrideDataType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/override_relationships_schedule_data.rb b/lib/datadog_api_client/v2/models/override_relationships_schedule_data.rb index 9dbb17c462d8..5c366ef76a52 100644 --- a/lib/datadog_api_client/v2/models/override_relationships_schedule_data.rb +++ b/lib/datadog_api_client/v2/models/override_relationships_schedule_data.rb @@ -24,7 +24,7 @@ class OverrideRelationshipsScheduleData # The unique identifier of the schedule. attr_reader :id - # Indicates that the related resource is of type 'schedules'. + # Indicates that the related resource is of type `schedules`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/override_relationships_schedule_data_type.rb b/lib/datadog_api_client/v2/models/override_relationships_schedule_data_type.rb index 8b1ec1f266c4..958da7d84f36 100644 --- a/lib/datadog_api_client/v2/models/override_relationships_schedule_data_type.rb +++ b/lib/datadog_api_client/v2/models/override_relationships_schedule_data_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Indicates that the related resource is of type 'schedules'. + # Indicates that the related resource is of type `schedules`. class OverrideRelationshipsScheduleDataType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/override_relationships_user_data.rb b/lib/datadog_api_client/v2/models/override_relationships_user_data.rb index 14b9689f03e0..abf2d1de15c0 100644 --- a/lib/datadog_api_client/v2/models/override_relationships_user_data.rb +++ b/lib/datadog_api_client/v2/models/override_relationships_user_data.rb @@ -24,7 +24,7 @@ class OverrideRelationshipsUserData # The unique identifier of the user. attr_reader :id - # Indicates that the related resource is of type 'users'. + # Indicates that the related resource is of type `users`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/override_relationships_user_data_type.rb b/lib/datadog_api_client/v2/models/override_relationships_user_data_type.rb index 8d87b0ab65c2..e088ec1870d6 100644 --- a/lib/datadog_api_client/v2/models/override_relationships_user_data_type.rb +++ b/lib/datadog_api_client/v2/models/override_relationships_user_data_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Indicates that the related resource is of type 'users'. + # Indicates that the related resource is of type `users`. class OverrideRelationshipsUserDataType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/routing_rule_escalation_policy_action.rb b/lib/datadog_api_client/v2/models/routing_rule_escalation_policy_action.rb index 91dbf14722ae..27e30f276001 100644 --- a/lib/datadog_api_client/v2/models/routing_rule_escalation_policy_action.rb +++ b/lib/datadog_api_client/v2/models/routing_rule_escalation_policy_action.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class RoutingRuleEscalationPolicyAction include BaseGenericModel - # The number of minutes before an acknowledged page is re-triggered. + # The number of minutes before an acknowledged Page is re-triggered. attr_accessor :ack_timeout_minutes # The ID of the escalation policy to route to. diff --git a/lib/datadog_api_client/v2/models/routing_rule_relationships_policy_data.rb b/lib/datadog_api_client/v2/models/routing_rule_relationships_policy_data.rb index 4626982cdb2f..05acc85e6ca1 100644 --- a/lib/datadog_api_client/v2/models/routing_rule_relationships_policy_data.rb +++ b/lib/datadog_api_client/v2/models/routing_rule_relationships_policy_data.rb @@ -24,7 +24,7 @@ class RoutingRuleRelationshipsPolicyData # Specifies the unique identifier of the policy. attr_reader :id - # Indicates that the resource is of type 'policies'. + # Indicates that the resource is of type `policies`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/routing_rule_relationships_policy_data_type.rb b/lib/datadog_api_client/v2/models/routing_rule_relationships_policy_data_type.rb index a840e8818c4f..7cf921844835 100644 --- a/lib/datadog_api_client/v2/models/routing_rule_relationships_policy_data_type.rb +++ b/lib/datadog_api_client/v2/models/routing_rule_relationships_policy_data_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Indicates that the resource is of type 'policies'. + # Indicates that the resource is of type `policies`. class RoutingRuleRelationshipsPolicyDataType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/routing_rule_reroute_to_team_action.rb b/lib/datadog_api_client/v2/models/routing_rule_reroute_to_team_action.rb index be1738751d83..ff163f8d135a 100644 --- a/lib/datadog_api_client/v2/models/routing_rule_reroute_to_team_action.rb +++ b/lib/datadog_api_client/v2/models/routing_rule_reroute_to_team_action.rb @@ -17,14 +17,14 @@ require 'time' module DatadogAPIClient::V2 - # Reroutes the page to another team, which then evaluates it against its own routing rules. Each routing rule can include this action only once. It can be combined only with `send_slack_message` and `send_teams_message` actions. It can't be used with `escalation_policy` or `workflow` actions, or when the routing rule sets `policy_id`. + # Reroutes the Page to another team, which then evaluates it against its own routing rules. Each routing rule can include this action only once. It can be combined only with `send_slack_message` and `send_teams_message` actions. It can't be used with `escalation_policy` or `workflow` actions, or when the routing rule sets `policy_id`. class RoutingRuleRerouteToTeamAction include BaseGenericModel - # The ID of the team to reroute the page to. + # The ID of the team to reroute the Page to. attr_reader :destination_team_id - # Indicates that the action reroutes the page to another team's routing rules. + # Indicates that the action reroutes the Page to another team's routing rules. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/routing_rule_reroute_to_team_action_type.rb b/lib/datadog_api_client/v2/models/routing_rule_reroute_to_team_action_type.rb index efa0b4c7e134..fd3f47b44c27 100644 --- a/lib/datadog_api_client/v2/models/routing_rule_reroute_to_team_action_type.rb +++ b/lib/datadog_api_client/v2/models/routing_rule_reroute_to_team_action_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Indicates that the action reroutes the page to another team's routing rules. + # Indicates that the action reroutes the Page to another team's routing rules. class RoutingRuleRerouteToTeamActionType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/schedules.rb b/lib/datadog_api_client/v2/models/schedules.rb index 86f55f1997c4..f89f7cd0e428 100644 --- a/lib/datadog_api_client/v2/models/schedules.rb +++ b/lib/datadog_api_client/v2/models/schedules.rb @@ -27,7 +27,7 @@ class Schedules # Any additional resources related to the schedules, such as teams. attr_accessor :included - # Metadata that is included in the response when listing schedules. + # Metadata that is included in the response when listing On-Call resources. attr_accessor :meta attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/schedules_response_meta.rb b/lib/datadog_api_client/v2/models/schedules_response_meta.rb index b1ccad883653..f0b8bb000fbe 100644 --- a/lib/datadog_api_client/v2/models/schedules_response_meta.rb +++ b/lib/datadog_api_client/v2/models/schedules_response_meta.rb @@ -17,11 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Metadata that is included in the response when listing schedules. + # Metadata that is included in the response when listing On-Call resources. class SchedulesResponseMeta include BaseGenericModel - # 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. attr_accessor :page attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/schedules_response_meta_page.rb b/lib/datadog_api_client/v2/models/schedules_response_meta_page.rb index 51f7c9afc6a6..2a7be886bb22 100644 --- a/lib/datadog_api_client/v2/models/schedules_response_meta_page.rb +++ b/lib/datadog_api_client/v2/models/schedules_response_meta_page.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # 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. class SchedulesResponseMetaPage include BaseGenericModel diff --git a/lib/datadog_api_client/v2/models/shift_data.rb b/lib/datadog_api_client/v2/models/shift_data.rb index be42bd0dd5c2..ac87f633f2da 100644 --- a/lib/datadog_api_client/v2/models/shift_data.rb +++ b/lib/datadog_api_client/v2/models/shift_data.rb @@ -30,7 +30,7 @@ class ShiftData # Relationships for an on-call shift. attr_accessor :relationships - # Indicates that the resource is of type 'shifts'. + # Indicates that the resource is of type `shifts`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/shift_data_relationships_user_data.rb b/lib/datadog_api_client/v2/models/shift_data_relationships_user_data.rb index d4fd9aef9e18..9efb96d3ec9d 100644 --- a/lib/datadog_api_client/v2/models/shift_data_relationships_user_data.rb +++ b/lib/datadog_api_client/v2/models/shift_data_relationships_user_data.rb @@ -24,7 +24,7 @@ class ShiftDataRelationshipsUserData # Specifies the unique identifier of the user. attr_reader :id - # Indicates that the related resource is of type 'users'. + # Indicates that the related resource is of type `users`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/shift_data_relationships_user_data_type.rb b/lib/datadog_api_client/v2/models/shift_data_relationships_user_data_type.rb index c10d2b8e8d0c..1d3bb5cb3421 100644 --- a/lib/datadog_api_client/v2/models/shift_data_relationships_user_data_type.rb +++ b/lib/datadog_api_client/v2/models/shift_data_relationships_user_data_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Indicates that the related resource is of type 'users'. + # Indicates that the related resource is of type `users`. class ShiftDataRelationshipsUserDataType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/shift_data_type.rb b/lib/datadog_api_client/v2/models/shift_data_type.rb index e6968dee7d79..44b5c6b4cd4f 100644 --- a/lib/datadog_api_client/v2/models/shift_data_type.rb +++ b/lib/datadog_api_client/v2/models/shift_data_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Indicates that the resource is of type 'shifts'. + # Indicates that the resource is of type `shifts`. class ShiftDataType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items.rb b/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items.rb index 74fb3a0c579b..0882223cfc6b 100644 --- a/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items.rb +++ b/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items.rb @@ -24,7 +24,7 @@ class TeamRoutingRulesDataRelationshipsRulesDataItems # Specifies the unique identifier for the related routing rule. attr_reader :id - # Indicates that the resource is of type 'team_routing_rules'. + # Indicates that the resource is of type `team_routing_rules`. attr_reader :type attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items_type.rb b/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items_type.rb index f4a3ffd7da50..91322b4a5249 100644 --- a/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items_type.rb +++ b/lib/datadog_api_client/v2/models/team_routing_rules_data_relationships_rules_data_items_type.rb @@ -17,7 +17,7 @@ require 'time' module DatadogAPIClient::V2 - # Indicates that the resource is of type 'team_routing_rules'. + # Indicates that the resource is of type `team_routing_rules`. class TeamRoutingRulesDataRelationshipsRulesDataItemsType include BaseEnumModel diff --git a/lib/datadog_api_client/v2/models/team_routing_rules_request_data_attributes.rb b/lib/datadog_api_client/v2/models/team_routing_rules_request_data_attributes.rb index d63b4860c86e..e9fd10e65a92 100644 --- a/lib/datadog_api_client/v2/models/team_routing_rules_request_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/team_routing_rules_request_data_attributes.rb @@ -21,7 +21,7 @@ module DatadogAPIClient::V2 class TeamRoutingRulesRequestDataAttributes include BaseGenericModel - # A list of routing rule items that define how incoming pages should be handled. + # A list of routing rule items that define how incoming Pages should be handled. attr_accessor :rules attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_data.rb b/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_data.rb index 6a9faa6c3ba5..bac44d36b52f 100644 --- a/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_data.rb +++ b/lib/datadog_api_client/v2/models/update_on_call_notification_rule_request_data.rb @@ -30,7 +30,7 @@ class UpdateOnCallNotificationRuleRequestData # Relationship object for creating a notification rule attr_accessor :relationships - # Indicates that the resource is of type 'notification_rules'. + # Indicates that the resource is of type `notification_rules`. attr_reader :type attr_accessor :additional_properties