#[non_exhaustive]pub struct ScanRun {
pub name: String,
pub execution_state: ExecutionState,
pub result_state: ResultState,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub urls_crawled_count: i64,
pub urls_tested_count: i64,
pub has_vulnerabilities: bool,
pub progress_percent: i32,
pub error_trace: Option<ScanRunErrorTrace>,
pub warning_traces: Vec<ScanRunWarningTrace>,
/* private fields */
}Expand description
A ScanRun is a output-only resource representing an actual run of the scan. Next id: 12
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOutput only. The resource name of the ScanRun. The name follows the format of ‘projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}’. The ScanRun IDs are generated by the system.
execution_state: ExecutionStateOutput only. The execution state of the ScanRun.
result_state: ResultStateOutput only. The result state of the ScanRun. This field is only available after the execution state reaches “FINISHED”.
start_time: Option<Timestamp>Output only. The time at which the ScanRun started.
end_time: Option<Timestamp>Output only. The time at which the ScanRun reached termination state - that the ScanRun is either finished or stopped by user.
urls_crawled_count: i64Output only. The number of URLs crawled during this ScanRun. If the scan is in progress, the value represents the number of URLs crawled up to now.
urls_tested_count: i64Output only. The number of URLs tested during this ScanRun. If the scan is in progress, the value represents the number of URLs tested up to now. The number of URLs tested is usually larger than the number URLS crawled because typically a crawled URL is tested with multiple test payloads.
has_vulnerabilities: boolOutput only. Whether the scan run has found any vulnerabilities.
progress_percent: i32Output only. The percentage of total completion ranging from 0 to 100. If the scan is in queue, the value is 0. If the scan is running, the value ranges from 0 to 100. If the scan is finished, the value is 100.
error_trace: Option<ScanRunErrorTrace>Output only. If result_state is an ERROR, this field provides the primary reason for scan’s termination and more details, if such are available.
warning_traces: Vec<ScanRunWarningTrace>Output only. A list of warnings, if such are encountered during this scan run.
Implementations§
Source§impl ScanRun
impl ScanRun
pub fn new() -> Self
Sourcepub fn set_execution_state<T: Into<ExecutionState>>(self, v: T) -> Self
pub fn set_execution_state<T: Into<ExecutionState>>(self, v: T) -> Self
Sets the value of execution_state.
§Example
use google_cloud_websecurityscanner_v1::model::scan_run::ExecutionState;
let x0 = ScanRun::new().set_execution_state(ExecutionState::Queued);
let x1 = ScanRun::new().set_execution_state(ExecutionState::Scanning);
let x2 = ScanRun::new().set_execution_state(ExecutionState::Finished);Sourcepub fn set_result_state<T: Into<ResultState>>(self, v: T) -> Self
pub fn set_result_state<T: Into<ResultState>>(self, v: T) -> Self
Sets the value of result_state.
§Example
use google_cloud_websecurityscanner_v1::model::scan_run::ResultState;
let x0 = ScanRun::new().set_result_state(ResultState::Success);
let x1 = ScanRun::new().set_result_state(ResultState::Error);
let x2 = ScanRun::new().set_result_state(ResultState::Killed);Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
use wkt::Timestamp;
let x = ScanRun::new().set_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
use wkt::Timestamp;
let x = ScanRun::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = ScanRun::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Sourcepub fn set_urls_crawled_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_urls_crawled_count<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_urls_tested_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_urls_tested_count<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_has_vulnerabilities<T: Into<bool>>(self, v: T) -> Self
pub fn set_has_vulnerabilities<T: Into<bool>>(self, v: T) -> Self
Sets the value of has_vulnerabilities.
§Example
let x = ScanRun::new().set_has_vulnerabilities(true);Sourcepub fn set_progress_percent<T: Into<i32>>(self, v: T) -> Self
pub fn set_progress_percent<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_error_trace<T>(self, v: T) -> Selfwhere
T: Into<ScanRunErrorTrace>,
pub fn set_error_trace<T>(self, v: T) -> Selfwhere
T: Into<ScanRunErrorTrace>,
Sets the value of error_trace.
§Example
use google_cloud_websecurityscanner_v1::model::ScanRunErrorTrace;
let x = ScanRun::new().set_error_trace(ScanRunErrorTrace::default()/* use setters */);Sourcepub fn set_or_clear_error_trace<T>(self, v: Option<T>) -> Selfwhere
T: Into<ScanRunErrorTrace>,
pub fn set_or_clear_error_trace<T>(self, v: Option<T>) -> Selfwhere
T: Into<ScanRunErrorTrace>,
Sets or clears the value of error_trace.
§Example
use google_cloud_websecurityscanner_v1::model::ScanRunErrorTrace;
let x = ScanRun::new().set_or_clear_error_trace(Some(ScanRunErrorTrace::default()/* use setters */));
let x = ScanRun::new().set_or_clear_error_trace(None::<ScanRunErrorTrace>);Sourcepub fn set_warning_traces<T, V>(self, v: T) -> Self
pub fn set_warning_traces<T, V>(self, v: T) -> Self
Sets the value of warning_traces.
§Example
use google_cloud_websecurityscanner_v1::model::ScanRunWarningTrace;
let x = ScanRun::new()
.set_warning_traces([
ScanRunWarningTrace::default()/* use setters */,
ScanRunWarningTrace::default()/* use (different) setters */,
]);