#[non_exhaustive]pub struct PartnerMetadata {
pub fingerprint: Option<Bytes>,
pub partner_metadata: HashMap<String, StructuredEntries>,
/* private fields */
}Available on crate feature
instances only.Expand description
Model definition of partner_metadata field. To be used in dedicated Partner Metadata methods and to be inlined in the Instance and InstanceTemplate resources.
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.fingerprint: Option<Bytes>Instance-level hash to be used for optimistic locking.
partner_metadata: HashMap<String, StructuredEntries>Partner Metadata assigned to the instance. A map from a subdomain to entries map. Subdomain name must be compliant withRFC1035 definition. The total size of all keys and values must be less than 2MB. Subdomain ‘metadata.compute.googleapis.com’ is reserverd for instance’s metadata.
Implementations§
Source§impl PartnerMetadata
impl PartnerMetadata
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 = PartnerMetadata::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 = PartnerMetadata::new().set_or_clear_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = PartnerMetadata::new().set_or_clear_fingerprint(None::<bytes::Bytes>);Sourcepub fn set_partner_metadata<T, K, V>(self, v: T) -> Self
pub fn set_partner_metadata<T, K, V>(self, v: T) -> Self
Sets the value of partner_metadata.
§Example
ⓘ
use google_cloud_compute_v1::model::StructuredEntries;
let x = PartnerMetadata::new().set_partner_metadata([
("key0", StructuredEntries::default()/* use setters */),
("key1", StructuredEntries::default()/* use (different) setters */),
]);Trait Implementations§
Source§impl Clone for PartnerMetadata
impl Clone for PartnerMetadata
Source§fn clone(&self) -> PartnerMetadata
fn clone(&self) -> PartnerMetadata
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 PartnerMetadata
impl Debug for PartnerMetadata
Source§impl Default for PartnerMetadata
impl Default for PartnerMetadata
Source§fn default() -> PartnerMetadata
fn default() -> PartnerMetadata
Returns the “default value” for a type. Read more
Source§impl Message for PartnerMetadata
impl Message for PartnerMetadata
Source§impl PartialEq for PartnerMetadata
impl PartialEq for PartnerMetadata
impl StructuralPartialEq for PartnerMetadata
Auto Trait Implementations§
impl !Freeze for PartnerMetadata
impl RefUnwindSafe for PartnerMetadata
impl Send for PartnerMetadata
impl Sync for PartnerMetadata
impl Unpin for PartnerMetadata
impl UnsafeUnpin for PartnerMetadata
impl UnwindSafe for PartnerMetadata
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