SubmissionParams

Struct SubmissionParams 

Source
pub struct SubmissionParams {
Show 26 fields pub classification: ClassificationString, pub deep_scan: bool, pub description: Option<Text>, pub generate_alert: bool, pub groups: Vec<UpperString>, pub ignore_cache: bool, pub ignore_recursion_prevention: bool, pub ignore_filtering: bool, pub ignore_size: bool, pub never_drop: bool, pub malicious: bool, pub max_extracted: i32, pub max_supplementary: i32, pub priority: u16, pub quota_item: bool, pub services: ServiceSelection, pub service_spec: HashMap<String, JsonMap>, pub submitter: String, pub trace: bool, pub ttl: i32, pub submission_type: String, pub initial_data: Option<Text>, pub auto_archive: bool, pub delete_after_archive: bool, pub psid: Option<Sid>, pub use_archive_alternate_dtl: bool,
}
Expand description

Submission Parameters

Fields§

§classification: ClassificationString

classification of the submission

§deep_scan: bool

Should a deep scan be performed?

§description: Option<Text>

Description of the submission

§generate_alert: bool

Should this submission generate an alert?

§groups: Vec<UpperString>

List of groups related to this scan

§ignore_cache: bool

Ignore the cached service results?

§ignore_recursion_prevention: bool

Should we ignore dynamic recursion prevention?

§ignore_filtering: bool

Should we ignore filtering services?

§ignore_size: bool

Ignore the file size limits?

§never_drop: bool

Exempt from being dropped by ingester?

§malicious: bool

Is the file submitted already known to be malicious?

§max_extracted: i32

Max number of extracted files

§max_supplementary: i32

Max number of supplementary files

§priority: u16

Priority of the scan

§quota_item: bool

Does this submission count against quota?

§services: ServiceSelection

Service selection

§service_spec: HashMap<String, JsonMap>

Service-specific parameters

§submitter: String

User who submitted the file

§trace: bool

Collect extra logging information during dispatching

§ttl: i32

Time, in days, to live for this submission

§submission_type: String

Type of submission

§initial_data: Option<Text>

Initialization for temporary submission data

§auto_archive: bool

Does the submission automatically goes into the archive when completed?

§delete_after_archive: bool

When the submission is archived, should we delete it from hot storage right away?

§psid: Option<Sid>

Parent submission ID

§use_archive_alternate_dtl: bool

Should we use the alternate dtl while archiving?

Implementations§

Source§

impl SubmissionParams

Source

pub fn new(classification: ClassificationString) -> Self

Source

pub fn set_description(self, text: &str) -> Self

Source

pub fn set_services_selected(self, selected: &[&str]) -> Self

Source

pub fn set_submitter(self, submitter: &str) -> Self

Source

pub fn set_groups(self, groups: &[&str]) -> Self

Source

pub fn set_max_extracted(self, max_extracted: i32) -> Self

Source

pub fn set_generate_alert(self, alert: bool) -> Self

Source

pub fn create_filescore_key( &self, sha256: &Sha256, services: Option<Vec<String>>, ) -> String

This is the key used to store the final score of a submission for fast lookup.

This lookup is one of the methods used to check for duplication in ingestion process, so this key is fairly sensitive.

Trait Implementations§

Source§

impl Clone for SubmissionParams

Source§

fn clone(&self) -> SubmissionParams

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SubmissionParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Described<ElasticMeta> for SubmissionParams

Source§

fn metadata() -> Descriptor<ElasticMeta>

Get self description of this type
Source§

impl<'de> Deserialize<'de> for SubmissionParams

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for SubmissionParams

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,