#[non_exhaustive]pub struct PerInstanceConfig {
pub fingerprint: Option<Bytes>,
pub name: Option<String>,
pub preserved_state: Option<PreservedState>,
pub status: Option<Status>,
/* private fields */
}instance-group-managers or region-instance-group-managers only.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.fingerprint: Option<Bytes>Fingerprint of this per-instance config. This field can be used in optimistic locking. It is ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance configuration or the field needs to be unset.
name: Option<String>The name of a per-instance configuration and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance configuration with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance configuration for a VM instance that either doesn’t exist or is not part of the group will result in an error.
preserved_state: Option<PreservedState>The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy.
status: Option<Status>The status of applying this per-instance configuration on the corresponding managed instance.
Implementations§
Source§impl PerInstanceConfig
impl PerInstanceConfig
pub fn new() -> Self
Sourcepub fn set_fingerprint<T>(self, v: T) -> Self
pub fn set_fingerprint<T>(self, v: T) -> Self
Sets the value of fingerprint.
§Example
let x = PerInstanceConfig::new().set_fingerprint(bytes::Bytes::from_static(b"example"));Sourcepub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
Sets or clears the value of fingerprint.
§Example
let x = PerInstanceConfig::new().set_or_clear_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = PerInstanceConfig::new().set_or_clear_fingerprint(None::<bytes::Bytes>);Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_preserved_state<T>(self, v: T) -> Selfwhere
T: Into<PreservedState>,
pub fn set_preserved_state<T>(self, v: T) -> Selfwhere
T: Into<PreservedState>,
Sets the value of preserved_state.
§Example
use google_cloud_compute_v1::model::PreservedState;
let x = PerInstanceConfig::new().set_preserved_state(PreservedState::default()/* use setters */);Sourcepub fn set_or_clear_preserved_state<T>(self, v: Option<T>) -> Selfwhere
T: Into<PreservedState>,
pub fn set_or_clear_preserved_state<T>(self, v: Option<T>) -> Selfwhere
T: Into<PreservedState>,
Sets or clears the value of preserved_state.
§Example
use google_cloud_compute_v1::model::PreservedState;
let x = PerInstanceConfig::new().set_or_clear_preserved_state(Some(PreservedState::default()/* use setters */));
let x = PerInstanceConfig::new().set_or_clear_preserved_state(None::<PreservedState>);Sourcepub fn set_status<T>(self, v: T) -> Self
pub fn set_status<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
Sets or clears the value of status.
§Example
use google_cloud_compute_v1::model::per_instance_config::Status;
let x0 = PerInstanceConfig::new().set_or_clear_status(Some(Status::Deleting));
let x1 = PerInstanceConfig::new().set_or_clear_status(Some(Status::Effective));
let x2 = PerInstanceConfig::new().set_or_clear_status(Some(Status::None));
let x_none = PerInstanceConfig::new().set_or_clear_status(None::<Status>);Trait Implementations§
Source§impl Clone for PerInstanceConfig
impl Clone for PerInstanceConfig
Source§fn clone(&self) -> PerInstanceConfig
fn clone(&self) -> PerInstanceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more