Skip to content

[SDS] Add sampling fields to SDS spec #2893

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-27 17:12:14.968856",
"spec_repo_commit": "ed439f7c"
"regenerated": "2025-06-02 16:14:34.329366",
"spec_repo_commit": "fa84ff05"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-27 17:12:14.988382",
"spec_repo_commit": "ed439f7c"
"regenerated": "2025-06-02 16:14:34.348537",
"spec_repo_commit": "fa84ff05"
}
}
}
35 changes: 35 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34675,6 +34675,11 @@ components:
items:
$ref: '#/components/schemas/SensitiveDataScannerProduct'
type: array
samplings:
description: List of sampling rates per product type.
items:
$ref: '#/components/schemas/SensitiveDataScannerSamplings'
type: array
type: object
SensitiveDataScannerGroupCreate:
description: Data related to the creation of a group.
Expand Down Expand Up @@ -34875,10 +34880,22 @@ components:
description: (Deprecated) Whether or not scanned events have multi-pass
enabled.
type: boolean
is_float_sampling_rate_enabled:
description: Whether or not the sampling rate for products can be set to
a float point number (as opposed to an integer).
type: boolean
is_pci_compliant:
description: Whether or not the org is compliant to the payment card industry
standard.
type: boolean
min_sampling_rate:
description: Global minimum sampling rate allowed for all product within
the org.
example: 10.0
format: double
maximum: 100.0
minimum: 0.0
type: number
version:
description: Version of the API.
example: 0
Expand Down Expand Up @@ -34955,6 +34972,11 @@ components:
is_enabled:
description: Whether or not the rule is enabled.
type: boolean
labels:
description: List of labels.
items:
type: string
type: array
name:
description: Name of the rule.
type: string
Expand Down Expand Up @@ -35106,6 +35128,19 @@ components:
meta:
$ref: '#/components/schemas/SensitiveDataScannerMetaVersionOnly'
type: object
SensitiveDataScannerSamplings:
description: Sampling configurations for the Scanning Group.
properties:
product:
$ref: '#/components/schemas/SensitiveDataScannerProduct'
rate:
description: Rate at which data in product type will be scanned, as a percentage.
example: 100.0
format: double
maximum: 100.0
minimum: 0.0
type: number
type: object
SensitiveDataScannerStandardPattern:
description: Data containing the standard pattern id.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
SensitiveDataScannerGroupAttributes.JSON_PROPERTY_FILTER,
SensitiveDataScannerGroupAttributes.JSON_PROPERTY_IS_ENABLED,
SensitiveDataScannerGroupAttributes.JSON_PROPERTY_NAME,
SensitiveDataScannerGroupAttributes.JSON_PROPERTY_PRODUCT_LIST
SensitiveDataScannerGroupAttributes.JSON_PROPERTY_PRODUCT_LIST,
SensitiveDataScannerGroupAttributes.JSON_PROPERTY_SAMPLINGS
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -45,6 +46,9 @@ public class SensitiveDataScannerGroupAttributes {
public static final String JSON_PROPERTY_PRODUCT_LIST = "product_list";
private List<SensitiveDataScannerProduct> productList = null;

public static final String JSON_PROPERTY_SAMPLINGS = "samplings";
private List<SensitiveDataScannerSamplings> samplings = null;

public SensitiveDataScannerGroupAttributes description(String description) {
this.description = description;
return this;
Expand Down Expand Up @@ -162,6 +166,41 @@ public void setProductList(List<SensitiveDataScannerProduct> productList) {
this.productList = productList;
}

public SensitiveDataScannerGroupAttributes samplings(
List<SensitiveDataScannerSamplings> samplings) {
this.samplings = samplings;
for (SensitiveDataScannerSamplings item : samplings) {
this.unparsed |= item.unparsed;
}
return this;
}

public SensitiveDataScannerGroupAttributes addSamplingsItem(
SensitiveDataScannerSamplings samplingsItem) {
if (this.samplings == null) {
this.samplings = new ArrayList<>();
}
this.samplings.add(samplingsItem);
this.unparsed |= samplingsItem.unparsed;
return this;
}

/**
* List of sampling rates per product type.
*
* @return samplings
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SAMPLINGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<SensitiveDataScannerSamplings> getSamplings() {
return samplings;
}

public void setSamplings(List<SensitiveDataScannerSamplings> samplings) {
this.samplings = samplings;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -224,13 +263,15 @@ public boolean equals(Object o) {
&& Objects.equals(this.isEnabled, sensitiveDataScannerGroupAttributes.isEnabled)
&& Objects.equals(this.name, sensitiveDataScannerGroupAttributes.name)
&& Objects.equals(this.productList, sensitiveDataScannerGroupAttributes.productList)
&& Objects.equals(this.samplings, sensitiveDataScannerGroupAttributes.samplings)
&& Objects.equals(
this.additionalProperties, sensitiveDataScannerGroupAttributes.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(description, filter, isEnabled, name, productList, additionalProperties);
return Objects.hash(
description, filter, isEnabled, name, productList, samplings, additionalProperties);
}

@Override
Expand All @@ -242,6 +283,7 @@ public String toString() {
sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" productList: ").append(toIndentedString(productList)).append("\n");
sb.append(" samplings: ").append(toIndentedString(samplings)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
SensitiveDataScannerMeta.JSON_PROPERTY_GROUP_COUNT_LIMIT,
SensitiveDataScannerMeta.JSON_PROPERTY_HAS_HIGHLIGHT_ENABLED,
SensitiveDataScannerMeta.JSON_PROPERTY_HAS_MULTI_PASS_ENABLED,
SensitiveDataScannerMeta.JSON_PROPERTY_IS_FLOAT_SAMPLING_RATE_ENABLED,
SensitiveDataScannerMeta.JSON_PROPERTY_IS_PCI_COMPLIANT,
SensitiveDataScannerMeta.JSON_PROPERTY_MIN_SAMPLING_RATE,
SensitiveDataScannerMeta.JSON_PROPERTY_VERSION
})
@jakarta.annotation.Generated(
Expand All @@ -41,9 +43,16 @@ public class SensitiveDataScannerMeta {
public static final String JSON_PROPERTY_HAS_MULTI_PASS_ENABLED = "has_multi_pass_enabled";
private Boolean hasMultiPassEnabled;

public static final String JSON_PROPERTY_IS_FLOAT_SAMPLING_RATE_ENABLED =
"is_float_sampling_rate_enabled";
private Boolean isFloatSamplingRateEnabled;

public static final String JSON_PROPERTY_IS_PCI_COMPLIANT = "is_pci_compliant";
private Boolean isPciCompliant;

public static final String JSON_PROPERTY_MIN_SAMPLING_RATE = "min_sampling_rate";
private Double minSamplingRate;

public static final String JSON_PROPERTY_VERSION = "version";
private Long version;

Expand Down Expand Up @@ -137,6 +146,28 @@ public void setHasMultiPassEnabled(Boolean hasMultiPassEnabled) {
this.hasMultiPassEnabled = hasMultiPassEnabled;
}

public SensitiveDataScannerMeta isFloatSamplingRateEnabled(Boolean isFloatSamplingRateEnabled) {
this.isFloatSamplingRateEnabled = isFloatSamplingRateEnabled;
return this;
}

/**
* Whether or not the sampling rate for products can be set to a float point number (as opposed to
* an integer).
*
* @return isFloatSamplingRateEnabled
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_IS_FLOAT_SAMPLING_RATE_ENABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getIsFloatSamplingRateEnabled() {
return isFloatSamplingRateEnabled;
}

public void setIsFloatSamplingRateEnabled(Boolean isFloatSamplingRateEnabled) {
this.isFloatSamplingRateEnabled = isFloatSamplingRateEnabled;
}

public SensitiveDataScannerMeta isPciCompliant(Boolean isPciCompliant) {
this.isPciCompliant = isPciCompliant;
return this;
Expand All @@ -158,6 +189,28 @@ public void setIsPciCompliant(Boolean isPciCompliant) {
this.isPciCompliant = isPciCompliant;
}

public SensitiveDataScannerMeta minSamplingRate(Double minSamplingRate) {
this.minSamplingRate = minSamplingRate;
return this;
}

/**
* Global minimum sampling rate allowed for all product within the org. minimum: 0.0 maximum:
* 100.0
*
* @return minSamplingRate
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MIN_SAMPLING_RATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getMinSamplingRate() {
return minSamplingRate;
}

public void setMinSamplingRate(Double minSamplingRate) {
this.minSamplingRate = minSamplingRate;
}

public SensitiveDataScannerMeta version(Long version) {
this.version = version;
return this;
Expand Down Expand Up @@ -239,7 +292,10 @@ public boolean equals(Object o) {
&& Objects.equals(this.groupCountLimit, sensitiveDataScannerMeta.groupCountLimit)
&& Objects.equals(this.hasHighlightEnabled, sensitiveDataScannerMeta.hasHighlightEnabled)
&& Objects.equals(this.hasMultiPassEnabled, sensitiveDataScannerMeta.hasMultiPassEnabled)
&& Objects.equals(
this.isFloatSamplingRateEnabled, sensitiveDataScannerMeta.isFloatSamplingRateEnabled)
&& Objects.equals(this.isPciCompliant, sensitiveDataScannerMeta.isPciCompliant)
&& Objects.equals(this.minSamplingRate, sensitiveDataScannerMeta.minSamplingRate)
&& Objects.equals(this.version, sensitiveDataScannerMeta.version)
&& Objects.equals(this.additionalProperties, sensitiveDataScannerMeta.additionalProperties);
}
Expand All @@ -251,7 +307,9 @@ public int hashCode() {
groupCountLimit,
hasHighlightEnabled,
hasMultiPassEnabled,
isFloatSamplingRateEnabled,
isPciCompliant,
minSamplingRate,
version,
additionalProperties);
}
Expand All @@ -268,7 +326,11 @@ public String toString() {
sb.append(" hasMultiPassEnabled: ")
.append(toIndentedString(hasMultiPassEnabled))
.append("\n");
sb.append(" isFloatSamplingRateEnabled: ")
.append(toIndentedString(isFloatSamplingRateEnabled))
.append("\n");
sb.append(" isPciCompliant: ").append(toIndentedString(isPciCompliant)).append("\n");
sb.append(" minSamplingRate: ").append(toIndentedString(minSamplingRate)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
SensitiveDataScannerRuleAttributes.JSON_PROPERTY_EXCLUDED_NAMESPACES,
SensitiveDataScannerRuleAttributes.JSON_PROPERTY_INCLUDED_KEYWORD_CONFIGURATION,
SensitiveDataScannerRuleAttributes.JSON_PROPERTY_IS_ENABLED,
SensitiveDataScannerRuleAttributes.JSON_PROPERTY_LABELS,
SensitiveDataScannerRuleAttributes.JSON_PROPERTY_NAME,
SensitiveDataScannerRuleAttributes.JSON_PROPERTY_NAMESPACES,
SensitiveDataScannerRuleAttributes.JSON_PROPERTY_PATTERN,
Expand All @@ -48,6 +49,9 @@ public class SensitiveDataScannerRuleAttributes {
public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled";
private Boolean isEnabled;

public static final String JSON_PROPERTY_LABELS = "labels";
private List<String> labels = null;

public static final String JSON_PROPERTY_NAME = "name";
private String name;

Expand Down Expand Up @@ -166,6 +170,35 @@ public void setIsEnabled(Boolean isEnabled) {
this.isEnabled = isEnabled;
}

public SensitiveDataScannerRuleAttributes labels(List<String> labels) {
this.labels = labels;
return this;
}

public SensitiveDataScannerRuleAttributes addLabelsItem(String labelsItem) {
if (this.labels == null) {
this.labels = new ArrayList<>();
}
this.labels.add(labelsItem);
return this;
}

/**
* List of labels.
*
* @return labels
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_LABELS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getLabels() {
return labels;
}

public void setLabels(List<String> labels) {
this.labels = labels;
}

public SensitiveDataScannerRuleAttributes name(String name) {
this.name = name;
return this;
Expand Down Expand Up @@ -375,6 +408,7 @@ public boolean equals(Object o) {
this.includedKeywordConfiguration,
sensitiveDataScannerRuleAttributes.includedKeywordConfiguration)
&& Objects.equals(this.isEnabled, sensitiveDataScannerRuleAttributes.isEnabled)
&& Objects.equals(this.labels, sensitiveDataScannerRuleAttributes.labels)
&& Objects.equals(this.name, sensitiveDataScannerRuleAttributes.name)
&& Objects.equals(this.namespaces, sensitiveDataScannerRuleAttributes.namespaces)
&& Objects.equals(this.pattern, sensitiveDataScannerRuleAttributes.pattern)
Expand All @@ -392,6 +426,7 @@ public int hashCode() {
excludedNamespaces,
includedKeywordConfiguration,
isEnabled,
labels,
name,
namespaces,
pattern,
Expand All @@ -411,6 +446,7 @@ public String toString() {
.append(toIndentedString(includedKeywordConfiguration))
.append("\n");
sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n");
sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" namespaces: ").append(toIndentedString(namespaces)).append("\n");
sb.append(" pattern: ").append(toIndentedString(pattern)).append("\n");
Expand Down
Loading
Loading