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
26 changes: 24 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10910,6 +10910,10 @@ components:
description: Operating system name.
example: ubuntu
type: string
version:
description: Operating system version.
example: "24.04"
type: string
required:
- name
type: object
Expand Down Expand Up @@ -94632,8 +94636,11 @@ components:
description: The ID of the scanned asset metadata.
example: "Host|i-0fc7edef1ab26d7ef"
type: string
type:
$ref: "#/components/schemas/ScannedAssetMetadataType"
required:
- id
- type
- attributes
type: object
ScannedAssetMetadataAsset:
Expand Down Expand Up @@ -94688,6 +94695,14 @@ components:
required:
- timestamp
type: object
ScannedAssetMetadataType:
description: The JSON:API type.
enum:
- scanned-assets-metadata
example: scanned-assets-metadata
type: string
x-enum-varnames:
- SCANNED_ASSETS_METADATA
ScannedAssetsMetadata:
description: The expected response schema when listing scanned assets metadata.
properties:
Expand Down Expand Up @@ -107359,7 +107374,8 @@ components:
- "1.3"
- "1.4"
- "1.5"
example: "1.5"
- "1.6"
example: "1.6"
type: string
x-enum-varnames:
- ONE_ZERO
Expand All @@ -107368,6 +107384,7 @@ components:
- ONE_THREE
- ONE_FOUR
- ONE_FIVE
- ONE_SIX
SplitAPIKey:
description: The definition of the `SplitAPIKey` object.
properties:
Expand Down Expand Up @@ -121376,10 +121393,12 @@ components:
- ReflectionInjection
- RiskyLicense
- SessionRewriting
- SessionRewritting
- SessionTimeout
- SqlInjection
- Ssrf
- StackTraceLeak
- TemplateInjection
- TrustBoundaryViolation
- Unmaintained
- UntrustedDeserialization
Expand Down Expand Up @@ -121421,10 +121440,12 @@ components:
- REFLECTION_INJECTION
- RISKY_LICENSE
- SESSION_REWRITING
- SESSION_REWRITTING
- SESSION_TIMEOUT
- SQL_INJECTION
- SSRF
- STACK_TRACE_LEAK
- TEMPLATE_INJECTION
- TRUST_BOUNDARY_VIOLATION
- UNMAINTAINED
- UNTRUSTED_DESERIALIZATION
Expand Down Expand Up @@ -194101,7 +194122,7 @@ paths:
dependencies: []
metadata: {}
serialNumber: urn:uuid:abc-123
specVersion: "1.5"
specVersion: "1.6"
version: 1
id: "github.com/datadog/datadog-agent"
type: sboms
Expand Down Expand Up @@ -194247,6 +194268,7 @@ paths:
last_success:
env: prod
id: "Host|i-0fc7edef1ab26d7ef"
type: scanned-assets-metadata
schema:
$ref: "#/components/schemas/ScannedAssetsMetadata"
description: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
/** Asset operating system. */
@JsonPropertyOrder({
AssetOperatingSystem.JSON_PROPERTY_DESCRIPTION,
AssetOperatingSystem.JSON_PROPERTY_NAME
AssetOperatingSystem.JSON_PROPERTY_NAME,
AssetOperatingSystem.JSON_PROPERTY_VERSION
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -32,6 +33,9 @@ public class AssetOperatingSystem {
public static final String JSON_PROPERTY_NAME = "name";
private String name;

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

public AssetOperatingSystem() {}

@JsonCreator
Expand Down Expand Up @@ -81,6 +85,27 @@ public void setName(String name) {
this.name = name;
}

public AssetOperatingSystem version(String version) {
this.version = version;
return this;
}

/**
* Operating system version.
*
* @return version
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_VERSION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getVersion() {
return version;
}

public void setVersion(String version) {
this.version = version;
}

/**
* 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 @@ -139,12 +164,13 @@ public boolean equals(Object o) {
AssetOperatingSystem assetOperatingSystem = (AssetOperatingSystem) o;
return Objects.equals(this.description, assetOperatingSystem.description)
&& Objects.equals(this.name, assetOperatingSystem.name)
&& Objects.equals(this.version, assetOperatingSystem.version)
&& Objects.equals(this.additionalProperties, assetOperatingSystem.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(description, name, additionalProperties);
return Objects.hash(description, name, version, additionalProperties);
}

@Override
Expand All @@ -153,6 +179,7 @@ public String toString() {
sb.append("class AssetOperatingSystem {\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
/** The metadata of a scanned asset. */
@JsonPropertyOrder({
ScannedAssetMetadata.JSON_PROPERTY_ATTRIBUTES,
ScannedAssetMetadata.JSON_PROPERTY_ID
ScannedAssetMetadata.JSON_PROPERTY_ID,
ScannedAssetMetadata.JSON_PROPERTY_TYPE
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -32,16 +33,22 @@ public class ScannedAssetMetadata {
public static final String JSON_PROPERTY_ID = "id";
private String id;

public static final String JSON_PROPERTY_TYPE = "type";
private ScannedAssetMetadataType type;

public ScannedAssetMetadata() {}

@JsonCreator
public ScannedAssetMetadata(
@JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES)
ScannedAssetMetadataAttributes attributes,
@JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) {
@JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
@JsonProperty(required = true, value = JSON_PROPERTY_TYPE) ScannedAssetMetadataType type) {
this.attributes = attributes;
this.unparsed |= attributes.unparsed;
this.id = id;
this.type = type;
this.unparsed |= !type.isValid();
}

public ScannedAssetMetadata attributes(ScannedAssetMetadataAttributes attributes) {
Expand Down Expand Up @@ -88,6 +95,30 @@ public void setId(String id) {
this.id = id;
}

public ScannedAssetMetadata type(ScannedAssetMetadataType type) {
this.type = type;
this.unparsed |= !type.isValid();
return this;
}

/**
* The JSON:API type.
*
* @return type
*/
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public ScannedAssetMetadataType getType() {
return type;
}

public void setType(ScannedAssetMetadataType type) {
if (!type.isValid()) {
this.unparsed = true;
}
this.type = type;
}

/**
* 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 @@ -146,12 +177,13 @@ public boolean equals(Object o) {
ScannedAssetMetadata scannedAssetMetadata = (ScannedAssetMetadata) o;
return Objects.equals(this.attributes, scannedAssetMetadata.attributes)
&& Objects.equals(this.id, scannedAssetMetadata.id)
&& Objects.equals(this.type, scannedAssetMetadata.type)
&& Objects.equals(this.additionalProperties, scannedAssetMetadata.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(attributes, id, additionalProperties);
return Objects.hash(attributes, id, type, additionalProperties);
}

@Override
Expand All @@ -160,6 +192,7 @@ public String toString() {
sb.append("class ScannedAssetMetadata {\n");
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* 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.datadog.api.client.ModelEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/** The JSON:API type. */
@JsonSerialize(using = ScannedAssetMetadataType.ScannedAssetMetadataTypeSerializer.class)
public class ScannedAssetMetadataType extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("scanned-assets-metadata"));

public static final ScannedAssetMetadataType SCANNED_ASSETS_METADATA =
new ScannedAssetMetadataType("scanned-assets-metadata");

ScannedAssetMetadataType(String value) {
super(value, allowedValues);
}

public static class ScannedAssetMetadataTypeSerializer
extends StdSerializer<ScannedAssetMetadataType> {
public ScannedAssetMetadataTypeSerializer(Class<ScannedAssetMetadataType> t) {
super(t);
}

public ScannedAssetMetadataTypeSerializer() {
this(null);
}

@Override
public void serialize(
ScannedAssetMetadataType value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonProcessingException {
jgen.writeObject(value.value);
}
}

@JsonCreator
public static ScannedAssetMetadataType fromValue(String value) {
return new ScannedAssetMetadataType(value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@
public class SpecVersion extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("1.0", "1.1", "1.2", "1.3", "1.4", "1.5"));
new HashSet<String>(Arrays.asList("1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6"));

public static final SpecVersion ONE_ZERO = new SpecVersion("1.0");
public static final SpecVersion ONE_ONE = new SpecVersion("1.1");
public static final SpecVersion ONE_TWO = new SpecVersion("1.2");
public static final SpecVersion ONE_THREE = new SpecVersion("1.3");
public static final SpecVersion ONE_FOUR = new SpecVersion("1.4");
public static final SpecVersion ONE_FIVE = new SpecVersion("1.5");
public static final SpecVersion ONE_SIX = new SpecVersion("1.6");

SpecVersion(String value) {
super(value, allowedValues);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ public class VulnerabilityType extends ModelEnum<String> {
"ReflectionInjection",
"RiskyLicense",
"SessionRewriting",
"SessionRewritting",
"SessionTimeout",
"SqlInjection",
"Ssrf",
"StackTraceLeak",
"TemplateInjection",
"TrustBoundaryViolation",
"Unmaintained",
"UntrustedDeserialization",
Expand Down Expand Up @@ -114,10 +116,14 @@ public class VulnerabilityType extends ModelEnum<String> {
public static final VulnerabilityType RISKY_LICENSE = new VulnerabilityType("RiskyLicense");
public static final VulnerabilityType SESSION_REWRITING =
new VulnerabilityType("SessionRewriting");
public static final VulnerabilityType SESSION_REWRITTING =
new VulnerabilityType("SessionRewritting");
public static final VulnerabilityType SESSION_TIMEOUT = new VulnerabilityType("SessionTimeout");
public static final VulnerabilityType SQL_INJECTION = new VulnerabilityType("SqlInjection");
public static final VulnerabilityType SSRF = new VulnerabilityType("Ssrf");
public static final VulnerabilityType STACK_TRACE_LEAK = new VulnerabilityType("StackTraceLeak");
public static final VulnerabilityType TEMPLATE_INJECTION =
new VulnerabilityType("TemplateInjection");
public static final VulnerabilityType TRUST_BOUNDARY_VIOLATION =
new VulnerabilityType("TrustBoundaryViolation");
public static final VulnerabilityType UNMAINTAINED = new VulnerabilityType("Unmaintained");
Expand Down
Loading