Interface FileCoo

All Superinterfaces:
BundleableObject, CyberObservableObject, CyberObservableObjectCommonProperties, GenericValidation, SdoDefaultValidator, Serializable, Stix, StixCustomProperties
All Known Implementing Classes:
File

@Immutable @DefaultTypeValue(value="file", groups=DefaultValuesProcessor.class) @BusinessRule(ifExp="isEncrypted().orElse(false) == false", thenExp="getEncryptionAlgorithm().isPresent() == false && getDecryptionKey().isPresent() == false", errorMessage="Encryption Algorithm and Description Key cannot be used if Encrypted equals false.") public interface FileCoo extends CyberObservableObject
file

The File Object represents the properties of a file.

  • Method Details

    • getHashes

      @JsonPropertyDescription("Specifies a dictionary of hashes for the contents of the file.") Map<@Length(min=3,max=256) @HashingVocab(HashingAlgorithms.class) String,String> getHashes()
    • getSize

      @JsonPropertyDescription("Specifies the size of the file, in bytes, as a non-negative integer.") Optional<@Positive Long> getSize()
    • getName

      @JsonPropertyDescription("Specifies the name of the file.") Optional<String> getName()
    • getNameEnc

      @JsonPropertyDescription("Specifies the observed encoding for the name of the file.") Optional<@Pattern(regexp="^[a-zA-Z0-9/\\.+_:-]{2,250}$") String> getNameEnc()
    • getMagicNumberHex

      @JsonPropertyDescription("Specifies the hexadecimal constant (\'magic number\') associated with a specific file format that corresponds to the file, if applicable.") Optional<@Pattern(regexp="^([a-fA-F0-9]{2})+$") String> getMagicNumberHex()
    • getMimeType

      @JsonPropertyDescription("Specifies the MIME type name specified for the file, e.g., \'application/msword\'.") Optional<@Pattern(regexp="^(application|audio|font|image|message|model|multipart|text|video)/[a-zA-Z0-9.+_-]+") String> getMimeType()
    • getCreated

      @JsonPropertyDescription("Specifies the date/time the file was created.") Optional<StixInstant> getCreated()
    • getModified

      @JsonPropertyDescription("Specifies the date/time the file was last written to/modified.") Optional<StixInstant> getModified()
    • getAccessed

      @JsonPropertyDescription("Specifies the date/time the file was last accessed.") Optional<StixInstant> getAccessed()
    • getParentDirectoryRef

      @JsonPropertyDescription("Specifies the parent directory of the file, as a reference to a Directory Object.") Optional<String> getParentDirectoryRef()
    • isEncrypted

      @JsonPropertyDescription("Specifies whether the file is encrypted.") @NotNull @NotNull Optional<Boolean> isEncrypted()
    • getEncryptionAlgorithm

      @JsonPropertyDescription("Specifies the name of the encryption algorithm used to encrypt the file. Open Vocabulary - encryption-algorithm-ov") Optional<@Vocab(EncryptionAlgorithms.class) String> getEncryptionAlgorithm()
    • getDecryptionKey

      @JsonPropertyDescription("Specifies the decryption key used to decrypt the archive file.") Optional<String> getDecryptionKey()
    • getContainsRefs

      @JsonPropertyDescription("Specifies a list of references to other Observable Objects contained within the file.") default Set<String> getContainsRefs()
    • getContentRef

      @JsonPropertyDescription("Specifies the content of the file, represented as an Artifact Object.") Optional<String> getContentRef()
    • getId

      @Derived default String getId()
      Deterministically generates the ID for this file based on its hashes and name. Uses the first available hash from the hashes map, or the file name if no hashes are present.
      Specified by:
      getId in interface BundleableObject
      Specified by:
      getId in interface CyberObservableObjectCommonProperties