From aed3611d922533951ef65eab8c67bed9863f148f Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 9 Feb 2026 15:58:46 +0000 Subject: [PATCH] Regenerate client from commit 6c91cfe of spec repo --- .generator/schemas/v2/openapi.yaml | 835 ++++++------------ docs/datadog_api_client.v2.api.rst | 7 + docs/datadog_api_client.v2.model.rst | 224 +++-- .../v2/case-management/CreateCaseJiraIssue.py | 28 - .../v2/case-management/CreateCaseNotebook.py | 21 - .../CreateCaseServiceNowTicket.py | 26 - examples/v2/case-management/LinkIncident.py | 24 - .../v2/case-management/LinkJiraIssueToCase.py | 25 - .../v2/case-management/MoveCaseToProject.py | 24 - .../v2/case-management/UnlinkJiraIssue.py | 14 - examples/v2/seats/AssignSeatsUserV2.py | 29 + examples/v2/seats/GetSeatsUsersV2.py | 15 + examples/v2/seats/UnassignSeatsUserV2.py | 29 + src/datadog_api_client/configuration.py | 7 - .../v2/api/case_management_api.py | 334 ------- src/datadog_api_client/v2/api/seats_api.py | 163 ++++ src/datadog_api_client/v2/apis/__init__.py | 2 + .../v2/model/assign_seats_user_request.py | 42 + .../model/assign_seats_user_request_data.py | 68 ++ ...sign_seats_user_request_data_attributes.py | 40 + .../v2/model/assign_seats_user_response.py | 42 + .../model/assign_seats_user_response_data.py | 68 ++ ...ign_seats_user_response_data_attributes.py | 45 + .../v2/model/incident_relationship_data.py | 46 - .../v2/model/incident_resource_type.py | 35 - .../v2/model/jira_issue_create_attributes.py | 81 -- .../v2/model/jira_issue_create_data.py | 48 - .../v2/model/jira_issue_create_request.py | 40 - .../v2/model/jira_issue_link_attributes.py | 33 - .../v2/model/jira_issue_link_data.py | 48 - .../v2/model/jira_issue_link_request.py | 40 - .../v2/model/notebook_create_data.py | 40 - .../v2/model/notebook_create_request.py | 40 - .../v2/model/notebook_resource_type.py | 35 - .../model/relationship_to_incident_request.py | 40 - ..._type.py => seat_assignments_data_type.py} | 12 +- .../v2/model/seat_user_data.py | 64 ++ .../v2/model/seat_user_data_array.py | 51 ++ .../v2/model/seat_user_data_attributes.py | 57 ++ ...esource_type.py => seat_user_data_type.py} | 12 +- .../v2/model/seat_user_meta.py | 56 ++ .../service_now_ticket_create_attributes.py | 43 - .../model/service_now_ticket_create_data.py | 48 - .../service_now_ticket_create_request.py | 40 - .../v2/model/unassign_seats_user_request.py | 42 + .../model/unassign_seats_user_request_data.py | 68 ++ ...sign_seats_user_request_data_attributes.py | 40 + src/datadog_api_client/v2/models/__init__.py | 66 +- tests/v2/features/case_management.feature | 195 ---- tests/v2/features/seats.feature | 72 ++ tests/v2/features/undo.json | 75 +- 51 files changed, 1458 insertions(+), 2121 deletions(-) delete mode 100644 examples/v2/case-management/CreateCaseJiraIssue.py delete mode 100644 examples/v2/case-management/CreateCaseNotebook.py delete mode 100644 examples/v2/case-management/CreateCaseServiceNowTicket.py delete mode 100644 examples/v2/case-management/LinkIncident.py delete mode 100644 examples/v2/case-management/LinkJiraIssueToCase.py delete mode 100644 examples/v2/case-management/MoveCaseToProject.py delete mode 100644 examples/v2/case-management/UnlinkJiraIssue.py create mode 100644 examples/v2/seats/AssignSeatsUserV2.py create mode 100644 examples/v2/seats/GetSeatsUsersV2.py create mode 100644 examples/v2/seats/UnassignSeatsUserV2.py create mode 100644 src/datadog_api_client/v2/api/seats_api.py create mode 100644 src/datadog_api_client/v2/model/assign_seats_user_request.py create mode 100644 src/datadog_api_client/v2/model/assign_seats_user_request_data.py create mode 100644 src/datadog_api_client/v2/model/assign_seats_user_request_data_attributes.py create mode 100644 src/datadog_api_client/v2/model/assign_seats_user_response.py create mode 100644 src/datadog_api_client/v2/model/assign_seats_user_response_data.py create mode 100644 src/datadog_api_client/v2/model/assign_seats_user_response_data_attributes.py delete mode 100644 src/datadog_api_client/v2/model/incident_relationship_data.py delete mode 100644 src/datadog_api_client/v2/model/incident_resource_type.py delete mode 100644 src/datadog_api_client/v2/model/jira_issue_create_attributes.py delete mode 100644 src/datadog_api_client/v2/model/jira_issue_create_data.py delete mode 100644 src/datadog_api_client/v2/model/jira_issue_create_request.py delete mode 100644 src/datadog_api_client/v2/model/jira_issue_link_attributes.py delete mode 100644 src/datadog_api_client/v2/model/jira_issue_link_data.py delete mode 100644 src/datadog_api_client/v2/model/jira_issue_link_request.py delete mode 100644 src/datadog_api_client/v2/model/notebook_create_data.py delete mode 100644 src/datadog_api_client/v2/model/notebook_create_request.py delete mode 100644 src/datadog_api_client/v2/model/notebook_resource_type.py delete mode 100644 src/datadog_api_client/v2/model/relationship_to_incident_request.py rename src/datadog_api_client/v2/model/{service_now_ticket_resource_type.py => seat_assignments_data_type.py} (61%) create mode 100644 src/datadog_api_client/v2/model/seat_user_data.py create mode 100644 src/datadog_api_client/v2/model/seat_user_data_array.py create mode 100644 src/datadog_api_client/v2/model/seat_user_data_attributes.py rename src/datadog_api_client/v2/model/{jira_issue_resource_type.py => seat_user_data_type.py} (66%) create mode 100644 src/datadog_api_client/v2/model/seat_user_meta.py delete mode 100644 src/datadog_api_client/v2/model/service_now_ticket_create_attributes.py delete mode 100644 src/datadog_api_client/v2/model/service_now_ticket_create_data.py delete mode 100644 src/datadog_api_client/v2/model/service_now_ticket_create_request.py create mode 100644 src/datadog_api_client/v2/model/unassign_seats_user_request.py create mode 100644 src/datadog_api_client/v2/model/unassign_seats_user_request_data.py create mode 100644 src/datadog_api_client/v2/model/unassign_seats_user_request_data_attributes.py create mode 100644 tests/v2/features/seats.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 181237b18f..83cabe9a91 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -5362,6 +5362,73 @@ components: example: _latest type: string type: object + AssignSeatsUserRequest: + properties: + data: + $ref: '#/components/schemas/AssignSeatsUserRequestData' + description: The data for the assign seats user request. + type: object + AssignSeatsUserRequestData: + properties: + attributes: + $ref: '#/components/schemas/AssignSeatsUserRequestDataAttributes' + description: The attributes of the assign seats user request. + id: + description: The ID of the assign seats user request. + type: string + type: + $ref: '#/components/schemas/SeatAssignmentsDataType' + description: The type of the assign seats user request. + required: + - type + type: object + AssignSeatsUserRequestDataAttributes: + properties: + product_code: + description: The product code for which to assign seats. + example: '' + type: string + user_uuids: + description: The list of user IDs to assign seats to. + example: + - '' + items: + type: string + type: array + required: + - product_code + - user_uuids + type: object + AssignSeatsUserResponse: + properties: + data: + $ref: '#/components/schemas/AssignSeatsUserResponseData' + description: The data for the assign seats user response. + type: object + AssignSeatsUserResponseData: + properties: + attributes: + $ref: '#/components/schemas/AssignSeatsUserResponseDataAttributes' + description: The attributes of the assign seats user response. + id: + description: The ID of the assign seats user response. + type: string + type: + $ref: '#/components/schemas/SeatAssignmentsDataType' + required: + - type + type: object + AssignSeatsUserResponseDataAttributes: + properties: + assigned_ids: + description: The list of user IDs to which the seats were assigned. + items: + type: string + type: array + product_code: + description: The product code for which the seats were assigned. + type: string + type: object AttachCaseRequest: description: Request for attaching security findings to a case. properties: @@ -29490,27 +29557,6 @@ components: x-enum-varnames: - USERS - ATTACHMENTS - IncidentRelationshipData: - description: Incident relationship data - properties: - id: - description: Incident identifier - example: 00000000-0000-0000-0000-000000000000 - type: string - type: - $ref: '#/components/schemas/IncidentResourceType' - required: - - type - - id - type: object - IncidentResourceType: - description: Incident resource type - enum: - - incidents - example: incidents - type: string - x-enum-varnames: - - INCIDENTS IncidentRespondersType: description: The incident responders type. enum: @@ -32410,87 +32456,6 @@ components: $ref: '#/components/schemas/Case3rdPartyTicketStatus' readOnly: true type: object - JiraIssueCreateAttributes: - description: Jira issue creation attributes - properties: - fields: - additionalProperties: {} - description: Additional Jira fields - example: {} - type: object - issue_type_id: - description: Jira issue type ID - example: '10001' - type: string - jira_account_id: - description: Jira account ID - example: '1234' - type: string - project_id: - description: Jira project ID - example: '5678' - type: string - required: - - jira_account_id - - project_id - - issue_type_id - type: object - JiraIssueCreateData: - description: Jira issue creation data - properties: - attributes: - $ref: '#/components/schemas/JiraIssueCreateAttributes' - type: - $ref: '#/components/schemas/JiraIssueResourceType' - required: - - type - - attributes - type: object - JiraIssueCreateRequest: - description: Jira issue creation request - properties: - data: - $ref: '#/components/schemas/JiraIssueCreateData' - required: - - data - type: object - JiraIssueLinkAttributes: - description: Jira issue link attributes - properties: - jira_issue_url: - description: URL of the Jira issue - example: https://jira.example.com/browse/PROJ-123 - type: string - required: - - jira_issue_url - type: object - JiraIssueLinkData: - description: Jira issue link data - properties: - attributes: - $ref: '#/components/schemas/JiraIssueLinkAttributes' - type: - $ref: '#/components/schemas/JiraIssueResourceType' - required: - - type - - attributes - type: object - JiraIssueLinkRequest: - description: Jira issue link request - properties: - data: - $ref: '#/components/schemas/JiraIssueLinkData' - required: - - data - type: object - JiraIssueResourceType: - description: Jira issue resource type - enum: - - issues - example: issues - type: string - x-enum-varnames: - - ISSUES JiraIssueResult: description: Jira issue information properties: @@ -37920,30 +37885,6 @@ components: meta: $ref: '#/components/schemas/MonthlyCostAttributionMeta' type: object - NotebookCreateData: - description: Notebook creation data - properties: - type: - $ref: '#/components/schemas/NotebookResourceType' - required: - - type - type: object - NotebookCreateRequest: - description: Notebook creation request - properties: - data: - $ref: '#/components/schemas/NotebookCreateData' - required: - - data - type: object - NotebookResourceType: - description: Notebook resource type - enum: - - notebook - example: notebook - type: string - x-enum-varnames: - - NOTEBOOK NotebookTriggerWrapper: description: Schema for a Notebook-based trigger. properties: @@ -48006,14 +47947,6 @@ components: - id - type type: object - RelationshipToIncidentRequest: - description: Relationship to incident request - properties: - data: - $ref: '#/components/schemas/IncidentRelationshipData' - required: - - data - type: object RelationshipToIncidentResponderData: description: Relationship to impact object. properties: @@ -52255,6 +52188,76 @@ components: - ISSUE_ASSIGNEE - ISSUE_CASE - ISSUE_TEAM_OWNERS + SeatAssignmentsDataType: + default: seat-assignments + description: Seat assignments resource type. + enum: + - seat-assignments + example: seat-assignments + type: string + x-enum-varnames: + - SEAT_ASSIGNMENTS + SeatUserData: + properties: + attributes: + $ref: '#/components/schemas/SeatUserDataAttributes' + description: The attributes of the seat user. + id: + description: The ID of the seat user. + type: string + type: + $ref: '#/components/schemas/SeatUserDataType' + required: + - type + type: object + SeatUserDataArray: + properties: + data: + description: The list of seat users. + items: + $ref: '#/components/schemas/SeatUserData' + type: array + meta: + $ref: '#/components/schemas/SeatUserMeta' + description: The metadata of the seat users. + required: + - data + type: object + SeatUserDataAttributes: + properties: + assigned_at: + description: The date and time the seat was assigned. + format: date-time + type: string + email: + description: The email of the user. + type: string + name: + description: The name of the user. + type: string + type: object + SeatUserDataType: + default: seat-users + description: Seat users resource type. + enum: + - seat-users + example: seat-users + type: string + x-enum-varnames: + - SEAT_USERS + SeatUserMeta: + properties: + cursor: + description: The cursor for the seat users. + type: string + limit: + description: The limit for the seat users. + format: int64 + type: integer + next_cursor: + description: The next cursor for the seat users. + type: string + type: object SecretRuleArray: properties: data: @@ -58222,47 +58225,6 @@ components: $ref: '#/components/schemas/Case3rdPartyTicketStatus' readOnly: true type: object - ServiceNowTicketCreateAttributes: - description: ServiceNow ticket creation attributes - properties: - assignment_group: - description: ServiceNow assignment group - example: IT Support - type: string - instance_name: - description: ServiceNow instance name - example: my-instance - type: string - required: - - instance_name - type: object - ServiceNowTicketCreateData: - description: ServiceNow ticket creation data - properties: - attributes: - $ref: '#/components/schemas/ServiceNowTicketCreateAttributes' - type: - $ref: '#/components/schemas/ServiceNowTicketResourceType' - required: - - type - - attributes - type: object - ServiceNowTicketCreateRequest: - description: ServiceNow ticket creation request - properties: - data: - $ref: '#/components/schemas/ServiceNowTicketCreateData' - required: - - data - type: object - ServiceNowTicketResourceType: - description: ServiceNow ticket resource type - enum: - - tickets - example: tickets - type: string - x-enum-varnames: - - TICKETS ServiceNowTicketResult: description: ServiceNow ticket information properties: @@ -64399,6 +64361,43 @@ components: type: string x-enum-varnames: - AZURE_UC_CONFIGS + UnassignSeatsUserRequest: + properties: + data: + $ref: '#/components/schemas/UnassignSeatsUserRequestData' + description: The data for the unassign seats user request. + type: object + UnassignSeatsUserRequestData: + properties: + attributes: + $ref: '#/components/schemas/UnassignSeatsUserRequestDataAttributes' + description: The attributes of the unassign seats user request. + id: + description: The ID of the unassign seats user request. + type: string + type: + $ref: '#/components/schemas/SeatAssignmentsDataType' + description: The type of the unassign seats user request. + required: + - type + type: object + UnassignSeatsUserRequestDataAttributes: + properties: + product_code: + description: The product code for which to unassign seats. + example: '' + type: string + user_uuids: + description: The list of user IDs to unassign seats from. + example: + - '' + items: + type: string + type: array + required: + - product_code + - user_uuids + type: object Unit: description: Object containing the metric unit family, scale factor, name, and short name. @@ -72717,382 +72716,6 @@ paths: summary: Update case priority tags: - Case Management - /api/v2/cases/{case_id}/relationships/incidents: - post: - description: Link an incident to a case - operationId: LinkIncident - parameters: - - $ref: '#/components/parameters/CaseIDPathParameter' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/RelationshipToIncidentRequest' - description: Incident link request - required: true - responses: - '201': - content: - application/json: - schema: - $ref: '#/components/schemas/CaseResponse' - description: Created - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Bad Request - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Link incident to case - tags: - - Case Management - 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/cases/{case_id}/relationships/jira_issues: - delete: - description: Remove the link between a Jira issue and a case - operationId: UnlinkJiraIssue - parameters: - - $ref: '#/components/parameters/CaseIDPathParameter' - responses: - '204': - description: No Content - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Bad Request - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Remove Jira issue link from case - tags: - - Case Management - x-unstable: '**Note**: This endpoint is in preview and is subject to change. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' - patch: - description: Link an existing Jira issue to a case - operationId: LinkJiraIssueToCase - parameters: - - $ref: '#/components/parameters/CaseIDPathParameter' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/JiraIssueLinkRequest' - description: Jira issue link request - required: true - responses: - '204': - description: No Content - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Bad Request - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Not Found - '409': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Conflict - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Link existing Jira issue to case - tags: - - Case Management - x-unstable: '**Note**: This endpoint is in preview and is subject to change. - - If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' - post: - description: Create a new Jira issue and link it to a case - operationId: CreateCaseJiraIssue - parameters: - - $ref: '#/components/parameters/CaseIDPathParameter' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/JiraIssueCreateRequest' - description: Jira issue creation request - required: true - responses: - '202': - description: Accepted - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Bad Request - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Create Jira issue for case - tags: - - Case Management - 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/cases/{case_id}/relationships/notebook: - post: - description: Create a new investigation notebook and link it to a case - operationId: CreateCaseNotebook - parameters: - - $ref: '#/components/parameters/CaseIDPathParameter' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NotebookCreateRequest' - description: Notebook creation request - required: true - responses: - '204': - description: No Content - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Bad Request - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Create investigation notebook for case - tags: - - Case Management - 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/cases/{case_id}/relationships/project: - patch: - description: Update the project associated with a case - operationId: MoveCaseToProject - parameters: - - $ref: '#/components/parameters/CaseIDPathParameter' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectRelationship' - description: Project update request - required: true - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/CaseResponse' - description: OK - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Bad Request - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Update case project - tags: - - Case Management - 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/cases/{case_id}/relationships/servicenow_tickets: - post: - description: Create a new ServiceNow incident ticket and link it to a case - operationId: CreateCaseServiceNowTicket - parameters: - - $ref: '#/components/parameters/CaseIDPathParameter' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ServiceNowTicketCreateRequest' - description: ServiceNow ticket creation request - required: true - responses: - '202': - description: Accepted - '400': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Bad Request - '401': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Unauthorized - '403': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Forbidden - '404': - content: - application/json: - schema: - $ref: '#/components/schemas/JSONAPIErrorResponse' - description: Not Found - '429': - $ref: '#/components/responses/TooManyRequestsResponse' - security: - - apiKeyAuth: [] - appKeyAuth: [] - - AuthZ: - - cases_write - summary: Create ServiceNow ticket for case - tags: - - Case Management - 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/cases/{case_id}/status: post: description: Update case status @@ -92716,6 +92339,113 @@ paths: x-unstable: '**Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/seats/users: + delete: + description: Unassign seats from users for a product code. + operationId: UnassignSeatsUserV2 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UnassignSeatsUserRequest' + required: true + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/BadRequestResponse' + '422': + description: Unprocessable Entity + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + description: Internal Server Error + summary: Unassign seats from users + tags: + - Seats + x-permission: + operator: OR + permissions: + - billing_edit + - incident_write + - on_call_write + get: + description: Get the list of seats users assigned to a product code. + operationId: GetSeatsUsersV2 + parameters: + - description: The product code for which to retrieve seat users. + in: query + name: product_code + required: true + schema: + type: string + - description: Maximum number of results to return. + in: query + name: page[limit] + schema: + type: integer + - description: Cursor for pagination. + in: query + name: page[cursor] + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SeatUserDataArray' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '422': + description: Unprocessable Entity + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + description: Internal Server Error + summary: Get seats users + tags: + - Seats + x-permission: + operator: OR + permissions: + - billing_read + - incident_read + - on_call_read + post: + description: Assign seats to users for a product code. + operationId: AssignSeatsUserV2 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AssignSeatsUserRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/AssignSeatsUserResponse' + description: Created + '400': + $ref: '#/components/responses/BadRequestResponse' + '422': + description: Unprocessable Entity + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + description: Internal Server Error + summary: Assign seats to users + tags: + - Seats + x-permission: + operator: OR + permissions: + - billing_edit + - incident_write + - on_call_write /api/v2/security-entities/risk-scores: get: description: Get a list of entity risk scores for your organization. Entity @@ -103849,6 +103579,9 @@ tags: - description: Manage retention filters through [Manage Applications](https://app.datadoghq.com/rum/list) of RUM for your organization. name: Rum Retention Filters +- description: The seats API allows you to view, assign, and unassign seats for your + organization. + name: Seats - description: Create and manage your security rules, signals, filters, and more. See the [Datadog Security page](https://docs.datadoghq.com/security/) for more information. diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 44f19cd202..1f725c357e 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -543,6 +543,13 @@ datadog\_api\_client.v2.api.rum\_retention\_filters\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.seats\_api module +--------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.seats_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.security\_monitoring\_api module ------------------------------------------------------------ diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index a359f6c443..537a25bfc1 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -1250,6 +1250,48 @@ datadog\_api\_client.v2.model.asset\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.assign\_seats\_user\_request module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.assign_seats_user_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.assign\_seats\_user\_request\_data module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.assign_seats_user_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.assign\_seats\_user\_request\_data\_attributes module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.assign_seats_user_request_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.assign\_seats\_user\_response module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.assign_seats_user_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.assign\_seats\_user\_response\_data module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.assign_seats_user_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.assign\_seats\_user\_response\_data\_attributes module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.assign_seats_user_response_data_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.attach\_case\_request module ---------------------------------------------------------- @@ -12471,20 +12513,6 @@ datadog\_api\_client.v2.model.incident\_related\_object module :members: :show-inheritance: -datadog\_api\_client.v2.model.incident\_relationship\_data module ------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.incident_relationship_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.incident\_resource\_type module -------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.incident_resource_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.incident\_responders\_type module --------------------------------------------------------------- @@ -13829,55 +13857,6 @@ datadog\_api\_client.v2.model.jira\_issue module :members: :show-inheritance: -datadog\_api\_client.v2.model.jira\_issue\_create\_attributes module --------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.jira_issue_create_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.jira\_issue\_create\_data module --------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.jira_issue_create_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.jira\_issue\_create\_request module ------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.jira_issue_create_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.jira\_issue\_link\_attributes module ------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.jira_issue_link_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.jira\_issue\_link\_data module ------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.jira_issue_link_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.jira\_issue\_link\_request module ---------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.jira_issue_link_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.jira\_issue\_resource\_type module ----------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.jira_issue_resource_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.jira\_issue\_result module -------------------------------------------------------- @@ -16524,27 +16503,6 @@ datadog\_api\_client.v2.model.ms\_teams\_integration\_metadata\_teams\_item modu :members: :show-inheritance: -datadog\_api\_client.v2.model.notebook\_create\_data module ------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.notebook_create_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notebook\_create\_request module --------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notebook_create_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.notebook\_resource\_type module -------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.notebook_resource_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.notebook\_trigger\_wrapper module --------------------------------------------------------------- @@ -20647,13 +20605,6 @@ datadog\_api\_client.v2.model.relationship\_to\_incident\_postmortem\_data modul :members: :show-inheritance: -datadog\_api\_client.v2.model.relationship\_to\_incident\_request module ------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.relationship_to_incident_request - :members: - :show-inheritance: - datadog\_api\_client.v2.model.relationship\_to\_incident\_responder\_data module -------------------------------------------------------------------------------- @@ -23104,6 +23055,48 @@ datadog\_api\_client.v2.model.search\_issues\_include\_query\_parameter\_item mo :members: :show-inheritance: +datadog\_api\_client.v2.model.seat\_assignments\_data\_type module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.seat_assignments_data_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.seat\_user\_data module +----------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.seat_user_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.seat\_user\_data\_array module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.seat_user_data_array + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.seat\_user\_data\_attributes module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.seat_user_data_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.seat\_user\_data\_type module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.seat_user_data_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.seat\_user\_meta module +----------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.seat_user_meta + :members: + :show-inheritance: + datadog\_api\_client.v2.model.secret\_rule\_array module -------------------------------------------------------- @@ -25456,34 +25449,6 @@ datadog\_api\_client.v2.model.service\_now\_ticket module :members: :show-inheritance: -datadog\_api\_client.v2.model.service\_now\_ticket\_create\_attributes module ------------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.service_now_ticket_create_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.service\_now\_ticket\_create\_data module ------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.service_now_ticket_create_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.service\_now\_ticket\_create\_request module --------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.service_now_ticket_create_request - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.service\_now\_ticket\_resource\_type module -------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.service_now_ticket_resource_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.service\_now\_ticket\_result module ----------------------------------------------------------------- @@ -28396,6 +28361,27 @@ datadog\_api\_client.v2.model.uc\_config\_pair\_data\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.unassign\_seats\_user\_request module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.unassign_seats_user_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.unassign\_seats\_user\_request\_data module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.unassign_seats_user_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.unassign\_seats\_user\_request\_data\_attributes module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.unassign_seats_user_request_data_attributes + :members: + :show-inheritance: + datadog\_api\_client.v2.model.unit module ----------------------------------------- diff --git a/examples/v2/case-management/CreateCaseJiraIssue.py b/examples/v2/case-management/CreateCaseJiraIssue.py deleted file mode 100644 index d795fad647..0000000000 --- a/examples/v2/case-management/CreateCaseJiraIssue.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -Create Jira issue for case returns "Accepted" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.case_management_api import CaseManagementApi -from datadog_api_client.v2.model.jira_issue_create_attributes import JiraIssueCreateAttributes -from datadog_api_client.v2.model.jira_issue_create_data import JiraIssueCreateData -from datadog_api_client.v2.model.jira_issue_create_request import JiraIssueCreateRequest -from datadog_api_client.v2.model.jira_issue_resource_type import JiraIssueResourceType - -body = JiraIssueCreateRequest( - data=JiraIssueCreateData( - attributes=JiraIssueCreateAttributes( - fields=dict(), - issue_type_id="10001", - jira_account_id="1234", - project_id="5678", - ), - type=JiraIssueResourceType.ISSUES, - ), -) - -configuration = Configuration() -configuration.unstable_operations["create_case_jira_issue"] = True -with ApiClient(configuration) as api_client: - api_instance = CaseManagementApi(api_client) - api_instance.create_case_jira_issue(case_id="case_id", body=body) diff --git a/examples/v2/case-management/CreateCaseNotebook.py b/examples/v2/case-management/CreateCaseNotebook.py deleted file mode 100644 index d79eb53478..0000000000 --- a/examples/v2/case-management/CreateCaseNotebook.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Create investigation notebook for case returns "No Content" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.case_management_api import CaseManagementApi -from datadog_api_client.v2.model.notebook_create_data import NotebookCreateData -from datadog_api_client.v2.model.notebook_create_request import NotebookCreateRequest -from datadog_api_client.v2.model.notebook_resource_type import NotebookResourceType - -body = NotebookCreateRequest( - data=NotebookCreateData( - type=NotebookResourceType.NOTEBOOK, - ), -) - -configuration = Configuration() -configuration.unstable_operations["create_case_notebook"] = True -with ApiClient(configuration) as api_client: - api_instance = CaseManagementApi(api_client) - api_instance.create_case_notebook(case_id="case_id", body=body) diff --git a/examples/v2/case-management/CreateCaseServiceNowTicket.py b/examples/v2/case-management/CreateCaseServiceNowTicket.py deleted file mode 100644 index 8cd3e42218..0000000000 --- a/examples/v2/case-management/CreateCaseServiceNowTicket.py +++ /dev/null @@ -1,26 +0,0 @@ -""" -Create ServiceNow ticket for case returns "Accepted" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.case_management_api import CaseManagementApi -from datadog_api_client.v2.model.service_now_ticket_create_attributes import ServiceNowTicketCreateAttributes -from datadog_api_client.v2.model.service_now_ticket_create_data import ServiceNowTicketCreateData -from datadog_api_client.v2.model.service_now_ticket_create_request import ServiceNowTicketCreateRequest -from datadog_api_client.v2.model.service_now_ticket_resource_type import ServiceNowTicketResourceType - -body = ServiceNowTicketCreateRequest( - data=ServiceNowTicketCreateData( - attributes=ServiceNowTicketCreateAttributes( - assignment_group="IT Support", - instance_name="my-instance", - ), - type=ServiceNowTicketResourceType.TICKETS, - ), -) - -configuration = Configuration() -configuration.unstable_operations["create_case_service_now_ticket"] = True -with ApiClient(configuration) as api_client: - api_instance = CaseManagementApi(api_client) - api_instance.create_case_service_now_ticket(case_id="case_id", body=body) diff --git a/examples/v2/case-management/LinkIncident.py b/examples/v2/case-management/LinkIncident.py deleted file mode 100644 index 327f7ea8b6..0000000000 --- a/examples/v2/case-management/LinkIncident.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -Link incident to case returns "Created" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.case_management_api import CaseManagementApi -from datadog_api_client.v2.model.incident_relationship_data import IncidentRelationshipData -from datadog_api_client.v2.model.incident_resource_type import IncidentResourceType -from datadog_api_client.v2.model.relationship_to_incident_request import RelationshipToIncidentRequest - -body = RelationshipToIncidentRequest( - data=IncidentRelationshipData( - id="00000000-0000-0000-0000-000000000000", - type=IncidentResourceType.INCIDENTS, - ), -) - -configuration = Configuration() -configuration.unstable_operations["link_incident"] = True -with ApiClient(configuration) as api_client: - api_instance = CaseManagementApi(api_client) - response = api_instance.link_incident(case_id="case_id", body=body) - - print(response) diff --git a/examples/v2/case-management/LinkJiraIssueToCase.py b/examples/v2/case-management/LinkJiraIssueToCase.py deleted file mode 100644 index 3803edf4ed..0000000000 --- a/examples/v2/case-management/LinkJiraIssueToCase.py +++ /dev/null @@ -1,25 +0,0 @@ -""" -Link existing Jira issue to case returns "No Content" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.case_management_api import CaseManagementApi -from datadog_api_client.v2.model.jira_issue_link_attributes import JiraIssueLinkAttributes -from datadog_api_client.v2.model.jira_issue_link_data import JiraIssueLinkData -from datadog_api_client.v2.model.jira_issue_link_request import JiraIssueLinkRequest -from datadog_api_client.v2.model.jira_issue_resource_type import JiraIssueResourceType - -body = JiraIssueLinkRequest( - data=JiraIssueLinkData( - attributes=JiraIssueLinkAttributes( - jira_issue_url="https://jira.example.com/browse/PROJ-123", - ), - type=JiraIssueResourceType.ISSUES, - ), -) - -configuration = Configuration() -configuration.unstable_operations["link_jira_issue_to_case"] = True -with ApiClient(configuration) as api_client: - api_instance = CaseManagementApi(api_client) - api_instance.link_jira_issue_to_case(case_id="case_id", body=body) diff --git a/examples/v2/case-management/MoveCaseToProject.py b/examples/v2/case-management/MoveCaseToProject.py deleted file mode 100644 index b1961ca56d..0000000000 --- a/examples/v2/case-management/MoveCaseToProject.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -Update case project returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.case_management_api import CaseManagementApi -from datadog_api_client.v2.model.project_relationship import ProjectRelationship -from datadog_api_client.v2.model.project_relationship_data import ProjectRelationshipData -from datadog_api_client.v2.model.project_resource_type import ProjectResourceType - -body = ProjectRelationship( - data=ProjectRelationshipData( - id="e555e290-ed65-49bd-ae18-8acbfcf18db7", - type=ProjectResourceType.PROJECT, - ), -) - -configuration = Configuration() -configuration.unstable_operations["move_case_to_project"] = True -with ApiClient(configuration) as api_client: - api_instance = CaseManagementApi(api_client) - response = api_instance.move_case_to_project(case_id="case_id", body=body) - - print(response) diff --git a/examples/v2/case-management/UnlinkJiraIssue.py b/examples/v2/case-management/UnlinkJiraIssue.py deleted file mode 100644 index 16751e9f31..0000000000 --- a/examples/v2/case-management/UnlinkJiraIssue.py +++ /dev/null @@ -1,14 +0,0 @@ -""" -Remove Jira issue link from case returns "No Content" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.case_management_api import CaseManagementApi - -configuration = Configuration() -configuration.unstable_operations["unlink_jira_issue"] = True -with ApiClient(configuration) as api_client: - api_instance = CaseManagementApi(api_client) - api_instance.unlink_jira_issue( - case_id="case_id", - ) diff --git a/examples/v2/seats/AssignSeatsUserV2.py b/examples/v2/seats/AssignSeatsUserV2.py new file mode 100644 index 0000000000..4b27128c5a --- /dev/null +++ b/examples/v2/seats/AssignSeatsUserV2.py @@ -0,0 +1,29 @@ +""" +Assign seats to users returns "Created" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.seats_api import SeatsApi +from datadog_api_client.v2.model.assign_seats_user_request import AssignSeatsUserRequest +from datadog_api_client.v2.model.assign_seats_user_request_data import AssignSeatsUserRequestData +from datadog_api_client.v2.model.assign_seats_user_request_data_attributes import AssignSeatsUserRequestDataAttributes +from datadog_api_client.v2.model.seat_assignments_data_type import SeatAssignmentsDataType + +body = AssignSeatsUserRequest( + data=AssignSeatsUserRequestData( + attributes=AssignSeatsUserRequestDataAttributes( + product_code="", + user_uuids=[ + "", + ], + ), + type=SeatAssignmentsDataType.SEAT_ASSIGNMENTS, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SeatsApi(api_client) + response = api_instance.assign_seats_user_v2(body=body) + + print(response) diff --git a/examples/v2/seats/GetSeatsUsersV2.py b/examples/v2/seats/GetSeatsUsersV2.py new file mode 100644 index 0000000000..3d9f313112 --- /dev/null +++ b/examples/v2/seats/GetSeatsUsersV2.py @@ -0,0 +1,15 @@ +""" +Get seats users returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.seats_api import SeatsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SeatsApi(api_client) + response = api_instance.get_seats_users_v2( + product_code="product_code", + ) + + print(response) diff --git a/examples/v2/seats/UnassignSeatsUserV2.py b/examples/v2/seats/UnassignSeatsUserV2.py new file mode 100644 index 0000000000..c46f861ef8 --- /dev/null +++ b/examples/v2/seats/UnassignSeatsUserV2.py @@ -0,0 +1,29 @@ +""" +Unassign seats from users returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.seats_api import SeatsApi +from datadog_api_client.v2.model.seat_assignments_data_type import SeatAssignmentsDataType +from datadog_api_client.v2.model.unassign_seats_user_request import UnassignSeatsUserRequest +from datadog_api_client.v2.model.unassign_seats_user_request_data import UnassignSeatsUserRequestData +from datadog_api_client.v2.model.unassign_seats_user_request_data_attributes import ( + UnassignSeatsUserRequestDataAttributes, +) + +body = UnassignSeatsUserRequest( + data=UnassignSeatsUserRequestData( + attributes=UnassignSeatsUserRequestDataAttributes( + product_code="", + user_uuids=[ + "", + ], + ), + type=SeatAssignmentsDataType.SEAT_ASSIGNMENTS, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SeatsApi(api_client) + api_instance.unassign_seats_user_v2(body=body) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index f3edb31d63..f715f758fc 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -266,13 +266,6 @@ def __init__( "v2.get_open_api": False, "v2.list_apis": False, "v2.update_open_api": False, - "v2.create_case_jira_issue": False, - "v2.create_case_notebook": False, - "v2.create_case_service_now_ticket": False, - "v2.link_incident": False, - "v2.link_jira_issue_to_case": False, - "v2.move_case_to_project": False, - "v2.unlink_jira_issue": False, "v2.activate_content_pack": False, "v2.cancel_threat_hunting_job": False, "v2.convert_job_result_to_signal": False, diff --git a/src/datadog_api_client/v2/api/case_management_api.py b/src/datadog_api_client/v2/api/case_management_api.py index 01d3bfcdaa..27cee1a0fa 100644 --- a/src/datadog_api_client/v2/api/case_management_api.py +++ b/src/datadog_api_client/v2/api/case_management_api.py @@ -35,12 +35,6 @@ from datadog_api_client.v2.model.case_update_custom_attribute_request import CaseUpdateCustomAttributeRequest from datadog_api_client.v2.model.case_update_description_request import CaseUpdateDescriptionRequest from datadog_api_client.v2.model.case_update_priority_request import CaseUpdatePriorityRequest -from datadog_api_client.v2.model.relationship_to_incident_request import RelationshipToIncidentRequest -from datadog_api_client.v2.model.jira_issue_link_request import JiraIssueLinkRequest -from datadog_api_client.v2.model.jira_issue_create_request import JiraIssueCreateRequest -from datadog_api_client.v2.model.notebook_create_request import NotebookCreateRequest -from datadog_api_client.v2.model.project_relationship import ProjectRelationship -from datadog_api_client.v2.model.service_now_ticket_create_request import ServiceNowTicketCreateRequest from datadog_api_client.v2.model.case_update_status_request import CaseUpdateStatusRequest from datadog_api_client.v2.model.case_update_title_request import CaseUpdateTitleRequest @@ -153,84 +147,6 @@ def __init__(self, api_client=None): api_client=api_client, ) - self._create_case_jira_issue_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/cases/{case_id}/relationships/jira_issues", - "operation_id": "create_case_jira_issue", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "case_id": { - "required": True, - "openapi_types": (str,), - "attribute": "case_id", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (JiraIssueCreateRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - self._create_case_notebook_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/cases/{case_id}/relationships/notebook", - "operation_id": "create_case_notebook", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "case_id": { - "required": True, - "openapi_types": (str,), - "attribute": "case_id", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (NotebookCreateRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - self._create_case_service_now_ticket_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/cases/{case_id}/relationships/servicenow_tickets", - "operation_id": "create_case_service_now_ticket", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "case_id": { - "required": True, - "openapi_types": (str,), - "attribute": "case_id", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (ServiceNowTicketCreateRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, - api_client=api_client, - ) - self._create_project_endpoint = _Endpoint( settings={ "response_type": (ProjectResponse,), @@ -472,84 +388,6 @@ def __init__(self, api_client=None): api_client=api_client, ) - self._link_incident_endpoint = _Endpoint( - settings={ - "response_type": (CaseResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/cases/{case_id}/relationships/incidents", - "operation_id": "link_incident", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "case_id": { - "required": True, - "openapi_types": (str,), - "attribute": "case_id", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (RelationshipToIncidentRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - self._link_jira_issue_to_case_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/cases/{case_id}/relationships/jira_issues", - "operation_id": "link_jira_issue_to_case", - "http_method": "PATCH", - "version": "v2", - }, - params_map={ - "case_id": { - "required": True, - "openapi_types": (str,), - "attribute": "case_id", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (JiraIssueLinkRequest,), - "location": "body", - }, - }, - headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, - api_client=api_client, - ) - - self._move_case_to_project_endpoint = _Endpoint( - settings={ - "response_type": (CaseResponse,), - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/cases/{case_id}/relationships/project", - "operation_id": "move_case_to_project", - "http_method": "PATCH", - "version": "v2", - }, - params_map={ - "case_id": { - "required": True, - "openapi_types": (str,), - "attribute": "case_id", - "location": "path", - }, - "body": { - "required": True, - "openapi_types": (ProjectRelationship,), - "location": "body", - }, - }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, - ) - self._search_cases_endpoint = _Endpoint( settings={ "response_type": (CasesResponse,), @@ -644,29 +482,6 @@ def __init__(self, api_client=None): api_client=api_client, ) - self._unlink_jira_issue_endpoint = _Endpoint( - settings={ - "response_type": None, - "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], - "endpoint_path": "/api/v2/cases/{case_id}/relationships/jira_issues", - "operation_id": "unlink_jira_issue", - "http_method": "DELETE", - "version": "v2", - }, - params_map={ - "case_id": { - "required": True, - "openapi_types": (str,), - "attribute": "case_id", - "location": "path", - }, - }, - headers_map={ - "accept": ["*/*"], - }, - api_client=api_client, - ) - self._update_attributes_endpoint = _Endpoint( settings={ "response_type": (CaseResponse,), @@ -970,72 +785,6 @@ def create_case( return self._create_case_endpoint.call_with_http_info(**kwargs) - def create_case_jira_issue( - self, - case_id: str, - body: JiraIssueCreateRequest, - ) -> None: - """Create Jira issue for case. - - Create a new Jira issue and link it to a case - - :param case_id: Case's UUID or key - :type case_id: str - :param body: Jira issue creation request - :type body: JiraIssueCreateRequest - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["case_id"] = case_id - - kwargs["body"] = body - - return self._create_case_jira_issue_endpoint.call_with_http_info(**kwargs) - - def create_case_notebook( - self, - case_id: str, - body: NotebookCreateRequest, - ) -> None: - """Create investigation notebook for case. - - Create a new investigation notebook and link it to a case - - :param case_id: Case's UUID or key - :type case_id: str - :param body: Notebook creation request - :type body: NotebookCreateRequest - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["case_id"] = case_id - - kwargs["body"] = body - - return self._create_case_notebook_endpoint.call_with_http_info(**kwargs) - - def create_case_service_now_ticket( - self, - case_id: str, - body: ServiceNowTicketCreateRequest, - ) -> None: - """Create ServiceNow ticket for case. - - Create a new ServiceNow incident ticket and link it to a case - - :param case_id: Case's UUID or key - :type case_id: str - :param body: ServiceNow ticket creation request - :type body: ServiceNowTicketCreateRequest - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["case_id"] = case_id - - kwargs["body"] = body - - return self._create_case_service_now_ticket_endpoint.call_with_http_info(**kwargs) - def create_project( self, body: ProjectCreateRequest, @@ -1221,72 +970,6 @@ def get_projects( kwargs: Dict[str, Any] = {} return self._get_projects_endpoint.call_with_http_info(**kwargs) - def link_incident( - self, - case_id: str, - body: RelationshipToIncidentRequest, - ) -> CaseResponse: - """Link incident to case. - - Link an incident to a case - - :param case_id: Case's UUID or key - :type case_id: str - :param body: Incident link request - :type body: RelationshipToIncidentRequest - :rtype: CaseResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["case_id"] = case_id - - kwargs["body"] = body - - return self._link_incident_endpoint.call_with_http_info(**kwargs) - - def link_jira_issue_to_case( - self, - case_id: str, - body: JiraIssueLinkRequest, - ) -> None: - """Link existing Jira issue to case. - - Link an existing Jira issue to a case - - :param case_id: Case's UUID or key - :type case_id: str - :param body: Jira issue link request - :type body: JiraIssueLinkRequest - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["case_id"] = case_id - - kwargs["body"] = body - - return self._link_jira_issue_to_case_endpoint.call_with_http_info(**kwargs) - - def move_case_to_project( - self, - case_id: str, - body: ProjectRelationship, - ) -> CaseResponse: - """Update case project. - - Update the project associated with a case - - :param case_id: Case's UUID or key - :type case_id: str - :param body: Project update request - :type body: ProjectRelationship - :rtype: CaseResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["case_id"] = case_id - - kwargs["body"] = body - - return self._move_case_to_project_endpoint.call_with_http_info(**kwargs) - def search_cases( self, *, @@ -1429,23 +1112,6 @@ def unassign_case( return self._unassign_case_endpoint.call_with_http_info(**kwargs) - def unlink_jira_issue( - self, - case_id: str, - ) -> None: - """Remove Jira issue link from case. - - Remove the link between a Jira issue and a case - - :param case_id: Case's UUID or key - :type case_id: str - :rtype: None - """ - kwargs: Dict[str, Any] = {} - kwargs["case_id"] = case_id - - return self._unlink_jira_issue_endpoint.call_with_http_info(**kwargs) - def update_attributes( self, case_id: str, diff --git a/src/datadog_api_client/v2/api/seats_api.py b/src/datadog_api_client/v2/api/seats_api.py new file mode 100644 index 0000000000..c91c577738 --- /dev/null +++ b/src/datadog_api_client/v2/api/seats_api.py @@ -0,0 +1,163 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Any, Dict, Union + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.model_utils import ( + UnsetType, + unset, +) +from datadog_api_client.v2.model.unassign_seats_user_request import UnassignSeatsUserRequest +from datadog_api_client.v2.model.seat_user_data_array import SeatUserDataArray +from datadog_api_client.v2.model.assign_seats_user_response import AssignSeatsUserResponse +from datadog_api_client.v2.model.assign_seats_user_request import AssignSeatsUserRequest + + +class SeatsApi: + """ + The seats API allows you to view, assign, and unassign seats for your organization. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._assign_seats_user_v2_endpoint = _Endpoint( + settings={ + "response_type": (AssignSeatsUserResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/seats/users", + "operation_id": "assign_seats_user_v2", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (AssignSeatsUserRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._get_seats_users_v2_endpoint = _Endpoint( + settings={ + "response_type": (SeatUserDataArray,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/seats/users", + "operation_id": "get_seats_users_v2", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "product_code": { + "required": True, + "openapi_types": (str,), + "attribute": "product_code", + "location": "query", + }, + "page_limit": { + "openapi_types": (int,), + "attribute": "page[limit]", + "location": "query", + }, + "page_cursor": { + "openapi_types": (str,), + "attribute": "page[cursor]", + "location": "query", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + + self._unassign_seats_user_v2_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/seats/users", + "operation_id": "unassign_seats_user_v2", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (UnassignSeatsUserRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["*/*"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + def assign_seats_user_v2( + self, + body: AssignSeatsUserRequest, + ) -> AssignSeatsUserResponse: + """Assign seats to users. + + Assign seats to users for a product code. + + :type body: AssignSeatsUserRequest + :rtype: AssignSeatsUserResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._assign_seats_user_v2_endpoint.call_with_http_info(**kwargs) + + def get_seats_users_v2( + self, + product_code: str, + *, + page_limit: Union[int, UnsetType] = unset, + page_cursor: Union[str, UnsetType] = unset, + ) -> SeatUserDataArray: + """Get seats users. + + Get the list of seats users assigned to a product code. + + :param product_code: The product code for which to retrieve seat users. + :type product_code: str + :param page_limit: Maximum number of results to return. + :type page_limit: int, optional + :param page_cursor: Cursor for pagination. + :type page_cursor: str, optional + :rtype: SeatUserDataArray + """ + kwargs: Dict[str, Any] = {} + kwargs["product_code"] = product_code + + if page_limit is not unset: + kwargs["page_limit"] = page_limit + + if page_cursor is not unset: + kwargs["page_cursor"] = page_cursor + + return self._get_seats_users_v2_endpoint.call_with_http_info(**kwargs) + + def unassign_seats_user_v2( + self, + body: UnassignSeatsUserRequest, + ) -> None: + """Unassign seats from users. + + Unassign seats from users for a product code. + + :type body: UnassignSeatsUserRequest + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._unassign_seats_user_v2_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 210ab0dd47..43bf59599b 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -75,6 +75,7 @@ from datadog_api_client.v2.api.rum_replay_sessions_api import RumReplaySessionsApi from datadog_api_client.v2.api.rum_replay_viewership_api import RumReplayViewershipApi from datadog_api_client.v2.api.rum_retention_filters_api import RumRetentionFiltersApi +from datadog_api_client.v2.api.seats_api import SeatsApi from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi from datadog_api_client.v2.api.sensitive_data_scanner_api import SensitiveDataScannerApi from datadog_api_client.v2.api.service_accounts_api import ServiceAccountsApi @@ -174,6 +175,7 @@ "RumReplaySessionsApi", "RumReplayViewershipApi", "RumRetentionFiltersApi", + "SeatsApi", "SecurityMonitoringApi", "SensitiveDataScannerApi", "ServiceAccountsApi", diff --git a/src/datadog_api_client/v2/model/assign_seats_user_request.py b/src/datadog_api_client/v2/model/assign_seats_user_request.py new file mode 100644 index 0000000000..8b5761aab8 --- /dev/null +++ b/src/datadog_api_client/v2/model/assign_seats_user_request.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.assign_seats_user_request_data import AssignSeatsUserRequestData + + +class AssignSeatsUserRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.assign_seats_user_request_data import AssignSeatsUserRequestData + + return { + "data": (AssignSeatsUserRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[AssignSeatsUserRequestData, UnsetType] = unset, **kwargs): + """ + + + :param data: + :type data: AssignSeatsUserRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/assign_seats_user_request_data.py b/src/datadog_api_client/v2/model/assign_seats_user_request_data.py new file mode 100644 index 0000000000..609d977e44 --- /dev/null +++ b/src/datadog_api_client/v2/model/assign_seats_user_request_data.py @@ -0,0 +1,68 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.assign_seats_user_request_data_attributes import ( + AssignSeatsUserRequestDataAttributes, + ) + from datadog_api_client.v2.model.seat_assignments_data_type import SeatAssignmentsDataType + + +class AssignSeatsUserRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.assign_seats_user_request_data_attributes import ( + AssignSeatsUserRequestDataAttributes, + ) + from datadog_api_client.v2.model.seat_assignments_data_type import SeatAssignmentsDataType + + return { + "attributes": (AssignSeatsUserRequestDataAttributes,), + "id": (str,), + "type": (SeatAssignmentsDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: SeatAssignmentsDataType, + attributes: Union[AssignSeatsUserRequestDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: AssignSeatsUserRequestDataAttributes, optional + + :param id: The ID of the assign seats user request. + :type id: str, optional + + :param type: Seat assignments resource type. + :type type: SeatAssignmentsDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/assign_seats_user_request_data_attributes.py b/src/datadog_api_client/v2/model/assign_seats_user_request_data_attributes.py new file mode 100644 index 0000000000..ed6b913871 --- /dev/null +++ b/src/datadog_api_client/v2/model/assign_seats_user_request_data_attributes.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class AssignSeatsUserRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "product_code": (str,), + "user_uuids": ([str],), + } + + attribute_map = { + "product_code": "product_code", + "user_uuids": "user_uuids", + } + + def __init__(self_, product_code: str, user_uuids: List[str], **kwargs): + """ + + + :param product_code: The product code for which to assign seats. + :type product_code: str + + :param user_uuids: The list of user IDs to assign seats to. + :type user_uuids: [str] + """ + super().__init__(kwargs) + + self_.product_code = product_code + self_.user_uuids = user_uuids diff --git a/src/datadog_api_client/v2/model/assign_seats_user_response.py b/src/datadog_api_client/v2/model/assign_seats_user_response.py new file mode 100644 index 0000000000..72a4a8ebe9 --- /dev/null +++ b/src/datadog_api_client/v2/model/assign_seats_user_response.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.assign_seats_user_response_data import AssignSeatsUserResponseData + + +class AssignSeatsUserResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.assign_seats_user_response_data import AssignSeatsUserResponseData + + return { + "data": (AssignSeatsUserResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[AssignSeatsUserResponseData, UnsetType] = unset, **kwargs): + """ + + + :param data: + :type data: AssignSeatsUserResponseData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/assign_seats_user_response_data.py b/src/datadog_api_client/v2/model/assign_seats_user_response_data.py new file mode 100644 index 0000000000..1ea05f3de6 --- /dev/null +++ b/src/datadog_api_client/v2/model/assign_seats_user_response_data.py @@ -0,0 +1,68 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.assign_seats_user_response_data_attributes import ( + AssignSeatsUserResponseDataAttributes, + ) + from datadog_api_client.v2.model.seat_assignments_data_type import SeatAssignmentsDataType + + +class AssignSeatsUserResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.assign_seats_user_response_data_attributes import ( + AssignSeatsUserResponseDataAttributes, + ) + from datadog_api_client.v2.model.seat_assignments_data_type import SeatAssignmentsDataType + + return { + "attributes": (AssignSeatsUserResponseDataAttributes,), + "id": (str,), + "type": (SeatAssignmentsDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: SeatAssignmentsDataType, + attributes: Union[AssignSeatsUserResponseDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: AssignSeatsUserResponseDataAttributes, optional + + :param id: The ID of the assign seats user response. + :type id: str, optional + + :param type: Seat assignments resource type. + :type type: SeatAssignmentsDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/assign_seats_user_response_data_attributes.py b/src/datadog_api_client/v2/model/assign_seats_user_response_data_attributes.py new file mode 100644 index 0000000000..4e77280a79 --- /dev/null +++ b/src/datadog_api_client/v2/model/assign_seats_user_response_data_attributes.py @@ -0,0 +1,45 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class AssignSeatsUserResponseDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "assigned_ids": ([str],), + "product_code": (str,), + } + + attribute_map = { + "assigned_ids": "assigned_ids", + "product_code": "product_code", + } + + def __init__( + self_, assigned_ids: Union[List[str], UnsetType] = unset, product_code: Union[str, UnsetType] = unset, **kwargs + ): + """ + + + :param assigned_ids: The list of user IDs to which the seats were assigned. + :type assigned_ids: [str], optional + + :param product_code: The product code for which the seats were assigned. + :type product_code: str, optional + """ + if assigned_ids is not unset: + kwargs["assigned_ids"] = assigned_ids + if product_code is not unset: + kwargs["product_code"] = product_code + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/incident_relationship_data.py b/src/datadog_api_client/v2/model/incident_relationship_data.py deleted file mode 100644 index d1088c6da5..0000000000 --- a/src/datadog_api_client/v2/model/incident_relationship_data.py +++ /dev/null @@ -1,46 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.incident_resource_type import IncidentResourceType - - -class IncidentRelationshipData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.incident_resource_type import IncidentResourceType - - return { - "id": (str,), - "type": (IncidentResourceType,), - } - - attribute_map = { - "id": "id", - "type": "type", - } - - def __init__(self_, id: str, type: IncidentResourceType, **kwargs): - """ - Incident relationship data - - :param id: Incident identifier - :type id: str - - :param type: Incident resource type - :type type: IncidentResourceType - """ - super().__init__(kwargs) - - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/incident_resource_type.py b/src/datadog_api_client/v2/model/incident_resource_type.py deleted file mode 100644 index 1a95489510..0000000000 --- a/src/datadog_api_client/v2/model/incident_resource_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class IncidentResourceType(ModelSimple): - """ - Incident resource type - - :param value: If omitted defaults to "incidents". Must be one of ["incidents"]. - :type value: str - """ - - allowed_values = { - "incidents", - } - INCIDENTS: ClassVar["IncidentResourceType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -IncidentResourceType.INCIDENTS = IncidentResourceType("incidents") diff --git a/src/datadog_api_client/v2/model/jira_issue_create_attributes.py b/src/datadog_api_client/v2/model/jira_issue_create_attributes.py deleted file mode 100644 index 03323d50a0..0000000000 --- a/src/datadog_api_client/v2/model/jira_issue_create_attributes.py +++ /dev/null @@ -1,81 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Any, Dict, Union - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - date, - datetime, - none_type, - unset, - UnsetType, - UUID, -) - - -class JiraIssueCreateAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "fields": ( - { - str: ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - UUID, - none_type, - ) - }, - ), - "issue_type_id": (str,), - "jira_account_id": (str,), - "project_id": (str,), - } - - attribute_map = { - "fields": "fields", - "issue_type_id": "issue_type_id", - "jira_account_id": "jira_account_id", - "project_id": "project_id", - } - - def __init__( - self_, - issue_type_id: str, - jira_account_id: str, - project_id: str, - fields: Union[Dict[str, Any], UnsetType] = unset, - **kwargs, - ): - """ - Jira issue creation attributes - - :param fields: Additional Jira fields - :type fields: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional - - :param issue_type_id: Jira issue type ID - :type issue_type_id: str - - :param jira_account_id: Jira account ID - :type jira_account_id: str - - :param project_id: Jira project ID - :type project_id: str - """ - if fields is not unset: - kwargs["fields"] = fields - super().__init__(kwargs) - - self_.issue_type_id = issue_type_id - self_.jira_account_id = jira_account_id - self_.project_id = project_id diff --git a/src/datadog_api_client/v2/model/jira_issue_create_data.py b/src/datadog_api_client/v2/model/jira_issue_create_data.py deleted file mode 100644 index a4591c938b..0000000000 --- a/src/datadog_api_client/v2/model/jira_issue_create_data.py +++ /dev/null @@ -1,48 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.jira_issue_create_attributes import JiraIssueCreateAttributes - from datadog_api_client.v2.model.jira_issue_resource_type import JiraIssueResourceType - - -class JiraIssueCreateData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.jira_issue_create_attributes import JiraIssueCreateAttributes - from datadog_api_client.v2.model.jira_issue_resource_type import JiraIssueResourceType - - return { - "attributes": (JiraIssueCreateAttributes,), - "type": (JiraIssueResourceType,), - } - - attribute_map = { - "attributes": "attributes", - "type": "type", - } - - def __init__(self_, attributes: JiraIssueCreateAttributes, type: JiraIssueResourceType, **kwargs): - """ - Jira issue creation data - - :param attributes: Jira issue creation attributes - :type attributes: JiraIssueCreateAttributes - - :param type: Jira issue resource type - :type type: JiraIssueResourceType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.type = type diff --git a/src/datadog_api_client/v2/model/jira_issue_create_request.py b/src/datadog_api_client/v2/model/jira_issue_create_request.py deleted file mode 100644 index 131cb06169..0000000000 --- a/src/datadog_api_client/v2/model/jira_issue_create_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.jira_issue_create_data import JiraIssueCreateData - - -class JiraIssueCreateRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.jira_issue_create_data import JiraIssueCreateData - - return { - "data": (JiraIssueCreateData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: JiraIssueCreateData, **kwargs): - """ - Jira issue creation request - - :param data: Jira issue creation data - :type data: JiraIssueCreateData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/jira_issue_link_attributes.py b/src/datadog_api_client/v2/model/jira_issue_link_attributes.py deleted file mode 100644 index 3e9cf2215c..0000000000 --- a/src/datadog_api_client/v2/model/jira_issue_link_attributes.py +++ /dev/null @@ -1,33 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class JiraIssueLinkAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "jira_issue_url": (str,), - } - - attribute_map = { - "jira_issue_url": "jira_issue_url", - } - - def __init__(self_, jira_issue_url: str, **kwargs): - """ - Jira issue link attributes - - :param jira_issue_url: URL of the Jira issue - :type jira_issue_url: str - """ - super().__init__(kwargs) - - self_.jira_issue_url = jira_issue_url diff --git a/src/datadog_api_client/v2/model/jira_issue_link_data.py b/src/datadog_api_client/v2/model/jira_issue_link_data.py deleted file mode 100644 index bf78f614bb..0000000000 --- a/src/datadog_api_client/v2/model/jira_issue_link_data.py +++ /dev/null @@ -1,48 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.jira_issue_link_attributes import JiraIssueLinkAttributes - from datadog_api_client.v2.model.jira_issue_resource_type import JiraIssueResourceType - - -class JiraIssueLinkData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.jira_issue_link_attributes import JiraIssueLinkAttributes - from datadog_api_client.v2.model.jira_issue_resource_type import JiraIssueResourceType - - return { - "attributes": (JiraIssueLinkAttributes,), - "type": (JiraIssueResourceType,), - } - - attribute_map = { - "attributes": "attributes", - "type": "type", - } - - def __init__(self_, attributes: JiraIssueLinkAttributes, type: JiraIssueResourceType, **kwargs): - """ - Jira issue link data - - :param attributes: Jira issue link attributes - :type attributes: JiraIssueLinkAttributes - - :param type: Jira issue resource type - :type type: JiraIssueResourceType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.type = type diff --git a/src/datadog_api_client/v2/model/jira_issue_link_request.py b/src/datadog_api_client/v2/model/jira_issue_link_request.py deleted file mode 100644 index 9f7d8c981e..0000000000 --- a/src/datadog_api_client/v2/model/jira_issue_link_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.jira_issue_link_data import JiraIssueLinkData - - -class JiraIssueLinkRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.jira_issue_link_data import JiraIssueLinkData - - return { - "data": (JiraIssueLinkData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: JiraIssueLinkData, **kwargs): - """ - Jira issue link request - - :param data: Jira issue link data - :type data: JiraIssueLinkData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/notebook_create_data.py b/src/datadog_api_client/v2/model/notebook_create_data.py deleted file mode 100644 index 86c25e05e3..0000000000 --- a/src/datadog_api_client/v2/model/notebook_create_data.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notebook_resource_type import NotebookResourceType - - -class NotebookCreateData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notebook_resource_type import NotebookResourceType - - return { - "type": (NotebookResourceType,), - } - - attribute_map = { - "type": "type", - } - - def __init__(self_, type: NotebookResourceType, **kwargs): - """ - Notebook creation data - - :param type: Notebook resource type - :type type: NotebookResourceType - """ - super().__init__(kwargs) - - self_.type = type diff --git a/src/datadog_api_client/v2/model/notebook_create_request.py b/src/datadog_api_client/v2/model/notebook_create_request.py deleted file mode 100644 index c549ba48e9..0000000000 --- a/src/datadog_api_client/v2/model/notebook_create_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.notebook_create_data import NotebookCreateData - - -class NotebookCreateRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.notebook_create_data import NotebookCreateData - - return { - "data": (NotebookCreateData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: NotebookCreateData, **kwargs): - """ - Notebook creation request - - :param data: Notebook creation data - :type data: NotebookCreateData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/notebook_resource_type.py b/src/datadog_api_client/v2/model/notebook_resource_type.py deleted file mode 100644 index e14eb09b1a..0000000000 --- a/src/datadog_api_client/v2/model/notebook_resource_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class NotebookResourceType(ModelSimple): - """ - Notebook resource type - - :param value: If omitted defaults to "notebook". Must be one of ["notebook"]. - :type value: str - """ - - allowed_values = { - "notebook", - } - NOTEBOOK: ClassVar["NotebookResourceType"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -NotebookResourceType.NOTEBOOK = NotebookResourceType("notebook") diff --git a/src/datadog_api_client/v2/model/relationship_to_incident_request.py b/src/datadog_api_client/v2/model/relationship_to_incident_request.py deleted file mode 100644 index cf2508253c..0000000000 --- a/src/datadog_api_client/v2/model/relationship_to_incident_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.incident_relationship_data import IncidentRelationshipData - - -class RelationshipToIncidentRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.incident_relationship_data import IncidentRelationshipData - - return { - "data": (IncidentRelationshipData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: IncidentRelationshipData, **kwargs): - """ - Relationship to incident request - - :param data: Incident relationship data - :type data: IncidentRelationshipData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/service_now_ticket_resource_type.py b/src/datadog_api_client/v2/model/seat_assignments_data_type.py similarity index 61% rename from src/datadog_api_client/v2/model/service_now_ticket_resource_type.py rename to src/datadog_api_client/v2/model/seat_assignments_data_type.py index f0165af8fe..520dbb8fa6 100644 --- a/src/datadog_api_client/v2/model/service_now_ticket_resource_type.py +++ b/src/datadog_api_client/v2/model/seat_assignments_data_type.py @@ -12,18 +12,18 @@ from typing import ClassVar -class ServiceNowTicketResourceType(ModelSimple): +class SeatAssignmentsDataType(ModelSimple): """ - ServiceNow ticket resource type + Seat assignments resource type. - :param value: If omitted defaults to "tickets". Must be one of ["tickets"]. + :param value: If omitted defaults to "seat-assignments". Must be one of ["seat-assignments"]. :type value: str """ allowed_values = { - "tickets", + "seat-assignments", } - TICKETS: ClassVar["ServiceNowTicketResourceType"] + SEAT_ASSIGNMENTS: ClassVar["SeatAssignmentsDataType"] @cached_property def openapi_types(_): @@ -32,4 +32,4 @@ def openapi_types(_): } -ServiceNowTicketResourceType.TICKETS = ServiceNowTicketResourceType("tickets") +SeatAssignmentsDataType.SEAT_ASSIGNMENTS = SeatAssignmentsDataType("seat-assignments") diff --git a/src/datadog_api_client/v2/model/seat_user_data.py b/src/datadog_api_client/v2/model/seat_user_data.py new file mode 100644 index 0000000000..0be3685083 --- /dev/null +++ b/src/datadog_api_client/v2/model/seat_user_data.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.seat_user_data_attributes import SeatUserDataAttributes + from datadog_api_client.v2.model.seat_user_data_type import SeatUserDataType + + +class SeatUserData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.seat_user_data_attributes import SeatUserDataAttributes + from datadog_api_client.v2.model.seat_user_data_type import SeatUserDataType + + return { + "attributes": (SeatUserDataAttributes,), + "id": (str,), + "type": (SeatUserDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: SeatUserDataType, + attributes: Union[SeatUserDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: SeatUserDataAttributes, optional + + :param id: The ID of the seat user. + :type id: str, optional + + :param type: Seat users resource type. + :type type: SeatUserDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/seat_user_data_array.py b/src/datadog_api_client/v2/model/seat_user_data_array.py new file mode 100644 index 0000000000..ebbd8a09f2 --- /dev/null +++ b/src/datadog_api_client/v2/model/seat_user_data_array.py @@ -0,0 +1,51 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.seat_user_data import SeatUserData + from datadog_api_client.v2.model.seat_user_meta import SeatUserMeta + + +class SeatUserDataArray(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.seat_user_data import SeatUserData + from datadog_api_client.v2.model.seat_user_meta import SeatUserMeta + + return { + "data": ([SeatUserData],), + "meta": (SeatUserMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__(self_, data: List[SeatUserData], meta: Union[SeatUserMeta, UnsetType] = unset, **kwargs): + """ + + + :param data: The list of seat users. + :type data: [SeatUserData] + + :param meta: + :type meta: SeatUserMeta, optional + """ + if meta is not unset: + kwargs["meta"] = meta + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/seat_user_data_attributes.py b/src/datadog_api_client/v2/model/seat_user_data_attributes.py new file mode 100644 index 0000000000..a7e460f3ea --- /dev/null +++ b/src/datadog_api_client/v2/model/seat_user_data_attributes.py @@ -0,0 +1,57 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +class SeatUserDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "assigned_at": (datetime,), + "email": (str,), + "name": (str,), + } + + attribute_map = { + "assigned_at": "assigned_at", + "email": "email", + "name": "name", + } + + def __init__( + self_, + assigned_at: Union[datetime, UnsetType] = unset, + email: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + + + :param assigned_at: The date and time the seat was assigned. + :type assigned_at: datetime, optional + + :param email: The email of the user. + :type email: str, optional + + :param name: The name of the user. + :type name: str, optional + """ + if assigned_at is not unset: + kwargs["assigned_at"] = assigned_at + if email is not unset: + kwargs["email"] = email + if name is not unset: + kwargs["name"] = name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/jira_issue_resource_type.py b/src/datadog_api_client/v2/model/seat_user_data_type.py similarity index 66% rename from src/datadog_api_client/v2/model/jira_issue_resource_type.py rename to src/datadog_api_client/v2/model/seat_user_data_type.py index e3f6f44f7d..cc17686382 100644 --- a/src/datadog_api_client/v2/model/jira_issue_resource_type.py +++ b/src/datadog_api_client/v2/model/seat_user_data_type.py @@ -12,18 +12,18 @@ from typing import ClassVar -class JiraIssueResourceType(ModelSimple): +class SeatUserDataType(ModelSimple): """ - Jira issue resource type + Seat users resource type. - :param value: If omitted defaults to "issues". Must be one of ["issues"]. + :param value: If omitted defaults to "seat-users". Must be one of ["seat-users"]. :type value: str """ allowed_values = { - "issues", + "seat-users", } - ISSUES: ClassVar["JiraIssueResourceType"] + SEAT_USERS: ClassVar["SeatUserDataType"] @cached_property def openapi_types(_): @@ -32,4 +32,4 @@ def openapi_types(_): } -JiraIssueResourceType.ISSUES = JiraIssueResourceType("issues") +SeatUserDataType.SEAT_USERS = SeatUserDataType("seat-users") diff --git a/src/datadog_api_client/v2/model/seat_user_meta.py b/src/datadog_api_client/v2/model/seat_user_meta.py new file mode 100644 index 0000000000..6549784f28 --- /dev/null +++ b/src/datadog_api_client/v2/model/seat_user_meta.py @@ -0,0 +1,56 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SeatUserMeta(ModelNormal): + @cached_property + def openapi_types(_): + return { + "cursor": (str,), + "limit": (int,), + "next_cursor": (str,), + } + + attribute_map = { + "cursor": "cursor", + "limit": "limit", + "next_cursor": "next_cursor", + } + + def __init__( + self_, + cursor: Union[str, UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + next_cursor: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + + + :param cursor: The cursor for the seat users. + :type cursor: str, optional + + :param limit: The limit for the seat users. + :type limit: int, optional + + :param next_cursor: The next cursor for the seat users. + :type next_cursor: str, optional + """ + if cursor is not unset: + kwargs["cursor"] = cursor + if limit is not unset: + kwargs["limit"] = limit + if next_cursor is not unset: + kwargs["next_cursor"] = next_cursor + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/service_now_ticket_create_attributes.py b/src/datadog_api_client/v2/model/service_now_ticket_create_attributes.py deleted file mode 100644 index 914abee8c2..0000000000 --- a/src/datadog_api_client/v2/model/service_now_ticket_create_attributes.py +++ /dev/null @@ -1,43 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import Union - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -class ServiceNowTicketCreateAttributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "assignment_group": (str,), - "instance_name": (str,), - } - - attribute_map = { - "assignment_group": "assignment_group", - "instance_name": "instance_name", - } - - def __init__(self_, instance_name: str, assignment_group: Union[str, UnsetType] = unset, **kwargs): - """ - ServiceNow ticket creation attributes - - :param assignment_group: ServiceNow assignment group - :type assignment_group: str, optional - - :param instance_name: ServiceNow instance name - :type instance_name: str - """ - if assignment_group is not unset: - kwargs["assignment_group"] = assignment_group - super().__init__(kwargs) - - self_.instance_name = instance_name diff --git a/src/datadog_api_client/v2/model/service_now_ticket_create_data.py b/src/datadog_api_client/v2/model/service_now_ticket_create_data.py deleted file mode 100644 index 981773a4c5..0000000000 --- a/src/datadog_api_client/v2/model/service_now_ticket_create_data.py +++ /dev/null @@ -1,48 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.service_now_ticket_create_attributes import ServiceNowTicketCreateAttributes - from datadog_api_client.v2.model.service_now_ticket_resource_type import ServiceNowTicketResourceType - - -class ServiceNowTicketCreateData(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.service_now_ticket_create_attributes import ServiceNowTicketCreateAttributes - from datadog_api_client.v2.model.service_now_ticket_resource_type import ServiceNowTicketResourceType - - return { - "attributes": (ServiceNowTicketCreateAttributes,), - "type": (ServiceNowTicketResourceType,), - } - - attribute_map = { - "attributes": "attributes", - "type": "type", - } - - def __init__(self_, attributes: ServiceNowTicketCreateAttributes, type: ServiceNowTicketResourceType, **kwargs): - """ - ServiceNow ticket creation data - - :param attributes: ServiceNow ticket creation attributes - :type attributes: ServiceNowTicketCreateAttributes - - :param type: ServiceNow ticket resource type - :type type: ServiceNowTicketResourceType - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.type = type diff --git a/src/datadog_api_client/v2/model/service_now_ticket_create_request.py b/src/datadog_api_client/v2/model/service_now_ticket_create_request.py deleted file mode 100644 index 736b6d1f20..0000000000 --- a/src/datadog_api_client/v2/model/service_now_ticket_create_request.py +++ /dev/null @@ -1,40 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.service_now_ticket_create_data import ServiceNowTicketCreateData - - -class ServiceNowTicketCreateRequest(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.service_now_ticket_create_data import ServiceNowTicketCreateData - - return { - "data": (ServiceNowTicketCreateData,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: ServiceNowTicketCreateData, **kwargs): - """ - ServiceNow ticket creation request - - :param data: ServiceNow ticket creation data - :type data: ServiceNowTicketCreateData - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/unassign_seats_user_request.py b/src/datadog_api_client/v2/model/unassign_seats_user_request.py new file mode 100644 index 0000000000..3f0f33e0fa --- /dev/null +++ b/src/datadog_api_client/v2/model/unassign_seats_user_request.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.unassign_seats_user_request_data import UnassignSeatsUserRequestData + + +class UnassignSeatsUserRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.unassign_seats_user_request_data import UnassignSeatsUserRequestData + + return { + "data": (UnassignSeatsUserRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[UnassignSeatsUserRequestData, UnsetType] = unset, **kwargs): + """ + + + :param data: + :type data: UnassignSeatsUserRequestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/unassign_seats_user_request_data.py b/src/datadog_api_client/v2/model/unassign_seats_user_request_data.py new file mode 100644 index 0000000000..9b5168063b --- /dev/null +++ b/src/datadog_api_client/v2/model/unassign_seats_user_request_data.py @@ -0,0 +1,68 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.unassign_seats_user_request_data_attributes import ( + UnassignSeatsUserRequestDataAttributes, + ) + from datadog_api_client.v2.model.seat_assignments_data_type import SeatAssignmentsDataType + + +class UnassignSeatsUserRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.unassign_seats_user_request_data_attributes import ( + UnassignSeatsUserRequestDataAttributes, + ) + from datadog_api_client.v2.model.seat_assignments_data_type import SeatAssignmentsDataType + + return { + "attributes": (UnassignSeatsUserRequestDataAttributes,), + "id": (str,), + "type": (SeatAssignmentsDataType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + type: SeatAssignmentsDataType, + attributes: Union[UnassignSeatsUserRequestDataAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + + + :param attributes: + :type attributes: UnassignSeatsUserRequestDataAttributes, optional + + :param id: The ID of the unassign seats user request. + :type id: str, optional + + :param type: Seat assignments resource type. + :type type: SeatAssignmentsDataType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/unassign_seats_user_request_data_attributes.py b/src/datadog_api_client/v2/model/unassign_seats_user_request_data_attributes.py new file mode 100644 index 0000000000..58b8b4130e --- /dev/null +++ b/src/datadog_api_client/v2/model/unassign_seats_user_request_data_attributes.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class UnassignSeatsUserRequestDataAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "product_code": (str,), + "user_uuids": ([str],), + } + + attribute_map = { + "product_code": "product_code", + "user_uuids": "user_uuids", + } + + def __init__(self_, product_code: str, user_uuids: List[str], **kwargs): + """ + + + :param product_code: The product code for which to unassign seats. + :type product_code: str + + :param user_uuids: The list of user IDs to unassign seats from. + :type user_uuids: [str] + """ + super().__init__(kwargs) + + self_.product_code = product_code + self_.user_uuids = user_uuids diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index f86d1dff08..9c09662222 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -366,6 +366,12 @@ from datadog_api_client.v2.model.asset_risks import AssetRisks from datadog_api_client.v2.model.asset_type import AssetType from datadog_api_client.v2.model.asset_version import AssetVersion +from datadog_api_client.v2.model.assign_seats_user_request import AssignSeatsUserRequest +from datadog_api_client.v2.model.assign_seats_user_request_data import AssignSeatsUserRequestData +from datadog_api_client.v2.model.assign_seats_user_request_data_attributes import AssignSeatsUserRequestDataAttributes +from datadog_api_client.v2.model.assign_seats_user_response import AssignSeatsUserResponse +from datadog_api_client.v2.model.assign_seats_user_response_data import AssignSeatsUserResponseData +from datadog_api_client.v2.model.assign_seats_user_response_data_attributes import AssignSeatsUserResponseDataAttributes from datadog_api_client.v2.model.attach_case_request import AttachCaseRequest from datadog_api_client.v2.model.attach_case_request_data import AttachCaseRequestData from datadog_api_client.v2.model.attach_case_request_data_relationships import AttachCaseRequestDataRelationships @@ -2407,8 +2413,6 @@ ) from datadog_api_client.v2.model.incident_postmortem_type import IncidentPostmortemType from datadog_api_client.v2.model.incident_related_object import IncidentRelatedObject -from datadog_api_client.v2.model.incident_relationship_data import IncidentRelationshipData -from datadog_api_client.v2.model.incident_resource_type import IncidentResourceType from datadog_api_client.v2.model.incident_responders_type import IncidentRespondersType from datadog_api_client.v2.model.incident_response import IncidentResponse from datadog_api_client.v2.model.incident_response_attributes import IncidentResponseAttributes @@ -2623,13 +2627,6 @@ from datadog_api_client.v2.model.jira_integration_metadata import JiraIntegrationMetadata from datadog_api_client.v2.model.jira_integration_metadata_issues_item import JiraIntegrationMetadataIssuesItem from datadog_api_client.v2.model.jira_issue import JiraIssue -from datadog_api_client.v2.model.jira_issue_create_attributes import JiraIssueCreateAttributes -from datadog_api_client.v2.model.jira_issue_create_data import JiraIssueCreateData -from datadog_api_client.v2.model.jira_issue_create_request import JiraIssueCreateRequest -from datadog_api_client.v2.model.jira_issue_link_attributes import JiraIssueLinkAttributes -from datadog_api_client.v2.model.jira_issue_link_data import JiraIssueLinkData -from datadog_api_client.v2.model.jira_issue_link_request import JiraIssueLinkRequest -from datadog_api_client.v2.model.jira_issue_resource_type import JiraIssueResourceType from datadog_api_client.v2.model.jira_issue_result import JiraIssueResult from datadog_api_client.v2.model.jira_issue_template_create_request import JiraIssueTemplateCreateRequest from datadog_api_client.v2.model.jira_issue_template_create_request_attributes import ( @@ -3115,9 +3112,6 @@ from datadog_api_client.v2.model.monthly_cost_attribution_meta import MonthlyCostAttributionMeta from datadog_api_client.v2.model.monthly_cost_attribution_pagination import MonthlyCostAttributionPagination from datadog_api_client.v2.model.monthly_cost_attribution_response import MonthlyCostAttributionResponse -from datadog_api_client.v2.model.notebook_create_data import NotebookCreateData -from datadog_api_client.v2.model.notebook_create_request import NotebookCreateRequest -from datadog_api_client.v2.model.notebook_resource_type import NotebookResourceType from datadog_api_client.v2.model.notebook_trigger_wrapper import NotebookTriggerWrapper from datadog_api_client.v2.model.notification_channel import NotificationChannel from datadog_api_client.v2.model.notification_channel_attributes import NotificationChannelAttributes @@ -4257,7 +4251,6 @@ ) from datadog_api_client.v2.model.relationship_to_incident_postmortem import RelationshipToIncidentPostmortem from datadog_api_client.v2.model.relationship_to_incident_postmortem_data import RelationshipToIncidentPostmortemData -from datadog_api_client.v2.model.relationship_to_incident_request import RelationshipToIncidentRequest from datadog_api_client.v2.model.relationship_to_incident_responder_data import RelationshipToIncidentResponderData from datadog_api_client.v2.model.relationship_to_incident_responders import RelationshipToIncidentResponders from datadog_api_client.v2.model.relationship_to_incident_type import RelationshipToIncidentType @@ -4639,6 +4632,12 @@ from datadog_api_client.v2.model.schedule_user_type import ScheduleUserType from datadog_api_client.v2.model.scorecard_type import ScorecardType from datadog_api_client.v2.model.search_issues_include_query_parameter_item import SearchIssuesIncludeQueryParameterItem +from datadog_api_client.v2.model.seat_assignments_data_type import SeatAssignmentsDataType +from datadog_api_client.v2.model.seat_user_data import SeatUserData +from datadog_api_client.v2.model.seat_user_data_array import SeatUserDataArray +from datadog_api_client.v2.model.seat_user_data_attributes import SeatUserDataAttributes +from datadog_api_client.v2.model.seat_user_data_type import SeatUserDataType +from datadog_api_client.v2.model.seat_user_meta import SeatUserMeta from datadog_api_client.v2.model.secret_rule_array import SecretRuleArray from datadog_api_client.v2.model.secret_rule_data import SecretRuleData from datadog_api_client.v2.model.secret_rule_data_attributes import SecretRuleDataAttributes @@ -5187,10 +5186,6 @@ from datadog_api_client.v2.model.service_now_template_update_request_data import ServiceNowTemplateUpdateRequestData from datadog_api_client.v2.model.service_now_templates_response import ServiceNowTemplatesResponse from datadog_api_client.v2.model.service_now_ticket import ServiceNowTicket -from datadog_api_client.v2.model.service_now_ticket_create_attributes import ServiceNowTicketCreateAttributes -from datadog_api_client.v2.model.service_now_ticket_create_data import ServiceNowTicketCreateData -from datadog_api_client.v2.model.service_now_ticket_create_request import ServiceNowTicketCreateRequest -from datadog_api_client.v2.model.service_now_ticket_resource_type import ServiceNowTicketResourceType from datadog_api_client.v2.model.service_now_ticket_result import ServiceNowTicketResult from datadog_api_client.v2.model.service_now_user_attributes import ServiceNowUserAttributes from datadog_api_client.v2.model.service_now_user_data import ServiceNowUserData @@ -5739,6 +5734,11 @@ UCConfigPairDataAttributesConfigsItems, ) from datadog_api_client.v2.model.uc_config_pair_data_type import UCConfigPairDataType +from datadog_api_client.v2.model.unassign_seats_user_request import UnassignSeatsUserRequest +from datadog_api_client.v2.model.unassign_seats_user_request_data import UnassignSeatsUserRequestData +from datadog_api_client.v2.model.unassign_seats_user_request_data_attributes import ( + UnassignSeatsUserRequestDataAttributes, +) from datadog_api_client.v2.model.unit import Unit from datadog_api_client.v2.model.unpublish_app_response import UnpublishAppResponse from datadog_api_client.v2.model.update_action_connection_request import UpdateActionConnectionRequest @@ -6262,6 +6262,12 @@ "AssetRisks", "AssetType", "AssetVersion", + "AssignSeatsUserRequest", + "AssignSeatsUserRequestData", + "AssignSeatsUserRequestDataAttributes", + "AssignSeatsUserResponse", + "AssignSeatsUserResponseData", + "AssignSeatsUserResponseDataAttributes", "AttachCaseRequest", "AttachCaseRequestData", "AttachCaseRequestDataRelationships", @@ -7805,8 +7811,6 @@ "IncidentNotificationTemplateUpdateData", "IncidentPostmortemType", "IncidentRelatedObject", - "IncidentRelationshipData", - "IncidentResourceType", "IncidentRespondersType", "IncidentResponse", "IncidentResponseAttributes", @@ -7993,13 +7997,6 @@ "JiraIntegrationMetadata", "JiraIntegrationMetadataIssuesItem", "JiraIssue", - "JiraIssueCreateAttributes", - "JiraIssueCreateData", - "JiraIssueCreateRequest", - "JiraIssueLinkAttributes", - "JiraIssueLinkData", - "JiraIssueLinkRequest", - "JiraIssueResourceType", "JiraIssueResult", "JiraIssueTemplateCreateRequest", "JiraIssueTemplateCreateRequestAttributes", @@ -8375,9 +8372,6 @@ "MonthlyCostAttributionMeta", "MonthlyCostAttributionPagination", "MonthlyCostAttributionResponse", - "NotebookCreateData", - "NotebookCreateRequest", - "NotebookResourceType", "NotebookTriggerWrapper", "NotificationChannel", "NotificationChannelAttributes", @@ -9017,7 +9011,6 @@ "RelationshipToIncidentNotificationTemplateData", "RelationshipToIncidentPostmortem", "RelationshipToIncidentPostmortemData", - "RelationshipToIncidentRequest", "RelationshipToIncidentResponderData", "RelationshipToIncidentResponders", "RelationshipToIncidentType", @@ -9323,6 +9316,12 @@ "ScheduleUserType", "ScorecardType", "SearchIssuesIncludeQueryParameterItem", + "SeatAssignmentsDataType", + "SeatUserData", + "SeatUserDataArray", + "SeatUserDataAttributes", + "SeatUserDataType", + "SeatUserMeta", "SecretRuleArray", "SecretRuleData", "SecretRuleDataAttributes", @@ -9663,10 +9662,6 @@ "ServiceNowTemplateUpdateRequestData", "ServiceNowTemplatesResponse", "ServiceNowTicket", - "ServiceNowTicketCreateAttributes", - "ServiceNowTicketCreateData", - "ServiceNowTicketCreateRequest", - "ServiceNowTicketResourceType", "ServiceNowTicketResult", "ServiceNowUserAttributes", "ServiceNowUserData", @@ -10077,6 +10072,9 @@ "UCConfigPairDataAttributes", "UCConfigPairDataAttributesConfigsItems", "UCConfigPairDataType", + "UnassignSeatsUserRequest", + "UnassignSeatsUserRequestData", + "UnassignSeatsUserRequestDataAttributes", "Unit", "UnpublishAppResponse", "UpdateActionConnectionRequest", diff --git a/tests/v2/features/case_management.feature b/tests/v2/features/case_management.feature index 56d8f9ed68..7e26a5815f 100644 --- a/tests/v2/features/case_management.feature +++ b/tests/v2/features/case_management.feature @@ -90,60 +90,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Create Jira issue for case returns "Accepted" response - Given operation "CreateCaseJiraIssue" enabled - And new "CreateCaseJiraIssue" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"fields": {}, "issue_type_id": "10001", "jira_account_id": "1234", "project_id": "5678"}, "type": "issues"}} - When the request is sent - Then the response status is 202 Accepted - - @generated @skip @team:DataDog/case-management - Scenario: Create Jira issue for case returns "Bad Request" response - Given operation "CreateCaseJiraIssue" enabled - And new "CreateCaseJiraIssue" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"fields": {}, "issue_type_id": "10001", "jira_account_id": "1234", "project_id": "5678"}, "type": "issues"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create Jira issue for case returns "Not Found" response - Given operation "CreateCaseJiraIssue" enabled - And new "CreateCaseJiraIssue" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"fields": {}, "issue_type_id": "10001", "jira_account_id": "1234", "project_id": "5678"}, "type": "issues"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Create ServiceNow ticket for case returns "Accepted" response - Given operation "CreateCaseServiceNowTicket" enabled - And new "CreateCaseServiceNowTicket" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"assignment_group": "IT Support", "instance_name": "my-instance"}, "type": "tickets"}} - When the request is sent - Then the response status is 202 Accepted - - @generated @skip @team:DataDog/case-management - Scenario: Create ServiceNow ticket for case returns "Bad Request" response - Given operation "CreateCaseServiceNowTicket" enabled - And new "CreateCaseServiceNowTicket" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"assignment_group": "IT Support", "instance_name": "my-instance"}, "type": "tickets"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create ServiceNow ticket for case returns "Not Found" response - Given operation "CreateCaseServiceNowTicket" enabled - And new "CreateCaseServiceNowTicket" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"assignment_group": "IT Support", "instance_name": "my-instance"}, "type": "tickets"}} - When the request is sent - Then the response status is 404 Not Found - @team:DataDog/case-management Scenario: Create a case returns "Bad Request" response Given new "CreateCase" request @@ -215,33 +161,6 @@ Feature: Case Management When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/case-management - Scenario: Create investigation notebook for case returns "Bad Request" response - Given operation "CreateCaseNotebook" enabled - And new "CreateCaseNotebook" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"type": "notebook"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Create investigation notebook for case returns "No Content" response - Given operation "CreateCaseNotebook" enabled - And new "CreateCaseNotebook" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"type": "notebook"}} - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Create investigation notebook for case returns "Not Found" response - Given operation "CreateCaseNotebook" enabled - And new "CreateCaseNotebook" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"type": "notebook"}} - 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 @@ -389,93 +308,6 @@ Feature: Case Management When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/case-management - Scenario: Link existing Jira issue to case returns "Bad Request" response - Given operation "LinkJiraIssueToCase" enabled - And new "LinkJiraIssueToCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"jira_issue_url": "https://jira.example.com/browse/PROJ-123"}, "type": "issues"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Link existing Jira issue to case returns "Conflict" response - Given operation "LinkJiraIssueToCase" enabled - And new "LinkJiraIssueToCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"jira_issue_url": "https://jira.example.com/browse/PROJ-123"}, "type": "issues"}} - When the request is sent - Then the response status is 409 Conflict - - @generated @skip @team:DataDog/case-management - Scenario: Link existing Jira issue to case returns "No Content" response - Given operation "LinkJiraIssueToCase" enabled - And new "LinkJiraIssueToCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"jira_issue_url": "https://jira.example.com/browse/PROJ-123"}, "type": "issues"}} - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Link existing Jira issue to case returns "Not Found" response - Given operation "LinkJiraIssueToCase" enabled - And new "LinkJiraIssueToCase" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"jira_issue_url": "https://jira.example.com/browse/PROJ-123"}, "type": "issues"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Link incident to case returns "Bad Request" response - Given operation "LinkIncident" enabled - And new "LinkIncident" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incidents"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Link incident to case returns "Created" response - Given operation "LinkIncident" enabled - And new "LinkIncident" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incidents"}} - When the request is sent - Then the response status is 201 Created - - @generated @skip @team:DataDog/case-management - Scenario: Link incident to case returns "Not Found" response - Given operation "LinkIncident" enabled - And new "LinkIncident" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incidents"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Remove Jira issue link from case returns "Bad Request" response - Given operation "UnlinkJiraIssue" enabled - And new "UnlinkJiraIssue" request - And request contains "case_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: Remove Jira issue link from case returns "No Content" response - Given operation "UnlinkJiraIssue" enabled - And new "UnlinkJiraIssue" request - And request contains "case_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/case-management - Scenario: Remove Jira issue link from case returns "Not Found" response - Given operation "UnlinkJiraIssue" enabled - And new "UnlinkJiraIssue" request - And request contains "case_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: Remove a project returns "API error response" response Given new "DeleteProject" request @@ -732,33 +564,6 @@ Feature: Case Management Then the response status is 200 OK And the response "data.attributes.priority" is equal to "P3" - @generated @skip @team:DataDog/case-management - Scenario: Update case project returns "Bad Request" response - Given operation "MoveCaseToProject" enabled - And new "MoveCaseToProject" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/case-management - Scenario: Update case project returns "Not Found" response - Given operation "MoveCaseToProject" enabled - And new "MoveCaseToProject" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/case-management - Scenario: Update case project returns "OK" response - Given operation "MoveCaseToProject" enabled - And new "MoveCaseToProject" request - And request contains "case_id" parameter from "REPLACE.ME" - And body with value {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}} - When the request is sent - Then the response status is 200 OK - @team:DataDog/case-management Scenario: Update case status returns "Bad Request" response Given new "UpdateStatus" request diff --git a/tests/v2/features/seats.feature b/tests/v2/features/seats.feature new file mode 100644 index 0000000000..e3a5205c3c --- /dev/null +++ b/tests/v2/features/seats.feature @@ -0,0 +1,72 @@ +@endpoint(seats) @endpoint(seats-v2) +Feature: Seats + The seats API allows you to view, assign, and unassign seats for your + organization. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Seats" API + + @generated @skip @team:DataDog/billing-experience + Scenario: Assign seats to users returns "Bad Request" response + Given new "AssignSeatsUserV2" request + And body with value {"data": {"attributes": {"product_code": "", "user_uuids": [""]}, "type": "seat-assignments"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/billing-experience + Scenario: Assign seats to users returns "Created" response + Given new "AssignSeatsUserV2" request + And body with value {"data": {"attributes": {"product_code": "", "user_uuids": [""]}, "type": "seat-assignments"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/billing-experience + Scenario: Assign seats to users returns "Unprocessable Entity" response + Given new "AssignSeatsUserV2" request + And body with value {"data": {"attributes": {"product_code": "", "user_uuids": [""]}, "type": "seat-assignments"}} + When the request is sent + Then the response status is 422 Unprocessable Entity + + @generated @skip @team:DataDog/billing-experience + Scenario: Get seats users returns "Bad Request" response + Given new "GetSeatsUsersV2" request + And request contains "product_code" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/billing-experience + Scenario: Get seats users returns "OK" response + Given new "GetSeatsUsersV2" request + And request contains "product_code" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/billing-experience + Scenario: Get seats users returns "Unprocessable Entity" response + Given new "GetSeatsUsersV2" request + And request contains "product_code" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 422 Unprocessable Entity + + @generated @skip @team:DataDog/billing-experience + Scenario: Unassign seats from users returns "Bad Request" response + Given new "UnassignSeatsUserV2" request + And body with value {"data": {"attributes": {"product_code": "", "user_uuids": [""]}, "type": "seat-assignments"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/billing-experience + Scenario: Unassign seats from users returns "No Content" response + Given new "UnassignSeatsUserV2" request + And body with value {"data": {"attributes": {"product_code": "", "user_uuids": [""]}, "type": "seat-assignments"}} + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/billing-experience + Scenario: Unassign seats from users returns "Unprocessable Entity" response + Given new "UnassignSeatsUserV2" request + And body with value {"data": {"attributes": {"product_code": "", "user_uuids": [""]}, "type": "seat-assignments"}} + When the request is sent + Then the response status is 422 Unprocessable Entity diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 5727d36b95..5f24936509 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -836,56 +836,6 @@ "type": "idempotent" } }, - "LinkIncident": { - "tag": "Case Management", - "undo": { - "operationId": "TODO", - "parameters": [], - "type": "unsafe" - } - }, - "UnlinkJiraIssue": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "LinkJiraIssueToCase": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "CreateCaseJiraIssue": { - "tag": "Case Management", - "undo": { - "operationId": "TODO", - "parameters": [], - "type": "unsafe" - } - }, - "CreateCaseNotebook": { - "tag": "Case Management", - "undo": { - "operationId": "TODO", - "parameters": [], - "type": "unsafe" - } - }, - "MoveCaseToProject": { - "tag": "Case Management", - "undo": { - "type": "idempotent" - } - }, - "CreateCaseServiceNowTicket": { - "tag": "Case Management", - "undo": { - "operationId": "TODO", - "parameters": [], - "type": "unsafe" - } - }, "UpdateStatus": { "tag": "Case Management", "undo": { @@ -4274,6 +4224,31 @@ "type": "idempotent" } }, + "UnassignSeatsUserV2": { + "tag": "Seats", + "undo": { + "type": "idempotent" + } + }, + "GetSeatsUsersV2": { + "tag": "Seats", + "undo": { + "type": "safe" + } + }, + "AssignSeatsUserV2": { + "tag": "Seats", + "undo": { + "operationId": "UnassignSeatsUserV2", + "parameters": [ + { + "name": "body", + "template": "{\"data\": {\"type\": \"seat-assignments\", \"attributes\": {\"product_code\": \"{{ data.attributes.product_code }}\", \"user_uuids\": {{ data.attributes.assigned_ids }}}}}" + } + ], + "type": "unsafe" + } + }, "ListEntityRiskScores": { "tag": "Entity Risk Scores", "undo": {