Artifact

@JsonClass(generateAdapter = true)
data class Artifact(    @Json(name = "contents") val contents: ArtifactContent? = null,     @Json(name = "description") val description: Message? = null,     @Json(name = "encoding") val encoding: String? = null,     @Json(name = "hashes") val hashes: Map<String, String>? = null,     @Json(name = "lastModifiedTimeUtc") val lastModifiedTimeUTC: String? = null,     @Json(name = "length") val length: Int? = null,     @Json(name = "location") val location: ArtifactLocation? = null,     @Json(name = "mimeType") val mimeType: String? = null,     @Json(name = "offset") val offset: Int? = null,     @Json(name = "parentIndex") val parentIndex: Int? = null,     @Json(name = "properties") val properties: PropertyBag? = null,     @Json(name = "roles") val roles: List<Role>? = null,     @Json(name = "sourceLanguage") val sourceLanguage: String? = null)

A single artifact. In some cases, this artifact might be nested within another artifact.

Constructors

Link copied to clipboard
fun Artifact(    @Json(name = "contents") contents: ArtifactContent? = null,     @Json(name = "description") description: Message? = null,     @Json(name = "encoding") encoding: String? = null,     @Json(name = "hashes") hashes: Map<String, String>? = null,     @Json(name = "lastModifiedTimeUtc") lastModifiedTimeUTC: String? = null,     @Json(name = "length") length: Int? = null,     @Json(name = "location") location: ArtifactLocation? = null,     @Json(name = "mimeType") mimeType: String? = null,     @Json(name = "offset") offset: Int? = null,     @Json(name = "parentIndex") parentIndex: Int? = null,     @Json(name = "properties") properties: PropertyBag? = null,     @Json(name = "roles") roles: List<Role>? = null,     @Json(name = "sourceLanguage") sourceLanguage: String? = null)

Properties

Link copied to clipboard
val contents: ArtifactContent? = null

The contents of the artifact.

Link copied to clipboard
val description: Message? = null

A short description of the artifact.

Link copied to clipboard
val encoding: String? = null

Specifies the encoding for an artifact object that refers to a text file.

Link copied to clipboard
val hashes: Map<String, String>? = null

A dictionary, each of whose keys is the name of a hash function and each of whose values is the hashed value of the artifact produced by the specified hash function.

Link copied to clipboard
val lastModifiedTimeUTC: String? = null

The Coordinated Universal Time (UTC) date and time at which the artifact was most recently modified. See "Date/time properties" in the SARIF spec for the required format.

Link copied to clipboard
val length: Int? = null

The length of the artifact in bytes.

Link copied to clipboard
val location: ArtifactLocation? = null

The location of the artifact.

Link copied to clipboard
val mimeType: String? = null

The MIME type (RFC 2045) of the artifact.

Link copied to clipboard
val offset: Int? = null

The offset in bytes of the artifact within its containing artifact.

Link copied to clipboard
val parentIndex: Int? = null

Identifies the index of the immediate parent of the artifact, if this artifact is nested.

Link copied to clipboard
val properties: PropertyBag? = null

Key/value pairs that provide additional information about the artifact.

Link copied to clipboard
val roles: List<Role>? = null

The role or roles played by the artifact in the analysis.

Link copied to clipboard
val sourceLanguage: String? = null

Specifies the source language for any artifact object that refers to a text file that contains source code.

Sources

Link copied to clipboard