Skip to content
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

Add new SDS fields to usage API #1537

Merged
Merged
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.4",
"regenerated": "2022-10-25 14:15:14.637832",
"spec_repo_commit": "ecf2f022"
"regenerated": "2022-10-25 16:38:43.613434",
"spec_repo_commit": "afdd6b70"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2022-10-25 14:15:14.650976",
"spec_repo_commit": "ecf2f022"
"regenerated": "2022-10-25 16:38:43.630793",
"spec_repo_commit": "afdd6b70"
}
}
}
63 changes: 63 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15677,6 +15677,18 @@ components:
description: Sensitive Data Scanner usage for a given organization for a given
hour.
properties:
apm_scanned_bytes:
description: "The total number of bytes scanned of APM usage across all
usage types by the Sensitive Data Scanner from the start of the given
hour\u2019s month until the given hour."
format: int64
type: integer
events_scanned_bytes:
description: "The total number of bytes scanned of Events usage across all
usage types by the Sensitive Data Scanner from the start of the given
hour\u2019s month until the given hour."
format: int64
type: integer
hour:
description: The hour for the usage.
format: date-time
Expand All @@ -15693,6 +15705,12 @@ components:
public_id:
description: The organization public ID.
type: string
rum_scanned_bytes:
description: "The total number of bytes scanned of RUM usage across all
usage types by the Sensitive Data Scanner from the start of the given
hour\u2019s month until the given hour."
format: int64
type: integer
total_scanned_bytes:
description: "The total number of bytes scanned across all usage types by
the Sensitive Data Scanner from the start of the given hour\u2019s month
Expand Down Expand Up @@ -16120,11 +16138,26 @@ components:
hours in the current date for all organizations.
format: int64
type: integer
sds_apm_scanned_bytes_sum:
description: Sum of all APM bytes scanned with sensitive data scanner over
all hours in the current date for all organizations.
format: int64
type: integer
sds_events_scanned_bytes_sum:
description: Sum of all event stream events bytes scanned with sensitive
data scanner over all hours in the current date for all organizations.
format: int64
type: integer
sds_logs_scanned_bytes_sum:
description: Shows the sum of all bytes scanned of logs usage by the Sensitive
Data Scanner over all hours in the current month for all organizations.
format: int64
type: integer
sds_rum_scanned_bytes_sum:
description: Sum of all RUM bytes scanned with sensitive data scanner over
all hours in the current date for all organizations.
format: int64
type: integer
sds_total_scanned_bytes_sum:
description: Shows the sum of all bytes scanned across all usage types by
the Sensitive Data Scanner over all hours in the current month for all
Expand Down Expand Up @@ -16458,11 +16491,26 @@ components:
hours in the current date for the given org.
format: int64
type: integer
sds_apm_scanned_bytes_sum:
description: Sum of all APM bytes scanned with sensitive data scanner over
all hours in the current date for the given org.
format: int64
type: integer
sds_events_scanned_bytes_sum:
description: Sum of all event stream events bytes scanned with sensitive
data scanner over all hours in the current date for the given org.
format: int64
type: integer
sds_logs_scanned_bytes_sum:
description: Shows the sum of all bytes scanned of logs usage by the Sensitive
Data Scanner over all hours in the current month for the given org.
format: int64
type: integer
sds_rum_scanned_bytes_sum:
description: Sum of all RUM bytes scanned with sensitive data scanner over
all hours in the current date for the given org.
format: int64
type: integer
sds_total_scanned_bytes_sum:
description: Shows the sum of all bytes scanned across all usage types by
the Sensitive Data Scanner over all hours in the current month for the
Expand Down Expand Up @@ -16833,11 +16881,26 @@ components:
hours in the current months for all organizations.
format: int64
type: integer
sds_apm_scanned_bytes_sum:
description: Sum of all APM bytes scanned with sensitive data scanner in
the current months for all organizations.
format: int64
type: integer
sds_events_scanned_bytes_sum:
description: Sum of all event stream events bytes scanned with sensitive
data scanner in the current months for all organizations.
format: int64
type: integer
sds_logs_scanned_bytes_sum:
description: Shows the sum of all bytes scanned of logs usage by the Sensitive
Data Scanner over all hours in the current month for all organizations.
format: int64
type: integer
sds_rum_scanned_bytes_sum:
description: Sum of all RUM bytes scanned with sensitive data scanner in
the current months for all organizations.
format: int64
type: integer
sds_total_scanned_bytes_sum:
description: Shows the sum of all bytes scanned across all usage types by
the Sensitive Data Scanner over all hours in the current month for all
Expand Down
96 changes: 94 additions & 2 deletions src/main/java/com/datadog/api/client/v1/model/UsageSDSHour.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,25 @@

