#[non_exhaustive]pub struct VersionedResource {
pub version: String,
pub resource: Option<Struct>,
/* private fields */
}Expand description
Resource representation as defined by the corresponding service providing the resource for a given API version.
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.version: StringAPI version of the resource.
Example:
If the resource is an instance provided by Compute Engine v1 API as defined
in <https://cloud.google.com/compute/docs/reference/rest/v1/instances>,
version will be “v1”.
resource: Option<Struct>JSON representation of the resource as defined by the corresponding service providing this resource.
Example:
If the resource is an instance provided by Compute Engine, this field will
contain the JSON representation of the instance as defined by Compute
Engine:
<https://cloud.google.com/compute/docs/reference/rest/v1/instances>.
You can find the resource definition for each supported resource type in
this table:
<https://cloud.google.com/asset-inventory/docs/supported-asset-types>
Implementations§
Source§impl VersionedResource
impl VersionedResource
pub fn new() -> Self
Sourcepub fn set_version<T: Into<String>>(self, v: T) -> Self
pub fn set_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_resource<T>(self, v: T) -> Self
pub fn set_resource<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_resource<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_resource<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for VersionedResource
impl Clone for VersionedResource
Source§fn clone(&self) -> VersionedResource
fn clone(&self) -> VersionedResource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more