From 3ebe326fd67b2d267ee534ef77515ed5d5fb6227 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 28 Jan 2026 13:01:48 +0000 Subject: [PATCH] Regenerate client from commit 1d15335 of spec repo --- .generator/schemas/v2/openapi.yaml | 779 +++++++++++++++++- ...roject-returns-Bad-Request-response.frozen | 1 + ...a-project-returns-Bad-Request-response.yml | 25 + ...-project-returns-Not-Found-response.frozen | 1 + ...e-a-project-returns-Not-Found-response.yml | 25 + ...pdate-a-project-returns-OK-response.frozen | 1 + .../Update-a-project-returns-OK-response.yml | 25 + examples/v2/case-management/CreateProject.rb | 1 + .../CreateProjectNotificationRule.rb | 26 + .../DeleteProjectNotificationRule.rb | 5 + .../GetProjectNotificationRules.rb | 5 + examples/v2/case-management/UpdateProject.rb | 14 + .../UpdateProjectNotificationRule.rb | 25 + features/scenarios_model_mapping.rb | 20 + features/v2/case_management.feature | 120 ++- features/v2/given.json | 30 + features/v2/undo.json | 41 + lib/datadog_api_client/inflector.rb | 44 + .../v2/api/case_management_api.rb | 356 ++++++++ .../v2/models/auto_close_inactive_cases.rb | 115 +++ .../models/auto_transition_assigned_cases.rb | 105 +++ .../v2/models/case_notification_rule.rb | 165 ++++ .../case_notification_rule_attributes.rb | 139 ++++ .../models/case_notification_rule_create.rb | 144 ++++ ...ase_notification_rule_create_attributes.rb | 168 ++++ .../case_notification_rule_create_request.rb | 123 +++ .../case_notification_rule_recipient.rb | 115 +++ .../case_notification_rule_recipient_data.rb | 225 +++++ .../case_notification_rule_resource_type.rb | 26 + .../models/case_notification_rule_response.rb | 105 +++ .../models/case_notification_rule_trigger.rb | 115 +++ .../case_notification_rule_trigger_data.rb | 155 ++++ .../models/case_notification_rule_update.rb | 133 +++ .../case_notification_rule_update_request.rb | 123 +++ .../case_notification_rules_response.rb | 107 +++ .../v2/models/integration_incident.rb | 157 ++++ ...tegration_incident_field_mappings_items.rb | 115 +++ .../integration_incident_severity_config.rb | 105 +++ .../v2/models/integration_jira.rb | 135 +++ .../models/integration_jira_auto_creation.rb | 105 +++ .../v2/models/integration_jira_metadata.rb | 125 +++ .../v2/models/integration_jira_sync.rb | 115 +++ .../integration_jira_sync139772721530016.rb | 175 ++++ .../models/integration_jira_sync_due_date.rb | 115 +++ .../v2/models/integration_monitor.rb | 135 +++ .../v2/models/integration_on_call.rb | 127 +++ ...ration_on_call_escalation_queries_items.rb | 135 +++ ...on_call_escalation_queries_items_target.rb | 125 +++ .../v2/models/integration_service_now.rb | 145 ++++ .../integration_service_now_auto_creation.rb | 105 +++ .../integration_service_now_sync_config.rb | 115 +++ ..._service_now_sync_config139772721534496.rb | 125 +++ ...ration_service_now_sync_config_priority.rb | 125 +++ .../v2/models/project_attributes.rb | 48 +- .../v2/models/project_columns_config.rb | 107 +++ .../project_columns_config_columns_items.rb | 125 +++ ...oject_columns_config_columns_items_sort.rb | 115 +++ .../v2/models/project_create_attributes.rb | 30 +- .../models/project_notification_settings.rb | 187 +++++ .../v2/models/project_settings.rb | 175 ++++ .../v2/models/project_update.rb | 133 +++ .../v2/models/project_update_attributes.rb | 147 ++++ .../v2/models/project_update_request.rb | 123 +++ .../v2/models/sync_property.rb | 105 +++ .../v2/models/sync_property_with_mapping.rb | 125 +++ 65 files changed, 7300 insertions(+), 11 deletions(-) create mode 100644 cassettes/features/v2/case_management/Update-a-project-returns-Bad-Request-response.frozen create mode 100644 cassettes/features/v2/case_management/Update-a-project-returns-Bad-Request-response.yml create mode 100644 cassettes/features/v2/case_management/Update-a-project-returns-Not-Found-response.frozen create mode 100644 cassettes/features/v2/case_management/Update-a-project-returns-Not-Found-response.yml create mode 100644 cassettes/features/v2/case_management/Update-a-project-returns-OK-response.frozen create mode 100644 cassettes/features/v2/case_management/Update-a-project-returns-OK-response.yml create mode 100644 examples/v2/case-management/CreateProjectNotificationRule.rb create mode 100644 examples/v2/case-management/DeleteProjectNotificationRule.rb create mode 100644 examples/v2/case-management/GetProjectNotificationRules.rb create mode 100644 examples/v2/case-management/UpdateProject.rb create mode 100644 examples/v2/case-management/UpdateProjectNotificationRule.rb create mode 100644 lib/datadog_api_client/v2/models/auto_close_inactive_cases.rb create mode 100644 lib/datadog_api_client/v2/models/auto_transition_assigned_cases.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_create.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_create_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_recipient.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_recipient_data.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_resource_type.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_response.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_trigger.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_trigger_data.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_update.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rule_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/case_notification_rules_response.rb create mode 100644 lib/datadog_api_client/v2/models/integration_incident.rb create mode 100644 lib/datadog_api_client/v2/models/integration_incident_field_mappings_items.rb create mode 100644 lib/datadog_api_client/v2/models/integration_incident_severity_config.rb create mode 100644 lib/datadog_api_client/v2/models/integration_jira.rb create mode 100644 lib/datadog_api_client/v2/models/integration_jira_auto_creation.rb create mode 100644 lib/datadog_api_client/v2/models/integration_jira_metadata.rb create mode 100644 lib/datadog_api_client/v2/models/integration_jira_sync.rb create mode 100644 lib/datadog_api_client/v2/models/integration_jira_sync139772721530016.rb create mode 100644 lib/datadog_api_client/v2/models/integration_jira_sync_due_date.rb create mode 100644 lib/datadog_api_client/v2/models/integration_monitor.rb create mode 100644 lib/datadog_api_client/v2/models/integration_on_call.rb create mode 100644 lib/datadog_api_client/v2/models/integration_on_call_escalation_queries_items.rb create mode 100644 lib/datadog_api_client/v2/models/integration_on_call_escalation_queries_items_target.rb create mode 100644 lib/datadog_api_client/v2/models/integration_service_now.rb create mode 100644 lib/datadog_api_client/v2/models/integration_service_now_auto_creation.rb create mode 100644 lib/datadog_api_client/v2/models/integration_service_now_sync_config.rb create mode 100644 lib/datadog_api_client/v2/models/integration_service_now_sync_config139772721534496.rb create mode 100644 lib/datadog_api_client/v2/models/integration_service_now_sync_config_priority.rb create mode 100644 lib/datadog_api_client/v2/models/project_columns_config.rb create mode 100644 lib/datadog_api_client/v2/models/project_columns_config_columns_items.rb create mode 100644 lib/datadog_api_client/v2/models/project_columns_config_columns_items_sort.rb create mode 100644 lib/datadog_api_client/v2/models/project_notification_settings.rb create mode 100644 lib/datadog_api_client/v2/models/project_settings.rb create mode 100644 lib/datadog_api_client/v2/models/project_update.rb create mode 100644 lib/datadog_api_client/v2/models/project_update_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/project_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/sync_property.rb create mode 100644 lib/datadog_api_client/v2/models/sync_property_with_mapping.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5423824d0a66..81332db8ac6d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -764,6 +764,14 @@ components: required: false schema: type: string + NotificationRuleIDPathParameter: + description: Notification Rule UUID + example: e555e290-ed65-49bd-ae18-8acbfcf18db7 + in: path + name: notification_rule_id + required: true + schema: + type: string OnDemandTaskId: description: The UUID of the task. example: 6d09294c-9ad9-42fd-a759-a0c1599b4828 @@ -5960,6 +5968,24 @@ components: type: string x-enum-varnames: - AUTHN_MAPPINGS + AutoCloseInactiveCases: + description: Auto-close inactive cases settings + properties: + enabled: + description: Whether auto-close is enabled + type: boolean + max_inactive_time_in_secs: + description: Maximum inactive time in seconds before auto-closing + format: int64 + type: integer + type: object + AutoTransitionAssignedCases: + description: Auto-transition assigned cases settings + properties: + auto_transition_assigned_cases_on_self_assigned: + description: Whether to auto-transition cases when self-assigned + type: boolean + type: object AwsAccountId: description: The ID of the AWS account. example: '123456789012' @@ -9417,6 +9443,214 @@ components: type: string x-enum-varnames: - PROJECTS + CaseNotificationRule: + description: A notification rule for case management + properties: + attributes: + $ref: '#/components/schemas/CaseNotificationRuleAttributes' + id: + description: The notification rule's identifier + example: aeadc05e-98a8-11ec-ac2c-da7ad0900001 + type: string + type: + $ref: '#/components/schemas/CaseNotificationRuleResourceType' + required: + - id + - type + - attributes + type: object + CaseNotificationRuleAttributes: + description: Notification rule attributes + properties: + is_enabled: + description: Whether the notification rule is enabled + type: boolean + query: + description: Query to filter cases for this notification rule + type: string + recipients: + description: List of notification recipients + items: + $ref: '#/components/schemas/CaseNotificationRuleRecipient' + type: array + triggers: + description: List of triggers for this notification rule + items: + $ref: '#/components/schemas/CaseNotificationRuleTrigger' + type: array + type: object + CaseNotificationRuleCreate: + description: Notification rule create + properties: + attributes: + $ref: '#/components/schemas/CaseNotificationRuleCreateAttributes' + type: + $ref: '#/components/schemas/CaseNotificationRuleResourceType' + required: + - attributes + - type + type: object + CaseNotificationRuleCreateAttributes: + description: Notification rule creation attributes + properties: + is_enabled: + default: true + description: Whether the notification rule is enabled + type: boolean + query: + description: Query to filter cases for this notification rule + type: string + recipients: + description: List of notification recipients + items: + $ref: '#/components/schemas/CaseNotificationRuleRecipient' + type: array + triggers: + description: List of triggers for this notification rule + items: + $ref: '#/components/schemas/CaseNotificationRuleTrigger' + type: array + required: + - recipients + - triggers + type: object + CaseNotificationRuleCreateRequest: + description: Notification rule create request + properties: + data: + $ref: '#/components/schemas/CaseNotificationRuleCreate' + required: + - data + type: object + CaseNotificationRuleRecipient: + description: Notification rule recipient + properties: + data: + $ref: '#/components/schemas/CaseNotificationRuleRecipientData' + type: + description: Type of recipient (SLACK_CHANNEL, EMAIL, HTTP, PAGERDUTY_SERVICE, + MS_TEAMS_CHANNEL) + example: EMAIL + type: string + type: object + CaseNotificationRuleRecipientData: + description: Recipient data + properties: + channel: + description: Slack channel name + type: string + channel_id: + description: Slack channel ID + type: string + channel_name: + description: Microsoft Teams channel name + type: string + connector_name: + description: Microsoft Teams connector name + type: string + email: + description: Email address + type: string + name: + description: HTTP webhook name + type: string + service_name: + description: PagerDuty service name + type: string + team_id: + description: Microsoft Teams team ID + type: string + team_name: + description: Microsoft Teams team name + type: string + tenant_id: + description: Microsoft Teams tenant ID + type: string + tenant_name: + description: Microsoft Teams tenant name + type: string + workspace: + description: Slack workspace name + type: string + workspace_id: + description: Slack workspace ID + type: string + type: object + CaseNotificationRuleResourceType: + default: notification_rule + description: Notification rule resource type + enum: + - notification_rule + example: notification_rule + type: string + x-enum-varnames: + - NOTIFICATION_RULE + CaseNotificationRuleResponse: + description: Notification rule response + properties: + data: + $ref: '#/components/schemas/CaseNotificationRule' + type: object + CaseNotificationRuleTrigger: + description: Notification rule trigger + properties: + data: + $ref: '#/components/schemas/CaseNotificationRuleTriggerData' + type: + description: Type of trigger (CASE_CREATED, STATUS_TRANSITIONED, ATTRIBUTE_VALUE_CHANGED, + EVENT_CORRELATION_SIGNAL_CORRELATED) + example: CASE_CREATED + type: string + type: object + CaseNotificationRuleTriggerData: + description: Trigger data + properties: + change_type: + description: Change type (added, removed, changed) + type: string + field: + description: Field name for attribute value changed trigger + type: string + from_status: + description: Status ID to transition from + type: string + from_status_name: + description: Status name to transition from + type: string + to_status: + description: Status ID to transition to + type: string + to_status_name: + description: Status name to transition to + type: string + type: object + CaseNotificationRuleUpdate: + description: Notification rule update + properties: + attributes: + $ref: '#/components/schemas/CaseNotificationRuleAttributes' + type: + $ref: '#/components/schemas/CaseNotificationRuleResourceType' + required: + - type + type: object + CaseNotificationRuleUpdateRequest: + description: Notification rule update request + properties: + data: + $ref: '#/components/schemas/CaseNotificationRuleUpdate' + required: + - data + type: object + CaseNotificationRulesResponse: + description: Response with notification rules + properties: + data: + description: Notification rules data + items: + $ref: '#/components/schemas/CaseNotificationRule' + type: array + type: object CaseObjectAttributes: additionalProperties: items: @@ -30455,6 +30689,209 @@ components: type: string type: array type: object + IntegrationIncident: + description: Incident integration settings + properties: + auto_escalation_query: + description: Query for auto-escalation + type: string + default_incident_commander: + description: Default incident commander + type: string + enabled: + description: Whether incident integration is enabled + type: boolean + field_mappings: + items: + $ref: '#/components/schemas/IntegrationIncidentFieldMappingsItems' + type: array + incident_type: + description: Incident type + type: string + severity_config: + $ref: '#/components/schemas/IntegrationIncidentSeverityConfig' + type: object + IntegrationIncidentFieldMappingsItems: + properties: + case_field: + type: string + incident_user_defined_field_id: + type: string + type: object + IntegrationIncidentSeverityConfig: + properties: + priority_mapping: + additionalProperties: + type: string + type: object + type: object + IntegrationJira: + description: Jira integration settings + properties: + auto_creation: + $ref: '#/components/schemas/IntegrationJiraAutoCreation' + enabled: + description: Whether Jira integration is enabled + type: boolean + metadata: + $ref: '#/components/schemas/IntegrationJiraMetadata' + sync: + $ref: '#/components/schemas/IntegrationJiraSync' + type: object + IntegrationJiraAutoCreation: + properties: + enabled: + type: boolean + type: object + IntegrationJiraMetadata: + properties: + account_id: + type: string + issue_type_id: + type: string + project_id: + type: string + type: object + IntegrationJiraSync: + properties: + enabled: + type: boolean + properties: + $ref: '#/components/schemas/IntegrationJiraSync139772721530016' + type: object + IntegrationJiraSync139772721530016: + properties: + assignee: + $ref: '#/components/schemas/SyncProperty' + comments: + $ref: '#/components/schemas/SyncProperty' + custom_fields: + additionalProperties: + properties: + sync_type: + type: string + value: {} + type: object + type: object + description: + $ref: '#/components/schemas/SyncProperty' + due_date: + $ref: '#/components/schemas/IntegrationJiraSyncDueDate' + priority: + $ref: '#/components/schemas/SyncPropertyWithMapping' + status: + $ref: '#/components/schemas/SyncPropertyWithMapping' + title: + $ref: '#/components/schemas/SyncProperty' + type: object + IntegrationJiraSyncDueDate: + properties: + jira_field_id: + type: string + sync_type: + type: string + type: object + IntegrationMonitor: + description: Monitor integration settings + properties: + auto_resolve_enabled: + description: Whether auto-resolve is enabled + type: boolean + case_type_id: + description: Case type ID for monitor integration + type: string + enabled: + description: Whether monitor integration is enabled + type: boolean + handle: + description: Monitor handle + type: string + type: object + IntegrationOnCall: + description: On-Call integration settings + properties: + auto_assign_on_call: + description: Whether to auto-assign on-call + type: boolean + enabled: + description: Whether On-Call integration is enabled + type: boolean + escalation_queries: + items: + $ref: '#/components/schemas/IntegrationOnCallEscalationQueriesItems' + type: array + type: object + IntegrationOnCallEscalationQueriesItems: + properties: + enabled: + type: boolean + id: + type: string + query: + type: string + target: + $ref: '#/components/schemas/IntegrationOnCallEscalationQueriesItemsTarget' + type: object + IntegrationOnCallEscalationQueriesItemsTarget: + properties: + dynamic_team_paging: + type: boolean + team_id: + type: string + user_id: + type: string + type: object + IntegrationServiceNow: + description: ServiceNow integration settings + properties: + assignment_group: + description: Assignment group + type: string + auto_creation: + $ref: '#/components/schemas/IntegrationServiceNowAutoCreation' + enabled: + description: Whether ServiceNow integration is enabled + type: boolean + instance_name: + description: ServiceNow instance name + type: string + sync_config: + $ref: '#/components/schemas/IntegrationServiceNowSyncConfig' + type: object + IntegrationServiceNowAutoCreation: + properties: + enabled: + type: boolean + type: object + IntegrationServiceNowSyncConfig: + properties: + enabled: + type: boolean + properties: + $ref: '#/components/schemas/IntegrationServiceNowSyncConfig139772721534496' + type: object + IntegrationServiceNowSyncConfig139772721534496: + properties: + comments: + $ref: '#/components/schemas/SyncProperty' + priority: + $ref: '#/components/schemas/IntegrationServiceNowSyncConfigPriority' + status: + $ref: '#/components/schemas/SyncPropertyWithMapping' + type: object + IntegrationServiceNowSyncConfigPriority: + properties: + impact_mapping: + additionalProperties: + type: string + type: object + sync_type: + type: string + urgency_mapping: + additionalProperties: + type: string + type: object + type: object InterfaceAttributes: description: The interface attributes properties: @@ -44785,13 +45222,51 @@ components: ProjectAttributes: description: Project attributes properties: + columns_config: + $ref: '#/components/schemas/ProjectColumnsConfig' + enabled_custom_case_types: + description: List of enabled custom case type IDs + items: + type: string + type: array key: description: The project's key example: CASEM type: string name: description: Project's name + example: Security Investigation type: string + restricted: + description: Whether the project is restricted + type: boolean + settings: + $ref: '#/components/schemas/ProjectSettings' + type: object + ProjectColumnsConfig: + description: Project columns configuration + properties: + columns: + items: + $ref: '#/components/schemas/ProjectColumnsConfigColumnsItems' + type: array + type: object + ProjectColumnsConfigColumnsItems: + properties: + sort: + $ref: '#/components/schemas/ProjectColumnsConfigColumnsItemsSort' + sort_field: + type: string + type: + type: string + type: object + ProjectColumnsConfigColumnsItemsSort: + properties: + ascending: + type: boolean + priority: + format: int64 + type: integer type: object ProjectCreate: description: Project create @@ -44807,14 +45282,22 @@ components: ProjectCreateAttributes: description: Project creation attributes properties: + enabled_custom_case_types: + description: List of enabled custom case type IDs + items: + type: string + type: array key: description: Project's key. Cannot be "CASE" example: SEC type: string name: - description: name + description: Project name example: Security Investigation type: string + team_uuid: + description: Team UUID to associate with the project + type: string required: - name - key @@ -44827,6 +45310,32 @@ components: required: - data type: object + ProjectNotificationSettings: + description: Project notification settings + properties: + destinations: + description: Notification destinations (1=email, 2=slack, 3=in-app) + items: + type: integer + type: array + enabled: + description: Whether notifications are enabled + type: boolean + notify_on_case_assignment: + type: boolean + notify_on_case_closed: + type: boolean + notify_on_case_comment: + type: boolean + notify_on_case_comment_mention: + type: boolean + notify_on_case_priority_change: + type: boolean + notify_on_case_status_change: + type: boolean + notify_on_case_unassignment: + type: boolean + type: object ProjectRelationship: description: Relationship to project properties: @@ -44871,6 +45380,63 @@ components: data: $ref: '#/components/schemas/Project' type: object + ProjectSettings: + description: Project settings + properties: + auto_close_inactive_cases: + $ref: '#/components/schemas/AutoCloseInactiveCases' + auto_transition_assigned_cases: + $ref: '#/components/schemas/AutoTransitionAssignedCases' + integration_incident: + $ref: '#/components/schemas/IntegrationIncident' + integration_jira: + $ref: '#/components/schemas/IntegrationJira' + integration_monitor: + $ref: '#/components/schemas/IntegrationMonitor' + integration_on_call: + $ref: '#/components/schemas/IntegrationOnCall' + integration_service_now: + $ref: '#/components/schemas/IntegrationServiceNow' + notification: + $ref: '#/components/schemas/ProjectNotificationSettings' + type: object + ProjectUpdate: + description: Project update + properties: + attributes: + $ref: '#/components/schemas/ProjectUpdateAttributes' + type: + $ref: '#/components/schemas/ProjectResourceType' + required: + - type + type: object + ProjectUpdateAttributes: + description: Project update attributes + properties: + columns_config: + $ref: '#/components/schemas/ProjectColumnsConfig' + enabled_custom_case_types: + description: List of enabled custom case type IDs + items: + type: string + type: array + name: + description: Project name + type: string + settings: + $ref: '#/components/schemas/ProjectSettings' + team_uuid: + description: Team UUID to associate with the project + type: string + type: object + ProjectUpdateRequest: + description: Project update request + properties: + data: + $ref: '#/components/schemas/ProjectUpdate' + required: + - data + type: object ProjectedCost: description: Projected Cost data. properties: @@ -59233,6 +59799,26 @@ components: suppression: $ref: '#/components/schemas/SecurityMonitoringSuppressionAttributes' type: object + SyncProperty: + description: Sync property configuration + properties: + sync_type: + type: string + type: object + SyncPropertyWithMapping: + description: Sync property with mapping configuration + properties: + mapping: + additionalProperties: + type: string + type: object + name_mapping: + additionalProperties: + type: string + type: object + sync_type: + type: string + type: object SyntheticsGlobalVariable: description: Synthetic global variable. properties: @@ -69554,6 +70140,197 @@ paths: summary: Get the details of a project tags: - Case Management + patch: + description: Update a project. + operationId: UpdateProject + parameters: + - $ref: '#/components/parameters/ProjectIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectUpdateRequest' + description: Project payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cases_write + summary: Update a project + tags: + - Case Management + /api/v2/cases/projects/{project_id}/notification_rules: + get: + description: Get all notification rules for a project. + operationId: GetProjectNotificationRules + parameters: + - description: Project UUID + example: e555e290-ed65-49bd-ae18-8acbfcf18db7 + in: path + name: project_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseNotificationRulesResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cases_read + summary: Get notification rules + tags: + - Case Management + post: + description: Create a notification rule for a project. + operationId: CreateProjectNotificationRule + parameters: + - description: Project UUID + example: e555e290-ed65-49bd-ae18-8acbfcf18db7 + in: path + name: project_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseNotificationRuleCreateRequest' + description: Notification rule payload + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseNotificationRuleResponse' + description: CREATED + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cases_write + summary: Create a notification rule + tags: + - Case Management + /api/v2/cases/projects/{project_id}/notification_rules/{notification_rule_id}: + delete: + description: Delete a notification rule using the notification rule's `id`. + operationId: DeleteProjectNotificationRule + parameters: + - description: Project UUID + example: e555e290-ed65-49bd-ae18-8acbfcf18db7 + in: path + name: project_id + required: true + schema: + type: string + - $ref: '#/components/parameters/NotificationRuleIDPathParameter' + responses: + '204': + description: No Content + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cases_write + summary: Delete a notification rule + tags: + - Case Management + put: + description: Update a notification rule. + operationId: UpdateProjectNotificationRule + parameters: + - description: Project UUID + example: e555e290-ed65-49bd-ae18-8acbfcf18db7 + in: path + name: project_id + required: true + schema: + type: string + - $ref: '#/components/parameters/NotificationRuleIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseNotificationRuleUpdateRequest' + description: Notification rule payload + required: true + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cases_write + summary: Update a notification rule + tags: + - Case Management /api/v2/cases/types: get: description: Get all case types diff --git a/cassettes/features/v2/case_management/Update-a-project-returns-Bad-Request-response.frozen b/cassettes/features/v2/case_management/Update-a-project-returns-Bad-Request-response.frozen new file mode 100644 index 000000000000..57657a05d9a8 --- /dev/null +++ b/cassettes/features/v2/case_management/Update-a-project-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2026-01-28T12:51:16.724Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Update-a-project-returns-Bad-Request-response.yml b/cassettes/features/v2/case_management/Update-a-project-returns-Bad-Request-response.yml new file mode 100644 index 000000000000..2e7570063445 --- /dev/null +++ b/cassettes/features/v2/case_management/Update-a-project-returns-Bad-Request-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Wed, 28 Jan 2026 12:51:16 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"type":"invalid_type"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/cases/projects/d4bbe1af-f36e-42f1-87c1-493ca35c320e + response: + body: + encoding: UTF-8 + string: '{"errors":[{"status":"400","title":"Bad Request","detail":"got type + \"invalid_type\" expected one of \"project\""}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 400 + message: Bad Request +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/case_management/Update-a-project-returns-Not-Found-response.frozen b/cassettes/features/v2/case_management/Update-a-project-returns-Not-Found-response.frozen new file mode 100644 index 000000000000..cf21958a6083 --- /dev/null +++ b/cassettes/features/v2/case_management/Update-a-project-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2026-01-28T12:51:17.270Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Update-a-project-returns-Not-Found-response.yml b/cassettes/features/v2/case_management/Update-a-project-returns-Not-Found-response.yml new file mode 100644 index 000000000000..def59d445f9f --- /dev/null +++ b/cassettes/features/v2/case_management/Update-a-project-returns-Not-Found-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Wed, 28 Jan 2026 12:51:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Updated Project Name"},"type":"project"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/cases/projects/67d80aa3-36ff-44b9-a694-c501a7591737 + response: + body: + encoding: UTF-8 + string: '{"errors":[{"code":"resource_not_found","title":"failed to get project: + project not found"}]}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v2/case_management/Update-a-project-returns-OK-response.frozen b/cassettes/features/v2/case_management/Update-a-project-returns-OK-response.frozen new file mode 100644 index 000000000000..b19d06ed2dea --- /dev/null +++ b/cassettes/features/v2/case_management/Update-a-project-returns-OK-response.frozen @@ -0,0 +1 @@ +2026-01-28T12:51:17.621Z \ No newline at end of file diff --git a/cassettes/features/v2/case_management/Update-a-project-returns-OK-response.yml b/cassettes/features/v2/case_management/Update-a-project-returns-OK-response.yml new file mode 100644 index 000000000000..fd91d55bf7a4 --- /dev/null +++ b/cassettes/features/v2/case_management/Update-a-project-returns-OK-response.yml @@ -0,0 +1,25 @@ +http_interactions: +- recorded_at: Wed, 28 Jan 2026 12:51:17 GMT + request: + body: + encoding: UTF-8 + string: '{"data":{"attributes":{"name":"Updated Project Name Test-Update_a_project_returns_OK_response-1769604677"},"type":"project"}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/cases/projects/d4bbe1af-f36e-42f1-87c1-493ca35c320e + response: + body: + encoding: UTF-8 + string: '{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project","attributes":{"key":"DDFC","name":"Updated + Project Name Test-Update_a_project_returns_OK_response-1769604677","restricted":false,"settings":{"notification":{"enabled":true,"destinations":[1],"notify_on_case_assignment":true,"notify_on_case_unassignment":true,"notify_on_case_closed":true,"notify_on_case_priority_change":true,"notify_on_case_comment":true,"notify_on_case_comment_mention":true,"notify_on_case_status_change":true}}}}}' + headers: + Content-Type: + - application/vnd.api+json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v2/case-management/CreateProject.rb b/examples/v2/case-management/CreateProject.rb index de760c4f6264..04500aa92305 100644 --- a/examples/v2/case-management/CreateProject.rb +++ b/examples/v2/case-management/CreateProject.rb @@ -6,6 +6,7 @@ body = DatadogAPIClient::V2::ProjectCreateRequest.new({ data: DatadogAPIClient::V2::ProjectCreate.new({ attributes: DatadogAPIClient::V2::ProjectCreateAttributes.new({ + enabled_custom_case_types: [], key: "SEC", name: "Security Investigation", }), diff --git a/examples/v2/case-management/CreateProjectNotificationRule.rb b/examples/v2/case-management/CreateProjectNotificationRule.rb new file mode 100644 index 000000000000..378173dbc597 --- /dev/null +++ b/examples/v2/case-management/CreateProjectNotificationRule.rb @@ -0,0 +1,26 @@ +# Create a notification rule returns "CREATED" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new + +body = DatadogAPIClient::V2::CaseNotificationRuleCreateRequest.new({ + data: DatadogAPIClient::V2::CaseNotificationRuleCreate.new({ + attributes: DatadogAPIClient::V2::CaseNotificationRuleCreateAttributes.new({ + is_enabled: true, + recipients: [ + DatadogAPIClient::V2::CaseNotificationRuleRecipient.new({ + data: DatadogAPIClient::V2::CaseNotificationRuleRecipientData.new({}), + type: "EMAIL", + }), + ], + triggers: [ + DatadogAPIClient::V2::CaseNotificationRuleTrigger.new({ + data: DatadogAPIClient::V2::CaseNotificationRuleTriggerData.new({}), + type: "CASE_CREATED", + }), + ], + }), + type: DatadogAPIClient::V2::CaseNotificationRuleResourceType::NOTIFICATION_RULE, + }), +}) +p api_instance.create_project_notification_rule("project_id", body) diff --git a/examples/v2/case-management/DeleteProjectNotificationRule.rb b/examples/v2/case-management/DeleteProjectNotificationRule.rb new file mode 100644 index 000000000000..2bd3ceb1794b --- /dev/null +++ b/examples/v2/case-management/DeleteProjectNotificationRule.rb @@ -0,0 +1,5 @@ +# Delete a notification rule returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new +api_instance.delete_project_notification_rule("project_id", "notification_rule_id") diff --git a/examples/v2/case-management/GetProjectNotificationRules.rb b/examples/v2/case-management/GetProjectNotificationRules.rb new file mode 100644 index 000000000000..a8ca9ee65116 --- /dev/null +++ b/examples/v2/case-management/GetProjectNotificationRules.rb @@ -0,0 +1,5 @@ +# Get notification rules returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new +p api_instance.get_project_notification_rules("project_id") diff --git a/examples/v2/case-management/UpdateProject.rb b/examples/v2/case-management/UpdateProject.rb new file mode 100644 index 000000000000..9d9326477b1e --- /dev/null +++ b/examples/v2/case-management/UpdateProject.rb @@ -0,0 +1,14 @@ +# Update a project returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new + +body = DatadogAPIClient::V2::ProjectUpdateRequest.new({ + data: DatadogAPIClient::V2::ProjectUpdate.new({ + type: DatadogAPIClient::V2::ProjectResourceType::PROJECT, + attributes: DatadogAPIClient::V2::ProjectUpdateAttributes.new({ + name: "Updated Project Name Example-Case-Management", + }), + }), +}) +p api_instance.update_project("d4bbe1af-f36e-42f1-87c1-493ca35c320e", body) diff --git a/examples/v2/case-management/UpdateProjectNotificationRule.rb b/examples/v2/case-management/UpdateProjectNotificationRule.rb new file mode 100644 index 000000000000..15a987b1e437 --- /dev/null +++ b/examples/v2/case-management/UpdateProjectNotificationRule.rb @@ -0,0 +1,25 @@ +# Update a notification rule returns "No Content" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::CaseManagementAPI.new + +body = DatadogAPIClient::V2::CaseNotificationRuleUpdateRequest.new({ + data: DatadogAPIClient::V2::CaseNotificationRuleUpdate.new({ + attributes: DatadogAPIClient::V2::CaseNotificationRuleAttributes.new({ + recipients: [ + DatadogAPIClient::V2::CaseNotificationRuleRecipient.new({ + data: DatadogAPIClient::V2::CaseNotificationRuleRecipientData.new({}), + type: "EMAIL", + }), + ], + triggers: [ + DatadogAPIClient::V2::CaseNotificationRuleTrigger.new({ + data: DatadogAPIClient::V2::CaseNotificationRuleTriggerData.new({}), + type: "CASE_CREATED", + }), + ], + }), + type: DatadogAPIClient::V2::CaseNotificationRuleResourceType::NOTIFICATION_RULE, + }), +}) +api_instance.update_project_notification_rule("project_id", "notification_rule_id", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 6674c3b1a047..43c253ada8e2 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1194,6 +1194,26 @@ "v2.GetProject" => { "project_id" => "String", }, + "v2.UpdateProject" => { + "project_id" => "String", + "body" => "ProjectUpdateRequest", + }, + "v2.GetProjectNotificationRules" => { + "project_id" => "String", + }, + "v2.CreateProjectNotificationRule" => { + "project_id" => "String", + "body" => "CaseNotificationRuleCreateRequest", + }, + "v2.DeleteProjectNotificationRule" => { + "project_id" => "String", + "notification_rule_id" => "String", + }, + "v2.UpdateProjectNotificationRule" => { + "project_id" => "String", + "notification_rule_id" => "String", + "body" => "CaseNotificationRuleUpdateRequest", + }, "v2.GetCase" => { "case_id" => "String", }, diff --git a/features/v2/case_management.feature b/features/v2/case_management.feature index 2f239155671f..7e26a5815f26 100644 --- a/features/v2/case_management.feature +++ b/features/v2/case_management.feature @@ -116,27 +116,67 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/case-management + Scenario: Create a notification rule returns "Bad Request" response + Given new "CreateProjectNotificationRule" request + And request contains "project_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"is_enabled": true, "recipients": [{"data": {}, "type": "EMAIL"}], "triggers": [{"data": {}, "type": "CASE_CREATED"}]}, "type": "notification_rule"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Create a notification rule returns "CREATED" response + Given new "CreateProjectNotificationRule" request + And request contains "project_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"is_enabled": true, "recipients": [{"data": {}, "type": "EMAIL"}], "triggers": [{"data": {}, "type": "CASE_CREATED"}]}, "type": "notification_rule"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/case-management + Scenario: Create a notification rule returns "Not Found" response + Given new "CreateProjectNotificationRule" request + And request contains "project_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"is_enabled": true, "recipients": [{"data": {}, "type": "EMAIL"}], "triggers": [{"data": {}, "type": "CASE_CREATED"}]}, "type": "notification_rule"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/case-management Scenario: Create a project returns "Bad Request" response Given new "CreateProject" request - And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + And body with value {"data": {"attributes": {"enabled_custom_case_types": [], "key": "SEC", "name": "Security Investigation"}, "type": "project"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/case-management Scenario: Create a project returns "CREATED" response Given new "CreateProject" request - And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + And body with value {"data": {"attributes": {"enabled_custom_case_types": [], "key": "SEC", "name": "Security Investigation"}, "type": "project"}} When the request is sent Then the response status is 201 CREATED @generated @skip @team:DataDog/case-management Scenario: Create a project returns "Not Found" response Given new "CreateProject" request - And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + And body with value {"data": {"attributes": {"enabled_custom_case_types": [], "key": "SEC", "name": "Security Investigation"}, "type": "project"}} When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/case-management + Scenario: Delete a notification rule returns "API error response" response + Given new "DeleteProjectNotificationRule" request + And request contains "project_id" parameter from "REPLACE.ME" + And request contains "notification_rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response + + @generated @skip @team:DataDog/case-management + Scenario: Delete a notification rule returns "No Content" response + Given new "DeleteProjectNotificationRule" request + And request contains "project_id" parameter from "REPLACE.ME" + And request contains "notification_rule_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + @skip @team:DataDog/case-management Scenario: Delete case comment returns "Bad Request" response Given new "DeleteCaseComment" request @@ -203,6 +243,27 @@ Feature: Case Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/case-management + Scenario: Get notification rules returns "Bad Request" response + Given new "GetProjectNotificationRules" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Get notification rules returns "Not Found" response + Given new "GetProjectNotificationRules" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Get notification rules returns "OK" response + Given new "GetProjectNotificationRules" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @skip @team:DataDog/case-management Scenario: Get the details of a case returns "Bad Request" response Given new "GetCase" request @@ -337,6 +398,59 @@ Feature: Case Management When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/case-management + Scenario: Update a notification rule returns "Bad Request" response + Given new "UpdateProjectNotificationRule" request + And request contains "project_id" parameter from "REPLACE.ME" + And request contains "notification_rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"recipients": [{"data": {}, "type": "EMAIL"}], "triggers": [{"data": {}, "type": "CASE_CREATED"}]}, "type": "notification_rule"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Update a notification rule returns "No Content" response + Given new "UpdateProjectNotificationRule" request + And request contains "project_id" parameter from "REPLACE.ME" + And request contains "notification_rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"recipients": [{"data": {}, "type": "EMAIL"}], "triggers": [{"data": {}, "type": "CASE_CREATED"}]}, "type": "notification_rule"}} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/case-management + Scenario: Update a notification rule returns "Not Found" response + Given new "UpdateProjectNotificationRule" request + And request contains "project_id" parameter from "REPLACE.ME" + And request contains "notification_rule_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"recipients": [{"data": {}, "type": "EMAIL"}], "triggers": [{"data": {}, "type": "CASE_CREATED"}]}, "type": "notification_rule"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Update a project returns "Bad Request" response + Given new "UpdateProject" request + And request contains "project_id" parameter with value "d4bbe1af-f36e-42f1-87c1-493ca35c320e" + And body with value {"data": {"type": "invalid_type"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Update a project returns "Not Found" response + Given new "UpdateProject" request + And request contains "project_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"type": "project", "attributes": {"name": "Updated Project Name"}}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Update a project returns "OK" response + Given new "UpdateProject" request + And request contains "project_id" parameter with value "d4bbe1af-f36e-42f1-87c1-493ca35c320e" + And body with value {"data": {"type": "project", "attributes": {"name": "Updated Project Name {{ unique }}"}}} + When the request is sent + Then the response status is 200 OK + And the response "data" has field "id" + And the response "data.attributes.name" is equal to "Updated Project Name {{ unique }}" + @skip @team:DataDog/case-management Scenario: Update case attributes returns "Bad Request" response Given new "UpdateAttributes" request diff --git a/features/v2/given.json b/features/v2/given.json index 1d65907ff13e..3605ca7f8e79 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -190,6 +190,36 @@ "tag": "Case Management", "operationId": "CreateCase" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"project\",\n \"attributes\": {\n \"key\": \"TST\",\n \"name\": \"Test Project {{ unique }}\"\n }\n }\n}" + } + ], + "source": "data", + "step": "there is a valid \"project\" in the system", + "key": "project", + "tag": "Case Management", + "operationId": "CreateProject" + }, + { + "parameters": [ + { + "name": "project_id", + "value": "d4bbe1af-f36e-42f1-87c1-493ca35c320e" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"notification_rule\",\n \"attributes\": {\n \"is_enabled\": true,\n \"triggers\": [{\"type\": \"CASE_CREATED\", \"data\": {}}],\n \"recipients\": [{\"type\": \"EMAIL\", \"data\": {\"email\": \"test-{{ unique }}@example.com\"}}]\n }\n }\n}" + } + ], + "source": "data", + "step": "there is a valid \"case_notification_rule\" in the system", + "key": "case_notification_rule", + "tag": "Case Management", + "operationId": "CreateProjectNotificationRule" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index 5a347bddf111..6387dae5fac2 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -693,6 +693,47 @@ "type": "safe" } }, + "UpdateProject": { + "tag": "Case Management", + "undo": { + "type": "idempotent" + } + }, + "GetProjectNotificationRules": { + "tag": "Case Management", + "undo": { + "type": "safe" + } + }, + "CreateProjectNotificationRule": { + "tag": "Case Management", + "undo": { + "operationId": "DeleteProjectNotificationRule", + "parameters": [ + { + "name": "project_id", + "source": "path.project_id" + }, + { + "name": "notification_rule_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteProjectNotificationRule": { + "tag": "Case Management", + "undo": { + "type": "idempotent" + } + }, + "UpdateProjectNotificationRule": { + "tag": "Case Management", + "undo": { + "type": "idempotent" + } + }, "GetAllCaseTypes": { "tag": "Case Management Type", "undo": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 1b7a7bac0e8b..e2a6352b8445 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1204,6 +1204,8 @@ def overrides "v2.authn_mapping_update_data" => "AuthNMappingUpdateData", "v2.authn_mapping_update_relationships" => "AuthNMappingUpdateRelationships", "v2.authn_mapping_update_request" => "AuthNMappingUpdateRequest", + "v2.auto_close_inactive_cases" => "AutoCloseInactiveCases", + "v2.auto_transition_assigned_cases" => "AutoTransitionAssignedCases", "v2.aws_account_create_request" => "AWSAccountCreateRequest", "v2.aws_account_create_request_attributes" => "AWSAccountCreateRequestAttributes", "v2.aws_account_create_request_data" => "AWSAccountCreateRequestData", @@ -1410,6 +1412,20 @@ def overrides "v2.case_management_project" => "CaseManagementProject", "v2.case_management_project_data" => "CaseManagementProjectData", "v2.case_management_project_data_type" => "CaseManagementProjectDataType", + "v2.case_notification_rule" => "CaseNotificationRule", + "v2.case_notification_rule_attributes" => "CaseNotificationRuleAttributes", + "v2.case_notification_rule_create" => "CaseNotificationRuleCreate", + "v2.case_notification_rule_create_attributes" => "CaseNotificationRuleCreateAttributes", + "v2.case_notification_rule_create_request" => "CaseNotificationRuleCreateRequest", + "v2.case_notification_rule_recipient" => "CaseNotificationRuleRecipient", + "v2.case_notification_rule_recipient_data" => "CaseNotificationRuleRecipientData", + "v2.case_notification_rule_resource_type" => "CaseNotificationRuleResourceType", + "v2.case_notification_rule_response" => "CaseNotificationRuleResponse", + "v2.case_notification_rules_response" => "CaseNotificationRulesResponse", + "v2.case_notification_rule_trigger" => "CaseNotificationRuleTrigger", + "v2.case_notification_rule_trigger_data" => "CaseNotificationRuleTriggerData", + "v2.case_notification_rule_update" => "CaseNotificationRuleUpdate", + "v2.case_notification_rule_update_request" => "CaseNotificationRuleUpdateRequest", "v2.case_priority" => "CasePriority", "v2.case_relationships" => "CaseRelationships", "v2.case_resource_type" => "CaseResourceType", @@ -2812,6 +2828,24 @@ def overrides "v2.input_schema_parameters" => "InputSchemaParameters", "v2.input_schema_parameters_type" => "InputSchemaParametersType", "v2.intake_payload_accepted" => "IntakePayloadAccepted", + "v2.integration_incident" => "IntegrationIncident", + "v2.integration_incident_field_mappings_items" => "IntegrationIncidentFieldMappingsItems", + "v2.integration_incident_severity_config" => "IntegrationIncidentSeverityConfig", + "v2.integration_jira" => "IntegrationJira", + "v2.integration_jira_auto_creation" => "IntegrationJiraAutoCreation", + "v2.integration_jira_metadata" => "IntegrationJiraMetadata", + "v2.integration_jira_sync" => "IntegrationJiraSync", + "v2.integration_jira_sync139772721530016" => "IntegrationJiraSync139772721530016", + "v2.integration_jira_sync_due_date" => "IntegrationJiraSyncDueDate", + "v2.integration_monitor" => "IntegrationMonitor", + "v2.integration_on_call" => "IntegrationOnCall", + "v2.integration_on_call_escalation_queries_items" => "IntegrationOnCallEscalationQueriesItems", + "v2.integration_on_call_escalation_queries_items_target" => "IntegrationOnCallEscalationQueriesItemsTarget", + "v2.integration_service_now" => "IntegrationServiceNow", + "v2.integration_service_now_auto_creation" => "IntegrationServiceNowAutoCreation", + "v2.integration_service_now_sync_config" => "IntegrationServiceNowSyncConfig", + "v2.integration_service_now_sync_config139772721534496" => "IntegrationServiceNowSyncConfig139772721534496", + "v2.integration_service_now_sync_config_priority" => "IntegrationServiceNowSyncConfigPriority", "v2.interface_attributes" => "InterfaceAttributes", "v2.interface_attributes_status" => "InterfaceAttributesStatus", "v2.ip_allowlist_attributes" => "IPAllowlistAttributes", @@ -3742,6 +3776,9 @@ def overrides "v2.product_analytics_server_side_event_item_usr" => "ProductAnalyticsServerSideEventItemUsr", "v2.project" => "Project", "v2.project_attributes" => "ProjectAttributes", + "v2.project_columns_config" => "ProjectColumnsConfig", + "v2.project_columns_config_columns_items" => "ProjectColumnsConfigColumnsItems", + "v2.project_columns_config_columns_items_sort" => "ProjectColumnsConfigColumnsItemsSort", "v2.project_create" => "ProjectCreate", "v2.project_create_attributes" => "ProjectCreateAttributes", "v2.project_create_request" => "ProjectCreateRequest", @@ -3749,12 +3786,17 @@ def overrides "v2.projected_cost_attributes" => "ProjectedCostAttributes", "v2.projected_cost_response" => "ProjectedCostResponse", "v2.projected_cost_type" => "ProjectedCostType", + "v2.project_notification_settings" => "ProjectNotificationSettings", "v2.project_relationship" => "ProjectRelationship", "v2.project_relationship_data" => "ProjectRelationshipData", "v2.project_relationships" => "ProjectRelationships", "v2.project_resource_type" => "ProjectResourceType", "v2.project_response" => "ProjectResponse", + "v2.project_settings" => "ProjectSettings", "v2.projects_response" => "ProjectsResponse", + "v2.project_update" => "ProjectUpdate", + "v2.project_update_attributes" => "ProjectUpdateAttributes", + "v2.project_update_request" => "ProjectUpdateRequest", "v2.publish_app_response" => "PublishAppResponse", "v2.put_apps_datastore_item_response_array" => "PutAppsDatastoreItemResponseArray", "v2.put_apps_datastore_item_response_data" => "PutAppsDatastoreItemResponseData", @@ -4677,6 +4719,8 @@ def overrides "v2.suite_search_response_type" => "SuiteSearchResponseType", "v2.suppression_version_history" => "SuppressionVersionHistory", "v2.suppression_versions" => "SuppressionVersions", + "v2.sync_property" => "SyncProperty", + "v2.sync_property_with_mapping" => "SyncPropertyWithMapping", "v2.synthetics_global_variable" => "SyntheticsGlobalVariable", "v2.synthetics_global_variable_attributes" => "SyntheticsGlobalVariableAttributes", "v2.synthetics_global_variable_options" => "SyntheticsGlobalVariableOptions", diff --git a/lib/datadog_api_client/v2/api/case_management_api.rb b/lib/datadog_api_client/v2/api/case_management_api.rb index 06055c264dd4..b361840d177c 100644 --- a/lib/datadog_api_client/v2/api/case_management_api.rb +++ b/lib/datadog_api_client/v2/api/case_management_api.rb @@ -373,6 +373,78 @@ def create_project_with_http_info(body, opts = {}) return data, status_code, headers end + # Create a notification rule. + # + # @see #create_project_notification_rule_with_http_info + def create_project_notification_rule(project_id, body, opts = {}) + data, _status_code, _headers = create_project_notification_rule_with_http_info(project_id, body, opts) + data + end + + # Create a notification rule. + # + # Create a notification rule for a project. + # + # @param project_id [String] Project UUID + # @param body [CaseNotificationRuleCreateRequest] Notification rule payload + # @param opts [Hash] the optional parameters + # @return [Array<(CaseNotificationRuleResponse, Integer, Hash)>] CaseNotificationRuleResponse data, response status code and response headers + def create_project_notification_rule_with_http_info(project_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project_notification_rule ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.create_project_notification_rule" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_project_notification_rule" + end + # resource path + local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'CaseNotificationRuleResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_project_notification_rule, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CaseManagementAPI#create_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Delete case comment. # # @see #delete_case_comment_with_http_info @@ -578,6 +650,76 @@ def delete_project_with_http_info(project_id, opts = {}) return data, status_code, headers end + # Delete a notification rule. + # + # @see #delete_project_notification_rule_with_http_info + def delete_project_notification_rule(project_id, notification_rule_id, opts = {}) + delete_project_notification_rule_with_http_info(project_id, notification_rule_id, opts) + nil + end + + # Delete a notification rule. + # + # Delete a notification rule using the notification rule's `id`. + # + # @param project_id [String] Project UUID + # @param notification_rule_id [String] Notification Rule UUID + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_project_notification_rule_with_http_info(project_id, notification_rule_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project_notification_rule ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project_notification_rule" + end + # verify the required parameter 'notification_rule_id' is set + if @api_client.config.client_side_validation && notification_rule_id.nil? + fail ArgumentError, "Missing the required parameter 'notification_rule_id' when calling CaseManagementAPI.delete_project_notification_rule" + end + # resource path + local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules/{notification_rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{notification_rule_id}', CGI.escape(notification_rule_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :delete_project_notification_rule, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get the details of a case. # # @see #get_case_with_http_info @@ -708,6 +850,71 @@ def get_project_with_http_info(project_id, opts = {}) return data, status_code, headers end + # Get notification rules. + # + # @see #get_project_notification_rules_with_http_info + def get_project_notification_rules(project_id, opts = {}) + data, _status_code, _headers = get_project_notification_rules_with_http_info(project_id, opts) + data + end + + # Get notification rules. + # + # Get all notification rules for a project. + # + # @param project_id [String] Project UUID + # @param opts [Hash] the optional parameters + # @return [Array<(CaseNotificationRulesResponse, Integer, Hash)>] CaseNotificationRulesResponse data, response status code and response headers + def get_project_notification_rules_with_http_info(project_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project_notification_rules ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project_notification_rules" + end + # resource path + local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'CaseNotificationRulesResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_project_notification_rules, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CaseManagementAPI#get_project_notification_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get all projects. # # @see #get_projects_with_http_info @@ -1373,6 +1580,155 @@ def update_priority_with_http_info(case_id, body, opts = {}) return data, status_code, headers end + # Update a project. + # + # @see #update_project_with_http_info + def update_project(project_id, body, opts = {}) + data, _status_code, _headers = update_project_with_http_info(project_id, body, opts) + data + end + + # Update a project. + # + # Update a project. + # + # @param project_id [String] Project UUID + # @param body [ProjectUpdateRequest] Project payload + # @param opts [Hash] the optional parameters + # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers + def update_project_with_http_info(project_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_project ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.update_project" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_project" + end + # resource path + local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'ProjectResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_project, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CaseManagementAPI#update_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update a notification rule. + # + # @see #update_project_notification_rule_with_http_info + def update_project_notification_rule(project_id, notification_rule_id, body, opts = {}) + update_project_notification_rule_with_http_info(project_id, notification_rule_id, body, opts) + nil + end + + # Update a notification rule. + # + # Update a notification rule. + # + # @param project_id [String] Project UUID + # @param notification_rule_id [String] Notification Rule UUID + # @param body [CaseNotificationRuleUpdateRequest] Notification rule payload + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def update_project_notification_rule_with_http_info(project_id, notification_rule_id, body, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_project_notification_rule ...' + end + # verify the required parameter 'project_id' is set + if @api_client.config.client_side_validation && project_id.nil? + fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.update_project_notification_rule" + end + # verify the required parameter 'notification_rule_id' is set + if @api_client.config.client_side_validation && notification_rule_id.nil? + fail ArgumentError, "Missing the required parameter 'notification_rule_id' when calling CaseManagementAPI.update_project_notification_rule" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_project_notification_rule" + end + # resource path + local_var_path = '/api/v2/cases/projects/{project_id}/notification_rules/{notification_rule_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/')).sub('{notification_rule_id}', CGI.escape(notification_rule_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :update_project_notification_rule, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Put, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: CaseManagementAPI#update_project_notification_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Update case status. # # @see #update_status_with_http_info diff --git a/lib/datadog_api_client/v2/models/auto_close_inactive_cases.rb b/lib/datadog_api_client/v2/models/auto_close_inactive_cases.rb new file mode 100644 index 000000000000..a267a52e88f3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/auto_close_inactive_cases.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 + # Auto-close inactive cases settings + class AutoCloseInactiveCases + include BaseGenericModel + + # Whether auto-close is enabled + attr_accessor :enabled + + # Maximum inactive time in seconds before auto-closing + attr_accessor :max_inactive_time_in_secs + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'max_inactive_time_in_secs' => :'max_inactive_time_in_secs' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'max_inactive_time_in_secs' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutoCloseInactiveCases` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'max_inactive_time_in_secs') + self.max_inactive_time_in_secs = attributes[:'max_inactive_time_in_secs'] + 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 && + enabled == o.enabled && + max_inactive_time_in_secs == o.max_inactive_time_in_secs && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, max_inactive_time_in_secs, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/auto_transition_assigned_cases.rb b/lib/datadog_api_client/v2/models/auto_transition_assigned_cases.rb new file mode 100644 index 000000000000..684f80a69a89 --- /dev/null +++ b/lib/datadog_api_client/v2/models/auto_transition_assigned_cases.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 + # Auto-transition assigned cases settings + class AutoTransitionAssignedCases + include BaseGenericModel + + # Whether to auto-transition cases when self-assigned + attr_accessor :auto_transition_assigned_cases_on_self_assigned + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auto_transition_assigned_cases_on_self_assigned' => :'auto_transition_assigned_cases_on_self_assigned' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auto_transition_assigned_cases_on_self_assigned' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AutoTransitionAssignedCases` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auto_transition_assigned_cases_on_self_assigned') + self.auto_transition_assigned_cases_on_self_assigned = attributes[:'auto_transition_assigned_cases_on_self_assigned'] + 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 && + auto_transition_assigned_cases_on_self_assigned == o.auto_transition_assigned_cases_on_self_assigned && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auto_transition_assigned_cases_on_self_assigned, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule.rb b/lib/datadog_api_client/v2/models/case_notification_rule.rb new file mode 100644 index 000000000000..ae00643e52fa --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A notification rule for case management + class CaseNotificationRule + include BaseGenericModel + + # Notification rule attributes + attr_reader :attributes + + # The notification rule's identifier + attr_reader :id + + # Notification rule 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' => :'CaseNotificationRuleAttributes', + :'id' => :'String', + :'type' => :'CaseNotificationRuleResourceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseNotificationRule` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_attributes.rb b/lib/datadog_api_client/v2/models/case_notification_rule_attributes.rb new file mode 100644 index 000000000000..574caf4eb92a --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_attributes.rb @@ -0,0 +1,139 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Notification rule attributes + class CaseNotificationRuleAttributes + include BaseGenericModel + + # Whether the notification rule is enabled + attr_accessor :is_enabled + + # Query to filter cases for this notification rule + attr_accessor :query + + # List of notification recipients + attr_accessor :recipients + + # List of triggers for this notification rule + attr_accessor :triggers + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'is_enabled' => :'is_enabled', + :'query' => :'query', + :'recipients' => :'recipients', + :'triggers' => :'triggers' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'is_enabled' => :'Boolean', + :'query' => :'String', + :'recipients' => :'Array', + :'triggers' => :'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::CaseNotificationRuleAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'is_enabled') + self.is_enabled = attributes[:'is_enabled'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'recipients') + if (value = attributes[:'recipients']).is_a?(Array) + self.recipients = value + end + end + + if attributes.key?(:'triggers') + if (value = attributes[:'triggers']).is_a?(Array) + self.triggers = 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 && + is_enabled == o.is_enabled && + query == o.query && + recipients == o.recipients && + triggers == o.triggers && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [is_enabled, query, recipients, triggers, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_create.rb b/lib/datadog_api_client/v2/models/case_notification_rule_create.rb new file mode 100644 index 000000000000..28f446de1f2f --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_create.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Notification rule create + class CaseNotificationRuleCreate + include BaseGenericModel + + # Notification rule creation attributes + attr_reader :attributes + + # Notification rule resource type + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CaseNotificationRuleCreateAttributes', + :'type' => :'CaseNotificationRuleResourceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseNotificationRuleCreate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_create_attributes.rb b/lib/datadog_api_client/v2/models/case_notification_rule_create_attributes.rb new file mode 100644 index 000000000000..be91a0c1eea6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_create_attributes.rb @@ -0,0 +1,168 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Notification rule creation attributes + class CaseNotificationRuleCreateAttributes + include BaseGenericModel + + # Whether the notification rule is enabled + attr_accessor :is_enabled + + # Query to filter cases for this notification rule + attr_accessor :query + + # List of notification recipients + attr_reader :recipients + + # List of triggers for this notification rule + attr_reader :triggers + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'is_enabled' => :'is_enabled', + :'query' => :'query', + :'recipients' => :'recipients', + :'triggers' => :'triggers' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'is_enabled' => :'Boolean', + :'query' => :'String', + :'recipients' => :'Array', + :'triggers' => :'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::CaseNotificationRuleCreateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'is_enabled') + self.is_enabled = attributes[:'is_enabled'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'recipients') + if (value = attributes[:'recipients']).is_a?(Array) + self.recipients = value + end + end + + if attributes.key?(:'triggers') + if (value = attributes[:'triggers']).is_a?(Array) + self.triggers = 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 @recipients.nil? + return false if @triggers.nil? + true + end + + # Custom attribute writer method with validation + # @param recipients [Object] Object to be assigned + # @!visibility private + def recipients=(recipients) + if recipients.nil? + fail ArgumentError, 'invalid value for "recipients", recipients cannot be nil.' + end + @recipients = recipients + end + + # Custom attribute writer method with validation + # @param triggers [Object] Object to be assigned + # @!visibility private + def triggers=(triggers) + if triggers.nil? + fail ArgumentError, 'invalid value for "triggers", triggers cannot be nil.' + end + @triggers = triggers + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + is_enabled == o.is_enabled && + query == o.query && + recipients == o.recipients && + triggers == o.triggers && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [is_enabled, query, recipients, triggers, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_create_request.rb b/lib/datadog_api_client/v2/models/case_notification_rule_create_request.rb new file mode 100644 index 000000000000..4b914877eb53 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_create_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Notification rule create request + class CaseNotificationRuleCreateRequest + include BaseGenericModel + + # Notification rule create + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CaseNotificationRuleCreate' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseNotificationRuleCreateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_recipient.rb b/lib/datadog_api_client/v2/models/case_notification_rule_recipient.rb new file mode 100644 index 000000000000..fca052434222 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_recipient.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 + # Notification rule recipient + class CaseNotificationRuleRecipient + include BaseGenericModel + + # Recipient data + attr_accessor :data + + # Type of recipient (SLACK_CHANNEL, EMAIL, HTTP, PAGERDUTY_SERVICE, MS_TEAMS_CHANNEL) + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CaseNotificationRuleRecipientData', + :'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::CaseNotificationRuleRecipient` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_recipient_data.rb b/lib/datadog_api_client/v2/models/case_notification_rule_recipient_data.rb new file mode 100644 index 000000000000..d41e98452d26 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_recipient_data.rb @@ -0,0 +1,225 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Recipient data + class CaseNotificationRuleRecipientData + include BaseGenericModel + + # Slack channel name + attr_accessor :channel + + # Slack channel ID + attr_accessor :channel_id + + # Microsoft Teams channel name + attr_accessor :channel_name + + # Microsoft Teams connector name + attr_accessor :connector_name + + # Email address + attr_accessor :email + + # HTTP webhook name + attr_accessor :name + + # PagerDuty service name + attr_accessor :service_name + + # Microsoft Teams team ID + attr_accessor :team_id + + # Microsoft Teams team name + attr_accessor :team_name + + # Microsoft Teams tenant ID + attr_accessor :tenant_id + + # Microsoft Teams tenant name + attr_accessor :tenant_name + + # Slack workspace name + attr_accessor :workspace + + # Slack workspace ID + attr_accessor :workspace_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'channel' => :'channel', + :'channel_id' => :'channel_id', + :'channel_name' => :'channel_name', + :'connector_name' => :'connector_name', + :'email' => :'email', + :'name' => :'name', + :'service_name' => :'service_name', + :'team_id' => :'team_id', + :'team_name' => :'team_name', + :'tenant_id' => :'tenant_id', + :'tenant_name' => :'tenant_name', + :'workspace' => :'workspace', + :'workspace_id' => :'workspace_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'channel' => :'String', + :'channel_id' => :'String', + :'channel_name' => :'String', + :'connector_name' => :'String', + :'email' => :'String', + :'name' => :'String', + :'service_name' => :'String', + :'team_id' => :'String', + :'team_name' => :'String', + :'tenant_id' => :'String', + :'tenant_name' => :'String', + :'workspace' => :'String', + :'workspace_id' => :'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::CaseNotificationRuleRecipientData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'channel') + self.channel = attributes[:'channel'] + end + + if attributes.key?(:'channel_id') + self.channel_id = attributes[:'channel_id'] + end + + if attributes.key?(:'channel_name') + self.channel_name = attributes[:'channel_name'] + end + + if attributes.key?(:'connector_name') + self.connector_name = attributes[:'connector_name'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'service_name') + self.service_name = attributes[:'service_name'] + end + + if attributes.key?(:'team_id') + self.team_id = attributes[:'team_id'] + end + + if attributes.key?(:'team_name') + self.team_name = attributes[:'team_name'] + end + + if attributes.key?(:'tenant_id') + self.tenant_id = attributes[:'tenant_id'] + end + + if attributes.key?(:'tenant_name') + self.tenant_name = attributes[:'tenant_name'] + end + + if attributes.key?(:'workspace') + self.workspace = attributes[:'workspace'] + end + + if attributes.key?(:'workspace_id') + self.workspace_id = attributes[:'workspace_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + channel == o.channel && + channel_id == o.channel_id && + channel_name == o.channel_name && + connector_name == o.connector_name && + email == o.email && + name == o.name && + service_name == o.service_name && + team_id == o.team_id && + team_name == o.team_name && + tenant_id == o.tenant_id && + tenant_name == o.tenant_name && + workspace == o.workspace && + workspace_id == o.workspace_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [channel, channel_id, channel_name, connector_name, email, name, service_name, team_id, team_name, tenant_id, tenant_name, workspace, workspace_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_resource_type.rb b/lib/datadog_api_client/v2/models/case_notification_rule_resource_type.rb new file mode 100644 index 000000000000..ddf1f8bbb313 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_resource_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Notification rule resource type + class CaseNotificationRuleResourceType + include BaseEnumModel + + NOTIFICATION_RULE = "notification_rule".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_response.rb b/lib/datadog_api_client/v2/models/case_notification_rule_response.rb new file mode 100644 index 000000000000..1d33dab31b9c --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_response.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 + # Notification rule response + class CaseNotificationRuleResponse + include BaseGenericModel + + # A notification rule for case management + 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' => :'CaseNotificationRule' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseNotificationRuleResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/case_notification_rule_trigger.rb b/lib/datadog_api_client/v2/models/case_notification_rule_trigger.rb new file mode 100644 index 000000000000..f324ddfa1ba6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_trigger.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 + # Notification rule trigger + class CaseNotificationRuleTrigger + include BaseGenericModel + + # Trigger data + attr_accessor :data + + # Type of trigger (CASE_CREATED, STATUS_TRANSITIONED, ATTRIBUTE_VALUE_CHANGED, EVENT_CORRELATION_SIGNAL_CORRELATED) + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CaseNotificationRuleTriggerData', + :'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::CaseNotificationRuleTrigger` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_trigger_data.rb b/lib/datadog_api_client/v2/models/case_notification_rule_trigger_data.rb new file mode 100644 index 000000000000..35bca8757169 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_trigger_data.rb @@ -0,0 +1,155 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Trigger data + class CaseNotificationRuleTriggerData + include BaseGenericModel + + # Change type (added, removed, changed) + attr_accessor :change_type + + # Field name for attribute value changed trigger + attr_accessor :field + + # Status ID to transition from + attr_accessor :from_status + + # Status name to transition from + attr_accessor :from_status_name + + # Status ID to transition to + attr_accessor :to_status + + # Status name to transition to + attr_accessor :to_status_name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'change_type' => :'change_type', + :'field' => :'field', + :'from_status' => :'from_status', + :'from_status_name' => :'from_status_name', + :'to_status' => :'to_status', + :'to_status_name' => :'to_status_name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'change_type' => :'String', + :'field' => :'String', + :'from_status' => :'String', + :'from_status_name' => :'String', + :'to_status' => :'String', + :'to_status_name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseNotificationRuleTriggerData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'change_type') + self.change_type = attributes[:'change_type'] + end + + if attributes.key?(:'field') + self.field = attributes[:'field'] + end + + if attributes.key?(:'from_status') + self.from_status = attributes[:'from_status'] + end + + if attributes.key?(:'from_status_name') + self.from_status_name = attributes[:'from_status_name'] + end + + if attributes.key?(:'to_status') + self.to_status = attributes[:'to_status'] + end + + if attributes.key?(:'to_status_name') + self.to_status_name = attributes[:'to_status_name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + change_type == o.change_type && + field == o.field && + from_status == o.from_status && + from_status_name == o.from_status_name && + to_status == o.to_status && + to_status_name == o.to_status_name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [change_type, field, from_status, from_status_name, to_status, to_status_name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_update.rb b/lib/datadog_api_client/v2/models/case_notification_rule_update.rb new file mode 100644 index 000000000000..14842e7b9f95 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Notification rule update + class CaseNotificationRuleUpdate + include BaseGenericModel + + # Notification rule attributes + attr_accessor :attributes + + # Notification rule resource type + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CaseNotificationRuleAttributes', + :'type' => :'CaseNotificationRuleResourceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseNotificationRuleUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rule_update_request.rb b/lib/datadog_api_client/v2/models/case_notification_rule_update_request.rb new file mode 100644 index 000000000000..7f5c42ccf2a3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rule_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Notification rule update request + class CaseNotificationRuleUpdateRequest + include BaseGenericModel + + # Notification rule update + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'CaseNotificationRuleUpdate' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CaseNotificationRuleUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/case_notification_rules_response.rb b/lib/datadog_api_client/v2/models/case_notification_rules_response.rb new file mode 100644 index 000000000000..cdbf346125b3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/case_notification_rules_response.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 + # Response with notification rules + class CaseNotificationRulesResponse + include BaseGenericModel + + # Notification rules data + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'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::CaseNotificationRulesResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/integration_incident.rb b/lib/datadog_api_client/v2/models/integration_incident.rb new file mode 100644 index 000000000000..1cb107b14bad --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_incident.rb @@ -0,0 +1,157 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Incident integration settings + class IntegrationIncident + include BaseGenericModel + + # Query for auto-escalation + attr_accessor :auto_escalation_query + + # Default incident commander + attr_accessor :default_incident_commander + + # Whether incident integration is enabled + attr_accessor :enabled + + # + attr_accessor :field_mappings + + # Incident type + attr_accessor :incident_type + + # + attr_accessor :severity_config + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auto_escalation_query' => :'auto_escalation_query', + :'default_incident_commander' => :'default_incident_commander', + :'enabled' => :'enabled', + :'field_mappings' => :'field_mappings', + :'incident_type' => :'incident_type', + :'severity_config' => :'severity_config' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auto_escalation_query' => :'String', + :'default_incident_commander' => :'String', + :'enabled' => :'Boolean', + :'field_mappings' => :'Array', + :'incident_type' => :'String', + :'severity_config' => :'IntegrationIncidentSeverityConfig' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationIncident` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auto_escalation_query') + self.auto_escalation_query = attributes[:'auto_escalation_query'] + end + + if attributes.key?(:'default_incident_commander') + self.default_incident_commander = attributes[:'default_incident_commander'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'field_mappings') + if (value = attributes[:'field_mappings']).is_a?(Array) + self.field_mappings = value + end + end + + if attributes.key?(:'incident_type') + self.incident_type = attributes[:'incident_type'] + end + + if attributes.key?(:'severity_config') + self.severity_config = attributes[:'severity_config'] + 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 && + auto_escalation_query == o.auto_escalation_query && + default_incident_commander == o.default_incident_commander && + enabled == o.enabled && + field_mappings == o.field_mappings && + incident_type == o.incident_type && + severity_config == o.severity_config && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auto_escalation_query, default_incident_commander, enabled, field_mappings, incident_type, severity_config, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_incident_field_mappings_items.rb b/lib/datadog_api_client/v2/models/integration_incident_field_mappings_items.rb new file mode 100644 index 000000000000..ef120b23dd34 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_incident_field_mappings_items.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 + # + class IntegrationIncidentFieldMappingsItems + include BaseGenericModel + + # + attr_accessor :case_field + + # + attr_accessor :incident_user_defined_field_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'case_field' => :'case_field', + :'incident_user_defined_field_id' => :'incident_user_defined_field_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'case_field' => :'String', + :'incident_user_defined_field_id' => :'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::IntegrationIncidentFieldMappingsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'case_field') + self.case_field = attributes[:'case_field'] + end + + if attributes.key?(:'incident_user_defined_field_id') + self.incident_user_defined_field_id = attributes[:'incident_user_defined_field_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + case_field == o.case_field && + incident_user_defined_field_id == o.incident_user_defined_field_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [case_field, incident_user_defined_field_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_incident_severity_config.rb b/lib/datadog_api_client/v2/models/integration_incident_severity_config.rb new file mode 100644 index 000000000000..227055891683 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_incident_severity_config.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 + # + class IntegrationIncidentSeverityConfig + include BaseGenericModel + + # + attr_accessor :priority_mapping + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'priority_mapping' => :'priority_mapping' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'priority_mapping' => :'Hash' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationIncidentSeverityConfig` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'priority_mapping') + self.priority_mapping = attributes[:'priority_mapping'] + 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 && + priority_mapping == o.priority_mapping && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [priority_mapping, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_jira.rb b/lib/datadog_api_client/v2/models/integration_jira.rb new file mode 100644 index 000000000000..3652660d886d --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_jira.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 + # Jira integration settings + class IntegrationJira + include BaseGenericModel + + # + attr_accessor :auto_creation + + # Whether Jira integration is enabled + attr_accessor :enabled + + # + attr_accessor :metadata + + # + attr_accessor :sync + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auto_creation' => :'auto_creation', + :'enabled' => :'enabled', + :'metadata' => :'metadata', + :'sync' => :'sync' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auto_creation' => :'IntegrationJiraAutoCreation', + :'enabled' => :'Boolean', + :'metadata' => :'IntegrationJiraMetadata', + :'sync' => :'IntegrationJiraSync' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationJira` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auto_creation') + self.auto_creation = attributes[:'auto_creation'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'sync') + self.sync = attributes[:'sync'] + 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 && + auto_creation == o.auto_creation && + enabled == o.enabled && + metadata == o.metadata && + sync == o.sync && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auto_creation, enabled, metadata, sync, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_jira_auto_creation.rb b/lib/datadog_api_client/v2/models/integration_jira_auto_creation.rb new file mode 100644 index 000000000000..b196ee048ef4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_jira_auto_creation.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 + # + class IntegrationJiraAutoCreation + include BaseGenericModel + + # + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationJiraAutoCreation` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + 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 && + enabled == o.enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_jira_metadata.rb b/lib/datadog_api_client/v2/models/integration_jira_metadata.rb new file mode 100644 index 000000000000..cb1df78c84c7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_jira_metadata.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class IntegrationJiraMetadata + include BaseGenericModel + + # + attr_accessor :account_id + + # + attr_accessor :issue_type_id + + # + attr_accessor :project_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_id' => :'account_id', + :'issue_type_id' => :'issue_type_id', + :'project_id' => :'project_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_id' => :'String', + :'issue_type_id' => :'String', + :'project_id' => :'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::IntegrationJiraMetadata` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_id') + self.account_id = attributes[:'account_id'] + end + + if attributes.key?(:'issue_type_id') + self.issue_type_id = attributes[:'issue_type_id'] + end + + if attributes.key?(:'project_id') + self.project_id = attributes[:'project_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_id == o.account_id && + issue_type_id == o.issue_type_id && + project_id == o.project_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_id, issue_type_id, project_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_jira_sync.rb b/lib/datadog_api_client/v2/models/integration_jira_sync.rb new file mode 100644 index 000000000000..bd82f162655f --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_jira_sync.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 + # + class IntegrationJiraSync + include BaseGenericModel + + # + attr_accessor :enabled + + # + attr_accessor :properties + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'properties' => :'properties' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'properties' => :'IntegrationJiraSync139772721530016' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationJiraSync` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + 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 && + enabled == o.enabled && + properties == o.properties && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, properties, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_jira_sync139772721530016.rb b/lib/datadog_api_client/v2/models/integration_jira_sync139772721530016.rb new file mode 100644 index 000000000000..6c9d0977eee6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_jira_sync139772721530016.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class IntegrationJiraSync139772721530016 + include BaseGenericModel + + # Sync property configuration + attr_accessor :assignee + + # Sync property configuration + attr_accessor :comments + + # + attr_accessor :custom_fields + + # Sync property configuration + attr_accessor :description + + # + attr_accessor :due_date + + # Sync property with mapping configuration + attr_accessor :priority + + # Sync property with mapping configuration + attr_accessor :status + + # Sync property configuration + attr_accessor :title + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'assignee' => :'assignee', + :'comments' => :'comments', + :'custom_fields' => :'custom_fields', + :'description' => :'description', + :'due_date' => :'due_date', + :'priority' => :'priority', + :'status' => :'status', + :'title' => :'title' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'assignee' => :'SyncProperty', + :'comments' => :'SyncProperty', + :'custom_fields' => :'Hash', + :'description' => :'SyncProperty', + :'due_date' => :'IntegrationJiraSyncDueDate', + :'priority' => :'SyncPropertyWithMapping', + :'status' => :'SyncPropertyWithMapping', + :'title' => :'SyncProperty' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationJiraSync139772721530016` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'assignee') + self.assignee = attributes[:'assignee'] + end + + if attributes.key?(:'comments') + self.comments = attributes[:'comments'] + end + + if attributes.key?(:'custom_fields') + self.custom_fields = attributes[:'custom_fields'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'due_date') + self.due_date = attributes[:'due_date'] + end + + if attributes.key?(:'priority') + self.priority = attributes[:'priority'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + assignee == o.assignee && + comments == o.comments && + custom_fields == o.custom_fields && + description == o.description && + due_date == o.due_date && + priority == o.priority && + status == o.status && + title == o.title && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [assignee, comments, custom_fields, description, due_date, priority, status, title, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_jira_sync_due_date.rb b/lib/datadog_api_client/v2/models/integration_jira_sync_due_date.rb new file mode 100644 index 000000000000..49970ca4dd15 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_jira_sync_due_date.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 + # + class IntegrationJiraSyncDueDate + include BaseGenericModel + + # + attr_accessor :jira_field_id + + # + attr_accessor :sync_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'jira_field_id' => :'jira_field_id', + :'sync_type' => :'sync_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'jira_field_id' => :'String', + :'sync_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::IntegrationJiraSyncDueDate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'jira_field_id') + self.jira_field_id = attributes[:'jira_field_id'] + end + + if attributes.key?(:'sync_type') + self.sync_type = attributes[:'sync_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 && + jira_field_id == o.jira_field_id && + sync_type == o.sync_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [jira_field_id, sync_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_monitor.rb b/lib/datadog_api_client/v2/models/integration_monitor.rb new file mode 100644 index 000000000000..9d9583d39c66 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_monitor.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 + # Monitor integration settings + class IntegrationMonitor + include BaseGenericModel + + # Whether auto-resolve is enabled + attr_accessor :auto_resolve_enabled + + # Case type ID for monitor integration + attr_accessor :case_type_id + + # Whether monitor integration is enabled + attr_accessor :enabled + + # Monitor handle + attr_accessor :handle + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auto_resolve_enabled' => :'auto_resolve_enabled', + :'case_type_id' => :'case_type_id', + :'enabled' => :'enabled', + :'handle' => :'handle' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auto_resolve_enabled' => :'Boolean', + :'case_type_id' => :'String', + :'enabled' => :'Boolean', + :'handle' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationMonitor` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auto_resolve_enabled') + self.auto_resolve_enabled = attributes[:'auto_resolve_enabled'] + end + + if attributes.key?(:'case_type_id') + self.case_type_id = attributes[:'case_type_id'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'handle') + self.handle = attributes[:'handle'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auto_resolve_enabled == o.auto_resolve_enabled && + case_type_id == o.case_type_id && + enabled == o.enabled && + handle == o.handle && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auto_resolve_enabled, case_type_id, enabled, handle, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_on_call.rb b/lib/datadog_api_client/v2/models/integration_on_call.rb new file mode 100644 index 000000000000..53f3885edf74 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_on_call.rb @@ -0,0 +1,127 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # On-Call integration settings + class IntegrationOnCall + include BaseGenericModel + + # Whether to auto-assign on-call + attr_accessor :auto_assign_on_call + + # Whether On-Call integration is enabled + attr_accessor :enabled + + # + attr_accessor :escalation_queries + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auto_assign_on_call' => :'auto_assign_on_call', + :'enabled' => :'enabled', + :'escalation_queries' => :'escalation_queries' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auto_assign_on_call' => :'Boolean', + :'enabled' => :'Boolean', + :'escalation_queries' => :'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::IntegrationOnCall` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auto_assign_on_call') + self.auto_assign_on_call = attributes[:'auto_assign_on_call'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'escalation_queries') + if (value = attributes[:'escalation_queries']).is_a?(Array) + self.escalation_queries = 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 && + auto_assign_on_call == o.auto_assign_on_call && + enabled == o.enabled && + escalation_queries == o.escalation_queries && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auto_assign_on_call, enabled, escalation_queries, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_on_call_escalation_queries_items.rb b/lib/datadog_api_client/v2/models/integration_on_call_escalation_queries_items.rb new file mode 100644 index 000000000000..7e6384d4e602 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_on_call_escalation_queries_items.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 + # + class IntegrationOnCallEscalationQueriesItems + include BaseGenericModel + + # + attr_accessor :enabled + + # + attr_accessor :id + + # + attr_accessor :query + + # + attr_accessor :target + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'id' => :'id', + :'query' => :'query', + :'target' => :'target' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'id' => :'String', + :'query' => :'String', + :'target' => :'IntegrationOnCallEscalationQueriesItemsTarget' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationOnCallEscalationQueriesItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'query') + self.query = attributes[:'query'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + 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 && + enabled == o.enabled && + id == o.id && + query == o.query && + target == o.target && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, id, query, target, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_on_call_escalation_queries_items_target.rb b/lib/datadog_api_client/v2/models/integration_on_call_escalation_queries_items_target.rb new file mode 100644 index 000000000000..cc7b5517bfe7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_on_call_escalation_queries_items_target.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class IntegrationOnCallEscalationQueriesItemsTarget + include BaseGenericModel + + # + attr_accessor :dynamic_team_paging + + # + attr_accessor :team_id + + # + attr_accessor :user_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'dynamic_team_paging' => :'dynamic_team_paging', + :'team_id' => :'team_id', + :'user_id' => :'user_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'dynamic_team_paging' => :'Boolean', + :'team_id' => :'String', + :'user_id' => :'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::IntegrationOnCallEscalationQueriesItemsTarget` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'dynamic_team_paging') + self.dynamic_team_paging = attributes[:'dynamic_team_paging'] + end + + if attributes.key?(:'team_id') + self.team_id = attributes[:'team_id'] + end + + if attributes.key?(:'user_id') + self.user_id = attributes[:'user_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + dynamic_team_paging == o.dynamic_team_paging && + team_id == o.team_id && + user_id == o.user_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [dynamic_team_paging, team_id, user_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_service_now.rb b/lib/datadog_api_client/v2/models/integration_service_now.rb new file mode 100644 index 000000000000..f08dc8fed3d6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_service_now.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 + # ServiceNow integration settings + class IntegrationServiceNow + include BaseGenericModel + + # Assignment group + attr_accessor :assignment_group + + # + attr_accessor :auto_creation + + # Whether ServiceNow integration is enabled + attr_accessor :enabled + + # ServiceNow instance name + attr_accessor :instance_name + + # + attr_accessor :sync_config + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'assignment_group' => :'assignment_group', + :'auto_creation' => :'auto_creation', + :'enabled' => :'enabled', + :'instance_name' => :'instance_name', + :'sync_config' => :'sync_config' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'assignment_group' => :'String', + :'auto_creation' => :'IntegrationServiceNowAutoCreation', + :'enabled' => :'Boolean', + :'instance_name' => :'String', + :'sync_config' => :'IntegrationServiceNowSyncConfig' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationServiceNow` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'assignment_group') + self.assignment_group = attributes[:'assignment_group'] + end + + if attributes.key?(:'auto_creation') + self.auto_creation = attributes[:'auto_creation'] + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'instance_name') + self.instance_name = attributes[:'instance_name'] + end + + if attributes.key?(:'sync_config') + self.sync_config = attributes[:'sync_config'] + 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 && + assignment_group == o.assignment_group && + auto_creation == o.auto_creation && + enabled == o.enabled && + instance_name == o.instance_name && + sync_config == o.sync_config && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [assignment_group, auto_creation, enabled, instance_name, sync_config, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_service_now_auto_creation.rb b/lib/datadog_api_client/v2/models/integration_service_now_auto_creation.rb new file mode 100644 index 000000000000..f335ce039b37 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_service_now_auto_creation.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 + # + class IntegrationServiceNowAutoCreation + include BaseGenericModel + + # + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationServiceNowAutoCreation` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + 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 && + enabled == o.enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_service_now_sync_config.rb b/lib/datadog_api_client/v2/models/integration_service_now_sync_config.rb new file mode 100644 index 000000000000..ba43bdb96eb2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_service_now_sync_config.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 + # + class IntegrationServiceNowSyncConfig + include BaseGenericModel + + # + attr_accessor :enabled + + # + attr_accessor :properties + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'properties' => :'properties' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'properties' => :'IntegrationServiceNowSyncConfig139772721534496' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationServiceNowSyncConfig` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'properties') + self.properties = attributes[:'properties'] + 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 && + enabled == o.enabled && + properties == o.properties && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, properties, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_service_now_sync_config139772721534496.rb b/lib/datadog_api_client/v2/models/integration_service_now_sync_config139772721534496.rb new file mode 100644 index 000000000000..433600923b79 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_service_now_sync_config139772721534496.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class IntegrationServiceNowSyncConfig139772721534496 + include BaseGenericModel + + # Sync property configuration + attr_accessor :comments + + # + attr_accessor :priority + + # Sync property with mapping configuration + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'comments' => :'comments', + :'priority' => :'priority', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'comments' => :'SyncProperty', + :'priority' => :'IntegrationServiceNowSyncConfigPriority', + :'status' => :'SyncPropertyWithMapping' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationServiceNowSyncConfig139772721534496` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'comments') + self.comments = attributes[:'comments'] + end + + if attributes.key?(:'priority') + self.priority = attributes[:'priority'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + comments == o.comments && + priority == o.priority && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [comments, priority, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_service_now_sync_config_priority.rb b/lib/datadog_api_client/v2/models/integration_service_now_sync_config_priority.rb new file mode 100644 index 000000000000..8a3e8b82440e --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_service_now_sync_config_priority.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class IntegrationServiceNowSyncConfigPriority + include BaseGenericModel + + # + attr_accessor :impact_mapping + + # + attr_accessor :sync_type + + # + attr_accessor :urgency_mapping + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'impact_mapping' => :'impact_mapping', + :'sync_type' => :'sync_type', + :'urgency_mapping' => :'urgency_mapping' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'impact_mapping' => :'Hash', + :'sync_type' => :'String', + :'urgency_mapping' => :'Hash' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationServiceNowSyncConfigPriority` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'impact_mapping') + self.impact_mapping = attributes[:'impact_mapping'] + end + + if attributes.key?(:'sync_type') + self.sync_type = attributes[:'sync_type'] + end + + if attributes.key?(:'urgency_mapping') + self.urgency_mapping = attributes[:'urgency_mapping'] + 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 && + impact_mapping == o.impact_mapping && + sync_type == o.sync_type && + urgency_mapping == o.urgency_mapping && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [impact_mapping, sync_type, urgency_mapping, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/project_attributes.rb b/lib/datadog_api_client/v2/models/project_attributes.rb index 85c7578a48d8..90aac29ddd8e 100644 --- a/lib/datadog_api_client/v2/models/project_attributes.rb +++ b/lib/datadog_api_client/v2/models/project_attributes.rb @@ -21,20 +21,36 @@ module DatadogAPIClient::V2 class ProjectAttributes include BaseGenericModel + # Project columns configuration + attr_accessor :columns_config + + # List of enabled custom case type IDs + attr_accessor :enabled_custom_case_types + # The project's key attr_accessor :key # Project's name attr_accessor :name + # Whether the project is restricted + attr_accessor :restricted + + # Project settings + attr_accessor :settings + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { + :'columns_config' => :'columns_config', + :'enabled_custom_case_types' => :'enabled_custom_case_types', :'key' => :'key', - :'name' => :'name' + :'name' => :'name', + :'restricted' => :'restricted', + :'settings' => :'settings' } end @@ -42,8 +58,12 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'columns_config' => :'ProjectColumnsConfig', + :'enabled_custom_case_types' => :'Array', :'key' => :'String', - :'name' => :'String' + :'name' => :'String', + :'restricted' => :'Boolean', + :'settings' => :'ProjectSettings' } end @@ -65,6 +85,16 @@ def initialize(attributes = {}) end } + if attributes.key?(:'columns_config') + self.columns_config = attributes[:'columns_config'] + end + + if attributes.key?(:'enabled_custom_case_types') + if (value = attributes[:'enabled_custom_case_types']).is_a?(Array) + self.enabled_custom_case_types = value + end + end + if attributes.key?(:'key') self.key = attributes[:'key'] end @@ -72,6 +102,14 @@ def initialize(attributes = {}) if attributes.key?(:'name') self.name = attributes[:'name'] end + + if attributes.key?(:'restricted') + self.restricted = attributes[:'restricted'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end end # Returns the object in the form of hash, with additionalProperties support. @@ -100,8 +138,12 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + columns_config == o.columns_config && + enabled_custom_case_types == o.enabled_custom_case_types && key == o.key && name == o.name && + restricted == o.restricted && + settings == o.settings && additional_properties == o.additional_properties end @@ -109,7 +151,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [key, name, additional_properties].hash + [columns_config, enabled_custom_case_types, key, name, restricted, settings, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/project_columns_config.rb b/lib/datadog_api_client/v2/models/project_columns_config.rb new file mode 100644 index 000000000000..5259cd69bcf1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_columns_config.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 + # Project columns configuration + class ProjectColumnsConfig + include BaseGenericModel + + # + attr_accessor :columns + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'columns' => :'columns' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'columns' => :'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::ProjectColumnsConfig` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'columns') + if (value = attributes[:'columns']).is_a?(Array) + self.columns = 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 && + columns == o.columns && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [columns, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/project_columns_config_columns_items.rb b/lib/datadog_api_client/v2/models/project_columns_config_columns_items.rb new file mode 100644 index 000000000000..6f70ba962557 --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_columns_config_columns_items.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # + class ProjectColumnsConfigColumnsItems + include BaseGenericModel + + # + attr_accessor :sort + + # + attr_accessor :sort_field + + # + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'sort' => :'sort', + :'sort_field' => :'sort_field', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'sort' => :'ProjectColumnsConfigColumnsItemsSort', + :'sort_field' => :'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::ProjectColumnsConfigColumnsItems` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'sort') + self.sort = attributes[:'sort'] + end + + if attributes.key?(:'sort_field') + self.sort_field = attributes[:'sort_field'] + 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 && + sort == o.sort && + sort_field == o.sort_field && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [sort, sort_field, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/project_columns_config_columns_items_sort.rb b/lib/datadog_api_client/v2/models/project_columns_config_columns_items_sort.rb new file mode 100644 index 000000000000..8cccc786459e --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_columns_config_columns_items_sort.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 + # + class ProjectColumnsConfigColumnsItemsSort + include BaseGenericModel + + # + attr_accessor :ascending + + # + attr_accessor :priority + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'ascending' => :'ascending', + :'priority' => :'priority' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'ascending' => :'Boolean', + :'priority' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectColumnsConfigColumnsItemsSort` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'ascending') + self.ascending = attributes[:'ascending'] + end + + if attributes.key?(:'priority') + self.priority = attributes[:'priority'] + 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 && + ascending == o.ascending && + priority == o.priority && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [ascending, priority, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/project_create_attributes.rb b/lib/datadog_api_client/v2/models/project_create_attributes.rb index e7d60fb681ac..fcb448b277c7 100644 --- a/lib/datadog_api_client/v2/models/project_create_attributes.rb +++ b/lib/datadog_api_client/v2/models/project_create_attributes.rb @@ -21,20 +21,28 @@ module DatadogAPIClient::V2 class ProjectCreateAttributes include BaseGenericModel + # List of enabled custom case type IDs + attr_accessor :enabled_custom_case_types + # Project's key. Cannot be "CASE" attr_reader :key - # name + # Project name attr_reader :name + # Team UUID to associate with the project + attr_accessor :team_uuid + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { + :'enabled_custom_case_types' => :'enabled_custom_case_types', :'key' => :'key', - :'name' => :'name' + :'name' => :'name', + :'team_uuid' => :'team_uuid' } end @@ -42,8 +50,10 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'enabled_custom_case_types' => :'Array', :'key' => :'String', - :'name' => :'String' + :'name' => :'String', + :'team_uuid' => :'String' } end @@ -65,6 +75,12 @@ def initialize(attributes = {}) end } + if attributes.key?(:'enabled_custom_case_types') + if (value = attributes[:'enabled_custom_case_types']).is_a?(Array) + self.enabled_custom_case_types = value + end + end + if attributes.key?(:'key') self.key = attributes[:'key'] end @@ -72,6 +88,10 @@ def initialize(attributes = {}) if attributes.key?(:'name') self.name = attributes[:'name'] end + + if attributes.key?(:'team_uuid') + self.team_uuid = attributes[:'team_uuid'] + end end # Check to see if the all the properties in the model are valid @@ -129,8 +149,10 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + enabled_custom_case_types == o.enabled_custom_case_types && key == o.key && name == o.name && + team_uuid == o.team_uuid && additional_properties == o.additional_properties end @@ -138,7 +160,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [key, name, additional_properties].hash + [enabled_custom_case_types, key, name, team_uuid, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/project_notification_settings.rb b/lib/datadog_api_client/v2/models/project_notification_settings.rb new file mode 100644 index 000000000000..c022a895579c --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_notification_settings.rb @@ -0,0 +1,187 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Project notification settings + class ProjectNotificationSettings + include BaseGenericModel + + # Notification destinations (1=email, 2=slack, 3=in-app) + attr_accessor :destinations + + # Whether notifications are enabled + attr_accessor :enabled + + # + attr_accessor :notify_on_case_assignment + + # + attr_accessor :notify_on_case_closed + + # + attr_accessor :notify_on_case_comment + + # + attr_accessor :notify_on_case_comment_mention + + # + attr_accessor :notify_on_case_priority_change + + # + attr_accessor :notify_on_case_status_change + + # + attr_accessor :notify_on_case_unassignment + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'destinations' => :'destinations', + :'enabled' => :'enabled', + :'notify_on_case_assignment' => :'notify_on_case_assignment', + :'notify_on_case_closed' => :'notify_on_case_closed', + :'notify_on_case_comment' => :'notify_on_case_comment', + :'notify_on_case_comment_mention' => :'notify_on_case_comment_mention', + :'notify_on_case_priority_change' => :'notify_on_case_priority_change', + :'notify_on_case_status_change' => :'notify_on_case_status_change', + :'notify_on_case_unassignment' => :'notify_on_case_unassignment' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'destinations' => :'Array', + :'enabled' => :'Boolean', + :'notify_on_case_assignment' => :'Boolean', + :'notify_on_case_closed' => :'Boolean', + :'notify_on_case_comment' => :'Boolean', + :'notify_on_case_comment_mention' => :'Boolean', + :'notify_on_case_priority_change' => :'Boolean', + :'notify_on_case_status_change' => :'Boolean', + :'notify_on_case_unassignment' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectNotificationSettings` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'destinations') + if (value = attributes[:'destinations']).is_a?(Array) + self.destinations = value + end + end + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'notify_on_case_assignment') + self.notify_on_case_assignment = attributes[:'notify_on_case_assignment'] + end + + if attributes.key?(:'notify_on_case_closed') + self.notify_on_case_closed = attributes[:'notify_on_case_closed'] + end + + if attributes.key?(:'notify_on_case_comment') + self.notify_on_case_comment = attributes[:'notify_on_case_comment'] + end + + if attributes.key?(:'notify_on_case_comment_mention') + self.notify_on_case_comment_mention = attributes[:'notify_on_case_comment_mention'] + end + + if attributes.key?(:'notify_on_case_priority_change') + self.notify_on_case_priority_change = attributes[:'notify_on_case_priority_change'] + end + + if attributes.key?(:'notify_on_case_status_change') + self.notify_on_case_status_change = attributes[:'notify_on_case_status_change'] + end + + if attributes.key?(:'notify_on_case_unassignment') + self.notify_on_case_unassignment = attributes[:'notify_on_case_unassignment'] + 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 && + destinations == o.destinations && + enabled == o.enabled && + notify_on_case_assignment == o.notify_on_case_assignment && + notify_on_case_closed == o.notify_on_case_closed && + notify_on_case_comment == o.notify_on_case_comment && + notify_on_case_comment_mention == o.notify_on_case_comment_mention && + notify_on_case_priority_change == o.notify_on_case_priority_change && + notify_on_case_status_change == o.notify_on_case_status_change && + notify_on_case_unassignment == o.notify_on_case_unassignment && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [destinations, enabled, notify_on_case_assignment, notify_on_case_closed, notify_on_case_comment, notify_on_case_comment_mention, notify_on_case_priority_change, notify_on_case_status_change, notify_on_case_unassignment, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/project_settings.rb b/lib/datadog_api_client/v2/models/project_settings.rb new file mode 100644 index 000000000000..ba34b7ed2043 --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_settings.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Project settings + class ProjectSettings + include BaseGenericModel + + # Auto-close inactive cases settings + attr_accessor :auto_close_inactive_cases + + # Auto-transition assigned cases settings + attr_accessor :auto_transition_assigned_cases + + # Incident integration settings + attr_accessor :integration_incident + + # Jira integration settings + attr_accessor :integration_jira + + # Monitor integration settings + attr_accessor :integration_monitor + + # On-Call integration settings + attr_accessor :integration_on_call + + # ServiceNow integration settings + attr_accessor :integration_service_now + + # Project notification settings + attr_accessor :notification + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auto_close_inactive_cases' => :'auto_close_inactive_cases', + :'auto_transition_assigned_cases' => :'auto_transition_assigned_cases', + :'integration_incident' => :'integration_incident', + :'integration_jira' => :'integration_jira', + :'integration_monitor' => :'integration_monitor', + :'integration_on_call' => :'integration_on_call', + :'integration_service_now' => :'integration_service_now', + :'notification' => :'notification' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auto_close_inactive_cases' => :'AutoCloseInactiveCases', + :'auto_transition_assigned_cases' => :'AutoTransitionAssignedCases', + :'integration_incident' => :'IntegrationIncident', + :'integration_jira' => :'IntegrationJira', + :'integration_monitor' => :'IntegrationMonitor', + :'integration_on_call' => :'IntegrationOnCall', + :'integration_service_now' => :'IntegrationServiceNow', + :'notification' => :'ProjectNotificationSettings' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectSettings` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auto_close_inactive_cases') + self.auto_close_inactive_cases = attributes[:'auto_close_inactive_cases'] + end + + if attributes.key?(:'auto_transition_assigned_cases') + self.auto_transition_assigned_cases = attributes[:'auto_transition_assigned_cases'] + end + + if attributes.key?(:'integration_incident') + self.integration_incident = attributes[:'integration_incident'] + end + + if attributes.key?(:'integration_jira') + self.integration_jira = attributes[:'integration_jira'] + end + + if attributes.key?(:'integration_monitor') + self.integration_monitor = attributes[:'integration_monitor'] + end + + if attributes.key?(:'integration_on_call') + self.integration_on_call = attributes[:'integration_on_call'] + end + + if attributes.key?(:'integration_service_now') + self.integration_service_now = attributes[:'integration_service_now'] + end + + if attributes.key?(:'notification') + self.notification = attributes[:'notification'] + 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 && + auto_close_inactive_cases == o.auto_close_inactive_cases && + auto_transition_assigned_cases == o.auto_transition_assigned_cases && + integration_incident == o.integration_incident && + integration_jira == o.integration_jira && + integration_monitor == o.integration_monitor && + integration_on_call == o.integration_on_call && + integration_service_now == o.integration_service_now && + notification == o.notification && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auto_close_inactive_cases, auto_transition_assigned_cases, integration_incident, integration_jira, integration_monitor, integration_on_call, integration_service_now, notification, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/project_update.rb b/lib/datadog_api_client/v2/models/project_update.rb new file mode 100644 index 000000000000..7038dac93f5e --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_update.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Project update + class ProjectUpdate + include BaseGenericModel + + # Project update attributes + attr_accessor :attributes + + # Project resource type + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ProjectUpdateAttributes', + :'type' => :'ProjectResourceType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/project_update_attributes.rb b/lib/datadog_api_client/v2/models/project_update_attributes.rb new file mode 100644 index 000000000000..b1b3b7cc3040 --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_update_attributes.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 + # Project update attributes + class ProjectUpdateAttributes + include BaseGenericModel + + # Project columns configuration + attr_accessor :columns_config + + # List of enabled custom case type IDs + attr_accessor :enabled_custom_case_types + + # Project name + attr_accessor :name + + # Project settings + attr_accessor :settings + + # Team UUID to associate with the project + attr_accessor :team_uuid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'columns_config' => :'columns_config', + :'enabled_custom_case_types' => :'enabled_custom_case_types', + :'name' => :'name', + :'settings' => :'settings', + :'team_uuid' => :'team_uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'columns_config' => :'ProjectColumnsConfig', + :'enabled_custom_case_types' => :'Array', + :'name' => :'String', + :'settings' => :'ProjectSettings', + :'team_uuid' => :'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::ProjectUpdateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'columns_config') + self.columns_config = attributes[:'columns_config'] + end + + if attributes.key?(:'enabled_custom_case_types') + if (value = attributes[:'enabled_custom_case_types']).is_a?(Array) + self.enabled_custom_case_types = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + + if attributes.key?(:'team_uuid') + self.team_uuid = attributes[:'team_uuid'] + 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 && + columns_config == o.columns_config && + enabled_custom_case_types == o.enabled_custom_case_types && + name == o.name && + settings == o.settings && + team_uuid == o.team_uuid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [columns_config, enabled_custom_case_types, name, settings, team_uuid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/project_update_request.rb b/lib/datadog_api_client/v2/models/project_update_request.rb new file mode 100644 index 000000000000..5031161e589d --- /dev/null +++ b/lib/datadog_api_client/v2/models/project_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Project update request + class ProjectUpdateRequest + include BaseGenericModel + + # Project update + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ProjectUpdate' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ProjectUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sync_property.rb b/lib/datadog_api_client/v2/models/sync_property.rb new file mode 100644 index 000000000000..f1e19427fff4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sync_property.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 + # Sync property configuration + class SyncProperty + include BaseGenericModel + + # + attr_accessor :sync_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'sync_type' => :'sync_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'sync_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::SyncProperty` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'sync_type') + self.sync_type = attributes[:'sync_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 && + sync_type == o.sync_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [sync_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/sync_property_with_mapping.rb b/lib/datadog_api_client/v2/models/sync_property_with_mapping.rb new file mode 100644 index 000000000000..2820ade6fe34 --- /dev/null +++ b/lib/datadog_api_client/v2/models/sync_property_with_mapping.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Sync property with mapping configuration + class SyncPropertyWithMapping + include BaseGenericModel + + # + attr_accessor :mapping + + # + attr_accessor :name_mapping + + # + attr_accessor :sync_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'mapping' => :'mapping', + :'name_mapping' => :'name_mapping', + :'sync_type' => :'sync_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'mapping' => :'Hash', + :'name_mapping' => :'Hash', + :'sync_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::SyncPropertyWithMapping` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'mapping') + self.mapping = attributes[:'mapping'] + end + + if attributes.key?(:'name_mapping') + self.name_mapping = attributes[:'name_mapping'] + end + + if attributes.key?(:'sync_type') + self.sync_type = attributes[:'sync_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 && + mapping == o.mapping && + name_mapping == o.name_mapping && + sync_type == o.sync_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [mapping, name_mapping, sync_type, additional_properties].hash + end + end +end