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
27 changes: 27 additions & 0 deletions src/datadogV2/model/model_case_create_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ use std::fmt::{self, Formatter};
#[skip_serializing_none]
#[derive(Clone, Debug, PartialEq, Serialize)]
pub struct CaseCreateAttributes {
/// Case custom attributes
#[serde(rename = "custom_attributes")]
pub custom_attributes:
Option<std::collections::BTreeMap<String, crate::datadogV2::model::CustomAttributeValue>>,
/// Description
#[serde(rename = "description")]
pub description: Option<String>,
Expand All @@ -33,6 +37,7 @@ pub struct CaseCreateAttributes {
impl CaseCreateAttributes {
pub fn new(title: String, type_id: String) -> CaseCreateAttributes {
CaseCreateAttributes {
custom_attributes: None,
description: None,
priority: None,
title,
Expand All @@ -42,6 +47,14 @@ impl CaseCreateAttributes {
}
}

pub fn custom_attributes(
mut self,
value: std::collections::BTreeMap<String, crate::datadogV2::model::CustomAttributeValue>,
) -> Self {
self.custom_attributes = Some(value);
self
}

pub fn description(mut self, value: String) -> Self {
self.description = Some(value);
self
Expand Down Expand Up @@ -78,6 +91,12 @@ impl<'de> Deserialize<'de> for CaseCreateAttributes {
where
M: MapAccess<'a>,
{
let mut custom_attributes: Option<
std::collections::BTreeMap<
String,
crate::datadogV2::model::CustomAttributeValue,
>,
> = None;
let mut description: Option<String> = None;
let mut priority: Option<crate::datadogV2::model::CasePriority> = None;
let mut title: Option<String> = None;
Expand All @@ -90,6 +109,13 @@ impl<'de> Deserialize<'de> for CaseCreateAttributes {

while let Some((k, v)) = map.next_entry::<String, serde_json::Value>()? {
match k.as_str() {
"custom_attributes" => {
if v.is_null() {
continue;
}
custom_attributes =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"description" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -130,6 +156,7 @@ impl<'de> Deserialize<'de> for CaseCreateAttributes {
let type_id = type_id.ok_or_else(|| M::Error::missing_field("type_id"))?;

let content = CaseCreateAttributes {
custom_attributes,
description,
priority,
title,
Expand Down
3 changes: 3 additions & 0 deletions src/datadogV2/model/model_custom_attribute_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pub enum CustomAttributeType {
URL,
TEXT,
NUMBER,
SELECT,
UnparsedObject(crate::datadog::UnparsedObject),
}

Expand All @@ -19,6 +20,7 @@ impl ToString for CustomAttributeType {
Self::URL => String::from("URL"),
Self::TEXT => String::from("TEXT"),
Self::NUMBER => String::from("NUMBER"),
Self::SELECT => String::from("SELECT"),
Self::UnparsedObject(v) => v.value.to_string(),
}
}
Expand Down Expand Up @@ -46,6 +48,7 @@ impl<'de> Deserialize<'de> for CustomAttributeType {
"URL" => Self::URL,
"TEXT" => Self::TEXT,
"NUMBER" => Self::NUMBER,
"SELECT" => Self::SELECT,
_ => Self::UnparsedObject(crate::datadog::UnparsedObject {
value: serde_json::Value::String(s.into()),
}),
Expand Down
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 @@ -19,7 +19,7 @@
},
"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\":\"[email protected]\",\"handle\":\"[email protected]\",\"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\":\"[email protected]\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}",
"encoding": null
},
"headers": {
Expand All @@ -32,7 +32,7 @@
"message": "Created"
}
},
"recorded_at": "Wed, 01 Oct 2025 12:46:29 GMT"
"recorded_at": "Tue, 30 Dec 2025 13:49:44 GMT"
},
{
"request": {
Expand All @@ -49,7 +49,7 @@
]
},
"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": {
Expand All @@ -66,7 +66,7 @@
"message": "Bad Request"
}
},
"recorded_at": "Wed, 01 Oct 2025 12:46:29 GMT"
"recorded_at": "Tue, 30 Dec 2025 13:49:44 GMT"
}
],
"recorded_with": "VCR 6.0.0"
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 @@ -19,7 +19,7 @@
},
"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\":\"[email protected]\",\"handle\":\"[email protected]\",\"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\":\"[email protected]\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}",
"encoding": null
},
"headers": {
Expand All @@ -32,7 +32,7 @@
"message": "Created"
}
},
"recorded_at": "Wed, 01 Oct 2025 12:46:31 GMT"
"recorded_at": "Tue, 30 Dec 2025 13:49:45 GMT"
},
{
"request": {
Expand All @@ -49,11 +49,11 @@
]
},
"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\":\"[email protected]\",\"handle\":\"[email protected]\",\"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\":\"[email protected]\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}",
"encoding": null
},
"headers": {
Expand All @@ -66,7 +66,7 @@
"message": "OK"
}
},
"recorded_at": "Wed, 01 Oct 2025 12:46:31 GMT"
"recorded_at": "Tue, 30 Dec 2025 13:49:45 GMT"
}
],
"recorded_with": "VCR 6.0.0"
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 @@ -19,7 +19,7 @@
},
"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\":\"[email protected]\",\"handle\":\"[email protected]\",\"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\":\"[email protected]\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}",
"encoding": null
},
"headers": {
Expand All @@ -32,7 +32,7 @@
"message": "Created"
}
},
"recorded_at": "Wed, 01 Oct 2025 12:46:31 GMT"
"recorded_at": "Tue, 30 Dec 2025 13:49:45 GMT"
},
{
"request": {
Expand All @@ -49,7 +49,7 @@
]
},
"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": {
Expand All @@ -66,7 +66,7 @@
"message": "Bad Request"
}
},
"recorded_at": "Wed, 01 Oct 2025 12:46:31 GMT"
"recorded_at": "Tue, 30 Dec 2025 13:49:45 GMT"
}
],
"recorded_with": "VCR 6.0.0"
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