ScanConfig

Struct ScanConfig 

Source
#[non_exhaustive]
pub struct ScanConfig {
Show 13 fields pub name: String, pub display_name: String, pub max_qps: i32, pub starting_urls: Vec<String>, pub authentication: Option<Authentication>, pub user_agent: UserAgent, pub blacklist_patterns: Vec<String>, pub schedule: Option<Schedule>, pub export_to_security_command_center: ExportToSecurityCommandCenter, pub risk_level: RiskLevel, pub managed_scan: bool, pub static_ip_scan: bool, pub ignore_http_status_errors: bool, /* private fields */
}
Expand description

A ScanConfig resource contains the configurations to launch a scan.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

The resource name of the ScanConfig. The name follows the format of ‘projects/{projectId}/scanConfigs/{scanConfigId}’. The ScanConfig IDs are generated by the system.

§display_name: String

Required. The user provided display name of the ScanConfig.

§max_qps: i32

The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.

§starting_urls: Vec<String>

Required. The starting URLs from which the scanner finds site pages.

§authentication: Option<Authentication>

The authentication configuration. If specified, service will use the authentication configuration during scanning.

§user_agent: UserAgent

The user agent used during scanning.

§blacklist_patterns: Vec<String>§schedule: Option<Schedule>

The schedule of the ScanConfig.

§export_to_security_command_center: ExportToSecurityCommandCenter

Controls export of scan configurations and results to Security Command Center.

§risk_level: RiskLevel

The risk level selected for the scan

§managed_scan: bool

Whether the scan config is managed by Web Security Scanner, output only.

§static_ip_scan: bool

Whether the scan configuration has enabled static IP address scan feature. If enabled, the scanner will access applications from static IP addresses.

§ignore_http_status_errors: bool

Whether to keep scanning even if most requests return HTTP error codes.

Implementations§

Source§

impl ScanConfig

Source

pub fn new() -> Self

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

§Example
let x = ScanConfig::new().set_name("example");
Source

pub fn set_display_name<T: Into<String>>(self, v: T) -> Self

Sets the value of display_name.

§Example
let x = ScanConfig::new().set_display_name("example");
Source

pub fn set_max_qps<T: Into<i32>>(self, v: T) -> Self

Sets the value of max_qps.

§Example
let x = ScanConfig::new().set_max_qps(42);
Source

pub fn set_starting_urls<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of starting_urls.

§Example
let x = ScanConfig::new().set_starting_urls(["a", "b", "c"]);
Source

pub fn set_authentication<T>(self, v: T) -> Self
where T: Into<Authentication>,

Sets the value of authentication.

§Example
use google_cloud_websecurityscanner_v1::model::scan_config::Authentication;
let x = ScanConfig::new().set_authentication(Authentication::default()/* use setters */);
Source

pub fn set_or_clear_authentication<T>(self, v: Option<T>) -> Self
where T: Into<Authentication>,

Sets or clears the value of authentication.

§Example
use google_cloud_websecurityscanner_v1::model::scan_config::Authentication;
let x = ScanConfig::new().set_or_clear_authentication(Some(Authentication::default()/* use setters */));
let x = ScanConfig::new().set_or_clear_authentication(None::<Authentication>);
Source

pub fn set_user_agent<T: Into<UserAgent>>(self, v: T) -> Self

Sets the value of user_agent.

§Example
use google_cloud_websecurityscanner_v1::model::scan_config::UserAgent;
let x0 = ScanConfig::new().set_user_agent(UserAgent::ChromeLinux);
let x1 = ScanConfig::new().set_user_agent(UserAgent::ChromeAndroid);
let x2 = ScanConfig::new().set_user_agent(UserAgent::SafariIphone);
Source

pub fn set_blacklist_patterns<T, V>(self, v: T) -> Self
where T: IntoIterator<Item = V>, V: Into<String>,

Sets the value of blacklist_patterns.

§Example
let x = ScanConfig::new().set_blacklist_patterns(["a", "b", "c"]);
Source

pub fn set_schedule<T>(self, v: T) -> Self
where T: Into<Schedule>,

Sets the value of schedule.

§Example
use google_cloud_websecurityscanner_v1::model::scan_config::Schedule;
let x = ScanConfig::new().set_schedule(Schedule::default()/* use setters */);
Source

pub fn set_or_clear_schedule<T>(self, v: Option<T>) -> Self
where T: Into<Schedule>,

Sets or clears the value of schedule.

§Example
use google_cloud_websecurityscanner_v1::model::scan_config::Schedule;
let x = ScanConfig::new().set_or_clear_schedule(Some(Schedule::default()/* use setters */));
let x = ScanConfig::new().set_or_clear_schedule(None::<Schedule>);
Source

pub fn set_export_to_security_command_center<T: Into<ExportToSecurityCommandCenter>>( self, v: T, ) -> Self

Sets the value of export_to_security_command_center.

§Example
use google_cloud_websecurityscanner_v1::model::scan_config::ExportToSecurityCommandCenter;
let x0 = ScanConfig::new().set_export_to_security_command_center(ExportToSecurityCommandCenter::Enabled);
let x1 = ScanConfig::new().set_export_to_security_command_center(ExportToSecurityCommandCenter::Disabled);
Source

pub fn set_risk_level<T: Into<RiskLevel>>(self, v: T) -> Self

Sets the value of risk_level.

§Example
use google_cloud_websecurityscanner_v1::model::scan_config::RiskLevel;
let x0 = ScanConfig::new().set_risk_level(RiskLevel::Normal);
let x1 = ScanConfig::new().set_risk_level(RiskLevel::Low);
Source

pub fn set_managed_scan<T: Into<bool>>(self, v: T) -> Self

Sets the value of managed_scan.

§Example
let x = ScanConfig::new().set_managed_scan(true);
Source

pub fn set_static_ip_scan<T: Into<bool>>(self, v: T) -> Self

Sets the value of static_ip_scan.

§Example
let x = ScanConfig::new().set_static_ip_scan(true);
Source

pub fn set_ignore_http_status_errors<T: Into<bool>>(self, v: T) -> Self

Sets the value of ignore_http_status_errors.

§Example
let x = ScanConfig::new().set_ignore_http_status_errors(true);

Trait Implementations§

Source§

impl Clone for ScanConfig

Source§

fn clone(&self) -> ScanConfig

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 ScanConfig

Source§

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

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

impl Default for ScanConfig

Source§

fn default() -> ScanConfig

Returns the “default value” for a type. Read more
Source§

impl Message for ScanConfig

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for ScanConfig

Source§

fn eq(&self, other: &ScanConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ScanConfig

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

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