Package ai.nightfall.scan.model
Class ScanFileRequest
java.lang.Object
ai.nightfall.scan.model.ScanFileRequest
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 Summary
ConstructorsConstructorDescriptionScanFileRequest(ScanPolicy policy, String requestMetadata) Create a new request to scan a file.ScanFileRequest(UUID policyUUID, String requestMetadata) Create a new request to scan a file. -
Method Summary
Modifier and TypeMethodDescriptionGet the policy.Get the policy UUID.Get the request metadata.voidsetRequestMetadata(String requestMetadata) Set the request metadata.
-
Constructor Details
-
ScanFileRequest
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
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
Get the policy UUID.- Returns:
- the UUID of an existing policy to use to scan a file
-
getPolicy
Get the policy.- Returns:
- the policy to use to scan the file
-
getRequestMetadata
Get the request metadata.- Returns:
- the request metadata.
-
setRequestMetadata
Set the request metadata.- Parameters:
requestMetadata- arbitrary data to be passed along with the request, maximum length 10 KB.
-