Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9168,6 +9168,11 @@ components:
CaseCreateAttributes:
description: Case creation attributes
properties:
custom_attributes:
additionalProperties:
$ref: '#/components/schemas/CustomAttributeValue'
description: Case custom attributes
type: object
description:
description: Description
type: string
Expand Down Expand Up @@ -14712,30 +14717,32 @@ components:
type: number
type: array
CustomAttributeMultiStringValue:
description: Value of multi TEXT/URL custom attribute
description: Value of multi TEXT/URL/SELECT custom attribute
items:
description: TEXT/URL Value
description: TEXT/URL/SELECT Value
type: string
type: array
CustomAttributeNumberValue:
description: Value of NUMBER custom attribute
format: double
type: number
CustomAttributeStringValue:
description: Value of TEXT/URL custom attribute
description: Value of TEXT/URL/SELECT custom attribute
type: string
CustomAttributeType:
description: Custom attributes type
enum:
- URL
- TEXT
- NUMBER
- SELECT
example: NUMBER
type: string
x-enum-varnames:
- URL
- TEXT
- NUMBER
- SELECT
CustomAttributeValue:
description: Custom attribute values
properties:
Expand Down
12 changes: 11 additions & 1 deletion src/datadog_api_client/v2/model/case_create_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union, TYPE_CHECKING
from typing import Dict, Union, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -14,22 +14,26 @@


if TYPE_CHECKING:
from datadog_api_client.v2.model.custom_attribute_value import CustomAttributeValue
from datadog_api_client.v2.model.case_priority import CasePriority


