Class ScanFileRequest

java.lang.Object
ai.nightfall.scan.model.ScanFileRequest

public class ScanFileRequest extends Object
A container for a request to scan a file that was uploaded via the Nightfall API. Exactly one of policyUUID or policy should be provided.
  • Constructor Details

    • ScanFileRequest

      public ScanFileRequest(ScanPolicy policy, String requestMetadata)
      Create a new request to scan a file.
      Parameters:
      policy - the policy to use to scan the file.
      requestMetadata - arbitrary metadata to pass along with the request; maximum length 10 KB.
    • ScanFileRequest

      public ScanFileRequest(UUID policyUUID, String requestMetadata)
      Create a new request to scan a file.
      Parameters:
      policyUUID - the UUID of an existing policy to use to scan the file.
      requestMetadata - arbitrary metadata to pass along with the request; maximum length 10 KB.
  • Method Details

    • getPolicyUUID

      public UUID getPolicyUUID()
      Get the policy UUID.
      Returns:
      the UUID of an existing policy to use to scan a file
    • getPolicy

      public ScanPolicy getPolicy()
      Get the policy.
      Returns:
      the policy to use to scan the file
    • getRequestMetadata

      public String getRequestMetadata()
      Get the request metadata.
      Returns:
      the request metadata.
    • setRequestMetadata

      public void setRequestMetadata(String requestMetadata)
      Set the request metadata.
      Parameters:
      requestMetadata - arbitrary data to be passed along with the request, maximum length 10 KB.