#[non_exhaustive]pub struct ResourceInfo {
pub resource_id: i64,
pub resource_type: ResourceType,
/* private fields */
}Expand description
Represent the resources that are children of this Workload.
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.resource_id: i64Resource identifier. For a project this represents project_number.
resource_type: ResourceTypeIndicates the type of resource.
Implementations§
Source§impl ResourceInfo
impl ResourceInfo
pub fn new() -> Self
Sourcepub fn set_resource_id<T: Into<i64>>(self, v: T) -> Self
pub fn set_resource_id<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_resource_type<T: Into<ResourceType>>(self, v: T) -> Self
pub fn set_resource_type<T: Into<ResourceType>>(self, v: T) -> Self
Sets the value of resource_type.
§Example
ⓘ
use google_cloud_assuredworkloads_v1::model::workload::resource_info::ResourceType;
let x0 = ResourceInfo::new().set_resource_type(ResourceType::ConsumerFolder);
let x1 = ResourceInfo::new().set_resource_type(ResourceType::EncryptionKeysProject);
let x2 = ResourceInfo::new().set_resource_type(ResourceType::Keyring);Trait Implementations§
Source§impl Clone for ResourceInfo
impl Clone for ResourceInfo
Source§fn clone(&self) -> ResourceInfo
fn clone(&self) -> ResourceInfo
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 ResourceInfo
impl Debug for ResourceInfo
Source§impl Default for ResourceInfo
impl Default for ResourceInfo
Source§fn default() -> ResourceInfo
fn default() -> ResourceInfo
Returns the “default value” for a type. Read more
Source§impl Message for ResourceInfo
impl Message for ResourceInfo
Source§impl PartialEq for ResourceInfo
impl PartialEq for ResourceInfo
impl StructuralPartialEq for ResourceInfo
Auto Trait Implementations§
impl Freeze for ResourceInfo
impl RefUnwindSafe for ResourceInfo
impl Send for ResourceInfo
impl Sync for ResourceInfo
impl Unpin for ResourceInfo
impl UnsafeUnpin for ResourceInfo
impl UnwindSafe for ResourceInfo
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