class CaseCreateAttributes(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.custom_attribute_value import CustomAttributeValue
from datadog_api_client.v2.model.case_priority import CasePriority

return {
"custom_attributes": ({str: (CustomAttributeValue,)},),
"description": (str,),
"priority": (CasePriority,),
"title": (str,),
"type_id": (str,),
}

attribute_map = {
"custom_attributes": "custom_attributes",
"description": "description",
"priority": "priority",
"title": "title",
Expand All @@ -40,13 +44,17 @@ def __init__(
self_,
title: str,
type_id: str,
custom_attributes: Union[Dict[str, CustomAttributeValue], UnsetType] = unset,
description: Union[str, UnsetType] = unset,
priority: Union[CasePriority, UnsetType] = unset,
**kwargs,
):
"""
Case creation attributes

:param custom_attributes: Case custom attributes
:type custom_attributes: {str: (CustomAttributeValue,)}, optional

:param description: Description
:type description: str, optional

Expand All @@ -59,6 +67,8 @@ def __init__(
:param type_id: Case type UUID
:type type_id: str
"""
if custom_attributes is not unset:
kwargs["custom_attributes"] = custom_attributes
if description is not unset:
kwargs["description"] = description
if priority is not unset:
Expand Down
5 changes: 4 additions & 1 deletion src/datadog_api_client/v2/model/custom_attribute_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ class CustomAttributeType(ModelSimple):
"""
Custom attributes type

:param value: Must be one of ["URL", "TEXT", "NUMBER"].
:param value: Must be one of ["URL", "TEXT", "NUMBER", "SELECT"].
:type value: str
"""

allowed_values = {
"URL",
"TEXT",
"NUMBER",
"SELECT",
}
URL: ClassVar["CustomAttributeType"]
TEXT: ClassVar["CustomAttributeType"]
NUMBER: ClassVar["CustomAttributeType"]
SELECT: ClassVar["CustomAttributeType"]

@cached_property
def openapi_types(_):
Expand All @@ -39,3 +41,4 @@ def openapi_types(_):
CustomAttributeType.URL = CustomAttributeType("URL")
CustomAttributeType.TEXT = CustomAttributeType("TEXT")
CustomAttributeType.NUMBER = CustomAttributeType("NUMBER")
CustomAttributeType.SELECT = CustomAttributeType("SELECT")
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-10-01T12:46:29.817Z
2025-12-30T13:49:44.747Z
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ interactions:
uri: https://api.datadoghq.com/api/v2/cases
response:
body:
string: '{"data":{"id":"3601878d-b851-43b6-900f-0deb35e536d7","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-10-01T12:46:30.261735Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"3601878d-b851-43b6-900f-0deb35e536d7","key":"DDFC-82968","merge_status":"NOT_MERGED","priority":"P4","public_id":"83056","status":"OPEN","status_name":"Open","title":"My
new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}'
string: '{"data":{"id":"e3f011bc-8ae6-4ec2-b80d-3069e73bc6a1","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-12-30T13:49:45.033566Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"e3f011bc-8ae6-4ec2-b80d-3069e73bc6a1","key":"DDFC-98805","merge_status":"NOT_MERGED","priority":"P4","public_id":"99261","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"My
new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"active":true,"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI
Account"}}]}'
headers:
content-type:
- application/vnd.api+json
Expand All @@ -26,7 +27,7 @@ interactions:
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v2/cases/3601878d-b851-43b6-900f-0deb35e536d7/archive
uri: https://api.datadoghq.com/api/v2/cases/e3f011bc-8ae6-4ec2-b80d-3069e73bc6a1/archive
response:
body:
string: '{"errors":[{"status":"400","title":"Bad Request","detail":"got type
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-10-01T12:46:31.029Z
2025-12-30T13:49:45.212Z
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ interactions:
uri: https://api.datadoghq.com/api/v2/cases
response:
body:
string: '{"data":{"id":"b5cf9b44-cb77-4487-a436-0e3ef4e88d49","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-10-01T12:46:31.456149Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"b5cf9b44-cb77-4487-a436-0e3ef4e88d49","key":"DDFC-82969","merge_status":"NOT_MERGED","priority":"P4","public_id":"83057","status":"OPEN","status_name":"Open","title":"My
new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}'
string: '{"data":{"id":"926e6b8a-4af6-43b2-8a29-33813af68594","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-12-30T13:49:45.269528Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"926e6b8a-4af6-43b2-8a29-33813af68594","key":"DDFC-98806","merge_status":"NOT_MERGED","priority":"P4","public_id":"99262","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"My
new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"active":true,"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI
Account"}}]}'
headers:
content-type:
- application/vnd.api+json
Expand All @@ -26,11 +27,12 @@ interactions:
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v2/cases/b5cf9b44-cb77-4487-a436-0e3ef4e88d49/archive
uri: https://api.datadoghq.com/api/v2/cases/926e6b8a-4af6-43b2-8a29-33813af68594/archive
response:
body:
string: '{"data":{"id":"b5cf9b44-cb77-4487-a436-0e3ef4e88d49","type":"case","attributes":{"archived_at":"2025-10-01T12:46:31.920596976Z","attributes":{},"comment_count":0,"created_at":"2025-10-01T12:46:31.456149Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"b5cf9b44-cb77-4487-a436-0e3ef4e88d49","key":"DDFC-82969","merge_status":"NOT_MERGED","modified_at":"2025-10-01T12:46:31.920597Z","priority":"P4","public_id":"83057","status":"OPEN","status_name":"Open","title":"My
new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"modified_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}'
string: '{"data":{"id":"926e6b8a-4af6-43b2-8a29-33813af68594","type":"case","attributes":{"archived_at":"2025-12-30T13:49:45.40368576Z","attributes":{},"comment_count":0,"created_at":"2025-12-30T13:49:45.269528Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"926e6b8a-4af6-43b2-8a29-33813af68594","key":"DDFC-98806","merge_status":"NOT_MERGED","modified_at":"2025-12-30T13:49:45.403686Z","priority":"P4","public_id":"99262","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"My
new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"modified_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"active":true,"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI
Account"}}]}'
headers:
content-type:
- application/vnd.api+json
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-10-01T12:46:31.968Z
2025-12-30T13:49:45.450Z
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ interactions:
uri: https://api.datadoghq.com/api/v2/cases
response:
body:
string: '{"data":{"id":"1beeecc8-5c4f-4194-a785-e5c60234e263","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-10-01T12:46:32.453117Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"1beeecc8-5c4f-4194-a785-e5c60234e263","key":"DDFC-82970","merge_status":"NOT_MERGED","priority":"P4","public_id":"83058","status":"OPEN","status_name":"Open","title":"My
new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"relationships":{"created_by":{"data":{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"3ad549bf-eba0-11e9-a77a-0705486660d0","type":"user","attributes":{"active":true,"email":"frog@datadoghq.com","handle":"frog@datadoghq.com","name":"frog"}}]}'
string: '{"data":{"id":"b3cef7a0-9637-43fb-88cf-d9ac56310a7b","type":"case","attributes":{"attributes":{},"comment_count":0,"created_at":"2025-12-30T13:49:45.508531Z","creation_source":"MANUAL","custom_attributes":{},"description":"","insights":[],"internal_id":"b3cef7a0-9637-43fb-88cf-d9ac56310a7b","key":"DDFC-98807","merge_status":"NOT_MERGED","priority":"P4","public_id":"99263","status":"OPEN","status_group":"SG_OPEN","status_name":"Open","title":"My
new case","type":"STANDARD","type_id":"00000000-0000-0000-0000-000000000001"},"relationships":{"created_by":{"data":{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user"}},"project":{"data":{"id":"d4bbe1af-f36e-42f1-87c1-493ca35c320e","type":"project"}}}},"included":[{"id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","type":"user","attributes":{"active":true,"email":"team-intg-tools-libs-spam@datadoghq.com","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","name":"CI
Account"}}]}'
headers:
content-type:
- application/vnd.api+json
Expand All @@ -26,7 +27,7 @@ interactions:
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v2/cases/1beeecc8-5c4f-4194-a785-e5c60234e263/assign
uri: https://api.datadoghq.com/api/v2/cases/b3cef7a0-9637-43fb-88cf-d9ac56310a7b/assign
response:
body:
string: '{"errors":[{"status":"400","title":"Bad Request"}]}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-10-01T12:46:34.590Z
2025-12-30T13:49:45.709Z
Loading