#[non_exhaustive]pub struct InstanceSettings {
pub fingerprint: Option<Bytes>,
pub kind: Option<String>,
pub metadata: Option<InstanceSettingsMetadata>,
pub zone: Option<String>,
/* private fields */
}instance-settings only.Expand description
Represents a Instance Settings resource. You can use instance settings to configure default settings for Compute Engine VM instances. For example, you can use it to configure default machine type of Compute Engine VM instances.
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>Specifies a fingerprint for instance settings, which is essentially a hash of the instance settings resource’s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance settings resource. You must always provide an up-to-date fingerprint hash in order to update or change the resource, otherwise the request will fail with error 412 conditionNotMet.
To see the latest fingerprint, make a get() request to retrieve the resource.
kind: Option<String>Output only. [Output Only] Type of the resource. Alwayscompute#instance_settings for instance settings.
metadata: Option<InstanceSettingsMetadata>The metadata key/value pairs assigned to all the instances in the corresponding scope.
zone: Option<String>Output only. [Output Only] URL of the zone where the resource resides You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
Implementations§
Source§impl InstanceSettings
impl InstanceSettings
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 = InstanceSettings::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 = InstanceSettings::new().set_or_clear_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = InstanceSettings::new().set_or_clear_fingerprint(None::<bytes::Bytes>);Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_metadata<T>(self, v: T) -> Selfwhere
T: Into<InstanceSettingsMetadata>,
pub fn set_metadata<T>(self, v: T) -> Selfwhere
T: Into<InstanceSettingsMetadata>,
Sourcepub fn set_or_clear_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceSettingsMetadata>,
pub fn set_or_clear_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<InstanceSettingsMetadata>,
Sets or clears the value of metadata.
§Example
use google_cloud_compute_v1::model::InstanceSettingsMetadata;
let x = InstanceSettings::new().set_or_clear_metadata(Some(InstanceSettingsMetadata::default()/* use setters */));
let x = InstanceSettings::new().set_or_clear_metadata(None::<InstanceSettingsMetadata>);Trait Implementations§
Source§impl Clone for InstanceSettings
impl Clone for InstanceSettings
Source§fn clone(&self) -> InstanceSettings
fn clone(&self) -> InstanceSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more