#[non_exhaustive]pub struct GlobalSetLabelsRequest {
pub label_fingerprint: Option<Bytes>,
pub labels: HashMap<String, String>,
/* private fields */
}Available on crate features
external-vpn-gateways or global-addresses or global-forwarding-rules or images or interconnects or machine-images or security-policies or snapshots only.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.label_fingerprint: Option<Bytes>The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint.
labels: HashMap<String, String>A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example,“webserver-frontend”: “images”. A label value can also be empty (e.g. “my-label”: “”).
Implementations§
Source§impl GlobalSetLabelsRequest
impl GlobalSetLabelsRequest
pub fn new() -> Self
Sourcepub fn set_label_fingerprint<T>(self, v: T) -> Self
pub fn set_label_fingerprint<T>(self, v: T) -> Self
Sets the value of label_fingerprint.
§Example
ⓘ
let x = GlobalSetLabelsRequest::new().set_label_fingerprint(bytes::Bytes::from_static(b"example"));Sourcepub fn set_or_clear_label_fingerprint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_label_fingerprint<T>(self, v: Option<T>) -> Self
Sets or clears the value of label_fingerprint.
§Example
ⓘ
let x = GlobalSetLabelsRequest::new().set_or_clear_label_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = GlobalSetLabelsRequest::new().set_or_clear_label_fingerprint(None::<bytes::Bytes>);Trait Implementations§
Source§impl Clone for GlobalSetLabelsRequest
impl Clone for GlobalSetLabelsRequest
Source§fn clone(&self) -> GlobalSetLabelsRequest
fn clone(&self) -> GlobalSetLabelsRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GlobalSetLabelsRequest
impl Debug for GlobalSetLabelsRequest
Source§impl Default for GlobalSetLabelsRequest
impl Default for GlobalSetLabelsRequest
Source§fn default() -> GlobalSetLabelsRequest
fn default() -> GlobalSetLabelsRequest
Returns the “default value” for a type. Read more
Source§impl Message for GlobalSetLabelsRequest
impl Message for GlobalSetLabelsRequest
Source§impl PartialEq for GlobalSetLabelsRequest
impl PartialEq for GlobalSetLabelsRequest
impl StructuralPartialEq for GlobalSetLabelsRequest
Auto Trait Implementations§
impl !Freeze for GlobalSetLabelsRequest
impl RefUnwindSafe for GlobalSetLabelsRequest
impl Send for GlobalSetLabelsRequest
impl Sync for GlobalSetLabelsRequest
impl Unpin for GlobalSetLabelsRequest
impl UnwindSafe for GlobalSetLabelsRequest
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