From c69198ba46ae72181e9a2aeb62ab1a56fb94f5da Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 15 Sep 2026 08:08:14 +0000 Subject: [PATCH] Regenerate client from commit 744b701 of spec repo --- .generator/schemas/v2/openapi.yaml | 64 +++++ .../CloudWorkloadSecurityAgentRuleAction.java | 109 ++++++++- ...rkloadSecurityAgentRuleActionCoreDump.java | 223 ++++++++++++++++++ ...udWorkloadSecurityAgentRuleActionHash.java | 33 ++- ...oudWorkloadSecurityAgentRuleActionLog.java | 167 +++++++++++++ ...dSecurityAgentRuleActionNetworkFilter.java | 196 +++++++++++++++ ...oudWorkloadSecurityAgentRuleActionSet.java | 56 +++++ .../CloudWorkloadSecurityAgentRuleKill.java | 102 +++++++- 8 files changed, 943 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionCoreDump.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionLog.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionNetworkFilter.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c3cbf49ea71..44f90ebdfe2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -19559,6 +19559,8 @@ components: CloudWorkloadSecurityAgentRuleAction: description: "The action the rule can perform if triggered" properties: + coredump: + $ref: "#/components/schemas/CloudWorkloadSecurityAgentRuleActionCoreDump" disabled: description: "Whether the action is disabled" example: false @@ -19570,17 +19572,51 @@ components: $ref: "#/components/schemas/CloudWorkloadSecurityAgentRuleActionHash" kill: $ref: "#/components/schemas/CloudWorkloadSecurityAgentRuleKill" + log: + $ref: "#/components/schemas/CloudWorkloadSecurityAgentRuleActionLog" metadata: $ref: "#/components/schemas/CloudWorkloadSecurityAgentRuleActionMetadata" + network_filter: + $ref: "#/components/schemas/CloudWorkloadSecurityAgentRuleActionNetworkFilter" set: $ref: "#/components/schemas/CloudWorkloadSecurityAgentRuleActionSet" type: object + CloudWorkloadSecurityAgentRuleActionCoreDump: + description: "The core dump action applied on the process matching the rule." + properties: + dentry: + description: "Whether the directory entry information is included in the core dump." + type: boolean + mount: + description: "Whether the mount information is included in the core dump." + type: boolean + no_compression: + description: "Whether the core dump is left uncompressed." + type: boolean + process: + description: "Whether the process memory is included in the core dump." + type: boolean + type: object CloudWorkloadSecurityAgentRuleActionHash: description: "Hash file specified by the field attribute" properties: field: description: "The field of the hash action" type: string + max_file_size: + description: "The maximum size of the files to hash, in bytes." + format: int64 + type: integer + type: object + CloudWorkloadSecurityAgentRuleActionLog: + description: "The log action applied when the rule is triggered." + properties: + level: + description: "The level of the log action." + type: string + message: + description: "The message of the log action." + type: string type: object CloudWorkloadSecurityAgentRuleActionMetadata: description: "The metadata action applied on the scope matching the rule" @@ -19595,6 +19631,19 @@ components: description: "The short image of the metadata action" type: string type: object + CloudWorkloadSecurityAgentRuleActionNetworkFilter: + description: "The network filter action applied on the network traffic matching the rule." + properties: + filter: + description: "The filter expression of the network filter action." + type: string + policy: + description: "The policy of the network filter action." + type: string + scope: + description: "The scope of the network filter action." + type: string + type: object CloudWorkloadSecurityAgentRuleActionSet: description: "The set action applied on the scope matching the rule" properties: @@ -19616,9 +19665,15 @@ components: name: description: "The name of the set action" type: string + private: + description: "Whether the value of the set action is private." + type: boolean scope: description: "The scope of the set action." type: string + scope_field: + description: "The scope field of the set action." + type: string size: description: "The size of the set action." format: int64 @@ -19873,6 +19928,15 @@ components: CloudWorkloadSecurityAgentRuleKill: description: "Kill system call applied on the container matching the rule" properties: + disable_container_disarmer: + description: "Whether the automatic container safeguard of the kill action is disabled." + type: boolean + disable_executable_disarmer: + description: "Whether the automatic executable safeguard of the kill action is disabled." + type: boolean + scope: + description: "The scope of the kill action." + type: string signal: description: "Supported signals for the kill system call" type: string diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleAction.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleAction.java index 0940407df20..187adf29644 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleAction.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleAction.java @@ -18,17 +18,23 @@ /** The action the rule can perform if triggered */ @JsonPropertyOrder({ + CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_COREDUMP, CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_DISABLED, CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_FILTER, CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_HASH, CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_KILL, + CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_LOG, CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_METADATA, + CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_NETWORK_FILTER, CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_SET }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleAction { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_COREDUMP = "coredump"; + private CloudWorkloadSecurityAgentRuleActionCoreDump coredump; + public static final String JSON_PROPERTY_DISABLED = "disabled"; private Boolean disabled; @@ -41,12 +47,44 @@ public class CloudWorkloadSecurityAgentRuleAction { public static final String JSON_PROPERTY_KILL = "kill"; private CloudWorkloadSecurityAgentRuleKill kill; + public static final String JSON_PROPERTY_LOG = "log"; + private CloudWorkloadSecurityAgentRuleActionLog log; + public static final String JSON_PROPERTY_METADATA = "metadata"; private CloudWorkloadSecurityAgentRuleActionMetadata metadata; + public static final String JSON_PROPERTY_NETWORK_FILTER = "network_filter"; + private CloudWorkloadSecurityAgentRuleActionNetworkFilter networkFilter; + public static final String JSON_PROPERTY_SET = "set"; private CloudWorkloadSecurityAgentRuleActionSet set; + public CloudWorkloadSecurityAgentRuleAction coredump( + CloudWorkloadSecurityAgentRuleActionCoreDump coredump) { + this.coredump = coredump; + this.unparsed |= coredump.unparsed; + return this; + } + + /** + * The core dump action applied on the process matching the rule. + * + * @return coredump + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COREDUMP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CloudWorkloadSecurityAgentRuleActionCoreDump getCoredump() { + return coredump; + } + + public void setCoredump(CloudWorkloadSecurityAgentRuleActionCoreDump coredump) { + this.coredump = coredump; + if (coredump != null) { + this.unparsed |= coredump.unparsed; + } + } + public CloudWorkloadSecurityAgentRuleAction disabled(Boolean disabled) { this.disabled = disabled; return this; @@ -139,6 +177,31 @@ public void setKill(CloudWorkloadSecurityAgentRuleKill kill) { } } + public CloudWorkloadSecurityAgentRuleAction log(CloudWorkloadSecurityAgentRuleActionLog log) { + this.log = log; + this.unparsed |= log.unparsed; + return this; + } + + /** + * The log action applied when the rule is triggered. + * + * @return log + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CloudWorkloadSecurityAgentRuleActionLog getLog() { + return log; + } + + public void setLog(CloudWorkloadSecurityAgentRuleActionLog log) { + this.log = log; + if (log != null) { + this.unparsed |= log.unparsed; + } + } + public CloudWorkloadSecurityAgentRuleAction metadata( CloudWorkloadSecurityAgentRuleActionMetadata metadata) { this.metadata = metadata; @@ -165,6 +228,32 @@ public void setMetadata(CloudWorkloadSecurityAgentRuleActionMetadata metadata) { } } + public CloudWorkloadSecurityAgentRuleAction networkFilter( + CloudWorkloadSecurityAgentRuleActionNetworkFilter networkFilter) { + this.networkFilter = networkFilter; + this.unparsed |= networkFilter.unparsed; + return this; + } + + /** + * The network filter action applied on the network traffic matching the rule. + * + * @return networkFilter + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public CloudWorkloadSecurityAgentRuleActionNetworkFilter getNetworkFilter() { + return networkFilter; + } + + public void setNetworkFilter(CloudWorkloadSecurityAgentRuleActionNetworkFilter networkFilter) { + this.networkFilter = networkFilter; + if (networkFilter != null) { + this.unparsed |= networkFilter.unparsed; + } + } + public CloudWorkloadSecurityAgentRuleAction set(CloudWorkloadSecurityAgentRuleActionSet set) { this.set = set; this.unparsed |= set.unparsed; @@ -247,11 +336,14 @@ public boolean equals(Object o) { } CloudWorkloadSecurityAgentRuleAction cloudWorkloadSecurityAgentRuleAction = (CloudWorkloadSecurityAgentRuleAction) o; - return Objects.equals(this.disabled, cloudWorkloadSecurityAgentRuleAction.disabled) + return Objects.equals(this.coredump, cloudWorkloadSecurityAgentRuleAction.coredump) + && Objects.equals(this.disabled, cloudWorkloadSecurityAgentRuleAction.disabled) && Objects.equals(this.filter, cloudWorkloadSecurityAgentRuleAction.filter) && Objects.equals(this.hash, cloudWorkloadSecurityAgentRuleAction.hash) && Objects.equals(this.kill, cloudWorkloadSecurityAgentRuleAction.kill) + && Objects.equals(this.log, cloudWorkloadSecurityAgentRuleAction.log) && Objects.equals(this.metadata, cloudWorkloadSecurityAgentRuleAction.metadata) + && Objects.equals(this.networkFilter, cloudWorkloadSecurityAgentRuleAction.networkFilter) && Objects.equals(this.set, cloudWorkloadSecurityAgentRuleAction.set) && Objects.equals( this.additionalProperties, cloudWorkloadSecurityAgentRuleAction.additionalProperties); @@ -259,18 +351,31 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(disabled, filter, hash, kill, metadata, set, additionalProperties); + return Objects.hash( + coredump, + disabled, + filter, + hash, + kill, + log, + metadata, + networkFilter, + set, + additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CloudWorkloadSecurityAgentRuleAction {\n"); + sb.append(" coredump: ").append(toIndentedString(coredump)).append("\n"); sb.append(" disabled: ").append(toIndentedString(disabled)).append("\n"); sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); sb.append(" hash: ").append(toIndentedString(hash)).append("\n"); sb.append(" kill: ").append(toIndentedString(kill)).append("\n"); + sb.append(" log: ").append(toIndentedString(log)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" networkFilter: ").append(toIndentedString(networkFilter)).append("\n"); sb.append(" set: ").append(toIndentedString(set)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionCoreDump.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionCoreDump.java new file mode 100644 index 00000000000..e7c6c5f4f6c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionCoreDump.java @@ -0,0 +1,223 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The core dump action applied on the process matching the rule. */ +@JsonPropertyOrder({ + CloudWorkloadSecurityAgentRuleActionCoreDump.JSON_PROPERTY_DENTRY, + CloudWorkloadSecurityAgentRuleActionCoreDump.JSON_PROPERTY_MOUNT, + CloudWorkloadSecurityAgentRuleActionCoreDump.JSON_PROPERTY_NO_COMPRESSION, + CloudWorkloadSecurityAgentRuleActionCoreDump.JSON_PROPERTY_PROCESS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CloudWorkloadSecurityAgentRuleActionCoreDump { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DENTRY = "dentry"; + private Boolean dentry; + + public static final String JSON_PROPERTY_MOUNT = "mount"; + private Boolean mount; + + public static final String JSON_PROPERTY_NO_COMPRESSION = "no_compression"; + private Boolean noCompression; + + public static final String JSON_PROPERTY_PROCESS = "process"; + private Boolean process; + + public CloudWorkloadSecurityAgentRuleActionCoreDump dentry(Boolean dentry) { + this.dentry = dentry; + return this; + } + + /** + * Whether the directory entry information is included in the core dump. + * + * @return dentry + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DENTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDentry() { + return dentry; + } + + public void setDentry(Boolean dentry) { + this.dentry = dentry; + } + + public CloudWorkloadSecurityAgentRuleActionCoreDump mount(Boolean mount) { + this.mount = mount; + return this; + } + + /** + * Whether the mount information is included in the core dump. + * + * @return mount + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MOUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getMount() { + return mount; + } + + public void setMount(Boolean mount) { + this.mount = mount; + } + + public CloudWorkloadSecurityAgentRuleActionCoreDump noCompression(Boolean noCompression) { + this.noCompression = noCompression; + return this; + } + + /** + * Whether the core dump is left uncompressed. + * + * @return noCompression + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NO_COMPRESSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getNoCompression() { + return noCompression; + } + + public void setNoCompression(Boolean noCompression) { + this.noCompression = noCompression; + } + + public CloudWorkloadSecurityAgentRuleActionCoreDump process(Boolean process) { + this.process = process; + return this; + } + + /** + * Whether the process memory is included in the core dump. + * + * @return process + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROCESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getProcess() { + return process; + } + + public void setProcess(Boolean process) { + this.process = process; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CloudWorkloadSecurityAgentRuleActionCoreDump + */ + @JsonAnySetter + public CloudWorkloadSecurityAgentRuleActionCoreDump putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CloudWorkloadSecurityAgentRuleActionCoreDump object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloudWorkloadSecurityAgentRuleActionCoreDump cloudWorkloadSecurityAgentRuleActionCoreDump = + (CloudWorkloadSecurityAgentRuleActionCoreDump) o; + return Objects.equals(this.dentry, cloudWorkloadSecurityAgentRuleActionCoreDump.dentry) + && Objects.equals(this.mount, cloudWorkloadSecurityAgentRuleActionCoreDump.mount) + && Objects.equals( + this.noCompression, cloudWorkloadSecurityAgentRuleActionCoreDump.noCompression) + && Objects.equals(this.process, cloudWorkloadSecurityAgentRuleActionCoreDump.process) + && Objects.equals( + this.additionalProperties, + cloudWorkloadSecurityAgentRuleActionCoreDump.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(dentry, mount, noCompression, process, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudWorkloadSecurityAgentRuleActionCoreDump {\n"); + sb.append(" dentry: ").append(toIndentedString(dentry)).append("\n"); + sb.append(" mount: ").append(toIndentedString(mount)).append("\n"); + sb.append(" noCompression: ").append(toIndentedString(noCompression)).append("\n"); + sb.append(" process: ").append(toIndentedString(process)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionHash.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionHash.java index 6c94ce513f0..48b8257775c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionHash.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionHash.java @@ -17,7 +17,10 @@ import java.util.Objects; /** Hash file specified by the field attribute */ -@JsonPropertyOrder({CloudWorkloadSecurityAgentRuleActionHash.JSON_PROPERTY_FIELD}) +@JsonPropertyOrder({ + CloudWorkloadSecurityAgentRuleActionHash.JSON_PROPERTY_FIELD, + CloudWorkloadSecurityAgentRuleActionHash.JSON_PROPERTY_MAX_FILE_SIZE +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleActionHash { @@ -25,6 +28,9 @@ public class CloudWorkloadSecurityAgentRuleActionHash { public static final String JSON_PROPERTY_FIELD = "field"; private String field; + public static final String JSON_PROPERTY_MAX_FILE_SIZE = "max_file_size"; + private Long maxFileSize; + public CloudWorkloadSecurityAgentRuleActionHash field(String field) { this.field = field; return this; @@ -46,6 +52,27 @@ public void setField(String field) { this.field = field; } + public CloudWorkloadSecurityAgentRuleActionHash maxFileSize(Long maxFileSize) { + this.maxFileSize = maxFileSize; + return this; + } + + /** + * The maximum size of the files to hash, in bytes. + * + * @return maxFileSize + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MAX_FILE_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getMaxFileSize() { + return maxFileSize; + } + + public void setMaxFileSize(Long maxFileSize) { + this.maxFileSize = maxFileSize; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -104,6 +131,7 @@ public boolean equals(Object o) { CloudWorkloadSecurityAgentRuleActionHash cloudWorkloadSecurityAgentRuleActionHash = (CloudWorkloadSecurityAgentRuleActionHash) o; return Objects.equals(this.field, cloudWorkloadSecurityAgentRuleActionHash.field) + && Objects.equals(this.maxFileSize, cloudWorkloadSecurityAgentRuleActionHash.maxFileSize) && Objects.equals( this.additionalProperties, cloudWorkloadSecurityAgentRuleActionHash.additionalProperties); @@ -111,7 +139,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(field, additionalProperties); + return Objects.hash(field, maxFileSize, additionalProperties); } @Override @@ -119,6 +147,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CloudWorkloadSecurityAgentRuleActionHash {\n"); sb.append(" field: ").append(toIndentedString(field)).append("\n"); + sb.append(" maxFileSize: ").append(toIndentedString(maxFileSize)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionLog.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionLog.java new file mode 100644 index 00000000000..c7fb6c78983 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionLog.java @@ -0,0 +1,167 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The log action applied when the rule is triggered. */ +@JsonPropertyOrder({ + CloudWorkloadSecurityAgentRuleActionLog.JSON_PROPERTY_LEVEL, + CloudWorkloadSecurityAgentRuleActionLog.JSON_PROPERTY_MESSAGE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CloudWorkloadSecurityAgentRuleActionLog { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_LEVEL = "level"; + private String level; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public CloudWorkloadSecurityAgentRuleActionLog level(String level) { + this.level = level; + return this; + } + + /** + * The level of the log action. + * + * @return level + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LEVEL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getLevel() { + return level; + } + + public void setLevel(String level) { + this.level = level; + } + + public CloudWorkloadSecurityAgentRuleActionLog message(String message) { + this.message = message; + return this; + } + + /** + * The message of the log action. + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CloudWorkloadSecurityAgentRuleActionLog + */ + @JsonAnySetter + public CloudWorkloadSecurityAgentRuleActionLog putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CloudWorkloadSecurityAgentRuleActionLog object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloudWorkloadSecurityAgentRuleActionLog cloudWorkloadSecurityAgentRuleActionLog = + (CloudWorkloadSecurityAgentRuleActionLog) o; + return Objects.equals(this.level, cloudWorkloadSecurityAgentRuleActionLog.level) + && Objects.equals(this.message, cloudWorkloadSecurityAgentRuleActionLog.message) + && Objects.equals( + this.additionalProperties, + cloudWorkloadSecurityAgentRuleActionLog.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(level, message, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudWorkloadSecurityAgentRuleActionLog {\n"); + sb.append(" level: ").append(toIndentedString(level)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionNetworkFilter.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionNetworkFilter.java new file mode 100644 index 00000000000..71a12b2a303 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionNetworkFilter.java @@ -0,0 +1,196 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** The network filter action applied on the network traffic matching the rule. */ +@JsonPropertyOrder({ + CloudWorkloadSecurityAgentRuleActionNetworkFilter.JSON_PROPERTY_FILTER, + CloudWorkloadSecurityAgentRuleActionNetworkFilter.JSON_PROPERTY_POLICY, + CloudWorkloadSecurityAgentRuleActionNetworkFilter.JSON_PROPERTY_SCOPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class CloudWorkloadSecurityAgentRuleActionNetworkFilter { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FILTER = "filter"; + private String filter; + + public static final String JSON_PROPERTY_POLICY = "policy"; + private String policy; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + + public CloudWorkloadSecurityAgentRuleActionNetworkFilter filter(String filter) { + this.filter = filter; + return this; + } + + /** + * The filter expression of the network filter action. + * + * @return filter + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFilter() { + return filter; + } + + public void setFilter(String filter) { + this.filter = filter; + } + + public CloudWorkloadSecurityAgentRuleActionNetworkFilter policy(String policy) { + this.policy = policy; + return this; + } + + /** + * The policy of the network filter action. + * + * @return policy + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_POLICY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPolicy() { + return policy; + } + + public void setPolicy(String policy) { + this.policy = policy; + } + + public CloudWorkloadSecurityAgentRuleActionNetworkFilter scope(String scope) { + this.scope = scope; + return this; + } + + /** + * The scope of the network filter action. + * + * @return scope + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return CloudWorkloadSecurityAgentRuleActionNetworkFilter + */ + @JsonAnySetter + public CloudWorkloadSecurityAgentRuleActionNetworkFilter putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this CloudWorkloadSecurityAgentRuleActionNetworkFilter object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CloudWorkloadSecurityAgentRuleActionNetworkFilter + cloudWorkloadSecurityAgentRuleActionNetworkFilter = + (CloudWorkloadSecurityAgentRuleActionNetworkFilter) o; + return Objects.equals(this.filter, cloudWorkloadSecurityAgentRuleActionNetworkFilter.filter) + && Objects.equals(this.policy, cloudWorkloadSecurityAgentRuleActionNetworkFilter.policy) + && Objects.equals(this.scope, cloudWorkloadSecurityAgentRuleActionNetworkFilter.scope) + && Objects.equals( + this.additionalProperties, + cloudWorkloadSecurityAgentRuleActionNetworkFilter.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(filter, policy, scope, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CloudWorkloadSecurityAgentRuleActionNetworkFilter {\n"); + sb.append(" filter: ").append(toIndentedString(filter)).append("\n"); + sb.append(" policy: ").append(toIndentedString(policy)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionSet.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionSet.java index 8e1cc415cef..5772d5ff0ff 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionSet.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleActionSet.java @@ -24,7 +24,9 @@ CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_FIELD, CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_INHERITED, CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_NAME, + CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_PRIVATE, CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_SCOPE, + CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_SCOPE_FIELD, CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_SIZE, CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_TTL, CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_VALUE @@ -51,9 +53,15 @@ public class CloudWorkloadSecurityAgentRuleActionSet { public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PRIVATE = "private"; + private Boolean _private; + public static final String JSON_PROPERTY_SCOPE = "scope"; private String scope; + public static final String JSON_PROPERTY_SCOPE_FIELD = "scope_field"; + private String scopeField; + public static final String JSON_PROPERTY_SIZE = "size"; private Long size; @@ -189,6 +197,27 @@ public void setName(String name) { this.name = name; } + public CloudWorkloadSecurityAgentRuleActionSet _private(Boolean _private) { + this._private = _private; + return this; + } + + /** + * Whether the value of the set action is private. + * + * @return _private + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PRIVATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getPrivate() { + return _private; + } + + public void setPrivate(Boolean _private) { + this._private = _private; + } + public CloudWorkloadSecurityAgentRuleActionSet scope(String scope) { this.scope = scope; return this; @@ -210,6 +239,27 @@ public void setScope(String scope) { this.scope = scope; } + public CloudWorkloadSecurityAgentRuleActionSet scopeField(String scopeField) { + this.scopeField = scopeField; + return this; + } + + /** + * The scope field of the set action. + * + * @return scopeField + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE_FIELD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScopeField() { + return scopeField; + } + + public void setScopeField(String scopeField) { + this.scopeField = scopeField; + } + public CloudWorkloadSecurityAgentRuleActionSet size(Long size) { this.size = size; return this; @@ -341,7 +391,9 @@ public boolean equals(Object o) { && Objects.equals(this.field, cloudWorkloadSecurityAgentRuleActionSet.field) && Objects.equals(this.inherited, cloudWorkloadSecurityAgentRuleActionSet.inherited) && Objects.equals(this.name, cloudWorkloadSecurityAgentRuleActionSet.name) + && Objects.equals(this._private, cloudWorkloadSecurityAgentRuleActionSet._private) && Objects.equals(this.scope, cloudWorkloadSecurityAgentRuleActionSet.scope) + && Objects.equals(this.scopeField, cloudWorkloadSecurityAgentRuleActionSet.scopeField) && Objects.equals(this.size, cloudWorkloadSecurityAgentRuleActionSet.size) && Objects.equals(this.ttl, cloudWorkloadSecurityAgentRuleActionSet.ttl) && Objects.equals(this.value, cloudWorkloadSecurityAgentRuleActionSet.value) @@ -359,7 +411,9 @@ public int hashCode() { field, inherited, name, + _private, scope, + scopeField, size, ttl, value, @@ -376,7 +430,9 @@ public String toString() { sb.append(" field: ").append(toIndentedString(field)).append("\n"); sb.append(" inherited: ").append(toIndentedString(inherited)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" _private: ").append(toIndentedString(_private)).append("\n"); sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" scopeField: ").append(toIndentedString(scopeField)).append("\n"); sb.append(" size: ").append(toIndentedString(size)).append("\n"); sb.append(" ttl: ").append(toIndentedString(ttl)).append("\n"); sb.append(" value: ").append(toIndentedString(value)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleKill.java b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleKill.java index c4ac8f579ae..d36936c3170 100644 --- a/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleKill.java +++ b/src/main/java/com/datadog/api/client/v2/model/CloudWorkloadSecurityAgentRuleKill.java @@ -17,14 +17,95 @@ import java.util.Objects; /** Kill system call applied on the container matching the rule */ -@JsonPropertyOrder({CloudWorkloadSecurityAgentRuleKill.JSON_PROPERTY_SIGNAL}) +@JsonPropertyOrder({ + CloudWorkloadSecurityAgentRuleKill.JSON_PROPERTY_DISABLE_CONTAINER_DISARMER, + CloudWorkloadSecurityAgentRuleKill.JSON_PROPERTY_DISABLE_EXECUTABLE_DISARMER, + CloudWorkloadSecurityAgentRuleKill.JSON_PROPERTY_SCOPE, + CloudWorkloadSecurityAgentRuleKill.JSON_PROPERTY_SIGNAL +}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class CloudWorkloadSecurityAgentRuleKill { @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DISABLE_CONTAINER_DISARMER = + "disable_container_disarmer"; + private Boolean disableContainerDisarmer; + + public static final String JSON_PROPERTY_DISABLE_EXECUTABLE_DISARMER = + "disable_executable_disarmer"; + private Boolean disableExecutableDisarmer; + + public static final String JSON_PROPERTY_SCOPE = "scope"; + private String scope; + public static final String JSON_PROPERTY_SIGNAL = "signal"; private String signal; + public CloudWorkloadSecurityAgentRuleKill disableContainerDisarmer( + Boolean disableContainerDisarmer) { + this.disableContainerDisarmer = disableContainerDisarmer; + return this; + } + + /** + * Whether the automatic container safeguard of the kill action is disabled. + * + * @return disableContainerDisarmer + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLE_CONTAINER_DISARMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisableContainerDisarmer() { + return disableContainerDisarmer; + } + + public void setDisableContainerDisarmer(Boolean disableContainerDisarmer) { + this.disableContainerDisarmer = disableContainerDisarmer; + } + + public CloudWorkloadSecurityAgentRuleKill disableExecutableDisarmer( + Boolean disableExecutableDisarmer) { + this.disableExecutableDisarmer = disableExecutableDisarmer; + return this; + } + + /** + * Whether the automatic executable safeguard of the kill action is disabled. + * + * @return disableExecutableDisarmer + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISABLE_EXECUTABLE_DISARMER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getDisableExecutableDisarmer() { + return disableExecutableDisarmer; + } + + public void setDisableExecutableDisarmer(Boolean disableExecutableDisarmer) { + this.disableExecutableDisarmer = disableExecutableDisarmer; + } + + public CloudWorkloadSecurityAgentRuleKill scope(String scope) { + this.scope = scope; + return this; + } + + /** + * The scope of the kill action. + * + * @return scope + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCOPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + public CloudWorkloadSecurityAgentRuleKill signal(String signal) { this.signal = signal; return this; @@ -103,20 +184,35 @@ public boolean equals(Object o) { } CloudWorkloadSecurityAgentRuleKill cloudWorkloadSecurityAgentRuleKill = (CloudWorkloadSecurityAgentRuleKill) o; - return Objects.equals(this.signal, cloudWorkloadSecurityAgentRuleKill.signal) + return Objects.equals( + this.disableContainerDisarmer, + cloudWorkloadSecurityAgentRuleKill.disableContainerDisarmer) + && Objects.equals( + this.disableExecutableDisarmer, + cloudWorkloadSecurityAgentRuleKill.disableExecutableDisarmer) + && Objects.equals(this.scope, cloudWorkloadSecurityAgentRuleKill.scope) + && Objects.equals(this.signal, cloudWorkloadSecurityAgentRuleKill.signal) && Objects.equals( this.additionalProperties, cloudWorkloadSecurityAgentRuleKill.additionalProperties); } @Override public int hashCode() { - return Objects.hash(signal, additionalProperties); + return Objects.hash( + disableContainerDisarmer, disableExecutableDisarmer, scope, signal, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CloudWorkloadSecurityAgentRuleKill {\n"); + sb.append(" disableContainerDisarmer: ") + .append(toIndentedString(disableContainerDisarmer)) + .append("\n"); + sb.append(" disableExecutableDisarmer: ") + .append(toIndentedString(disableExecutableDisarmer)) + .append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); sb.append(" signal: ").append(toIndentedString(signal)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties))