Skip to content

Commit 1a50546

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 37786faa of spec repo
1 parent 9b3bdbc commit 1a50546

File tree

4 files changed

+32
-4
lines changed

4 files changed

+32
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-04-08 20:55:41.621292",
8-
"spec_repo_commit": "21cf6edb"
7+
"regenerated": "2025-04-09 12:18:27.625240",
8+
"spec_repo_commit": "37786faa"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-08 20:55:41.637249",
13-
"spec_repo_commit": "21cf6edb"
12+
"regenerated": "2025-04-09 12:18:27.641993",
13+
"spec_repo_commit": "37786faa"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27223,16 +27223,23 @@ components:
2722327223
format: int64
2722427224
minimum: 0
2722527225
type: integer
27226+
userBehaviorName:
27227+
$ref: '#/components/schemas/SecurityMonitoringRuleCaseActionOptionsUserBehaviorName'
2722627228
type: object
27229+
SecurityMonitoringRuleCaseActionOptionsUserBehaviorName:
27230+
description: Name of the user behavior.
27231+
type: string
2722727232
SecurityMonitoringRuleCaseActionType:
2722827233
description: The action type.
2722927234
enum:
2723027235
- block_ip
2723127236
- block_user
27237+
- user_behavior
2723227238
type: string
2723327239
x-enum-varnames:
2723427240
- BLOCK_IP
2723527241
- BLOCK_USER
27242+
- USER_BEHAVIOR
2723627243
SecurityMonitoringRuleCaseCreate:
2723727244
description: Case when signal is generated.
2723827245
properties:

src/datadogV2/model/model_security_monitoring_rule_case_action_options.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ pub struct SecurityMonitoringRuleCaseActionOptions {
1414
/// Duration of the action in seconds. 0 indicates no expiration.
1515
#[serde(rename = "duration")]
1616
pub duration: Option<i64>,
17+
/// Name of the user behavior.
18+
#[serde(rename = "userBehaviorName")]
19+
pub user_behavior_name: Option<String>,
1720
#[serde(flatten)]
1821
pub additional_properties: std::collections::BTreeMap<String, serde_json::Value>,
1922
#[serde(skip)]
@@ -25,6 +28,7 @@ impl SecurityMonitoringRuleCaseActionOptions {
2528
pub fn new() -> SecurityMonitoringRuleCaseActionOptions {
2629
SecurityMonitoringRuleCaseActionOptions {
2730
duration: None,
31+
user_behavior_name: None,
2832
additional_properties: std::collections::BTreeMap::new(),
2933
_unparsed: false,
3034
}
@@ -35,6 +39,11 @@ impl SecurityMonitoringRuleCaseActionOptions {
3539
self
3640
}
3741

42+
pub fn user_behavior_name(mut self, value: String) -> Self {
43+
self.user_behavior_name = Some(value);
44+
self
45+
}
46+
3847
pub fn additional_properties(
3948
mut self,
4049
value: std::collections::BTreeMap<String, serde_json::Value>,
@@ -68,6 +77,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringRuleCaseActionOptions {
6877
M: MapAccess<'a>,
6978
{
7079
let mut duration: Option<i64> = None;
80+
let mut user_behavior_name: Option<String> = None;
7181
let mut additional_properties: std::collections::BTreeMap<
7282
String,
7383
serde_json::Value,
@@ -82,6 +92,13 @@ impl<'de> Deserialize<'de> for SecurityMonitoringRuleCaseActionOptions {
8292
}
8393
duration = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
8494
}
95+
"userBehaviorName" => {
96+
if v.is_null() {
97+
continue;
98+
}
99+
user_behavior_name =
100+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
101+
}
85102
&_ => {
86103
if let Ok(value) = serde_json::from_value(v.clone()) {
87104
additional_properties.insert(k, value);
@@ -92,6 +109,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringRuleCaseActionOptions {
92109

93110
let content = SecurityMonitoringRuleCaseActionOptions {
94111
duration,
112+
user_behavior_name,
95113
additional_properties,
96114
_unparsed,
97115
};

src/datadogV2/model/model_security_monitoring_rule_case_action_type.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
99
pub enum SecurityMonitoringRuleCaseActionType {
1010
BLOCK_IP,
1111
BLOCK_USER,
12+
USER_BEHAVIOR,
1213
UnparsedObject(crate::datadog::UnparsedObject),
1314
}
1415

@@ -17,6 +18,7 @@ impl ToString for SecurityMonitoringRuleCaseActionType {
1718
match self {
1819
Self::BLOCK_IP => String::from("block_ip"),
1920
Self::BLOCK_USER => String::from("block_user"),
21+
Self::USER_BEHAVIOR => String::from("user_behavior"),
2022
Self::UnparsedObject(v) => v.value.to_string(),
2123
}
2224
}
@@ -43,6 +45,7 @@ impl<'de> Deserialize<'de> for SecurityMonitoringRuleCaseActionType {
4345
Ok(match s.as_str() {
4446
"block_ip" => Self::BLOCK_IP,
4547
"block_user" => Self::BLOCK_USER,
48+
"user_behavior" => Self::USER_BEHAVIOR,
4649
_ => Self::UnparsedObject(crate::datadog::UnparsedObject {
4750
value: serde_json::Value::String(s.into()),
4851
}),

0 commit comments

Comments
 (0)