#[non_exhaustive]pub struct ComplianceNote {
pub title: String,
pub description: String,
pub version: Vec<ComplianceVersion>,
pub rationale: String,
pub remediation: String,
pub scan_instructions: Bytes,
pub compliance_type: Option<ComplianceType>,
pub potential_impact: Option<PotentialImpact>,
/* private fields */
}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.title: StringThe title that identifies this compliance check.
description: StringA description about this compliance check.
version: Vec<ComplianceVersion>The OS and config versions the benchmark applies to.
rationale: StringA rationale for the existence of this compliance check.
remediation: StringA description of remediation steps if the compliance check fails.
scan_instructions: BytesSerialized scan instructions with a predefined format.
compliance_type: Option<ComplianceType>§potential_impact: Option<PotentialImpact>Potential impact of the suggested remediation
Implementations§
Source§impl ComplianceNote
impl ComplianceNote
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_version<T, V>(self, v: T) -> Self
pub fn set_version<T, V>(self, v: T) -> Self
Sourcepub fn set_rationale<T: Into<String>>(self, v: T) -> Self
pub fn set_rationale<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_remediation<T: Into<String>>(self, v: T) -> Self
pub fn set_remediation<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_scan_instructions<T: Into<Bytes>>(self, v: T) -> Self
pub fn set_scan_instructions<T: Into<Bytes>>(self, v: T) -> Self
Sets the value of scan_instructions.
§Example
let x = ComplianceNote::new().set_scan_instructions(bytes::Bytes::from_static(b"example"));Sourcepub fn set_compliance_type<T: Into<Option<ComplianceType>>>(self, v: T) -> Self
pub fn set_compliance_type<T: Into<Option<ComplianceType>>>(self, v: T) -> Self
Sets the value of compliance_type.
Note that all the setters affecting compliance_type are mutually
exclusive.
§Example
use google_cloud_grafeas_v1::model::compliance_note::CisBenchmark;
let x = ComplianceNote::new().set_compliance_type(Some(
google_cloud_grafeas_v1::model::compliance_note::ComplianceType::CisBenchmark(CisBenchmark::default().into())));Sourcepub fn cis_benchmark(&self) -> Option<&Box<CisBenchmark>>
pub fn cis_benchmark(&self) -> Option<&Box<CisBenchmark>>
The value of compliance_type
if it holds a CisBenchmark, None if the field is not set or
holds a different branch.
Sourcepub fn set_cis_benchmark<T: Into<Box<CisBenchmark>>>(self, v: T) -> Self
pub fn set_cis_benchmark<T: Into<Box<CisBenchmark>>>(self, v: T) -> Self
Sets the value of compliance_type
to hold a CisBenchmark.
Note that all the setters affecting compliance_type are
mutually exclusive.
§Example
use google_cloud_grafeas_v1::model::compliance_note::CisBenchmark;
let x = ComplianceNote::new().set_cis_benchmark(CisBenchmark::default()/* use setters */);
assert!(x.cis_benchmark().is_some());Sourcepub fn set_potential_impact<T: Into<Option<PotentialImpact>>>(
self,
v: T,
) -> Self
pub fn set_potential_impact<T: Into<Option<PotentialImpact>>>( self, v: T, ) -> Self
Sets the value of potential_impact.
Note that all the setters affecting potential_impact are mutually
exclusive.
§Example
use google_cloud_grafeas_v1::model::compliance_note::PotentialImpact;
let x = ComplianceNote::new().set_potential_impact(Some(PotentialImpact::Impact("example".to_string())));Sourcepub fn impact(&self) -> Option<&String>
pub fn impact(&self) -> Option<&String>
The value of potential_impact
if it holds a Impact, None if the field is not set or
holds a different branch.
Sourcepub fn set_impact<T: Into<String>>(self, v: T) -> Self
pub fn set_impact<T: Into<String>>(self, v: T) -> Self
Sets the value of potential_impact
to hold a Impact.
Note that all the setters affecting potential_impact are
mutually exclusive.
§Example
let x = ComplianceNote::new().set_impact("example");
assert!(x.impact().is_some());Trait Implementations§
Source§impl Clone for ComplianceNote
impl Clone for ComplianceNote
Source§fn clone(&self) -> ComplianceNote
fn clone(&self) -> ComplianceNote
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more