#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PerInstanceConfig
impl Debug for PerInstanceConfig
Source§impl Default for PerInstanceConfig
impl Default for PerInstanceConfig
Source§fn default() -> PerInstanceConfig
fn default() -> PerInstanceConfig
Source§impl Message for PerInstanceConfig
impl Message for PerInstanceConfig
Source§impl PartialEq for PerInstanceConfig
impl PartialEq for PerInstanceConfig
impl StructuralPartialEq for PerInstanceConfig
Auto Trait Implementations§
impl !Freeze for PerInstanceConfig
impl RefUnwindSafe for PerInstanceConfig
impl Send for PerInstanceConfig
impl Sync for PerInstanceConfig
impl Unpin for PerInstanceConfig
impl UnsafeUnpin for PerInstanceConfig
impl UnwindSafe for PerInstanceConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request