#[non_exhaustive]pub struct ShareSettings {
pub project_map: HashMap<String, ShareSettingsProjectConfig>,
pub share_type: Option<ShareType>,
/* private fields */
}Available on crate features
future-reservations or node-groups or region-commitments or reservation-slots or reservations only.Expand description
The share setting for reservations and sole tenancy node groups.
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.project_map: HashMap<String, ShareSettingsProjectConfig>A map of project id and project config. This is only valid when share_type’s value is SPECIFIC_PROJECTS.
Type of sharing for this shared-reservation
Implementations§
pub fn new() -> Self
Sourcepub fn set_project_map<T, K, V>(self, v: T) -> Self
pub fn set_project_map<T, K, V>(self, v: T) -> Self
Sets the value of project_map.
§Example
ⓘ
use google_cloud_compute_v1::model::ShareSettingsProjectConfig;
let x = ShareSettings::new().set_project_map([
("key0", ShareSettingsProjectConfig::default()/* use setters */),
("key1", ShareSettingsProjectConfig::default()/* use (different) setters */),
]);Sets the value of share_type.
§Example
ⓘ
use google_cloud_compute_v1::model::share_settings::ShareType;
let x0 = ShareSettings::new().set_share_type(ShareType::Organization);
let x1 = ShareSettings::new().set_share_type(ShareType::Unspecified);
let x2 = ShareSettings::new().set_share_type(ShareType::SpecificProjects);Sets or clears the value of share_type.
§Example
ⓘ
use google_cloud_compute_v1::model::share_settings::ShareType;
let x0 = ShareSettings::new().set_or_clear_share_type(Some(ShareType::Organization));
let x1 = ShareSettings::new().set_or_clear_share_type(Some(ShareType::Unspecified));
let x2 = ShareSettings::new().set_or_clear_share_type(Some(ShareType::SpecificProjects));
let x_none = ShareSettings::new().set_or_clear_share_type(None::<ShareType>);Trait Implementations§
Source§fn clone(&self) -> ShareSettings
fn clone(&self) -> ShareSettings
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§fn default() -> ShareSettings
fn default() -> ShareSettings
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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