#[non_exhaustive]pub struct TargetResourceConfig {
pub resource_config: Option<ResourceConfig>,
/* private fields */
}Expand description
The name of the target resource or the configuration that’s required to create a new target resource.
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.resource_config: Option<ResourceConfig>The resource configuration for the target resource.
Implementations§
Source§impl TargetResourceConfig
impl TargetResourceConfig
pub fn new() -> Self
Sourcepub fn set_resource_config<T: Into<Option<ResourceConfig>>>(self, v: T) -> Self
pub fn set_resource_config<T: Into<Option<ResourceConfig>>>(self, v: T) -> Self
Sets the value of resource_config.
Note that all the setters affecting resource_config are mutually
exclusive.
§Example
use google_cloud_cloudsecuritycompliance_v1::model::target_resource_config::ResourceConfig;
let x = TargetResourceConfig::new().set_resource_config(Some(ResourceConfig::ExistingTargetResource("example".to_string())));Sourcepub fn existing_target_resource(&self) -> Option<&String>
pub fn existing_target_resource(&self) -> Option<&String>
The value of resource_config
if it holds a ExistingTargetResource, None if the field is not set or
holds a different branch.
Sourcepub fn set_existing_target_resource<T: Into<String>>(self, v: T) -> Self
pub fn set_existing_target_resource<T: Into<String>>(self, v: T) -> Self
Sets the value of resource_config
to hold a ExistingTargetResource.
Note that all the setters affecting resource_config are
mutually exclusive.
§Example
let x = TargetResourceConfig::new().set_existing_target_resource("example");
assert!(x.existing_target_resource().is_some());
assert!(x.target_resource_creation_config().is_none());Sourcepub fn target_resource_creation_config(
&self,
) -> Option<&Box<TargetResourceCreationConfig>>
pub fn target_resource_creation_config( &self, ) -> Option<&Box<TargetResourceCreationConfig>>
The value of resource_config
if it holds a TargetResourceCreationConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_target_resource_creation_config<T: Into<Box<TargetResourceCreationConfig>>>(
self,
v: T,
) -> Self
pub fn set_target_resource_creation_config<T: Into<Box<TargetResourceCreationConfig>>>( self, v: T, ) -> Self
Sets the value of resource_config
to hold a TargetResourceCreationConfig.
Note that all the setters affecting resource_config are
mutually exclusive.
§Example
use google_cloud_cloudsecuritycompliance_v1::model::TargetResourceCreationConfig;
let x = TargetResourceConfig::new().set_target_resource_creation_config(TargetResourceCreationConfig::default()/* use setters */);
assert!(x.target_resource_creation_config().is_some());
assert!(x.existing_target_resource().is_none());Trait Implementations§
Source§impl Clone for TargetResourceConfig
impl Clone for TargetResourceConfig
Source§fn clone(&self) -> TargetResourceConfig
fn clone(&self) -> TargetResourceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more