Skip to content

Commit 877843c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e5094d5 of spec repo
1 parent 7fdcc4e commit 877843c

File tree

56 files changed

+719
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+719
-195
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10243,6 +10243,10 @@ components:
1024310243
description: Whether the policy is pinned
1024410244
example: false
1024510245
type: boolean
10246+
policyType:
10247+
description: The type of the policy
10248+
example: policy
10249+
type: string
1024610250
policyVersion:
1024710251
description: The version of the policy
1024810252
example: '1'
@@ -10421,11 +10425,11 @@ components:
1042110425
CloudWorkloadSecurityAgentPolicyVersion:
1042210426
description: The versions of the policy
1042310427
properties:
10424-
Date:
10428+
date:
1042510429
description: The date and time the version was created
1042610430
nullable: true
1042710431
type: string
10428-
Name:
10432+
name:
1042910433
description: The version of the policy
1043010434
example: 1.47.0-rc2
1043110435
type: string
@@ -10452,8 +10456,11 @@ components:
1045210456
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSet'
1045310457
type: object
1045410458
CloudWorkloadSecurityAgentRuleActionHash:
10455-
additionalProperties: {}
10456-
description: An empty object indicating the hash action
10459+
description: Hash file specified by the field attribute
10460+
properties:
10461+
field:
10462+
description: The field of the hash action
10463+
type: string
1045710464
type: object
1045810465
CloudWorkloadSecurityAgentRuleActionMetadata:
1045910466
description: The metadata action applied on the scope matching the rule
@@ -10501,9 +10508,14 @@ components:
1050110508
format: int64
1050210509
type: integer
1050310510
value:
10504-
description: The value of the set action
10505-
type: string
10511+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSetValue'
1050610512
type: object
10513+
CloudWorkloadSecurityAgentRuleActionSetValue:
10514+
description: The value of the set action
10515+
oneOf:
10516+
- type: string
10517+
- type: integer
10518+
- type: boolean
1050710519
CloudWorkloadSecurityAgentRuleActions:
1050810520
description: The array of actions the rule can perform if triggered
1050910521
items:

examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
import com.datadog.api.client.ApiException;
55
import com.datadog.api.client.v2.api.CsmThreatsApi;
66
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleAction;
7+
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleActionHash;
78
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleActionSet;
9+
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleActionSetValue;
810
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleCreateAttributes;
911
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleCreateData;
1012
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleCreateRequest;
1113
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleResponse;
1214
import com.datadog.api.client.v2.model.CloudWorkloadSecurityAgentRuleType;
1315
import java.util.Arrays;
14-
import java.util.Map;
1516

1617
public class Example {
1718
public static void main(String[] args) {
@@ -40,11 +41,15 @@ public static void main(String[] args) {
4041
.set(
4142
new CloudWorkloadSecurityAgentRuleActionSet()
4243
.name("test_set")
43-
.value("test_value")
44+
.value(
45+
new CloudWorkloadSecurityAgentRuleActionSetValue(
46+
"test_value"))
4447
.scope("process")
4548
.inherited(true)),
4649
new CloudWorkloadSecurityAgentRuleAction()
47-
.hash(Map.ofEntries()))))
50+
.hash(
51+
new CloudWorkloadSecurityAgentRuleActionHash()
52+
.field("exec.file")))))
4853
.type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE));
4954

5055
try {

examples/v2/csm-threats/CreateCSMThreatsAgentRule_1363354233.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static void main(String[] args) {
3939
.set(
4040
new CloudWorkloadSecurityAgentRuleActionSet()
4141
.name("test_set")
42-
.expression("open.file.path")
42+
.expression("exec.file.path")
4343
.defaultValue("/dev/null")
4444
.scope("process")))))
4545
.type(CloudWorkloadSecurityAgentRuleType.AGENT_RULE));

