#[non_exhaustive]pub struct ValuedResource {
pub name: String,
pub resource: String,
pub resource_type: String,
pub display_name: String,
pub resource_value: ResourceValue,
pub exposed_score: f64,
pub resource_value_configs_used: Vec<ResourceValueConfigMetadata>,
/* private fields */
}Expand description
A resource that is determined to have value to a user’s system
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: StringValued resource name, for example,
e.g.:
organizations/123/simulations/456/valuedResources/789
resource: StringThe full resource name of the valued resource.
resource_type: StringThe resource type of the valued resource.
display_name: StringHuman-readable name of the valued resource.
resource_value: ResourceValueHow valuable this resource is.
exposed_score: f64Exposed score for this valued resource. A value of 0 means no exposure was detected exposure.
resource_value_configs_used: Vec<ResourceValueConfigMetadata>List of resource value configurations’ metadata used to determine the value of this resource. Maximum of 100.
Implementations§
Source§impl ValuedResource
impl ValuedResource
pub fn new() -> Self
Sourcepub fn set_resource<T: Into<String>>(self, v: T) -> Self
pub fn set_resource<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_resource_type<T: Into<String>>(self, v: T) -> Self
pub fn set_resource_type<T: Into<String>>(self, v: T) -> Self
Sets the value of resource_type.
§Example
ⓘ
let x = ValuedResource::new().set_resource_type("example");Sourcepub fn set_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of display_name.
§Example
ⓘ
let x = ValuedResource::new().set_display_name("example");Sourcepub fn set_resource_value<T: Into<ResourceValue>>(self, v: T) -> Self
pub fn set_resource_value<T: Into<ResourceValue>>(self, v: T) -> Self
Sets the value of resource_value.
§Example
ⓘ
use google_cloud_securitycenter_v2::model::valued_resource::ResourceValue;
let x0 = ValuedResource::new().set_resource_value(ResourceValue::Low);
let x1 = ValuedResource::new().set_resource_value(ResourceValue::Medium);
let x2 = ValuedResource::new().set_resource_value(ResourceValue::High);Sourcepub fn set_exposed_score<T: Into<f64>>(self, v: T) -> Self
pub fn set_exposed_score<T: Into<f64>>(self, v: T) -> Self
Sourcepub fn set_resource_value_configs_used<T, V>(self, v: T) -> Self
pub fn set_resource_value_configs_used<T, V>(self, v: T) -> Self
Sets the value of resource_value_configs_used.
§Example
ⓘ
use google_cloud_securitycenter_v2::model::ResourceValueConfigMetadata;
let x = ValuedResource::new()
.set_resource_value_configs_used([
ResourceValueConfigMetadata::default()/* use setters */,
ResourceValueConfigMetadata::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for ValuedResource
impl Clone for ValuedResource
Source§fn clone(&self) -> ValuedResource
fn clone(&self) -> ValuedResource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValuedResource
impl Debug for ValuedResource
Source§impl Default for ValuedResource
impl Default for ValuedResource
Source§fn default() -> ValuedResource
fn default() -> ValuedResource
Returns the “default value” for a type. Read more
Source§impl Message for ValuedResource
impl Message for ValuedResource
Source§impl PartialEq for ValuedResource
impl PartialEq for ValuedResource
impl StructuralPartialEq for ValuedResource
Auto Trait Implementations§
impl Freeze for ValuedResource
impl RefUnwindSafe for ValuedResource
impl Send for ValuedResource
impl Sync for ValuedResource
impl Unpin for ValuedResource
impl UnwindSafe for ValuedResource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more