Struct ResourceInfo Copy item path Source #[non_exhaustive]
pub struct ResourceInfo {
pub name: String ,
pub type: String ,
pub permission: String ,
pub container: String ,
pub location: String ,
}Expand description Describes a resource referenced in the request.
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.
The name of the resource referenced in the request.
The resource type in the format of “{service}/{kind}”.
The resource permission needed for this request.
The format must be “{service}/{plural}.{verb}”.
Optional. The identifier of the container of this resource. For Google
Cloud APIs, the resource container must be one of the following formats:
Required for the policy enforcement on the container level (e.g. VPCSC,
Location Policy check, Org Policy check).
Optional. The location of the resource, it must be a valid zone, region or
multiregion, for example: “europe-west4”, “northamerica-northeast1-a”.
Required for location policy check.
Creates a new default instance.
Sets the value of name .
§ Example
ⓘ let x = ResourceInfo::new().set_name("example" );Sets the value of r#type .
§ Example
ⓘ let x = ResourceInfo::new().set_type("example" );Sets the value of permission .
§ Example
ⓘ let x = ResourceInfo::new().set_permission("example" );Sets the value of container .
§ Example
ⓘ let x = ResourceInfo::new().set_container("example" );Sets the value of location .
§ Example
ⓘ let x = ResourceInfo::new().set_location("example" );Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Returns the “default value” for a type.
Read more The typename of this message.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Attaches the provided
Context to this type, returning a
WithContext
wrapper.
Read more Attaches the current
Context to this type, returning a
WithContext
wrapper.
Read more Instruments this type with the provided
Span, returning an
Instrumented wrapper.
Read more Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.