src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyAttributes.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_MONITORING_RULES_COUNT,
3131
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_NAME,
3232
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_PINNED,
33+
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_POLICY_TYPE,
3334
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_POLICY_VERSION,
3435
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_PRIORITY,
3536
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_RULE_COUNT,
@@ -72,6 +73,9 @@ public class CloudWorkloadSecurityAgentPolicyAttributes {
7273
public static final String JSON_PROPERTY_PINNED = "pinned";
7374
private Boolean pinned;
7475

76+
public static final String JSON_PROPERTY_POLICY_TYPE = "policyType";
77+
private String policyType;
78+
7579
public static final String JSON_PROPERTY_POLICY_VERSION = "policyVersion";
7680
private String policyVersion;
7781

@@ -323,6 +327,27 @@ public void setPinned(Boolean pinned) {
323327
this.pinned = pinned;
324328
}
325329

330+
public CloudWorkloadSecurityAgentPolicyAttributes policyType(String policyType) {
331+
this.policyType = policyType;
332+
return this;
333+
}
334+
335+
/**
336+
* The type of the policy
337+
*
338+
* @return policyType
339+
*/
340+
@jakarta.annotation.Nullable
341+
@JsonProperty(JSON_PROPERTY_POLICY_TYPE)
342+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
343+
public String getPolicyType() {
344+
return policyType;
345+
}
346+
347+
public void setPolicyType(String policyType) {
348+
this.policyType = policyType;
349+
}
350+
326351
public CloudWorkloadSecurityAgentPolicyAttributes policyVersion(String policyVersion) {
327352
this.policyVersion = policyVersion;
328353
return this;
@@ -560,6 +585,7 @@ public boolean equals(Object o) {
560585
cloudWorkloadSecurityAgentPolicyAttributes.monitoringRulesCount)
561586
&& Objects.equals(this.name, cloudWorkloadSecurityAgentPolicyAttributes.name)
562587
&& Objects.equals(this.pinned, cloudWorkloadSecurityAgentPolicyAttributes.pinned)
588+
&& Objects.equals(this.policyType, cloudWorkloadSecurityAgentPolicyAttributes.policyType)
563589
&& Objects.equals(
564590
this.policyVersion, cloudWorkloadSecurityAgentPolicyAttributes.policyVersion)
565591
&& Objects.equals(this.priority, cloudWorkloadSecurityAgentPolicyAttributes.priority)
@@ -586,6 +612,7 @@ public int hashCode() {
586612
monitoringRulesCount,
587613
name,
588614
pinned,
615+
policyType,
589616
policyVersion,
590617
priority,
591618
ruleCount,
@@ -612,6 +639,7 @@ public String toString() {
612639
.append("\n");
613640
sb.append(" name: ").append(toIndentedString(name)).append("\n");
614641
sb.append(" pinned: ").append(toIndentedString(pinned)).append("\n");
642+
sb.append(" policyType: ").append(toIndentedString(policyType)).append("\n");
615643
sb.append(" policyVersion: ").append(toIndentedString(policyVersion)).append("\n");
616644
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
617645
sb.append(" ruleCount: ").append(toIndentedString(ruleCount)).append("\n");

src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentPolicyVersion.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
2727
public class CloudWorkloadSecurityAgentPolicyVersion {
2828
@JsonIgnore public boolean unparsed = false;
29-
public static final String JSON_PROPERTY_DATE = "Date";
29+
public static final String JSON_PROPERTY_DATE = "date";
3030
private JsonNullable<String> date = JsonNullable.<String>undefined();
3131

32-
public static final String JSON_PROPERTY_NAME = "Name";
32+
public static final String JSON_PROPERTY_NAME = "name";
3333
private String name;
3434

3535
public CloudWorkloadSecurityAgentPolicyVersion date(String date) {

src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleAction.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class CloudWorkloadSecurityAgentRuleAction {
3232
private String filter;
3333

3434
public static final String JSON_PROPERTY_HASH = "hash";
35-
private Map<String, Object> hash = null;
35+
private CloudWorkloadSecurityAgentRuleActionHash hash;
3636

3737
public static final String JSON_PROPERTY_KILL = "kill";
3838
private CloudWorkloadSecurityAgentRuleKill kill;
@@ -64,32 +64,25 @@ public void setFilter(String filter) {
6464
this.filter = filter;
6565
}
6666

67-
public CloudWorkloadSecurityAgentRuleAction hash(Map<String, Object> hash) {
67+
public CloudWorkloadSecurityAgentRuleAction hash(CloudWorkloadSecurityAgentRuleActionHash hash) {
6868
this.hash = hash;
69-
return this;
70-
}
71-
72-
public CloudWorkloadSecurityAgentRuleAction putHashItem(String key, Object hashItem) {
73-
if (this.hash == null) {
74-
this.hash = new HashMap<>();
75-
}
76-
this.hash.put(key, hashItem);
69+
this.unparsed |= hash.unparsed;
7770
return this;
7871
}
7972

8073
/**
81-
* An empty object indicating the hash action
74+
* Hash file specified by the field attribute
8275
*
8376
* @return hash
8477
*/
8578
@jakarta.annotation.Nullable
8679
@JsonProperty(JSON_PROPERTY_HASH)
8780
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
88-
public Map<String, Object> getHash() {
81+
public CloudWorkloadSecurityAgentRuleActionHash getHash() {
8982
return hash;
9083
}
9184

92-
public void setHash(Map<String, Object> hash) {
85+
public void setHash(CloudWorkloadSecurityAgentRuleActionHash hash) {
9386
this.hash = hash;
9487
}
9588

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
package com.datadog.api.client.v2.model;
8+
9+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
10+
import com.fasterxml.jackson.annotation.JsonAnySetter;
11+
import com.fasterxml.jackson.annotation.JsonIgnore;
12+
import com.fasterxml.jackson.annotation.JsonInclude;
13+
import com.fasterxml.jackson.annotation.JsonProperty;
14+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
15+
import java.util.HashMap;
16+
import java.util.Map;
17+
import java.util.Objects;
18+
19+
/** Hash file specified by the field attribute */
20+
@JsonPropertyOrder({CloudWorkloadSecurityAgentRuleActionHash.JSON_PROPERTY_FIELD})
21+
@jakarta.annotation.Generated(
22+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
23+
public class CloudWorkloadSecurityAgentRuleActionHash {
24+
@JsonIgnore public boolean unparsed = false;
25+
public static final String JSON_PROPERTY_FIELD = "field";
26+
private String field;
27+
28+
public CloudWorkloadSecurityAgentRuleActionHash field(String field) {
29+
this.field = field;
30+
return this;
31+
}
32+
33+
/**
34+
* The field of the hash action
35+
*
36+
* @return field
37+
*/
38+
@jakarta.annotation.Nullable
39+
@JsonProperty(JSON_PROPERTY_FIELD)
40+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
41+
public String getField() {
42+
return field;
43+
}
44+
45+
public void setField(String field) {
46+
this.field = field;
47+
}
48+
49+
/**
50+
* A container for additional, undeclared properties. This is a holder for any undeclared
51+
* properties as specified with the 'additionalProperties' keyword in the OAS document.
52+
*/
53+
private Map<String, Object> additionalProperties;
54+
55+
/**
56+
* Set the additional (undeclared) property with the specified name and value. If the property
57+
* does not already exist, create it otherwise replace it.
58+
*
59+
* @param key The arbitrary key to set
60+
* @param value The associated value
61+
* @return CloudWorkloadSecurityAgentRuleActionHash
62+
*/
63+
@JsonAnySetter
64+
public CloudWorkloadSecurityAgentRuleActionHash putAdditionalProperty(String key, Object value) {
65+
if (this.additionalProperties == null) {
66+
this.additionalProperties = new HashMap<String, Object>();
67+
}
68+
this.additionalProperties.put(key, value);
69+
return this;
70+
}
71+
72+
/**
73+
* Return the additional (undeclared) property.
74+
*
75+
* @return The additional properties
76+
*/
77+
@JsonAnyGetter
78+
public Map<String, Object> getAdditionalProperties() {
79+
return additionalProperties;
80+
}
81+
82+
/**
83+
* Return the additional (undeclared) property with the specified name.
84+
*
85+
* @param key The arbitrary key to get
86+
* @return The specific additional property for the given key
87+
*/
88+
public Object getAdditionalProperty(String key) {
89+
if (this.additionalProperties == null) {
90+
return null;
91+
}
92+
return this.additionalProperties.get(key);
93+
}
94+
95+
/** Return true if this CloudWorkloadSecurityAgentRuleActionHash object is equal to o. */
96+
@Override
97+
public boolean equals(Object o) {
98+
if (this == o) {
99+
return true;
100+
}
101+
if (o == null || getClass() != o.getClass()) {
102+
return false;
103+
}
104+
CloudWorkloadSecurityAgentRuleActionHash cloudWorkloadSecurityAgentRuleActionHash =
105+
(CloudWorkloadSecurityAgentRuleActionHash) o;
106+
return Objects.equals(this.field, cloudWorkloadSecurityAgentRuleActionHash.field)
107+
&& Objects.equals(
108+
this.additionalProperties,
109+
cloudWorkloadSecurityAgentRuleActionHash.additionalProperties);
110+
}
111+
112+
@Override
113+
public int hashCode() {
114+
return Objects.hash(field, additionalProperties);
115+
}
116+
117+
@Override
118+
public String toString() {
119+
StringBuilder sb = new StringBuilder();
120+
sb.append("class CloudWorkloadSecurityAgentRuleActionHash {\n");
121+
sb.append(" field: ").append(toIndentedString(field)).append("\n");
122+
sb.append(" additionalProperties: ")
123+
.append(toIndentedString(additionalProperties))
124+
.append("\n");
125+
sb.append('}');
126+
return sb.toString();
127+
}
128+
129+
/**
130+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
131+
*/
132+
private String toIndentedString(Object o) {
133+
if (o == null) {
134+
return "null";
135+
}
136+
return o.toString().replace("\n", "\n ");
137+
}
138+
}

0 commit comments

Comments
 (0)