Skip to content

Commit bb63bbc

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add use_recommended_keywords attribute to sensitive data scanner rule spec (#2542)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 98e3a64 commit bb63bbc

File tree

3 files changed

+47
-6
lines changed

3 files changed

+47
-6
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": "2024-10-28 23:07:46.686658",
8-
"spec_repo_commit": "4251a422"
7+
"regenerated": "2024-10-29 20:46:31.079470",
8+
"spec_repo_commit": "c0b9551e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-28 23:07:46.704767",
13-
"spec_repo_commit": "4251a422"
12+
"regenerated": "2024-10-29 20:46:31.098654",
13+
"spec_repo_commit": "c0b9551e"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21870,6 +21870,13 @@ components:
2187021870
items:
2187121871
type: string
2187221872
type: array
21873+
use_recommended_keywords:
21874+
description: 'Should the rule use the underlying standard pattern keyword
21875+
configuration. If set to `true`, the rule must be tied
21876+
21877+
to a standard pattern. If set to `false`, the specified keywords and `character_count`
21878+
are applied.'
21879+
type: boolean
2187321880
required:
2187421881
- keywords
2187521882
- character_count

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

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
*/
2828
@JsonPropertyOrder({
2929
SensitiveDataScannerIncludedKeywordConfiguration.JSON_PROPERTY_CHARACTER_COUNT,
30-
SensitiveDataScannerIncludedKeywordConfiguration.JSON_PROPERTY_KEYWORDS
30+
SensitiveDataScannerIncludedKeywordConfiguration.JSON_PROPERTY_KEYWORDS,
31+
SensitiveDataScannerIncludedKeywordConfiguration.JSON_PROPERTY_USE_RECOMMENDED_KEYWORDS
3132
})
3233
@jakarta.annotation.Generated(
3334
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
@@ -39,6 +40,9 @@ public class SensitiveDataScannerIncludedKeywordConfiguration {
3940
public static final String JSON_PROPERTY_KEYWORDS = "keywords";
4041
private List<String> keywords = new ArrayList<>();
4142

43+
public static final String JSON_PROPERTY_USE_RECOMMENDED_KEYWORDS = "use_recommended_keywords";
44+
private Boolean useRecommendedKeywords;
45+
4246
public SensitiveDataScannerIncludedKeywordConfiguration() {}
4347

4448
@JsonCreator
@@ -97,6 +101,30 @@ public void setKeywords(List<String> keywords) {
97101
this.keywords = keywords;
98102
}
99103

104+
public SensitiveDataScannerIncludedKeywordConfiguration useRecommendedKeywords(
105+
Boolean useRecommendedKeywords) {
106+
this.useRecommendedKeywords = useRecommendedKeywords;
107+
return this;
108+
}
109+
110+
/**
111+
* Should the rule use the underlying standard pattern keyword configuration. If set to <code>true
112+
* </code>, the rule must be tied to a standard pattern. If set to <code>false</code>, the
113+
* specified keywords and <code>character_count</code> are applied.
114+
*
115+
* @return useRecommendedKeywords
116+
*/
117+
@jakarta.annotation.Nullable
118+
@JsonProperty(JSON_PROPERTY_USE_RECOMMENDED_KEYWORDS)
119+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
120+
public Boolean getUseRecommendedKeywords() {
121+
return useRecommendedKeywords;
122+
}
123+
124+
public void setUseRecommendedKeywords(Boolean useRecommendedKeywords) {
125+
this.useRecommendedKeywords = useRecommendedKeywords;
126+
}
127+
100128
/**
101129
* A container for additional, undeclared properties. This is a holder for any undeclared
102130
* properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -159,14 +187,17 @@ public boolean equals(Object o) {
159187
return Objects.equals(
160188
this.characterCount, sensitiveDataScannerIncludedKeywordConfiguration.characterCount)
161189
&& Objects.equals(this.keywords, sensitiveDataScannerIncludedKeywordConfiguration.keywords)
190+
&& Objects.equals(
191+
this.useRecommendedKeywords,
192+
sensitiveDataScannerIncludedKeywordConfiguration.useRecommendedKeywords)
162193
&& Objects.equals(
163194
this.additionalProperties,
164195
sensitiveDataScannerIncludedKeywordConfiguration.additionalProperties);
165196
}
166197

167198
@Override
168199
public int hashCode() {
169-
return Objects.hash(characterCount, keywords, additionalProperties);
200+
return Objects.hash(characterCount, keywords, useRecommendedKeywords, additionalProperties);
170201
}
171202

172203
@Override
@@ -175,6 +206,9 @@ public String toString() {
175206
sb.append("class SensitiveDataScannerIncludedKeywordConfiguration {\n");
176207
sb.append(" characterCount: ").append(toIndentedString(characterCount)).append("\n");
177208
sb.append(" keywords: ").append(toIndentedString(keywords)).append("\n");
209+
sb.append(" useRecommendedKeywords: ")
210+
.append(toIndentedString(useRecommendedKeywords))
211+
.append("\n");
178212
sb.append(" additionalProperties: ")
179213
.append(toIndentedString(additionalProperties))
180214
.append("\n");

0 commit comments

Comments
 (0)