Interface ArtifactCoo

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

@Immutable @DefaultTypeValue(value="artifact", groups=DefaultValuesProcessor.class) @BusinessRule(ifExp="getUrl().isPresent() == true",thenExp="getHashes().isEmpty() == false && getPayloadBin().isPresent() == false",errorMessage="When Url is used, Hashes have at least 1 value, and payload_bin cannot be used.") @BusinessRule(ifExp="getPayloadBin().isPresent() == true",thenExp="getUrl().isPresent() == false && getHashes().isEmpty() == true",errorMessage="When payload_bin is used, Url and hashes cannot be used.") public interface ArtifactCoo extends CyberObservableObject
  • Method Details

    • getMimeType

      @JsonPropertyDescription("The value of this property MUST be a valid MIME type as specified in the IANA Media Types registry.") Optional<@Pattern(regexp="^(application|audio|font|image|message|model|multipart|text|video)/[a-zA-Z0-9.+_-]+") String> getMimeType()
    • getPayloadBin

      @JsonPropertyDescription("Specifies the binary data contained in the artifact as a base64-encoded string.") Optional<String> getPayloadBin()
    • getUrl

      @JsonPropertyDescription("The value of this property MUST be a valid URL that resolves to the unencoded content.") Optional<@Pattern(regexp="^(?:(?:https?|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\\.(?:[a-z\u00a1-\uffff]{2,}))\\.?)(?::\\d{2,5})?(?:[/?#]\\S*)?$") String> getUrl()
    • getHashes

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

      This MUST be provided when the url property is present. Optional if payload_bin is present.

    • getId

      @Derived default String getId()
      Deterministically generates the ID for this artifact based on its payload_bin, url, or hashes.
      Specified by:
      getId in interface BundleableObject
      Specified by:
      getId in interface CyberObservableObjectCommonProperties