Skip to content

Commit 150e2b8

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1a0e3ba of spec repo
1 parent d3bff53 commit 150e2b8

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9421,9 +9421,18 @@ components:
94219421
append:
94229422
description: Whether the value should be appended to the field
94239423
type: boolean
9424+
default_value:
9425+
description: The default value of the set action
9426+
type: string
9427+
expression:
9428+
description: The expression of the set action
9429+
type: string
94249430
field:
94259431
description: The field of the set action
94269432
type: string
9433+
inherited:
9434+
description: Whether the value should be inherited
9435+
type: boolean
94279436
name:
94289437
description: The name of the set action
94299438
type: string
@@ -9543,6 +9552,9 @@ components:
95439552
properties:
95449553
actions:
95459554
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActions'
9555+
agent_version:
9556+
description: Constrain the rule to specific versions of the Datadog Agent
9557+
type: string
95469558
blocking:
95479559
description: The blocking policies that the rule belongs to
95489560
items:

src/datadogV2/model/model_cloud_workload_security_agent_rule_action_set.rs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,18 @@ pub struct CloudWorkloadSecurityAgentRuleActionSet {
1414
/// Whether the value should be appended to the field
1515
#[serde(rename = "append")]
1616
pub append: Option<bool>,
17+
/// The default value of the set action
18+
#[serde(rename = "default_value")]
19+
pub default_value: Option<String>,
20+
/// The expression of the set action
21+
#[serde(rename = "expression")]
22+
pub expression: Option<String>,
1723
/// The field of the set action
1824
#[serde(rename = "field")]
1925
pub field: Option<String>,
26+
/// Whether the value should be inherited
27+
#[serde(rename = "inherited")]
28+
pub inherited: Option<bool>,
2029
/// The name of the set action
2130
#[serde(rename = "name")]
2231
pub name: Option<String>,
@@ -43,7 +52,10 @@ impl CloudWorkloadSecurityAgentRuleActionSet {
4352
pub fn new() -> CloudWorkloadSecurityAgentRuleActionSet {
4453
CloudWorkloadSecurityAgentRuleActionSet {
4554
append: None,
55+
default_value: None,
56+
expression: None,
4657
field: None,
58+
inherited: None,
4759
name: None,
4860
scope: None,
4961
size: None,
@@ -59,11 +71,26 @@ impl CloudWorkloadSecurityAgentRuleActionSet {
5971
self
6072
}
6173

74+
pub fn default_value(mut self, value: String) -> Self {
75+
self.default_value = Some(value);
76+
self
77+
}
78+
79+
pub fn expression(mut self, value: String) -> Self {
80+
self.expression = Some(value);
81+
self
82+
}
83+
6284
pub fn field(mut self, value: String) -> Self {
6385
self.field = Some(value);
6486
self
6587
}
6688

89+
pub fn inherited(mut self, value: bool) -> Self {
90+
self.inherited = Some(value);
91+
self
92+
}
93+
6794
pub fn name(mut self, value: String) -> Self {
6895
self.name = Some(value);
6996
self
@@ -122,7 +149,10 @@ impl<'de> Deserialize<'de> for CloudWorkloadSecurityAgentRuleActionSet {
122149
M: MapAccess<'a>,
123150
{
124151
let mut append: Option<bool> = None;
152+
let mut default_value: Option<String> = None;
153+
let mut expression: Option<String> = None;
125154
let mut field: Option<String> = None;
155+
let mut inherited: Option<bool> = None;
126156
let mut name: Option<String> = None;
127157
let mut scope: Option<String> = None;
128158
let mut size: Option<i64> = None;
@@ -142,12 +172,31 @@ impl<'de> Deserialize<'de> for CloudWorkloadSecurityAgentRuleActionSet {
142172
}
143173
append = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
144174
}
175+
"default_value" => {
176+
if v.is_null() {
177+
continue;
178+
}
179+
default_value =
180+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
181+
}
182+
"expression" => {
183+
if v.is_null() {
184+
continue;
185+
}
186+
expression = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
187+
}
145188
"field" => {
146189
if v.is_null() {
147190
continue;
148191
}
149192
field = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
150193
}
194+
"inherited" => {
195+
if v.is_null() {
196+
continue;
197+
}
198+
inherited = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
199+
}
151200
"name" => {
152201
if v.is_null() {
153202
continue;
@@ -188,7 +237,10 @@ impl<'de> Deserialize<'de> for CloudWorkloadSecurityAgentRuleActionSet {
188237

189238
let content = CloudWorkloadSecurityAgentRuleActionSet {
190239
append,
240+
default_value,
241+
expression,
191242
field,
243+
inherited,
192244
name,
193245
scope,
194246
size,

src/datadogV2/model/model_cloud_workload_security_agent_rule_create_attributes.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ pub struct CloudWorkloadSecurityAgentRuleCreateAttributes {
1818
with = "::serde_with::rust::double_option"
1919
)]
2020
pub actions: Option<Option<Vec<crate::datadogV2::model::CloudWorkloadSecurityAgentRuleAction>>>,
21+
/// Constrain the rule to specific versions of the Datadog Agent
22+
#[serde(rename = "agent_version")]
23+
pub agent_version: Option<String>,
2124
/// The blocking policies that the rule belongs to
2225
#[serde(rename = "blocking")]
2326
pub blocking: Option<Vec<String>>,
@@ -59,6 +62,7 @@ impl CloudWorkloadSecurityAgentRuleCreateAttributes {
5962
pub fn new(expression: String, name: String) -> CloudWorkloadSecurityAgentRuleCreateAttributes {
6063
CloudWorkloadSecurityAgentRuleCreateAttributes {
6164
actions: None,
65+
agent_version: None,
6266
blocking: None,
6367
description: None,
6468
disabled: None,
@@ -82,6 +86,11 @@ impl CloudWorkloadSecurityAgentRuleCreateAttributes {
8286
self
8387
}
8488

89+
pub fn agent_version(mut self, value: String) -> Self {
90+
self.agent_version = Some(value);
91+
self
92+
}
93+
8594
pub fn blocking(mut self, value: Vec<String>) -> Self {
8695
self.blocking = Some(value);
8796
self
@@ -151,6 +160,7 @@ impl<'de> Deserialize<'de> for CloudWorkloadSecurityAgentRuleCreateAttributes {
151160
let mut actions: Option<
152161
Option<Vec<crate::datadogV2::model::CloudWorkloadSecurityAgentRuleAction>>,
153162
> = None;
163+
let mut agent_version: Option<String> = None;
154164
let mut blocking: Option<Vec<String>> = None;
155165
let mut description: Option<String> = None;
156166
let mut disabled: Option<Vec<String>> = None;
@@ -172,6 +182,13 @@ impl<'de> Deserialize<'de> for CloudWorkloadSecurityAgentRuleCreateAttributes {
172182
"actions" => {
173183
actions = Some(serde_json::from_value(v).map_err(M::Error::custom)?);
174184
}
185+
"agent_version" => {
186+
if v.is_null() {
187+
continue;
188+
}
189+
agent_version =
190+
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
191+
}
175192
"blocking" => {
176193
if v.is_null() {
177194
continue;
@@ -240,6 +257,7 @@ impl<'de> Deserialize<'de> for CloudWorkloadSecurityAgentRuleCreateAttributes {
240257

241258
let content = CloudWorkloadSecurityAgentRuleCreateAttributes {
242259
actions,
260+
agent_version,
243261
blocking,
244262
description,
245263
disabled,

0 commit comments

Comments
 (0)