Skip to content
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
15 changes: 15 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19045,6 +19045,11 @@ components:
format: int32
maximum: 2147483647
type: integer
contentPackUpdateAvailable:
description: "Whether a content pack update is available for the policy."
example: false
nullable: true
type: boolean
datadogManaged:
description: "Whether the policy is managed by Datadog"
example: false
Expand Down Expand Up @@ -19111,6 +19116,10 @@ components:
format: int32
maximum: 2147483647
type: integer
sourceDefaultPolicyId:
description: "The ID of the Datadog-managed default policy this policy is sourced from."
example: "threat-detection.policy"
type: string
updateDate:
description: "Timestamp in milliseconds when the policy was last updated"
example: 1624366480320
Expand Down Expand Up @@ -19293,6 +19302,9 @@ components:
CloudWorkloadSecurityAgentRuleAction:
description: "The action the rule can perform if triggered"
properties:
disabled:
description: "Whether the action is disabled."
type: boolean
filter:
description: "SECL expression used to target the container to apply the action on"
type: string
Expand Down Expand Up @@ -19349,6 +19361,9 @@ components:
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;

/** A Cloud Workload Security Agent policy returned by the API */
@JsonPropertyOrder({
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_BLOCKING_RULES_COUNT,
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_CONTENT_PACK_UPDATE_AVAILABLE,
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_DATADOG_MANAGED,
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_DESCRIPTION,
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_DISABLED_RULES_COUNT,
Expand All @@ -34,6 +36,7 @@
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_POLICY_VERSION,
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_PRIORITY,
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_RULE_COUNT,
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_SOURCE_DEFAULT_POLICY_ID,
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_UPDATE_DATE,
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_UPDATED_AT,
CloudWorkloadSecurityAgentPolicyAttributes.JSON_PROPERTY_UPDATER,
Expand All @@ -46,6 +49,10 @@ public class CloudWorkloadSecurityAgentPolicyAttributes {
public static final String JSON_PROPERTY_BLOCKING_RULES_COUNT = "blockingRulesCount";
private Integer blockingRulesCount;

public static final String JSON_PROPERTY_CONTENT_PACK_UPDATE_AVAILABLE =
"contentPackUpdateAvailable";
private JsonNullable<Boolean> contentPackUpdateAvailable = JsonNullable.<Boolean>undefined();

public static final String JSON_PROPERTY_DATADOG_MANAGED = "datadogManaged";
private Boolean datadogManaged;

Expand Down Expand Up @@ -85,6 +92,9 @@ public class CloudWorkloadSecurityAgentPolicyAttributes {
public static final String JSON_PROPERTY_RULE_COUNT = "ruleCount";
private Integer ruleCount;

public static final String JSON_PROPERTY_SOURCE_DEFAULT_POLICY_ID = "sourceDefaultPolicyId";
private String sourceDefaultPolicyId;

public static final String JSON_PROPERTY_UPDATE_DATE = "updateDate";
private Long updateDate;

Expand Down Expand Up @@ -118,6 +128,39 @@ public void setBlockingRulesCount(Integer blockingRulesCount) {
this.blockingRulesCount = blockingRulesCount;
}

public CloudWorkloadSecurityAgentPolicyAttributes contentPackUpdateAvailable(
Boolean contentPackUpdateAvailable) {
this.contentPackUpdateAvailable = JsonNullable.<Boolean>of(contentPackUpdateAvailable);
return this;
}

/**
* Whether a content pack update is available for the policy.
*
* @return contentPackUpdateAvailable
*/
@jakarta.annotation.Nullable
@JsonIgnore
public Boolean getContentPackUpdateAvailable() {
return contentPackUpdateAvailable.orElse(null);
}

@JsonProperty(JSON_PROPERTY_CONTENT_PACK_UPDATE_AVAILABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Boolean> getContentPackUpdateAvailable_JsonNullable() {
return contentPackUpdateAvailable;
}

@JsonProperty(JSON_PROPERTY_CONTENT_PACK_UPDATE_AVAILABLE)
public void setContentPackUpdateAvailable_JsonNullable(
JsonNullable<Boolean> contentPackUpdateAvailable) {
this.contentPackUpdateAvailable = contentPackUpdateAvailable;
}

public void setContentPackUpdateAvailable(Boolean contentPackUpdateAvailable) {
this.contentPackUpdateAvailable = JsonNullable.<Boolean>of(contentPackUpdateAvailable);
}

public CloudWorkloadSecurityAgentPolicyAttributes datadogManaged(Boolean datadogManaged) {
this.datadogManaged = datadogManaged;
return this;
Expand Down Expand Up @@ -411,6 +454,28 @@ public void setRuleCount(Integer ruleCount) {
this.ruleCount = ruleCount;
}

public CloudWorkloadSecurityAgentPolicyAttributes sourceDefaultPolicyId(
String sourceDefaultPolicyId) {
this.sourceDefaultPolicyId = sourceDefaultPolicyId;
return this;
}

/**
* The ID of the Datadog-managed default policy this policy is sourced from.
*
* @return sourceDefaultPolicyId
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SOURCE_DEFAULT_POLICY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSourceDefaultPolicyId() {
return sourceDefaultPolicyId;
}

public void setSourceDefaultPolicyId(String sourceDefaultPolicyId) {
this.sourceDefaultPolicyId = sourceDefaultPolicyId;
}

public CloudWorkloadSecurityAgentPolicyAttributes updateDate(Long updateDate) {
this.updateDate = updateDate;
return this;
Expand Down Expand Up @@ -581,6 +646,9 @@ public boolean equals(Object o) {
(CloudWorkloadSecurityAgentPolicyAttributes) o;
return Objects.equals(
this.blockingRulesCount, cloudWorkloadSecurityAgentPolicyAttributes.blockingRulesCount)
&& Objects.equals(
this.contentPackUpdateAvailable,
cloudWorkloadSecurityAgentPolicyAttributes.contentPackUpdateAvailable)
&& Objects.equals(
this.datadogManaged, cloudWorkloadSecurityAgentPolicyAttributes.datadogManaged)
&& Objects.equals(this.description, cloudWorkloadSecurityAgentPolicyAttributes.description)
Expand All @@ -600,6 +668,9 @@ public boolean equals(Object o) {
this.policyVersion, cloudWorkloadSecurityAgentPolicyAttributes.policyVersion)
&& Objects.equals(this.priority, cloudWorkloadSecurityAgentPolicyAttributes.priority)
&& Objects.equals(this.ruleCount, cloudWorkloadSecurityAgentPolicyAttributes.ruleCount)
&& Objects.equals(
this.sourceDefaultPolicyId,
cloudWorkloadSecurityAgentPolicyAttributes.sourceDefaultPolicyId)
&& Objects.equals(this.updateDate, cloudWorkloadSecurityAgentPolicyAttributes.updateDate)
&& Objects.equals(this.updatedAt, cloudWorkloadSecurityAgentPolicyAttributes.updatedAt)
&& Objects.equals(this.updater, cloudWorkloadSecurityAgentPolicyAttributes.updater)
Expand All @@ -613,6 +684,7 @@ public boolean equals(Object o) {
public int hashCode() {
return Objects.hash(
blockingRulesCount,
contentPackUpdateAvailable,
datadogManaged,
description,
disabledRulesCount,
Expand All @@ -626,6 +698,7 @@ public int hashCode() {
policyVersion,
priority,
ruleCount,
sourceDefaultPolicyId,
updateDate,
updatedAt,
updater,
Expand All @@ -638,6 +711,9 @@ public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CloudWorkloadSecurityAgentPolicyAttributes {\n");
sb.append(" blockingRulesCount: ").append(toIndentedString(blockingRulesCount)).append("\n");
sb.append(" contentPackUpdateAvailable: ")
.append(toIndentedString(contentPackUpdateAvailable))
.append("\n");
sb.append(" datadogManaged: ").append(toIndentedString(datadogManaged)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" disabledRulesCount: ").append(toIndentedString(disabledRulesCount)).append("\n");
Expand All @@ -653,6 +729,9 @@ public String toString() {
sb.append(" policyVersion: ").append(toIndentedString(policyVersion)).append("\n");
sb.append(" priority: ").append(toIndentedString(priority)).append("\n");
sb.append(" ruleCount: ").append(toIndentedString(ruleCount)).append("\n");
sb.append(" sourceDefaultPolicyId: ")
.append(toIndentedString(sourceDefaultPolicyId))
.append("\n");
sb.append(" updateDate: ").append(toIndentedString(updateDate)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" updater: ").append(toIndentedString(updater)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

/** The action the rule can perform if triggered */
@JsonPropertyOrder({
CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_DISABLED,
CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_FILTER,
CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_HASH,
CloudWorkloadSecurityAgentRuleAction.JSON_PROPERTY_KILL,
Expand All @@ -28,6 +29,9 @@
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_DISABLED = "disabled";
private Boolean disabled;

public static final String JSON_PROPERTY_FILTER = "filter";
private String filter;

Expand All @@ -43,6 +47,27 @@ public class CloudWorkloadSecurityAgentRuleAction {
public static final String JSON_PROPERTY_SET = "set";
private CloudWorkloadSecurityAgentRuleActionSet set;

public CloudWorkloadSecurityAgentRuleAction disabled(Boolean disabled) {
this.disabled = disabled;
return this;
}

/**
* Whether the action is disabled.
*
* @return disabled
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DISABLED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getDisabled() {
return disabled;
}

public void setDisabled(Boolean disabled) {
this.disabled = disabled;
}

public CloudWorkloadSecurityAgentRuleAction filter(String filter) {
this.filter = filter;
return this;
Expand Down Expand Up @@ -222,7 +247,8 @@ public boolean equals(Object o) {
}
CloudWorkloadSecurityAgentRuleAction cloudWorkloadSecurityAgentRuleAction =
(CloudWorkloadSecurityAgentRuleAction) o;
return Objects.equals(this.filter, cloudWorkloadSecurityAgentRuleAction.filter)
return 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.metadata, cloudWorkloadSecurityAgentRuleAction.metadata)
Expand All @@ -233,13 +259,14 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(filter, hash, kill, metadata, set, additionalProperties);
return Objects.hash(disabled, filter, hash, kill, metadata, set, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CloudWorkloadSecurityAgentRuleAction {\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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_INHERITED,
CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_NAME,
CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_SCOPE,
CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_SCOPE_FIELD,
CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_SIZE,
CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_TTL,
CloudWorkloadSecurityAgentRuleActionSet.JSON_PROPERTY_VALUE
Expand Down Expand Up @@ -54,6 +55,9 @@ public class CloudWorkloadSecurityAgentRuleActionSet {
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;

Expand Down Expand Up @@ -210,6 +214,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;
Expand Down Expand Up @@ -342,6 +367,7 @@ public boolean equals(Object o) {
&& Objects.equals(this.inherited, cloudWorkloadSecurityAgentRuleActionSet.inherited)
&& Objects.equals(this.name, cloudWorkloadSecurityAgentRuleActionSet.name)
&& 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)
Expand All @@ -360,6 +386,7 @@ public int hashCode() {
inherited,
name,
scope,
scopeField,
size,
ttl,
value,
Expand All @@ -377,6 +404,7 @@ public String toString() {
sb.append(" inherited: ").append(toIndentedString(inherited)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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");
Expand Down
Loading