/** Sensitive Data Scanner usage for a given organization for a given hour. */
@JsonPropertyOrder({
UsageSDSHour.JSON_PROPERTY_APM_SCANNED_BYTES,
UsageSDSHour.JSON_PROPERTY_EVENTS_SCANNED_BYTES,
UsageSDSHour.JSON_PROPERTY_HOUR,
UsageSDSHour.JSON_PROPERTY_LOGS_SCANNED_BYTES,
UsageSDSHour.JSON_PROPERTY_ORG_NAME,
UsageSDSHour.JSON_PROPERTY_PUBLIC_ID,
UsageSDSHour.JSON_PROPERTY_RUM_SCANNED_BYTES,
UsageSDSHour.JSON_PROPERTY_TOTAL_SCANNED_BYTES
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class UsageSDSHour {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_APM_SCANNED_BYTES = "apm_scanned_bytes";
private Long apmScannedBytes;

public static final String JSON_PROPERTY_EVENTS_SCANNED_BYTES = "events_scanned_bytes";
private Long eventsScannedBytes;

public static final String JSON_PROPERTY_HOUR = "hour";

@JsonSerialize(using = JsonTimeSerializer.class)
Expand All @@ -41,9 +50,56 @@ public class UsageSDSHour {
public static final String JSON_PROPERTY_PUBLIC_ID = "public_id";
private String publicId;

public static final String JSON_PROPERTY_RUM_SCANNED_BYTES = "rum_scanned_bytes";
private Long rumScannedBytes;

public static final String JSON_PROPERTY_TOTAL_SCANNED_BYTES = "total_scanned_bytes";
private Long totalScannedBytes;

public UsageSDSHour apmScannedBytes(Long apmScannedBytes) {
this.apmScannedBytes = apmScannedBytes;
return this;
}

/**
* The total number of bytes scanned of APM usage across all usage types by the Sensitive Data
* Scanner from the start of the given hour’s month until the given hour.
*
* @return apmScannedBytes
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_APM_SCANNED_BYTES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getApmScannedBytes() {
return apmScannedBytes;
}

public void setApmScannedBytes(Long apmScannedBytes) {
this.apmScannedBytes = apmScannedBytes;
}

public UsageSDSHour eventsScannedBytes(Long eventsScannedBytes) {
this.eventsScannedBytes = eventsScannedBytes;
return this;
}

/**
* The total number of bytes scanned of Events usage across all usage types by the Sensitive Data
* Scanner from the start of the given hour’s month until the given hour.
*
* @return eventsScannedBytes
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_EVENTS_SCANNED_BYTES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getEventsScannedBytes() {
return eventsScannedBytes;
}

public void setEventsScannedBytes(Long eventsScannedBytes) {
this.eventsScannedBytes = eventsScannedBytes;
}

public UsageSDSHour hour(OffsetDateTime hour) {
this.hour = hour;
return this;
Expand Down Expand Up @@ -129,6 +185,28 @@ public void setPublicId(String publicId) {
this.publicId = publicId;
}

public UsageSDSHour rumScannedBytes(Long rumScannedBytes) {
this.rumScannedBytes = rumScannedBytes;
return this;
}

/**
* The total number of bytes scanned of RUM usage across all usage types by the Sensitive Data
* Scanner from the start of the given hour’s month until the given hour.
*
* @return rumScannedBytes
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_RUM_SCANNED_BYTES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getRumScannedBytes() {
return rumScannedBytes;
}

public void setRumScannedBytes(Long rumScannedBytes) {
this.rumScannedBytes = rumScannedBytes;
}

public UsageSDSHour totalScannedBytes(Long totalScannedBytes) {
this.totalScannedBytes = totalScannedBytes;
return this;
Expand Down Expand Up @@ -161,26 +239,40 @@ public boolean equals(Object o) {
return false;
}
UsageSDSHour usageSdsHour = (UsageSDSHour) o;
return Objects.equals(this.hour, usageSdsHour.hour)
return Objects.equals(this.apmScannedBytes, usageSdsHour.apmScannedBytes)
&& Objects.equals(this.eventsScannedBytes, usageSdsHour.eventsScannedBytes)
&& Objects.equals(this.hour, usageSdsHour.hour)
&& Objects.equals(this.logsScannedBytes, usageSdsHour.logsScannedBytes)
&& Objects.equals(this.orgName, usageSdsHour.orgName)
&& Objects.equals(this.publicId, usageSdsHour.publicId)
&& Objects.equals(this.rumScannedBytes, usageSdsHour.rumScannedBytes)
&& Objects.equals(this.totalScannedBytes, usageSdsHour.totalScannedBytes);
}

@Override
public int hashCode() {
return Objects.hash(hour, logsScannedBytes, orgName, publicId, totalScannedBytes);
return Objects.hash(
apmScannedBytes,
eventsScannedBytes,
hour,
logsScannedBytes,
orgName,
publicId,
rumScannedBytes,
totalScannedBytes);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UsageSDSHour {\n");
sb.append(" apmScannedBytes: ").append(toIndentedString(apmScannedBytes)).append("\n");
sb.append(" eventsScannedBytes: ").append(toIndentedString(eventsScannedBytes)).append("\n");
sb.append(" hour: ").append(toIndentedString(hour)).append("\n");
sb.append(" logsScannedBytes: ").append(toIndentedString(logsScannedBytes)).append("\n");
sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n");
sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n");
sb.append(" rumScannedBytes: ").append(toIndentedString(rumScannedBytes)).append("\n");
sb.append(" totalScannedBytes: ").append(toIndentedString(totalScannedBytes)).append("\n");
sb.append("}");
return sb.toString();
Expand Down
Loading