diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c680cd9d1d4..a6b689f90eb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -56955,13 +56955,14 @@ components: - attributes type: object GovernanceControlDetectionAssignmentSource: - description: How the detection's current assignment was determined. Possible values are `auto_resolved`, `manual`, `reassigned`, and `cleared`. + description: How the detection's current assignment was determined. Possible values are `auto_resolved`, `manual`, `reassigned`, and `cleared`. `null` when not set. enum: - auto_resolved - manual - reassigned - cleared example: "manual" + nullable: true type: string x-enum-varnames: - AUTO_RESOLVED @@ -56974,10 +56975,12 @@ components: assigned_team: description: The identifier of the team the detection is assigned to, if any. example: "platform-security" + nullable: true type: string assigned_to: description: The identifier of the user the detection is assigned to, if any. example: "11111111-2222-3333-4444-555555555555" + nullable: true type: string assignment_source: $ref: "#/components/schemas/GovernanceControlDetectionAssignmentSource" @@ -57000,15 +57003,18 @@ components: display_name: description: The human-readable name of the detected resource. example: "CI Deploy Key" + nullable: true type: string exception_at: description: The date and time when the detection was marked as an exception, if applicable. example: "2024-03-05T09:00:00Z" format: date-time + nullable: true type: string exception_by: description: The identifier of the user who marked the detection as an exception, if applicable. example: "11111111-2222-3333-4444-555555555555" + nullable: true type: string metadata: description: Free-form metadata associated with the detection. @@ -57018,16 +57024,19 @@ components: description: The date and time after which the detection is scheduled to be mitigated, if applicable. example: "2024-03-15T00:00:00Z" format: date-time + nullable: true type: string mitigated_at: description: The date and time when the detection was mitigated, if applicable. example: "2024-03-10T15:30:00Z" format: date-time + nullable: true type: string priority: description: The priority of the detection, if set. example: 1 format: int64 + nullable: true type: integer resource_id: description: The identifier of the resource the detection applies to. @@ -57036,6 +57045,7 @@ components: resource_type: description: The type of resource the detection applies to, for example `api_key` or `dashboard`. example: "api_key" + nullable: true type: string state: $ref: "#/components/schemas/GovernanceControlDetectionState" diff --git a/src/main/java/com/datadog/api/client/v2/model/GovernanceControlDetectionAssignmentSource.java b/src/main/java/com/datadog/api/client/v2/model/GovernanceControlDetectionAssignmentSource.java index e721be4665a..29e72292d7f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GovernanceControlDetectionAssignmentSource.java +++ b/src/main/java/com/datadog/api/client/v2/model/GovernanceControlDetectionAssignmentSource.java @@ -20,7 +20,8 @@ /** * How the detection's current assignment was determined. Possible values are auto_resolved - * , manual, reassigned, and cleared. + * , manual, reassigned, and cleared. null + * when not set. */ @JsonSerialize( using = diff --git a/src/main/java/com/datadog/api/client/v2/model/GovernanceControlDetectionAttributes.java b/src/main/java/com/datadog/api/client/v2/model/GovernanceControlDetectionAttributes.java index bc19a41f952..a2896298ac5 100644 --- a/src/main/java/com/datadog/api/client/v2/model/GovernanceControlDetectionAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/GovernanceControlDetectionAttributes.java @@ -17,6 +17,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; /** The attributes of a governance control detection. */ @JsonPropertyOrder({ @@ -42,10 +43,10 @@ public class GovernanceControlDetectionAttributes { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ASSIGNED_TEAM = "assigned_team"; - private String assignedTeam; + private JsonNullable assignedTeam = JsonNullable.undefined(); public static final String JSON_PROPERTY_ASSIGNED_TO = "assigned_to"; - private String assignedTo; + private JsonNullable assignedTo = JsonNullable.undefined(); public static final String JSON_PROPERTY_ASSIGNMENT_SOURCE = "assignment_source"; private GovernanceControlDetectionAssignmentSource assignmentSource; @@ -63,19 +64,19 @@ public class GovernanceControlDetectionAttributes { private String displayName; public static final String JSON_PROPERTY_EXCEPTION_AT = "exception_at"; - private OffsetDateTime exceptionAt; + private JsonNullable exceptionAt = JsonNullable.undefined(); public static final String JSON_PROPERTY_EXCEPTION_BY = "exception_by"; - private String exceptionBy; + private JsonNullable exceptionBy = JsonNullable.undefined(); public static final String JSON_PROPERTY_METADATA = "metadata"; private Object metadata = null; public static final String JSON_PROPERTY_MITIGATE_AFTER = "mitigate_after"; - private OffsetDateTime mitigateAfter; + private JsonNullable mitigateAfter = JsonNullable.undefined(); public static final String JSON_PROPERTY_MITIGATED_AT = "mitigated_at"; - private OffsetDateTime mitigatedAt; + private JsonNullable mitigatedAt = JsonNullable.undefined(); public static final String JSON_PROPERTY_PRIORITY = "priority"; private Long priority; @@ -105,20 +106,25 @@ public GovernanceControlDetectionAttributes( @JsonProperty(required = true, value = JSON_PROPERTY_STATE) GovernanceControlDetectionState state) { this.assignmentSource = assignmentSource; - this.unparsed |= !assignmentSource.isValid(); + if (assignmentSource != null) { + this.unparsed |= !assignmentSource.isValid(); + } this.controlId = controlId; this.createdAt = createdAt; this.detectionType = detectionType; this.displayName = displayName; + if (displayName != null) {} this.priority = priority; + if (priority != null) {} this.resourceId = resourceId; this.resourceType = resourceType; + if (resourceType != null) {} this.state = state; this.unparsed |= !state.isValid(); } public GovernanceControlDetectionAttributes assignedTeam(String assignedTeam) { - this.assignedTeam = assignedTeam; + this.assignedTeam = JsonNullable.of(assignedTeam); return this; } @@ -128,18 +134,28 @@ public GovernanceControlDetectionAttributes assignedTeam(String assignedTeam) { * @return assignedTeam */ @jakarta.annotation.Nullable + @JsonIgnore + public String getAssignedTeam() { + return assignedTeam.orElse(null); + } + @JsonProperty(JSON_PROPERTY_ASSIGNED_TEAM) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAssignedTeam() { + public JsonNullable getAssignedTeam_JsonNullable() { return assignedTeam; } - public void setAssignedTeam(String assignedTeam) { + @JsonProperty(JSON_PROPERTY_ASSIGNED_TEAM) + public void setAssignedTeam_JsonNullable(JsonNullable assignedTeam) { this.assignedTeam = assignedTeam; } + public void setAssignedTeam(String assignedTeam) { + this.assignedTeam = JsonNullable.of(assignedTeam); + } + public GovernanceControlDetectionAttributes assignedTo(String assignedTo) { - this.assignedTo = assignedTo; + this.assignedTo = JsonNullable.of(assignedTo); return this; } @@ -149,29 +165,43 @@ public GovernanceControlDetectionAttributes assignedTo(String assignedTo) { * @return assignedTo */ @jakarta.annotation.Nullable + @JsonIgnore + public String getAssignedTo() { + return assignedTo.orElse(null); + } + @JsonProperty(JSON_PROPERTY_ASSIGNED_TO) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getAssignedTo() { + public JsonNullable getAssignedTo_JsonNullable() { return assignedTo; } - public void setAssignedTo(String assignedTo) { + @JsonProperty(JSON_PROPERTY_ASSIGNED_TO) + public void setAssignedTo_JsonNullable(JsonNullable assignedTo) { this.assignedTo = assignedTo; } + public void setAssignedTo(String assignedTo) { + this.assignedTo = JsonNullable.of(assignedTo); + } + public GovernanceControlDetectionAttributes assignmentSource( GovernanceControlDetectionAssignmentSource assignmentSource) { this.assignmentSource = assignmentSource; - this.unparsed |= !assignmentSource.isValid(); + if (assignmentSource != null) { + this.unparsed |= !assignmentSource.isValid(); + } return this; } /** * How the detection's current assignment was determined. Possible values are auto_resolved - * , manual, reassigned, and cleared. + * , manual, reassigned, and cleared. null + * when not set. * * @return assignmentSource */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ASSIGNMENT_SOURCE) @JsonInclude(value = JsonInclude.Include.ALWAYS) public GovernanceControlDetectionAssignmentSource getAssignmentSource() { @@ -251,6 +281,7 @@ public void setDetectionType(String detectionType) { public GovernanceControlDetectionAttributes displayName(String displayName) { this.displayName = displayName; + if (displayName != null) {} return this; } @@ -259,6 +290,7 @@ public GovernanceControlDetectionAttributes displayName(String displayName) { * * @return displayName */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getDisplayName() { @@ -270,7 +302,7 @@ public void setDisplayName(String displayName) { } public GovernanceControlDetectionAttributes exceptionAt(OffsetDateTime exceptionAt) { - this.exceptionAt = exceptionAt; + this.exceptionAt = JsonNullable.of(exceptionAt); return this; } @@ -280,18 +312,28 @@ public GovernanceControlDetectionAttributes exceptionAt(OffsetDateTime exception * @return exceptionAt */ @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getExceptionAt() { + return exceptionAt.orElse(null); + } + @JsonProperty(JSON_PROPERTY_EXCEPTION_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getExceptionAt() { + public JsonNullable getExceptionAt_JsonNullable() { return exceptionAt; } - public void setExceptionAt(OffsetDateTime exceptionAt) { + @JsonProperty(JSON_PROPERTY_EXCEPTION_AT) + public void setExceptionAt_JsonNullable(JsonNullable exceptionAt) { this.exceptionAt = exceptionAt; } + public void setExceptionAt(OffsetDateTime exceptionAt) { + this.exceptionAt = JsonNullable.of(exceptionAt); + } + public GovernanceControlDetectionAttributes exceptionBy(String exceptionBy) { - this.exceptionBy = exceptionBy; + this.exceptionBy = JsonNullable.of(exceptionBy); return this; } @@ -301,16 +343,26 @@ public GovernanceControlDetectionAttributes exceptionBy(String exceptionBy) { * @return exceptionBy */ @jakarta.annotation.Nullable + @JsonIgnore + public String getExceptionBy() { + return exceptionBy.orElse(null); + } + @JsonProperty(JSON_PROPERTY_EXCEPTION_BY) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getExceptionBy() { + public JsonNullable getExceptionBy_JsonNullable() { return exceptionBy; } - public void setExceptionBy(String exceptionBy) { + @JsonProperty(JSON_PROPERTY_EXCEPTION_BY) + public void setExceptionBy_JsonNullable(JsonNullable exceptionBy) { this.exceptionBy = exceptionBy; } + public void setExceptionBy(String exceptionBy) { + this.exceptionBy = JsonNullable.of(exceptionBy); + } + public GovernanceControlDetectionAttributes metadata(Object metadata) { this.metadata = metadata; return this; @@ -333,7 +385,7 @@ public void setMetadata(Object metadata) { } public GovernanceControlDetectionAttributes mitigateAfter(OffsetDateTime mitigateAfter) { - this.mitigateAfter = mitigateAfter; + this.mitigateAfter = JsonNullable.of(mitigateAfter); return this; } @@ -343,18 +395,28 @@ public GovernanceControlDetectionAttributes mitigateAfter(OffsetDateTime mitigat * @return mitigateAfter */ @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getMitigateAfter() { + return mitigateAfter.orElse(null); + } + @JsonProperty(JSON_PROPERTY_MITIGATE_AFTER) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getMitigateAfter() { + public JsonNullable getMitigateAfter_JsonNullable() { return mitigateAfter; } - public void setMitigateAfter(OffsetDateTime mitigateAfter) { + @JsonProperty(JSON_PROPERTY_MITIGATE_AFTER) + public void setMitigateAfter_JsonNullable(JsonNullable mitigateAfter) { this.mitigateAfter = mitigateAfter; } + public void setMitigateAfter(OffsetDateTime mitigateAfter) { + this.mitigateAfter = JsonNullable.of(mitigateAfter); + } + public GovernanceControlDetectionAttributes mitigatedAt(OffsetDateTime mitigatedAt) { - this.mitigatedAt = mitigatedAt; + this.mitigatedAt = JsonNullable.of(mitigatedAt); return this; } @@ -364,18 +426,29 @@ public GovernanceControlDetectionAttributes mitigatedAt(OffsetDateTime mitigated * @return mitigatedAt */ @jakarta.annotation.Nullable + @JsonIgnore + public OffsetDateTime getMitigatedAt() { + return mitigatedAt.orElse(null); + } + @JsonProperty(JSON_PROPERTY_MITIGATED_AT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public OffsetDateTime getMitigatedAt() { + public JsonNullable getMitigatedAt_JsonNullable() { return mitigatedAt; } - public void setMitigatedAt(OffsetDateTime mitigatedAt) { + @JsonProperty(JSON_PROPERTY_MITIGATED_AT) + public void setMitigatedAt_JsonNullable(JsonNullable mitigatedAt) { this.mitigatedAt = mitigatedAt; } + public void setMitigatedAt(OffsetDateTime mitigatedAt) { + this.mitigatedAt = JsonNullable.of(mitigatedAt); + } + public GovernanceControlDetectionAttributes priority(Long priority) { this.priority = priority; + if (priority != null) {} return this; } @@ -384,6 +457,7 @@ public GovernanceControlDetectionAttributes priority(Long priority) { * * @return priority */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_PRIORITY) @JsonInclude(value = JsonInclude.Include.ALWAYS) public Long getPriority() { @@ -416,6 +490,7 @@ public void setResourceId(String resourceId) { public GovernanceControlDetectionAttributes resourceType(String resourceType) { this.resourceType = resourceType; + if (resourceType != null) {} return this; } @@ -425,6 +500,7 @@ public GovernanceControlDetectionAttributes resourceType(String resourceType) { * * @return resourceType */ + @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_RESOURCE_TYPE) @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getResourceType() {