java.lang.Object
se.bjurr.violations.lib.model.generated.sarif.Artifact

public class Artifact extends Object
A single artifact. In some cases, this artifact might be nested within another artifact.
  • Constructor Details

    • Artifact

      public Artifact()
  • Method Details

    • getDescription

      public Message getDescription()
      Encapsulates a message intended to be read by the end user.
    • setDescription

      public void setDescription(Message description)
      Encapsulates a message intended to be read by the end user.
    • withDescription

      public Artifact withDescription(Message description)
    • getLocation

      public ArtifactLocation getLocation()
      Specifies the location of an artifact.
    • setLocation

      public void setLocation(ArtifactLocation location)
      Specifies the location of an artifact.
    • withLocation

      public Artifact withLocation(ArtifactLocation location)
    • getParentIndex

      public Integer getParentIndex()
      Identifies the index of the immediate parent of the artifact, if this artifact is nested.
    • setParentIndex

      public void setParentIndex(Integer parentIndex)
      Identifies the index of the immediate parent of the artifact, if this artifact is nested.
    • withParentIndex

      public Artifact withParentIndex(Integer parentIndex)
    • getOffset

      public Integer getOffset()
      The offset in bytes of the artifact within its containing artifact.
    • setOffset

      public void setOffset(Integer offset)
      The offset in bytes of the artifact within its containing artifact.
    • withOffset

      public Artifact withOffset(Integer offset)
    • getLength

      public Integer getLength()
      The length of the artifact in bytes.
    • setLength

      public void setLength(Integer length)
      The length of the artifact in bytes.
    • withLength

      public Artifact withLength(Integer length)
    • getRoles

      public Set<Role> getRoles()
      The role or roles played by the artifact in the analysis.
    • setRoles

      public void setRoles(Set<Role> roles)
      The role or roles played by the artifact in the analysis.
    • withRoles

      public Artifact withRoles(Set<Role> roles)
    • getMimeType

      public String getMimeType()
      The MIME type (RFC 2045) of the artifact.
    • setMimeType

      public void setMimeType(String mimeType)
      The MIME type (RFC 2045) of the artifact.
    • withMimeType

      public Artifact withMimeType(String mimeType)
    • getContents

      public ArtifactContent getContents()
      Represents the contents of an artifact.
    • setContents

      public void setContents(ArtifactContent contents)
      Represents the contents of an artifact.
    • withContents

      public Artifact withContents(ArtifactContent contents)
    • getEncoding

      public String getEncoding()
      Specifies the encoding for an artifact object that refers to a text file.
    • setEncoding

      public void setEncoding(String encoding)
      Specifies the encoding for an artifact object that refers to a text file.
    • withEncoding

      public Artifact withEncoding(String encoding)
    • getSourceLanguage

      public String getSourceLanguage()
      Specifies the source language for any artifact object that refers to a text file that contains source code.
    • setSourceLanguage

      public void setSourceLanguage(String sourceLanguage)
      Specifies the source language for any artifact object that refers to a text file that contains source code.
    • withSourceLanguage

      public Artifact withSourceLanguage(String sourceLanguage)
    • getHashes

      public Hashes getHashes()
      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.
    • setHashes

      public void setHashes(Hashes hashes)
      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.
    • withHashes

      public Artifact withHashes(Hashes hashes)
    • getLastModifiedTimeUtc

      public Date getLastModifiedTimeUtc()
      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.
    • setLastModifiedTimeUtc

      public void setLastModifiedTimeUtc(Date lastModifiedTimeUtc)
      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.
    • withLastModifiedTimeUtc

      public Artifact withLastModifiedTimeUtc(Date lastModifiedTimeUtc)
    • getProperties

      public PropertyBag getProperties()
      Key/value pairs that provide additional information about the object.
    • setProperties

      public void setProperties(PropertyBag properties)
      Key/value pairs that provide additional information about the object.
    • withProperties

      public Artifact withProperties(PropertyBag properties)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object