diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9b5a962d175..11779662d48 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -94280,6 +94280,8 @@ components: type: array repository: $ref: "#/components/schemas/ScaRequestDataAttributesRepository" + scan_start_timestamp: + $ref: "#/components/schemas/ScaRequestDataAttributesScanStartTimestamp" service: description: The name of the service or application being analyzed. type: string @@ -94330,24 +94332,26 @@ components: type: array group: description: The group or organization namespace of the dependency (e.g., Maven group ID). + nullable: true type: string is_dev: description: Indicates whether this is a development-only dependency not used in production. type: boolean is_direct: description: Indicates whether this is a direct dependency (as opposed to a transitive one). + nullable: true type: boolean language: description: The programming language ecosystem of this dependency (e.g., java, python, javascript). type: string locations: - description: The list of source file locations where this dependency is declared. - items: - $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItems" - type: array + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocations" name: description: The name of the dependency package. type: string + opaque: + description: Indicates whether dependency details are intentionally opaque. + type: boolean package_manager: description: The package manager responsible for this dependency (e.g., maven, pip, npm). type: string @@ -94359,21 +94363,43 @@ components: items: $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems" type: array + requires_transitive_enrichment: + description: Indicates whether this dependency requires transitive dependency enrichment. + type: boolean + target_frameworks: + description: The target framework identifiers associated with this dependency. + items: + description: A target framework identifier. + type: string + type: array version: description: The version of the dependency. + nullable: true + type: string + version_constraint: + description: Indicates whether the version value represents a version constraint. + type: boolean + version_range: + description: The version range associated with this dependency when a manifest declares a range. type: string type: object + ScaRequestDataAttributesDependenciesItemsLocations: + description: The list of source file locations where this dependency is declared. + items: + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItems" + nullable: true + type: array ScaRequestDataAttributesDependenciesItemsLocationsItems: description: The source code location where a dependency is declared, including block, name, namespace, and version positions within the file. properties: block: $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition" name: - $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition" + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition" namespace: - $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition" + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition" version: - $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition" + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition" type: object ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition: description: A range within a file defined by a start and end position, along with the file name. @@ -94383,6 +94409,24 @@ components: file_name: description: The name or path of the file containing this location. type: string + role: + description: The semantic role associated with this file location. + type: string + start: + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition" + type: object + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition: + description: A nullable range within a file defined by a start and end position, along with the file name. + nullable: true + properties: + end: + $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition" + file_name: + description: The name or path of the file containing this location. + type: string + role: + description: The semantic role associated with this file location. + type: string start: $ref: "#/components/schemas/ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition" type: object @@ -94440,6 +94484,20 @@ components: description: The URL of the repository. type: string type: object + ScaRequestDataAttributesScanStartTimestamp: + description: The time when the SCA scan started. + nullable: true + properties: + nanos: + description: Non-negative fractions of a second at nanosecond resolution. + format: int32 + maximum: 2147483647 + type: integer + seconds: + description: Seconds of UTC time since Unix epoch. + format: int64 + type: integer + type: object ScaRequestDataAttributesVulnerabilitiesItems: description: A vulnerability entry from the Software Bill of Materials (SBOM), describing a known security issue and the components it affects. properties: diff --git a/examples/v2/static-analysis/CreateSCAResult.java b/examples/v2/static-analysis/CreateSCAResult.java index d0855efc5d6..9699dc057ef 100644 --- a/examples/v2/static-analysis/CreateSCAResult.java +++ b/examples/v2/static-analysis/CreateSCAResult.java @@ -10,11 +10,13 @@ import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItems; import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItemsLocationsItems; import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition; +import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition; import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition; import com.datadog.api.client.v2.model.ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems; import com.datadog.api.client.v2.model.ScaRequestDataAttributesFilesItems; import com.datadog.api.client.v2.model.ScaRequestDataAttributesRelationsItems; import com.datadog.api.client.v2.model.ScaRequestDataAttributesRepository; +import com.datadog.api.client.v2.model.ScaRequestDataAttributesScanStartTimestamp; import com.datadog.api.client.v2.model.ScaRequestDataAttributesVulnerabilitiesItems; import com.datadog.api.client.v2.model.ScaRequestDataAttributesVulnerabilitiesItemsAffectsItems; import com.datadog.api.client.v2.model.ScaRequestDataType; @@ -36,6 +38,8 @@ public static void main(String[] args) { .dependencies( Collections.singletonList( new ScaRequestDataAttributesDependenciesItems() + .group(null) + .isDirect(null) .locations( Collections.singletonList( new ScaRequestDataAttributesDependenciesItemsLocationsItems() @@ -46,32 +50,34 @@ public static void main(String[] args) { .start( new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition())) .name( - new ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition() + new ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition() .end( new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition()) .start( new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition())) .namespace( - new ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition() + new ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition() .end( new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition()) .start( new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition())) .version( - new ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition() + new ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition() .end( new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition()) .start( new ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition())))) .reachableSymbolProperties( Collections.singletonList( - new ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems())))) + new ScaRequestDataAttributesDependenciesItemsReachableSymbolPropertiesItems())) + .version(null))) .files( Collections.singletonList(new ScaRequestDataAttributesFilesItems())) .relations( Collections.singletonList( new ScaRequestDataAttributesRelationsItems())) .repository(new ScaRequestDataAttributesRepository()) + .scanStartTimestamp(new ScaRequestDataAttributesScanStartTimestamp()) .vulnerabilities( Collections.singletonList( new ScaRequestDataAttributesVulnerabilitiesItems() diff --git a/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributes.java index 95c5f32ea62..ae2182c85b2 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributes.java @@ -17,6 +17,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; /** * The attributes of an SCA request, containing dependency graph data, vulnerability information, @@ -29,6 +30,7 @@ ScaRequestDataAttributes.JSON_PROPERTY_FILES, ScaRequestDataAttributes.JSON_PROPERTY_RELATIONS, ScaRequestDataAttributes.JSON_PROPERTY_REPOSITORY, + ScaRequestDataAttributes.JSON_PROPERTY_SCAN_START_TIMESTAMP, ScaRequestDataAttributes.JSON_PROPERTY_SERVICE, ScaRequestDataAttributes.JSON_PROPERTY_TAGS, ScaRequestDataAttributes.JSON_PROPERTY_VULNERABILITIES @@ -55,6 +57,10 @@ public class ScaRequestDataAttributes { public static final String JSON_PROPERTY_REPOSITORY = "repository"; private ScaRequestDataAttributesRepository repository; + public static final String JSON_PROPERTY_SCAN_START_TIMESTAMP = "scan_start_timestamp"; + private JsonNullable scanStartTimestamp = + JsonNullable.undefined(); + public static final String JSON_PROPERTY_SERVICE = "service"; private String service; @@ -260,6 +266,42 @@ public void setRepository(ScaRequestDataAttributesRepository repository) { } } + public ScaRequestDataAttributes scanStartTimestamp( + ScaRequestDataAttributesScanStartTimestamp scanStartTimestamp) { + this.scanStartTimestamp = + JsonNullable.of(scanStartTimestamp); + return this; + } + + /** + * The time when the SCA scan started. + * + * @return scanStartTimestamp + */ + @jakarta.annotation.Nullable + @JsonIgnore + public ScaRequestDataAttributesScanStartTimestamp getScanStartTimestamp() { + return scanStartTimestamp.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_SCAN_START_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable + getScanStartTimestamp_JsonNullable() { + return scanStartTimestamp; + } + + @JsonProperty(JSON_PROPERTY_SCAN_START_TIMESTAMP) + public void setScanStartTimestamp_JsonNullable( + JsonNullable scanStartTimestamp) { + this.scanStartTimestamp = scanStartTimestamp; + } + + public void setScanStartTimestamp(ScaRequestDataAttributesScanStartTimestamp scanStartTimestamp) { + this.scanStartTimestamp = + JsonNullable.of(scanStartTimestamp); + } + public ScaRequestDataAttributes service(String service) { this.service = service; return this; @@ -415,6 +457,7 @@ public boolean equals(Object o) { && Objects.equals(this.files, scaRequestDataAttributes.files) && Objects.equals(this.relations, scaRequestDataAttributes.relations) && Objects.equals(this.repository, scaRequestDataAttributes.repository) + && Objects.equals(this.scanStartTimestamp, scaRequestDataAttributes.scanStartTimestamp) && Objects.equals(this.service, scaRequestDataAttributes.service) && Objects.equals(this.tags, scaRequestDataAttributes.tags) && Objects.equals(this.vulnerabilities, scaRequestDataAttributes.vulnerabilities) @@ -430,6 +473,7 @@ public int hashCode() { files, relations, repository, + scanStartTimestamp, service, tags, vulnerabilities, @@ -446,6 +490,7 @@ public String toString() { sb.append(" files: ").append(toIndentedString(files)).append("\n"); sb.append(" relations: ").append(toIndentedString(relations)).append("\n"); sb.append(" repository: ").append(toIndentedString(repository)).append("\n"); + sb.append(" scanStartTimestamp: ").append(toIndentedString(scanStartTimestamp)).append("\n"); sb.append(" service: ").append(toIndentedString(service)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" vulnerabilities: ").append(toIndentedString(vulnerabilities)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItems.java b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItems.java index 994f24014c0..d1393cc11b3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItems.java @@ -17,6 +17,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; /** * A dependency found in the repository, including its identity, location, and reachability @@ -30,10 +31,15 @@ ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_LANGUAGE, ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_LOCATIONS, ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_NAME, + ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_OPAQUE, ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_PACKAGE_MANAGER, ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_PURL, ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_REACHABLE_SYMBOL_PROPERTIES, - ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_VERSION + ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_REQUIRES_TRANSITIVE_ENRICHMENT, + ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_TARGET_FRAMEWORKS, + ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_VERSION, + ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_VERSION_CONSTRAINT, + ScaRequestDataAttributesDependenciesItems.JSON_PROPERTY_VERSION_RANGE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") @@ -43,23 +49,27 @@ public class ScaRequestDataAttributesDependenciesItems { private List exclusions = null; public static final String JSON_PROPERTY_GROUP = "group"; - private String group; + private JsonNullable group = JsonNullable.undefined(); public static final String JSON_PROPERTY_IS_DEV = "is_dev"; private Boolean isDev; public static final String JSON_PROPERTY_IS_DIRECT = "is_direct"; - private Boolean isDirect; + private JsonNullable isDirect = JsonNullable.undefined(); public static final String JSON_PROPERTY_LANGUAGE = "language"; private String language; public static final String JSON_PROPERTY_LOCATIONS = "locations"; - private List locations = null; + private JsonNullable> locations = + JsonNullable.>undefined(); public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_OPAQUE = "opaque"; + private Boolean opaque; + public static final String JSON_PROPERTY_PACKAGE_MANAGER = "package_manager"; private String packageManager; @@ -71,8 +81,21 @@ public class ScaRequestDataAttributesDependenciesItems { private List reachableSymbolProperties = null; + public static final String JSON_PROPERTY_REQUIRES_TRANSITIVE_ENRICHMENT = + "requires_transitive_enrichment"; + private Boolean requiresTransitiveEnrichment; + + public static final String JSON_PROPERTY_TARGET_FRAMEWORKS = "target_frameworks"; + private List targetFrameworks = null; + public static final String JSON_PROPERTY_VERSION = "version"; - private String version; + private JsonNullable version = JsonNullable.undefined(); + + public static final String JSON_PROPERTY_VERSION_CONSTRAINT = "version_constraint"; + private Boolean versionConstraint; + + public static final String JSON_PROPERTY_VERSION_RANGE = "version_range"; + private String versionRange; public ScaRequestDataAttributesDependenciesItems exclusions(List exclusions) { this.exclusions = exclusions; @@ -104,7 +127,7 @@ public void setExclusions(List exclusions) { } public ScaRequestDataAttributesDependenciesItems group(String group) { - this.group = group; + this.group = JsonNullable.of(group); return this; } @@ -114,16 +137,26 @@ public ScaRequestDataAttributesDependenciesItems group(String group) { * @return group */ @jakarta.annotation.Nullable + @JsonIgnore + public String getGroup() { + return group.orElse(null); + } + @JsonProperty(JSON_PROPERTY_GROUP) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getGroup() { + public JsonNullable getGroup_JsonNullable() { return group; } - public void setGroup(String group) { + @JsonProperty(JSON_PROPERTY_GROUP) + public void setGroup_JsonNullable(JsonNullable group) { this.group = group; } + public void setGroup(String group) { + this.group = JsonNullable.of(group); + } + public ScaRequestDataAttributesDependenciesItems isDev(Boolean isDev) { this.isDev = isDev; return this; @@ -146,7 +179,7 @@ public void setIsDev(Boolean isDev) { } public ScaRequestDataAttributesDependenciesItems isDirect(Boolean isDirect) { - this.isDirect = isDirect; + this.isDirect = JsonNullable.of(isDirect); return this; } @@ -156,16 +189,26 @@ public ScaRequestDataAttributesDependenciesItems isDirect(Boolean isDirect) { * @return isDirect */ @jakarta.annotation.Nullable + @JsonIgnore + public Boolean getIsDirect() { + return isDirect.orElse(null); + } + @JsonProperty(JSON_PROPERTY_IS_DIRECT) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsDirect() { + public JsonNullable getIsDirect_JsonNullable() { return isDirect; } - public void setIsDirect(Boolean isDirect) { + @JsonProperty(JSON_PROPERTY_IS_DIRECT) + public void setIsDirect_JsonNullable(JsonNullable isDirect) { this.isDirect = isDirect; } + public void setIsDirect(Boolean isDirect) { + this.isDirect = JsonNullable.of(isDirect); + } + public ScaRequestDataAttributesDependenciesItems language(String language) { this.language = language; return this; @@ -189,22 +232,23 @@ public void setLanguage(String language) { public ScaRequestDataAttributesDependenciesItems locations( List locations) { - this.locations = locations; - if (locations != null) { - for (ScaRequestDataAttributesDependenciesItemsLocationsItems item : locations) { - this.unparsed |= item.unparsed; - } - } + this.locations = + JsonNullable.>of(locations); return this; } public ScaRequestDataAttributesDependenciesItems addLocationsItem( ScaRequestDataAttributesDependenciesItemsLocationsItems locationsItem) { - if (this.locations == null) { - this.locations = new ArrayList<>(); + if (this.locations == null || !this.locations.isPresent()) { + this.locations = + JsonNullable.>of( + new ArrayList<>()); + } + try { + this.locations.get().add(locationsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present } - this.locations.add(locationsItem); - this.unparsed |= locationsItem.unparsed; return this; } @@ -214,20 +258,28 @@ public ScaRequestDataAttributesDependenciesItems addLocationsItem( * @return locations */ @jakarta.annotation.Nullable + @JsonIgnore + public List getLocations() { + return locations.orElse(null); + } + @JsonProperty(JSON_PROPERTY_LOCATIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getLocations() { + public JsonNullable> + getLocations_JsonNullable() { return locations; } + @JsonProperty(JSON_PROPERTY_LOCATIONS) + public void setLocations_JsonNullable( + JsonNullable> locations) { + this.locations = locations; + } + public void setLocations( List locations) { - this.locations = locations; - if (locations != null) { - for (ScaRequestDataAttributesDependenciesItemsLocationsItems item : locations) { - this.unparsed |= item.unparsed; - } - } + this.locations = + JsonNullable.>of(locations); } public ScaRequestDataAttributesDependenciesItems name(String name) { @@ -251,6 +303,27 @@ public void setName(String name) { this.name = name; } + public ScaRequestDataAttributesDependenciesItems opaque(Boolean opaque) { + this.opaque = opaque; + return this; + } + + /** + * Indicates whether dependency details are intentionally opaque. + * + * @return opaque + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OPAQUE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getOpaque() { + return opaque; + } + + public void setOpaque(Boolean opaque) { + this.opaque = opaque; + } + public ScaRequestDataAttributesDependenciesItems packageManager(String packageManager) { this.packageManager = packageManager; return this; @@ -342,8 +415,60 @@ public void setReachableSymbolProperties( } } + public ScaRequestDataAttributesDependenciesItems requiresTransitiveEnrichment( + Boolean requiresTransitiveEnrichment) { + this.requiresTransitiveEnrichment = requiresTransitiveEnrichment; + return this; + } + + /** + * Indicates whether this dependency requires transitive dependency enrichment. + * + * @return requiresTransitiveEnrichment + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUIRES_TRANSITIVE_ENRICHMENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getRequiresTransitiveEnrichment() { + return requiresTransitiveEnrichment; + } + + public void setRequiresTransitiveEnrichment(Boolean requiresTransitiveEnrichment) { + this.requiresTransitiveEnrichment = requiresTransitiveEnrichment; + } + + public ScaRequestDataAttributesDependenciesItems targetFrameworks(List targetFrameworks) { + this.targetFrameworks = targetFrameworks; + return this; + } + + public ScaRequestDataAttributesDependenciesItems addTargetFrameworksItem( + String targetFrameworksItem) { + if (this.targetFrameworks == null) { + this.targetFrameworks = new ArrayList<>(); + } + this.targetFrameworks.add(targetFrameworksItem); + return this; + } + + /** + * The target framework identifiers associated with this dependency. + * + * @return targetFrameworks + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TARGET_FRAMEWORKS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTargetFrameworks() { + return targetFrameworks; + } + + public void setTargetFrameworks(List targetFrameworks) { + this.targetFrameworks = targetFrameworks; + } + public ScaRequestDataAttributesDependenciesItems version(String version) { - this.version = version; + this.version = JsonNullable.of(version); return this; } @@ -353,16 +478,68 @@ public ScaRequestDataAttributesDependenciesItems version(String version) { * @return version */ @jakarta.annotation.Nullable + @JsonIgnore + public String getVersion() { + return version.orElse(null); + } + @JsonProperty(JSON_PROPERTY_VERSION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getVersion() { + public JsonNullable getVersion_JsonNullable() { return version; } - public void setVersion(String version) { + @JsonProperty(JSON_PROPERTY_VERSION) + public void setVersion_JsonNullable(JsonNullable version) { this.version = version; } + public void setVersion(String version) { + this.version = JsonNullable.of(version); + } + + public ScaRequestDataAttributesDependenciesItems versionConstraint(Boolean versionConstraint) { + this.versionConstraint = versionConstraint; + return this; + } + + /** + * Indicates whether the version value represents a version constraint. + * + * @return versionConstraint + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION_CONSTRAINT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getVersionConstraint() { + return versionConstraint; + } + + public void setVersionConstraint(Boolean versionConstraint) { + this.versionConstraint = versionConstraint; + } + + public ScaRequestDataAttributesDependenciesItems versionRange(String versionRange) { + this.versionRange = versionRange; + return this; + } + + /** + * The version range associated with this dependency when a manifest declares a range. + * + * @return versionRange + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION_RANGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersionRange() { + return versionRange; + } + + public void setVersionRange(String versionRange) { + this.versionRange = versionRange; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -427,13 +604,22 @@ public boolean equals(Object o) { && Objects.equals(this.language, scaRequestDataAttributesDependenciesItems.language) && Objects.equals(this.locations, scaRequestDataAttributesDependenciesItems.locations) && Objects.equals(this.name, scaRequestDataAttributesDependenciesItems.name) + && Objects.equals(this.opaque, scaRequestDataAttributesDependenciesItems.opaque) && Objects.equals( this.packageManager, scaRequestDataAttributesDependenciesItems.packageManager) && Objects.equals(this.purl, scaRequestDataAttributesDependenciesItems.purl) && Objects.equals( this.reachableSymbolProperties, scaRequestDataAttributesDependenciesItems.reachableSymbolProperties) + && Objects.equals( + this.requiresTransitiveEnrichment, + scaRequestDataAttributesDependenciesItems.requiresTransitiveEnrichment) + && Objects.equals( + this.targetFrameworks, scaRequestDataAttributesDependenciesItems.targetFrameworks) && Objects.equals(this.version, scaRequestDataAttributesDependenciesItems.version) + && Objects.equals( + this.versionConstraint, scaRequestDataAttributesDependenciesItems.versionConstraint) + && Objects.equals(this.versionRange, scaRequestDataAttributesDependenciesItems.versionRange) && Objects.equals( this.additionalProperties, scaRequestDataAttributesDependenciesItems.additionalProperties); @@ -449,10 +635,15 @@ public int hashCode() { language, locations, name, + opaque, packageManager, purl, reachableSymbolProperties, + requiresTransitiveEnrichment, + targetFrameworks, version, + versionConstraint, + versionRange, additionalProperties); } @@ -467,12 +658,19 @@ public String toString() { sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append(" locations: ").append(toIndentedString(locations)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" opaque: ").append(toIndentedString(opaque)).append("\n"); sb.append(" packageManager: ").append(toIndentedString(packageManager)).append("\n"); sb.append(" purl: ").append(toIndentedString(purl)).append("\n"); sb.append(" reachableSymbolProperties: ") .append(toIndentedString(reachableSymbolProperties)) .append("\n"); + sb.append(" requiresTransitiveEnrichment: ") + .append(toIndentedString(requiresTransitiveEnrichment)) + .append("\n"); + sb.append(" targetFrameworks: ").append(toIndentedString(targetFrameworks)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" versionConstraint: ").append(toIndentedString(versionConstraint)).append("\n"); + sb.append(" versionRange: ").append(toIndentedString(versionRange)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItems.java b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItems.java index f5c6d697432..f6feadd36a6 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItems.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItems.java @@ -15,6 +15,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; /** * The source code location where a dependency is declared, including block, name, namespace, and @@ -34,13 +35,25 @@ public class ScaRequestDataAttributesDependenciesItemsLocationsItems { private ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition block; public static final String JSON_PROPERTY_NAME = "name"; - private ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition name; + private JsonNullable + name = + JsonNullable + . + undefined(); public static final String JSON_PROPERTY_NAMESPACE = "namespace"; - private ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition namespace; + private JsonNullable + namespace = + JsonNullable + . + undefined(); public static final String JSON_PROPERTY_VERSION = "version"; - private ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition version; + private JsonNullable + version = + JsonNullable + . + undefined(); public ScaRequestDataAttributesDependenciesItemsLocationsItems block( ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition block) { @@ -69,83 +82,128 @@ public void setBlock(ScaRequestDataAttributesDependenciesItemsLocationsItemsFile } public ScaRequestDataAttributesDependenciesItemsLocationsItems name( - ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition name) { - this.name = name; - this.unparsed |= name.unparsed; + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition name) { + this.name = + JsonNullable + .of(name); return this; } /** - * A range within a file defined by a start and end position, along with the file name. + * A nullable range within a file defined by a start and end position, along with the file name. * * @return name */ @jakarta.annotation.Nullable + @JsonIgnore + public ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition getName() { + return name.orElse(null); + } + @JsonProperty(JSON_PROPERTY_NAME) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition getName() { + public JsonNullable + getName_JsonNullable() { return name; } - public void setName(ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition name) { + @JsonProperty(JSON_PROPERTY_NAME) + public void setName_JsonNullable( + JsonNullable + name) { this.name = name; - if (name != null) { - this.unparsed |= name.unparsed; - } + } + + public void setName( + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition name) { + this.name = + JsonNullable + .of(name); } public ScaRequestDataAttributesDependenciesItemsLocationsItems namespace( - ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition namespace) { - this.namespace = namespace; - this.unparsed |= namespace.unparsed; + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition namespace) { + this.namespace = + JsonNullable + .of( + namespace); return this; } /** - * A range within a file defined by a start and end position, along with the file name. + * A nullable range within a file defined by a start and end position, along with the file name. * * @return namespace */ @jakarta.annotation.Nullable + @JsonIgnore + public ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition + getNamespace() { + return namespace.orElse(null); + } + @JsonProperty(JSON_PROPERTY_NAMESPACE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition getNamespace() { + public JsonNullable + getNamespace_JsonNullable() { return namespace; } - public void setNamespace( - ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition namespace) { + @JsonProperty(JSON_PROPERTY_NAMESPACE) + public void setNamespace_JsonNullable( + JsonNullable + namespace) { this.namespace = namespace; - if (namespace != null) { - this.unparsed |= namespace.unparsed; - } + } + + public void setNamespace( + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition namespace) { + this.namespace = + JsonNullable + .of( + namespace); } public ScaRequestDataAttributesDependenciesItemsLocationsItems version( - ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition version) { - this.version = version; - this.unparsed |= version.unparsed; + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition version) { + this.version = + JsonNullable + .of( + version); return this; } /** - * A range within a file defined by a start and end position, along with the file name. + * A nullable range within a file defined by a start and end position, along with the file name. * * @return version */ @jakarta.annotation.Nullable + @JsonIgnore + public ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition getVersion() { + return version.orElse(null); + } + @JsonProperty(JSON_PROPERTY_VERSION) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition getVersion() { + public JsonNullable + getVersion_JsonNullable() { return version; } - public void setVersion( - ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition version) { + @JsonProperty(JSON_PROPERTY_VERSION) + public void setVersion_JsonNullable( + JsonNullable + version) { this.version = version; - if (version != null) { - this.unparsed |= version.unparsed; - } + } + + public void setVersion( + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition version) { + this.version = + JsonNullable + .of( + version); } /** diff --git a/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.java b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.java index 553b04d58b6..6e61e58d097 100644 --- a/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.java +++ b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.java @@ -20,6 +20,7 @@ @JsonPropertyOrder({ ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.JSON_PROPERTY_END, ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.JSON_PROPERTY_FILE_NAME, + ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.JSON_PROPERTY_ROLE, ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.JSON_PROPERTY_START }) @jakarta.annotation.Generated( @@ -32,6 +33,9 @@ public class ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition public static final String JSON_PROPERTY_FILE_NAME = "file_name"; private String fileName; + public static final String JSON_PROPERTY_ROLE = "role"; + private String role; + public static final String JSON_PROPERTY_START = "start"; private ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition start; @@ -83,6 +87,27 @@ public void setFileName(String fileName) { this.fileName = fileName; } + public ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition role(String role) { + this.role = role; + return this; + } + + /** + * The semantic role associated with this file location. + * + * @return role + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + public ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition start( ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition start) { this.start = start; @@ -176,6 +201,8 @@ public boolean equals(Object o) { && Objects.equals( this.fileName, scaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.fileName) + && Objects.equals( + this.role, scaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.role) && Objects.equals( this.start, scaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition.start) && Objects.equals( @@ -186,7 +213,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(end, fileName, start, additionalProperties); + return Objects.hash(end, fileName, role, start, additionalProperties); } @Override @@ -195,6 +222,7 @@ public String toString() { sb.append("class ScaRequestDataAttributesDependenciesItemsLocationsItemsFilePosition {\n"); sb.append(" end: ").append(toIndentedString(end)).append("\n"); sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); sb.append(" start: ").append(toIndentedString(start)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.java b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.java new file mode 100644 index 00000000000..3284f1bb205 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.java @@ -0,0 +1,249 @@ +/* + * 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; + +/** A nullable range within a file defined by a start and end position, along with the file name. */ +@JsonPropertyOrder({ + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.JSON_PROPERTY_END, + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition + .JSON_PROPERTY_FILE_NAME, + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.JSON_PROPERTY_ROLE, + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.JSON_PROPERTY_START +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_END = "end"; + private ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition end; + + public static final String JSON_PROPERTY_FILE_NAME = "file_name"; + private String fileName; + + public static final String JSON_PROPERTY_ROLE = "role"; + private String role; + + public static final String JSON_PROPERTY_START = "start"; + private ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition start; + + public ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition end( + ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition end) { + this.end = end; + this.unparsed |= end.unparsed; + return this; + } + + /** + * A specific position (line and column) within a source file. + * + * @return end + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_END) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition getEnd() { + return end; + } + + public void setEnd(ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition end) { + this.end = end; + if (end != null) { + this.unparsed |= end.unparsed; + } + } + + public ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition fileName( + String fileName) { + this.fileName = fileName; + return this; + } + + /** + * The name or path of the file containing this location. + * + * @return fileName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILE_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition role( + String role) { + this.role = role; + return this; + } + + /** + * The semantic role associated with this file location. + * + * @return role + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition start( + ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition start) { + this.start = start; + this.unparsed |= start.unparsed; + return this; + } + + /** + * A specific position (line and column) within a source file. + * + * @return start + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_START) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition getStart() { + return start; + } + + public void setStart(ScaRequestDataAttributesDependenciesItemsLocationsItemsPosition start) { + this.start = start; + if (start != null) { + this.unparsed |= start.unparsed; + } + } + + /** + * 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 ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition + */ + @JsonAnySetter + public ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition + 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 ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition + * object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition + scaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition = + (ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition) o; + return Objects.equals( + this.end, + scaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.end) + && Objects.equals( + this.fileName, + scaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.fileName) + && Objects.equals( + this.role, + scaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.role) + && Objects.equals( + this.start, + scaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition.start) + && Objects.equals( + this.additionalProperties, + scaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition + .additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(end, fileName, role, start, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append( + "class ScaRequestDataAttributesDependenciesItemsLocationsItemsNullableFilePosition {\n"); + sb.append(" end: ").append(toIndentedString(end)).append("\n"); + sb.append(" fileName: ").append(toIndentedString(fileName)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" start: ").append(toIndentedString(start)).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/ScaRequestDataAttributesScanStartTimestamp.java b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesScanStartTimestamp.java new file mode 100644 index 00000000000..4af1c38a3e7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ScaRequestDataAttributesScanStartTimestamp.java @@ -0,0 +1,168 @@ +/* + * 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 time when the SCA scan started. */ +@JsonPropertyOrder({ + ScaRequestDataAttributesScanStartTimestamp.JSON_PROPERTY_NANOS, + ScaRequestDataAttributesScanStartTimestamp.JSON_PROPERTY_SECONDS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ScaRequestDataAttributesScanStartTimestamp { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_NANOS = "nanos"; + private Integer nanos; + + public static final String JSON_PROPERTY_SECONDS = "seconds"; + private Long seconds; + + public ScaRequestDataAttributesScanStartTimestamp nanos(Integer nanos) { + this.nanos = nanos; + return this; + } + + /** + * Non-negative fractions of a second at nanosecond resolution. maximum: 2147483647 + * + * @return nanos + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NANOS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getNanos() { + return nanos; + } + + public void setNanos(Integer nanos) { + this.nanos = nanos; + } + + public ScaRequestDataAttributesScanStartTimestamp seconds(Long seconds) { + this.seconds = seconds; + return this; + } + + /** + * Seconds of UTC time since Unix epoch. + * + * @return seconds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SECONDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSeconds() { + return seconds; + } + + public void setSeconds(Long seconds) { + this.seconds = seconds; + } + + /** + * 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 ScaRequestDataAttributesScanStartTimestamp + */ + @JsonAnySetter + public ScaRequestDataAttributesScanStartTimestamp 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 ScaRequestDataAttributesScanStartTimestamp object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ScaRequestDataAttributesScanStartTimestamp scaRequestDataAttributesScanStartTimestamp = + (ScaRequestDataAttributesScanStartTimestamp) o; + return Objects.equals(this.nanos, scaRequestDataAttributesScanStartTimestamp.nanos) + && Objects.equals(this.seconds, scaRequestDataAttributesScanStartTimestamp.seconds) + && Objects.equals( + this.additionalProperties, + scaRequestDataAttributesScanStartTimestamp.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(nanos, seconds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ScaRequestDataAttributesScanStartTimestamp {\n"); + sb.append(" nanos: ").append(toIndentedString(nanos)).append("\n"); + sb.append(" seconds: ").append(toIndentedString(seconds)).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/test/resources/com/datadog/api/client/v2/api/static_analysis.feature b/src/test/resources/com/datadog/api/client/v2/api/static_analysis.feature index 5a662bc9c32..29355638ddf 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/static_analysis.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/static_analysis.feature @@ -581,7 +581,7 @@ Feature: Static Analysis Scenario: Post dependencies for analysis returns "OK" response Given operation "CreateSCAResult" enabled And new "CreateSCAResult" request - And body with value {"data": {"attributes": {"commit": {}, "dependencies": [{"exclusions": [], "locations": [{"block": {"end": {}, "start": {}}, "name": {"end": {}, "start": {}}, "namespace": {"end": {}, "start": {}}, "version": {"end": {}, "start": {}}}], "reachable_symbol_properties": [{}]}], "files": [{}], "relations": [{"depends_on": []}], "repository": {}, "vulnerabilities": [{"affects": [{}]}]}, "type": "scarequests"}} + And body with value {"data": {"attributes": {"commit": {}, "dependencies": [{"exclusions": [], "group": null, "is_direct": null, "locations": [{"block": {"end": {}, "start": {}}, "name": {"end": {}, "start": {}}, "namespace": {"end": {}, "start": {}}, "version": {"end": {}, "start": {}}}], "reachable_symbol_properties": [{}], "target_frameworks": [], "version": null}], "files": [{}], "relations": [{"depends_on": []}], "repository": {}, "scan_start_timestamp": {}, "vulnerabilities": [{"affects": [{}]}]}, "type": "scarequests"}} When the request is sent Then the response status is 200 OK