#[non_exhaustive]pub struct Instance {
pub name: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub state: State,
pub region: String,
pub product_activation: HashMap<String, ActivationState>,
pub license_version_id: String,
pub compute_instance: String,
/* private fields */
}Expand description
Message describing Instance object
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: StringIdentifier. name of resource
create_time: Option<Timestamp>Output only. [Output only] Create time stamp
update_time: Option<Timestamp>Output only. [Output only] Update time stamp
labels: HashMap<String, String>Optional. Labels as key value pairs
state: StateOutput only. The state of the VM.
region: StringOutput only. The location of the VM.
product_activation: HashMap<String, ActivationState>Output only. Map with Product_Name and Activation State of the VM.
license_version_id: StringOutput only. license version id.
compute_instance: StringRequired. Compute Instance resource name, i.e. projects/{project}/zones/{zone}/instances/{instance}
Implementations§
Source§impl Instance
impl Instance
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Instance::new().set_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Instance::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Instance::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
ⓘ
use wkt::Timestamp;
let x = Instance::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Instance::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_region<T: Into<String>>(self, v: T) -> Self
pub fn set_region<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_product_activation<T, K, V>(self, v: T) -> Self
pub fn set_product_activation<T, K, V>(self, v: T) -> Self
Sets the value of product_activation.
§Example
ⓘ
use google_cloud_licensemanager_v1::model::ActivationState;
let x = Instance::new().set_product_activation([
("key0", ActivationState::KeyRequested),
("key1", ActivationState::Activating),
("key2", ActivationState::Activated),
]);Sourcepub fn set_license_version_id<T: Into<String>>(self, v: T) -> Self
pub fn set_license_version_id<T: Into<String>>(self, v: T) -> Self
Sets the value of license_version_id.
§Example
ⓘ
let x = Instance::new().set_license_version_id("example");Sourcepub fn set_compute_instance<T: Into<String>>(self, v: T) -> Self
pub fn set_compute_instance<T: Into<String>>(self, v: T) -> Self
Sets the value of compute_instance.
§Example
ⓘ
let x = Instance::new().set_compute_instance("example");Trait Implementations§
impl StructuralPartialEq for Instance
Auto Trait Implementations§
impl Freeze for Instance
impl RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnsafeUnpin for Instance
impl UnwindSafe for Instance
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