diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 10f16a21b7d4..cc175b4553f8 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -10745,6 +10745,51 @@ components: - findings - project type: object + AttachLinearIssueRequest: + description: Request for attaching security findings to a Linear issue. + properties: + data: + $ref: "#/components/schemas/AttachLinearIssueRequestData" + required: + - data + type: object + AttachLinearIssueRequestData: + description: Data of the Linear issue to attach security findings to. + properties: + attributes: + $ref: "#/components/schemas/AttachLinearIssueRequestDataAttributes" + relationships: + $ref: "#/components/schemas/AttachLinearIssueRequestDataRelationships" + type: + $ref: "#/components/schemas/LinearIssuesDataType" + required: + - attributes + - relationships + - type + type: object + AttachLinearIssueRequestDataAttributes: + description: Attributes of the Linear issue to attach security findings to. + properties: + linear_issue_url: + description: URL of the Linear issue to attach security findings to. + example: "https://linear.app/your-workspace/issue/ENG-123" + type: string + required: + - linear_issue_url + type: object + AttachLinearIssueRequestDataRelationships: + description: Relationships of the Linear issue to attach security findings to. + properties: + findings: + $ref: "#/components/schemas/Findings" + description: Security findings to attach to the Linear issue. + project: + $ref: "#/components/schemas/CaseManagementProject" + description: Case management project with the Linear integration configured. It is used to attach security findings to the Linear issue. + required: + - findings + - project + type: object AttachServiceNowTicketRequest: description: Request for attaching security findings to a ServiceNow ticket. properties: @@ -23958,6 +24003,74 @@ components: - findings - project type: object + CreateLinearIssueRequestArray: + description: List of requests to create Linear issues for security findings. + properties: + data: + description: Array of Linear issue creation request data objects. + items: + $ref: "#/components/schemas/CreateLinearIssueRequestData" + type: array + required: + - data + type: object + CreateLinearIssueRequestData: + description: Data of the Linear issue to create. + properties: + attributes: + $ref: "#/components/schemas/CreateLinearIssueRequestDataAttributes" + relationships: + $ref: "#/components/schemas/CreateLinearIssueRequestDataRelationships" + type: + $ref: "#/components/schemas/LinearIssuesDataType" + required: + - type + type: object + CreateLinearIssueRequestDataAttributes: + description: Attributes of the Linear issue to create. + properties: + assignee_id: + description: Unique identifier of the Datadog user assigned to the Linear issue. + example: "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0" + type: string + description: + description: Description of the Linear issue. If not provided, the description will be automatically generated. + example: "A description of the Linear issue." + type: string + label_ids: + description: Linear label IDs to set on the created issue. + example: + - "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d" + items: + description: A Linear label ID. + type: string + type: array + linear_project_id: + description: Unique identifier of the Linear project to pin the issue to. If not provided, the issue is not associated with a Linear project. + example: "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d" + type: string + priority: + $ref: "#/components/schemas/CasePriority" + description: Datadog case priority mapped to the Linear issue priority. If not provided, the priority will be automatically set to "NOT_DEFINED". + example: "P4" + title: + description: Title of the Linear issue. If not provided, the title will be automatically generated. + example: "A title for the Linear issue." + type: string + type: object + CreateLinearIssueRequestDataRelationships: + description: Relationships of the Linear issue to create. + properties: + findings: + $ref: "#/components/schemas/Findings" + description: Security findings to create a Linear issue for. + project: + $ref: "#/components/schemas/CaseManagementProject" + description: Case management project configured with the Linear integration. It is used to create the Linear issue. + required: + - findings + - project + type: object CreateMaintenanceRequest: description: Request object for creating a maintenance. example: @@ -36878,6 +36991,9 @@ components: description: Key of the case. example: "PROJ-123" type: string + linear_issue: + $ref: "#/components/schemas/FindingLinearIssue" + description: Linear issue associated with the case. modified_at: description: Timestamp of when the case was last modified. example: "2025-01-01T00:00:00.000Z" @@ -37010,6 +37126,44 @@ components: example: "https://domain.atlassian.net/browse/PROJ-123" type: string type: object + FindingLinearIssue: + description: Linear issue associated with the case. + properties: + error_message: + description: Error message if the Linear issue creation failed. + example: "Linear issue creation failed." + type: string + result: + $ref: "#/components/schemas/FindingLinearIssueResult" + status: + description: Status of the Linear issue creation. Can be "COMPLETED" if the Linear issue was created successfully, or "FAILED" if the Linear issue creation failed. + example: "COMPLETED" + type: string + type: object + FindingLinearIssueResult: + description: Result of the Linear issue creation. + properties: + account_id: + description: Account ID of the Linear workspace. + example: "463a8631-680e-455c-bfd3-3ed04d326eb7" + type: string + issue_id: + description: Unique identifier of the Linear issue. + example: "9c1e5f8a-2b3d-4c7e-8f6a-1d2e3f4a5b6c" + type: string + issue_key: + description: Key of the Linear issue. + example: "ENG-123" + type: string + team_id: + description: Team ID of the Linear issue. + example: "b5d3c8a1-7e6f-4d2c-9a8b-3c4d5e6f7a8b" + type: string + url: + description: URL of the Linear issue. + example: "https://linear.app/your-workspace/issue/ENG-123" + type: string + type: object FindingMute: additionalProperties: false description: Information about the mute status of this finding. @@ -56335,6 +56489,15 @@ components: type: string x-enum-varnames: - LICENSEREQUEST + LinearIssuesDataType: + default: linear_issues + description: Linear issues resource type. + enum: + - linear_issues + example: linear_issues + type: string + x-enum-varnames: + - LINEAR_ISSUES Links: description: The JSON:API links related to pagination. properties: @@ -173712,6 +173875,153 @@ paths: permissions: - security_monitoring_findings_write - appsec_vm_write + /api/v2/security/findings/linear_issues: + patch: + description: >- + Attach security findings to a Linear issue by providing the Linear issue URL. + + You can attach up to 50 security findings per Linear issue. If the Linear issue is not linked to any case, this operation will create a case for the security findings and link the Linear issue to the newly created case. Security findings that are already attached to another Linear issue will be detached from their previous Linear issue and attached to the specified Linear issue. + operationId: AttachLinearIssue + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + linear_issue_url: https://linear.app/your-workspace/issue/ENG-123 + relationships: + findings: + data: + - id: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw== + type: findings + project: + data: + id: aeadc05e-98a8-11ec-ac2c-da7ad0900001 + type: projects + type: linear_issues + schema: + $ref: "#/components/schemas/AttachLinearIssueRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00+00:00" + description: A description of the Linear issue. + modified_at: "2024-01-01T00:00:00+00:00" + priority: P4 + status: OPEN + title: A title for the Linear issue. + id: 00000000-0000-0000-0000-000000000008 + type: cases + schema: + $ref: "#/components/schemas/FindingCaseResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Attach security findings to a Linear issue + tags: + - "Security Monitoring" + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_findings_write + - appsec_vm_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: >- + Create Linear issues for security findings. + + This operation creates a case in Datadog and a Linear issue linked to that case for bidirectional sync between Datadog and Linear. You can create up to 50 Linear issues per request and associate up to 50 security findings per Linear issue. Security findings that are already attached to another Linear issue will be detached from their previous Linear issue and attached to the newly created Linear issue. + operationId: CreateLinearIssues + requestBody: + content: + application/json: + examples: + default: + value: + data: + - attributes: + assignee_id: f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0 + description: A description of the Linear issue. + label_ids: + - a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d + linear_project_id: d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d + priority: NOT_DEFINED + title: A title for the Linear issue. + relationships: + findings: + data: + - id: ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw== + type: findings + project: + data: + id: aeadc05e-98a8-11ec-ac2c-da7ad0900001 + type: projects + type: linear_issues + schema: + $ref: "#/components/schemas/CreateLinearIssueRequestArray" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-01T00:00:00+00:00" + description: A description of the Linear issue. + modified_at: "2024-01-01T00:00:00+00:00" + priority: P4 + status: OPEN + title: A title for the Linear issue. + id: 00000000-0000-0000-0000-000000000007 + type: cases + schema: + $ref: "#/components/schemas/FindingCaseResponseArray" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: [] + summary: Create Linear issues for security findings + tags: + - "Security Monitoring" + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - security_monitoring_findings_write + - appsec_vm_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security/findings/mute: patch: description: >- diff --git a/examples/v2/security-monitoring/AttachLinearIssue.rb b/examples/v2/security-monitoring/AttachLinearIssue.rb new file mode 100644 index 000000000000..949a6ca643f8 --- /dev/null +++ b/examples/v2/security-monitoring/AttachLinearIssue.rb @@ -0,0 +1,33 @@ +# Attach security findings to a Linear issue returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.attach_linear_issue".to_sym] = true +end +api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new + +body = DatadogAPIClient::V2::AttachLinearIssueRequest.new({ + data: DatadogAPIClient::V2::AttachLinearIssueRequestData.new({ + attributes: DatadogAPIClient::V2::AttachLinearIssueRequestDataAttributes.new({ + linear_issue_url: "https://linear.app/your-workspace/issue/ENG-123", + }), + relationships: DatadogAPIClient::V2::AttachLinearIssueRequestDataRelationships.new({ + findings: DatadogAPIClient::V2::Findings.new({ + data: [ + DatadogAPIClient::V2::FindingData.new({ + id: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", + type: DatadogAPIClient::V2::FindingDataType::FINDINGS, + }), + ], + }), + project: DatadogAPIClient::V2::CaseManagementProject.new({ + data: DatadogAPIClient::V2::CaseManagementProjectData.new({ + id: "aeadc05e-98a8-11ec-ac2c-da7ad0900001", + type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, + }), + }), + }), + type: DatadogAPIClient::V2::LinearIssuesDataType::LINEAR_ISSUES, + }), +}) +p api_instance.attach_linear_issue(body) diff --git a/examples/v2/security-monitoring/CreateLinearIssues.rb b/examples/v2/security-monitoring/CreateLinearIssues.rb new file mode 100644 index 000000000000..40a8c59def4d --- /dev/null +++ b/examples/v2/security-monitoring/CreateLinearIssues.rb @@ -0,0 +1,42 @@ +# Create Linear issues for security findings returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_linear_issues".to_sym] = true +end +api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new + +body = DatadogAPIClient::V2::CreateLinearIssueRequestArray.new({ + data: [ + DatadogAPIClient::V2::CreateLinearIssueRequestData.new({ + attributes: DatadogAPIClient::V2::CreateLinearIssueRequestDataAttributes.new({ + assignee_id: "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", + description: "A description of the Linear issue.", + label_ids: [ + "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d", + ], + linear_project_id: "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d", + priority: DatadogAPIClient::V2::CasePriority::NOT_DEFINED, + title: "A title for the Linear issue.", + }), + relationships: DatadogAPIClient::V2::CreateLinearIssueRequestDataRelationships.new({ + findings: DatadogAPIClient::V2::Findings.new({ + data: [ + DatadogAPIClient::V2::FindingData.new({ + id: "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", + type: DatadogAPIClient::V2::FindingDataType::FINDINGS, + }), + ], + }), + project: DatadogAPIClient::V2::CaseManagementProject.new({ + data: DatadogAPIClient::V2::CaseManagementProjectData.new({ + id: "aeadc05e-98a8-11ec-ac2c-da7ad0900001", + type: DatadogAPIClient::V2::CaseManagementProjectDataType::PROJECTS, + }), + }), + }), + type: DatadogAPIClient::V2::LinearIssuesDataType::LINEAR_ISSUES, + }), + ], +}) +p api_instance.create_linear_issues(body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 045336f70c3d..392cb7bf5cc0 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -2124,6 +2124,12 @@ "v2.CreateJiraIssues" => { "body" => "CreateJiraIssueRequestArray", }, + "v2.AttachLinearIssue" => { + "body" => "AttachLinearIssueRequest", + }, + "v2.CreateLinearIssues" => { + "body" => "CreateLinearIssueRequestArray", + }, "v2.MuteSecurityFindings" => { "body" => "MuteFindingsRequest", }, diff --git a/features/v2/security_monitoring.feature b/features/v2/security_monitoring.feature index da7e67cad57d..17760225c5a0 100644 --- a/features/v2/security_monitoring.feature +++ b/features/v2/security_monitoring.feature @@ -111,6 +111,30 @@ Feature: Security Monitoring And the response "data.attributes.insights" has item with field "resource_id" with value "MTNjN2ZmYWMzMDIxYmU1ZDFiZDRjNWUwN2I1NzVmY2F-YTA3MzllMTUzNWM3NmEyZjdiNzEzOWM5YmViZTMzOGM=" And the response "data.attributes.jira_issue.result.issue_url" is equal to "https://datadoghq-sandbox-538.atlassian.net/browse/CSMSEC-105476" + @generated @skip @team:DataDog/k9-investigation + Scenario: Attach security findings to a Linear issue returns "Bad Request" response + Given operation "AttachLinearIssue" enabled + And new "AttachLinearIssue" request + And body with value {"data": {"attributes": {"linear_issue_url": "https://linear.app/your-workspace/issue/ENG-123"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-investigation + Scenario: Attach security findings to a Linear issue returns "Not Found" response + Given operation "AttachLinearIssue" enabled + And new "AttachLinearIssue" request + And body with value {"data": {"attributes": {"linear_issue_url": "https://linear.app/your-workspace/issue/ENG-123"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/k9-investigation + Scenario: Attach security findings to a Linear issue returns "OK" response + Given operation "AttachLinearIssue" enabled + And new "AttachLinearIssue" request + And body with value {"data": {"attributes": {"linear_issue_url": "https://linear.app/your-workspace/issue/ENG-123"}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/k9-investigation Scenario: Attach security findings to a ServiceNow ticket returns "Bad Request" response Given new "AttachServiceNowTicket" request @@ -527,6 +551,30 @@ Feature: Security Monitoring When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/k9-investigation + Scenario: Create Linear issues for security findings returns "Bad Request" response + Given operation "CreateLinearIssues" enabled + And new "CreateLinearIssues" request + And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Linear issue.", "label_ids": ["a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"], "linear_project_id": "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d", "priority": "NOT_DEFINED", "title": "A title for the Linear issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}]} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/k9-investigation + Scenario: Create Linear issues for security findings returns "Created" response + Given operation "CreateLinearIssues" enabled + And new "CreateLinearIssues" request + And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Linear issue.", "label_ids": ["a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"], "linear_project_id": "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d", "priority": "NOT_DEFINED", "title": "A title for the Linear issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}]} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/k9-investigation + Scenario: Create Linear issues for security findings returns "Not Found" response + Given operation "CreateLinearIssues" enabled + And new "CreateLinearIssues" request + And body with value {"data": [{"attributes": {"assignee_id": "f315bdaf-9ee7-4808-a9c1-99c15bf0f4d0", "description": "A description of the Linear issue.", "label_ids": ["a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"], "linear_project_id": "d4c3b2a1-6f5e-8b7a-0d9c-2f1e4a3b6c5d", "priority": "NOT_DEFINED", "title": "A title for the Linear issue."}, "relationships": {"findings": {"data": [{"id": "ZGVmLTAwcC1pZXJ-aS0wZjhjNjMyZDNmMzRlZTgzNw==", "type": "findings"}]}, "project": {"data": {"id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001", "type": "projects"}}}, "type": "linear_issues"}]} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/k9-investigation Scenario: Create ServiceNow tickets for security findings returns "Bad Request" response Given new "CreateServiceNowTickets" request diff --git a/features/v2/undo.json b/features/v2/undo.json index 37f5bce7a2c8..54671118bc40 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -7184,6 +7184,25 @@ "type": "unsafe" } }, + "AttachLinearIssue": { + "tag": "Security Monitoring", + "undo": { + "type": "idempotent" + } + }, + "CreateLinearIssues": { + "tag": "Security Monitoring", + "undo": { + "operationId": "DetachCase", + "parameters": [ + { + "name": "body", + "template": "{\n \"data\": {\n \"type\": \"cases\",\n \"relationships\": {\n \"findings\": {\n \"data\": [\n {\n \"type\": \"findings\",\n \"id\": \"{{data[0].attributes.insights[0].resource_id}}\"\n }\n ]\n }\n }\n }\n}" + } + ], + "type": "unsafe" + } + }, "MuteSecurityFindings": { "tag": "Security Monitoring", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 0c247f9a57bc..e962893abe58 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -337,6 +337,7 @@ def initialize "v2.get_aws_cloud_auth_persona_mapping": false, "v2.list_aws_cloud_auth_persona_mappings": false, "v2.activate_content_pack": false, + "v2.attach_linear_issue": false, "v2.batch_get_security_monitoring_dataset_dependencies": false, "v2.bulk_create_sample_log_generation_subscriptions": false, "v2.bulk_export_security_monitoring_terraform_resources": false, @@ -344,6 +345,7 @@ def initialize "v2.convert_job_result_to_signal": false, "v2.convert_security_monitoring_terraform_resource": false, "v2.create_io_c_triage_state": false, + "v2.create_linear_issues": false, "v2.create_sample_log_generation_subscription": false, "v2.create_security_findings_automation_due_date_rule": false, "v2.create_security_findings_automation_mute_rule": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index b5448a033d8c..64fc6b61f4c9 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -1516,6 +1516,10 @@ def overrides "v2.attach_jira_issue_request_data" => "AttachJiraIssueRequestData", "v2.attach_jira_issue_request_data_attributes" => "AttachJiraIssueRequestDataAttributes", "v2.attach_jira_issue_request_data_relationships" => "AttachJiraIssueRequestDataRelationships", + "v2.attach_linear_issue_request" => "AttachLinearIssueRequest", + "v2.attach_linear_issue_request_data" => "AttachLinearIssueRequestData", + "v2.attach_linear_issue_request_data_attributes" => "AttachLinearIssueRequestDataAttributes", + "v2.attach_linear_issue_request_data_relationships" => "AttachLinearIssueRequestDataRelationships", "v2.attachment" => "Attachment", "v2.attachment_array" => "AttachmentArray", "v2.attachment_data" => "AttachmentData", @@ -2439,6 +2443,10 @@ def overrides "v2.create_jira_issue_request_data" => "CreateJiraIssueRequestData", "v2.create_jira_issue_request_data_attributes" => "CreateJiraIssueRequestDataAttributes", "v2.create_jira_issue_request_data_relationships" => "CreateJiraIssueRequestDataRelationships", + "v2.create_linear_issue_request_array" => "CreateLinearIssueRequestArray", + "v2.create_linear_issue_request_data" => "CreateLinearIssueRequestData", + "v2.create_linear_issue_request_data_attributes" => "CreateLinearIssueRequestDataAttributes", + "v2.create_linear_issue_request_data_relationships" => "CreateLinearIssueRequestDataRelationships", "v2.create_maintenance_request" => "CreateMaintenanceRequest", "v2.create_maintenance_request_data" => "CreateMaintenanceRequestData", "v2.create_maintenance_request_data_attributes" => "CreateMaintenanceRequestDataAttributes", @@ -3250,6 +3258,8 @@ def overrides "v2.finding_evaluation" => "FindingEvaluation", "v2.finding_jira_issue" => "FindingJiraIssue", "v2.finding_jira_issue_result" => "FindingJiraIssueResult", + "v2.finding_linear_issue" => "FindingLinearIssue", + "v2.finding_linear_issue_result" => "FindingLinearIssueResult", "v2.finding_mute" => "FindingMute", "v2.finding_mute_reason" => "FindingMuteReason", "v2.finding_rule" => "FindingRule", @@ -4048,6 +4058,7 @@ def overrides "v2.licenses_list_response_data_attributes" => "LicensesListResponseDataAttributes", "v2.licenses_list_response_data_attributes_licenses_items" => "LicensesListResponseDataAttributesLicensesItems", "v2.licenses_list_response_data_type" => "LicensesListResponseDataType", + "v2.linear_issues_data_type" => "LinearIssuesDataType", "v2.links" => "Links", "v2.list_allocations_response" => "ListAllocationsResponse", "v2.list_apis_response" => "ListAPIsResponse", diff --git a/lib/datadog_api_client/v2/api/security_monitoring_api.rb b/lib/datadog_api_client/v2/api/security_monitoring_api.rb index 020516777fdf..9751fcbb908b 100644 --- a/lib/datadog_api_client/v2/api/security_monitoring_api.rb +++ b/lib/datadog_api_client/v2/api/security_monitoring_api.rb @@ -237,6 +237,80 @@ def attach_jira_issue_with_http_info(body, opts = {}) return data, status_code, headers end + # Attach security findings to a Linear issue. + # + # @see #attach_linear_issue_with_http_info + def attach_linear_issue(body, opts = {}) + data, _status_code, _headers = attach_linear_issue_with_http_info(body, opts) + data + end + + # Attach security findings to a Linear issue. + # + # Attach security findings to a Linear issue by providing the Linear issue URL. + # You can attach up to 50 security findings per Linear issue. If the Linear issue is not linked to any case, this operation will create a case for the security findings and link the Linear issue to the newly created case. Security findings that are already attached to another Linear issue will be detached from their previous Linear issue and attached to the specified Linear issue. + # + # @param body [AttachLinearIssueRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(FindingCaseResponse, Integer, Hash)>] FindingCaseResponse data, response status code and response headers + def attach_linear_issue_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.attach_linear_issue".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.attach_linear_issue") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.attach_linear_issue")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.attach_linear_issue ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling SecurityMonitoringAPI.attach_linear_issue" + end + # resource path + local_var_path = '/api/v2/security/findings/linear_issues' + + # 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] || 'FindingCaseResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :attach_linear_issue, + :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: SecurityMonitoringAPI#attach_linear_issue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Attach security findings to a ServiceNow ticket. # # @see #attach_service_now_ticket_with_http_info @@ -1607,6 +1681,80 @@ def create_jira_issues_with_http_info(body, opts = {}) return data, status_code, headers end + # Create Linear issues for security findings. + # + # @see #create_linear_issues_with_http_info + def create_linear_issues(body, opts = {}) + data, _status_code, _headers = create_linear_issues_with_http_info(body, opts) + data + end + + # Create Linear issues for security findings. + # + # Create Linear issues for security findings. + # This operation creates a case in Datadog and a Linear issue linked to that case for bidirectional sync between Datadog and Linear. You can create up to 50 Linear issues per request and associate up to 50 security findings per Linear issue. Security findings that are already attached to another Linear issue will be detached from their previous Linear issue and attached to the newly created Linear issue. + # + # @param body [CreateLinearIssueRequestArray] + # @param opts [Hash] the optional parameters + # @return [Array<(FindingCaseResponseArray, Integer, Hash)>] FindingCaseResponseArray data, response status code and response headers + def create_linear_issues_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_linear_issues".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_linear_issues") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_linear_issues")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SecurityMonitoringAPI.create_linear_issues ...' + 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 SecurityMonitoringAPI.create_linear_issues" + end + # resource path + local_var_path = '/api/v2/security/findings/linear_issues' + + # 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] || 'FindingCaseResponseArray' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :create_linear_issues, + :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: SecurityMonitoringAPI#create_linear_issues\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Subscribe to sample log generation. # # @see #create_sample_log_generation_subscription_with_http_info diff --git a/lib/datadog_api_client/v2/models/attach_linear_issue_request.rb b/lib/datadog_api_client/v2/models/attach_linear_issue_request.rb new file mode 100644 index 000000000000..727785db1cea --- /dev/null +++ b/lib/datadog_api_client/v2/models/attach_linear_issue_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request for attaching security findings to a Linear issue. + class AttachLinearIssueRequest + include BaseGenericModel + + # Data of the Linear issue to attach security findings to. + 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' => :'AttachLinearIssueRequestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AttachLinearIssueRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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/attach_linear_issue_request_data.rb b/lib/datadog_api_client/v2/models/attach_linear_issue_request_data.rb new file mode 100644 index 000000000000..32dc29369c9b --- /dev/null +++ b/lib/datadog_api_client/v2/models/attach_linear_issue_request_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data of the Linear issue to attach security findings to. + class AttachLinearIssueRequestData + include BaseGenericModel + + # Attributes of the Linear issue to attach security findings to. + attr_reader :attributes + + # Relationships of the Linear issue to attach security findings to. + attr_reader :relationships + + # Linear issues resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'AttachLinearIssueRequestDataAttributes', + :'relationships' => :'AttachLinearIssueRequestDataRelationships', + :'type' => :'LinearIssuesDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AttachLinearIssueRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @relationships.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 relationships [Object] Object to be assigned + # @!visibility private + def relationships=(relationships) + if relationships.nil? + fail ArgumentError, 'invalid value for "relationships", relationships cannot be nil.' + end + @relationships = relationships + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/attach_linear_issue_request_data_attributes.rb b/lib/datadog_api_client/v2/models/attach_linear_issue_request_data_attributes.rb new file mode 100644 index 000000000000..d39fd27dc77e --- /dev/null +++ b/lib/datadog_api_client/v2/models/attach_linear_issue_request_data_attributes.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of the Linear issue to attach security findings to. + class AttachLinearIssueRequestDataAttributes + include BaseGenericModel + + # URL of the Linear issue to attach security findings to. + attr_reader :linear_issue_url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'linear_issue_url' => :'linear_issue_url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'linear_issue_url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AttachLinearIssueRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'linear_issue_url') + self.linear_issue_url = attributes[:'linear_issue_url'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @linear_issue_url.nil? + true + end + + # Custom attribute writer method with validation + # @param linear_issue_url [Object] Object to be assigned + # @!visibility private + def linear_issue_url=(linear_issue_url) + if linear_issue_url.nil? + fail ArgumentError, 'invalid value for "linear_issue_url", linear_issue_url cannot be nil.' + end + @linear_issue_url = linear_issue_url + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + linear_issue_url == o.linear_issue_url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [linear_issue_url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/attach_linear_issue_request_data_relationships.rb b/lib/datadog_api_client/v2/models/attach_linear_issue_request_data_relationships.rb new file mode 100644 index 000000000000..9a99db54b70a --- /dev/null +++ b/lib/datadog_api_client/v2/models/attach_linear_issue_request_data_relationships.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 + # Relationships of the Linear issue to attach security findings to. + class AttachLinearIssueRequestDataRelationships + include BaseGenericModel + + # A list of security findings. + attr_reader :findings + + # Case management project. + attr_reader :project + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'findings' => :'findings', + :'project' => :'project' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'findings' => :'Findings', + :'project' => :'CaseManagementProject' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AttachLinearIssueRequestDataRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'findings') + self.findings = attributes[:'findings'] + end + + if attributes.key?(:'project') + self.project = attributes[:'project'] + 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 @findings.nil? + return false if @project.nil? + true + end + + # Custom attribute writer method with validation + # @param findings [Object] Object to be assigned + # @!visibility private + def findings=(findings) + if findings.nil? + fail ArgumentError, 'invalid value for "findings", findings cannot be nil.' + end + @findings = findings + end + + # Custom attribute writer method with validation + # @param project [Object] Object to be assigned + # @!visibility private + def project=(project) + if project.nil? + fail ArgumentError, 'invalid value for "project", project cannot be nil.' + end + @project = project + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + findings == o.findings && + project == o.project && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [findings, project, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_linear_issue_request_array.rb b/lib/datadog_api_client/v2/models/create_linear_issue_request_array.rb new file mode 100644 index 000000000000..f5152040796e --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_linear_issue_request_array.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 + # List of requests to create Linear issues for security findings. + class CreateLinearIssueRequestArray + include BaseGenericModel + + # Array of Linear issue creation request data objects. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateLinearIssueRequestArray` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_linear_issue_request_data.rb b/lib/datadog_api_client/v2/models/create_linear_issue_request_data.rb new file mode 100644 index 000000000000..568554c5d068 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_linear_issue_request_data.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data of the Linear issue to create. + class CreateLinearIssueRequestData + include BaseGenericModel + + # Attributes of the Linear issue to create. + attr_accessor :attributes + + # Relationships of the Linear issue to create. + attr_accessor :relationships + + # Linear issues resource type. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'CreateLinearIssueRequestDataAttributes', + :'relationships' => :'CreateLinearIssueRequestDataRelationships', + :'type' => :'LinearIssuesDataType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateLinearIssueRequestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @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 && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_linear_issue_request_data_attributes.rb b/lib/datadog_api_client/v2/models/create_linear_issue_request_data_attributes.rb new file mode 100644 index 000000000000..3acce9c7bb01 --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_linear_issue_request_data_attributes.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 + # Attributes of the Linear issue to create. + class CreateLinearIssueRequestDataAttributes + include BaseGenericModel + + # Unique identifier of the Datadog user assigned to the Linear issue. + attr_accessor :assignee_id + + # Description of the Linear issue. If not provided, the description will be automatically generated. + attr_accessor :description + + # Linear label IDs to set on the created issue. + attr_accessor :label_ids + + # Unique identifier of the Linear project to pin the issue to. If not provided, the issue is not associated with a Linear project. + attr_accessor :linear_project_id + + # Case priority + attr_accessor :priority + + # Title of the Linear issue. If not provided, the title will be automatically generated. + attr_accessor :title + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'assignee_id' => :'assignee_id', + :'description' => :'description', + :'label_ids' => :'label_ids', + :'linear_project_id' => :'linear_project_id', + :'priority' => :'priority', + :'title' => :'title' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'assignee_id' => :'String', + :'description' => :'String', + :'label_ids' => :'Array', + :'linear_project_id' => :'String', + :'priority' => :'CasePriority', + :'title' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateLinearIssueRequestDataAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_id') + self.assignee_id = attributes[:'assignee_id'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'label_ids') + if (value = attributes[:'label_ids']).is_a?(Array) + self.label_ids = value + end + end + + if attributes.key?(:'linear_project_id') + self.linear_project_id = attributes[:'linear_project_id'] + end + + if attributes.key?(:'priority') + self.priority = attributes[:'priority'] + 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_id == o.assignee_id && + description == o.description && + label_ids == o.label_ids && + linear_project_id == o.linear_project_id && + priority == o.priority && + 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_id, description, label_ids, linear_project_id, priority, title, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/create_linear_issue_request_data_relationships.rb b/lib/datadog_api_client/v2/models/create_linear_issue_request_data_relationships.rb new file mode 100644 index 000000000000..8d3e1243828e --- /dev/null +++ b/lib/datadog_api_client/v2/models/create_linear_issue_request_data_relationships.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 + # Relationships of the Linear issue to create. + class CreateLinearIssueRequestDataRelationships + include BaseGenericModel + + # A list of security findings. + attr_reader :findings + + # Case management project. + attr_reader :project + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'findings' => :'findings', + :'project' => :'project' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'findings' => :'Findings', + :'project' => :'CaseManagementProject' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::CreateLinearIssueRequestDataRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'findings') + self.findings = attributes[:'findings'] + end + + if attributes.key?(:'project') + self.project = attributes[:'project'] + 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 @findings.nil? + return false if @project.nil? + true + end + + # Custom attribute writer method with validation + # @param findings [Object] Object to be assigned + # @!visibility private + def findings=(findings) + if findings.nil? + fail ArgumentError, 'invalid value for "findings", findings cannot be nil.' + end + @findings = findings + end + + # Custom attribute writer method with validation + # @param project [Object] Object to be assigned + # @!visibility private + def project=(project) + if project.nil? + fail ArgumentError, 'invalid value for "project", project cannot be nil.' + end + @project = project + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + findings == o.findings && + project == o.project && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [findings, project, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/finding_case_response_data_attributes.rb b/lib/datadog_api_client/v2/models/finding_case_response_data_attributes.rb index 6fcda4848d0b..983294c71e06 100644 --- a/lib/datadog_api_client/v2/models/finding_case_response_data_attributes.rb +++ b/lib/datadog_api_client/v2/models/finding_case_response_data_attributes.rb @@ -54,6 +54,9 @@ class FindingCaseResponseDataAttributes # Key of the case. attr_accessor :key + # Linear issue associated with the case. + attr_accessor :linear_issue + # Timestamp of when the case was last modified. attr_accessor :modified_at @@ -95,6 +98,7 @@ def self.attribute_map :'insights' => :'insights', :'jira_issue' => :'jira_issue', :'key' => :'key', + :'linear_issue' => :'linear_issue', :'modified_at' => :'modified_at', :'priority' => :'priority', :'servicenow_ticket' => :'servicenow_ticket', @@ -121,6 +125,7 @@ def self.openapi_types :'insights' => :'Array', :'jira_issue' => :'FindingJiraIssue', :'key' => :'String', + :'linear_issue' => :'FindingLinearIssue', :'modified_at' => :'Time', :'priority' => :'String', :'servicenow_ticket' => :'FindingServiceNowTicket', @@ -196,6 +201,10 @@ def initialize(attributes = {}) self.key = attributes[:'key'] end + if attributes.key?(:'linear_issue') + self.linear_issue = attributes[:'linear_issue'] + end + if attributes.key?(:'modified_at') self.modified_at = attributes[:'modified_at'] end @@ -266,6 +275,7 @@ def ==(o) insights == o.insights && jira_issue == o.jira_issue && key == o.key && + linear_issue == o.linear_issue && modified_at == o.modified_at && priority == o.priority && servicenow_ticket == o.servicenow_ticket && @@ -281,7 +291,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [archived_at, assigned_to, attributes, closed_at, created_at, creation_source, description, due_date, insights, jira_issue, key, modified_at, priority, servicenow_ticket, status, status_group, status_name, title, type, additional_properties].hash + [archived_at, assigned_to, attributes, closed_at, created_at, creation_source, description, due_date, insights, jira_issue, key, linear_issue, modified_at, priority, servicenow_ticket, status, status_group, status_name, title, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/finding_linear_issue.rb b/lib/datadog_api_client/v2/models/finding_linear_issue.rb new file mode 100644 index 000000000000..551a521294dd --- /dev/null +++ b/lib/datadog_api_client/v2/models/finding_linear_issue.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 + # Linear issue associated with the case. + class FindingLinearIssue + include BaseGenericModel + + # Error message if the Linear issue creation failed. + attr_accessor :error_message + + # Result of the Linear issue creation. + attr_accessor :result + + # Status of the Linear issue creation. Can be "COMPLETED" if the Linear issue was created successfully, or "FAILED" if the Linear issue creation failed. + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'error_message' => :'error_message', + :'result' => :'result', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'error_message' => :'String', + :'result' => :'FindingLinearIssueResult', + :'status' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FindingLinearIssue` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'result') + self.result = attributes[:'result'] + 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 && + error_message == o.error_message && + result == o.result && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [error_message, result, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/finding_linear_issue_result.rb b/lib/datadog_api_client/v2/models/finding_linear_issue_result.rb new file mode 100644 index 000000000000..c5b00c4876a5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/finding_linear_issue_result.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 + # Result of the Linear issue creation. + class FindingLinearIssueResult + include BaseGenericModel + + # Account ID of the Linear workspace. + attr_accessor :account_id + + # Unique identifier of the Linear issue. + attr_accessor :issue_id + + # Key of the Linear issue. + attr_accessor :issue_key + + # Team ID of the Linear issue. + attr_accessor :team_id + + # URL of the Linear issue. + attr_accessor :url + + 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_id' => :'issue_id', + :'issue_key' => :'issue_key', + :'team_id' => :'team_id', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_id' => :'String', + :'issue_id' => :'String', + :'issue_key' => :'String', + :'team_id' => :'String', + :'url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::FindingLinearIssueResult` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.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_id') + self.issue_id = attributes[:'issue_id'] + end + + if attributes.key?(:'issue_key') + self.issue_key = attributes[:'issue_key'] + end + + if attributes.key?(:'team_id') + self.team_id = attributes[:'team_id'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + 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_id == o.issue_id && + issue_key == o.issue_key && + team_id == o.team_id && + url == o.url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_id, issue_id, issue_key, team_id, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/linear_issues_data_type.rb b/lib/datadog_api_client/v2/models/linear_issues_data_type.rb new file mode 100644 index 000000000000..fbfcd72a56b3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/linear_issues_data_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Linear issues resource type. + class LinearIssuesDataType + include BaseEnumModel + + LINEAR_ISSUES = "linear_issues".freeze + end +end