Skip to content

Commit a8afd81

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

File tree

4 files changed

+34
-4
lines changed

4 files changed

+34
-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:41:18.909690",
8+
"spec_repo_commit": "f8db1e11"
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:41:18.925302",
13+
"spec_repo_commit": "f8db1e11"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27215,6 +27215,7 @@ components:
2721527215
$ref: '#/components/schemas/SecurityMonitoringRuleCaseActionType'
2721627216
type: object
2721727217
SecurityMonitoringRuleCaseActionOptions:
27218+
additionalProperties: {}
2721827219
description: Options for the rule action
2721927220
properties:
2722027221
duration:
@@ -27223,16 +27224,24 @@ components:
2722327224
format: int64
2722427225
minimum: 0
2722527226
type: integer
27227+
userBehaviorName:
27228+
$ref: '#/components/schemas/SecurityMonitoringRuleCaseActionOptionsUserBehaviorName'
2722627229
type: object
27230+
SecurityMonitoringRuleCaseActionOptionsUserBehaviorName:
27231+
description: Used with the case action of type 'user_behavior'. The value specified
27232+
in this field will be applied as a risk tag to all users affected by the rule.
27233+
type: string
2722727234
SecurityMonitoringRuleCaseActionType:
2722827235
description: The action type.
2722927236
enum:
2723027237
- block_ip
2723127238
- block_user
27239+
- user_behavior
2723227240
type: string
2723327241
x-enum-varnames:
2723427242
- BLOCK_IP
2723527243
- BLOCK_USER
27244+
- USER_BEHAVIOR
2723627245
SecurityMonitoringRuleCaseCreate:
2723727246
description: Case when signal is generated.
2723827247
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+
/// Used with the case action of type 'user_behavior'. The value specified in this field will be applied as a risk tag to all users affected by the rule.
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)