#[non_exhaustive]pub struct Resource {
pub name: String,
pub terraform_info: Option<ResourceTerraformInfo>,
pub cai_assets: HashMap<String, ResourceCAIInfo>,
pub intent: Intent,
pub state: State,
/* private fields */
}Expand description
Resource represents a Google Cloud Platform resource actuated by IM. Resources are child resources of Revisions.
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: StringOutput only. Resource name.
Format:
projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}
terraform_info: Option<ResourceTerraformInfo>Output only. Terraform-specific info if this resource was created using Terraform.
cai_assets: HashMap<String, ResourceCAIInfo>Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI ID). CAI type format follows https://cloud.google.com/asset-inventory/docs/supported-asset-types
intent: IntentOutput only. Intent of the resource.
state: StateOutput only. Current state of the resource.
Implementations§
Source§impl Resource
impl Resource
pub fn new() -> Self
Sourcepub fn set_terraform_info<T>(self, v: T) -> Selfwhere
T: Into<ResourceTerraformInfo>,
pub fn set_terraform_info<T>(self, v: T) -> Selfwhere
T: Into<ResourceTerraformInfo>,
Sets the value of terraform_info.
§Example
ⓘ
use google_cloud_config_v1::model::ResourceTerraformInfo;
let x = Resource::new().set_terraform_info(ResourceTerraformInfo::default()/* use setters */);Sourcepub fn set_or_clear_terraform_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<ResourceTerraformInfo>,
pub fn set_or_clear_terraform_info<T>(self, v: Option<T>) -> Selfwhere
T: Into<ResourceTerraformInfo>,
Sets or clears the value of terraform_info.
§Example
ⓘ
use google_cloud_config_v1::model::ResourceTerraformInfo;
let x = Resource::new().set_or_clear_terraform_info(Some(ResourceTerraformInfo::default()/* use setters */));
let x = Resource::new().set_or_clear_terraform_info(None::<ResourceTerraformInfo>);Sourcepub fn set_cai_assets<T, K, V>(self, v: T) -> Self
pub fn set_cai_assets<T, K, V>(self, v: T) -> Self
Sets the value of cai_assets.
§Example
ⓘ
use google_cloud_config_v1::model::ResourceCAIInfo;
let x = Resource::new().set_cai_assets([
("key0", ResourceCAIInfo::default()/* use setters */),
("key1", ResourceCAIInfo::default()/* use (different) setters */),
]);Sourcepub fn set_intent<T: Into<Intent>>(self, v: T) -> Self
pub fn set_intent<T: Into<Intent>>(self, v: T) -> Self
Trait Implementations§
impl StructuralPartialEq for Resource
Auto Trait Implementations§
impl Freeze for Resource
impl RefUnwindSafe for Resource
impl Send for Resource
impl Sync for Resource
impl Unpin for Resource
impl UnwindSafe for Resource
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