#[non_exhaustive]pub struct LocationPolicyLocation {
pub constraints: Option<LocationPolicyLocationConstraints>,
pub preference: Option<Preference>,
/* private fields */
}Available on crate features
instances or region-instances 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.constraints: Option<LocationPolicyLocationConstraints>Constraints that the caller requires on the result distribution in this zone.
preference: Option<Preference>Preference for a given location. Set to either ALLOW orDENY.
Implementations§
Source§impl LocationPolicyLocation
impl LocationPolicyLocation
pub fn new() -> Self
Sourcepub fn set_constraints<T>(self, v: T) -> Selfwhere
T: Into<LocationPolicyLocationConstraints>,
pub fn set_constraints<T>(self, v: T) -> Selfwhere
T: Into<LocationPolicyLocationConstraints>,
Sets the value of constraints.
§Example
ⓘ
use google_cloud_compute_v1::model::LocationPolicyLocationConstraints;
let x = LocationPolicyLocation::new().set_constraints(LocationPolicyLocationConstraints::default()/* use setters */);Sourcepub fn set_or_clear_constraints<T>(self, v: Option<T>) -> Selfwhere
T: Into<LocationPolicyLocationConstraints>,
pub fn set_or_clear_constraints<T>(self, v: Option<T>) -> Selfwhere
T: Into<LocationPolicyLocationConstraints>,
Sets or clears the value of constraints.
§Example
ⓘ
use google_cloud_compute_v1::model::LocationPolicyLocationConstraints;
let x = LocationPolicyLocation::new().set_or_clear_constraints(Some(LocationPolicyLocationConstraints::default()/* use setters */));
let x = LocationPolicyLocation::new().set_or_clear_constraints(None::<LocationPolicyLocationConstraints>);Sourcepub fn set_preference<T>(self, v: T) -> Selfwhere
T: Into<Preference>,
pub fn set_preference<T>(self, v: T) -> Selfwhere
T: Into<Preference>,
Sets the value of preference.
§Example
ⓘ
use google_cloud_compute_v1::model::location_policy_location::Preference;
let x0 = LocationPolicyLocation::new().set_preference(Preference::Deny);
let x1 = LocationPolicyLocation::new().set_preference(Preference::Unspecified);Sourcepub fn set_or_clear_preference<T>(self, v: Option<T>) -> Selfwhere
T: Into<Preference>,
pub fn set_or_clear_preference<T>(self, v: Option<T>) -> Selfwhere
T: Into<Preference>,
Sets or clears the value of preference.
§Example
ⓘ
use google_cloud_compute_v1::model::location_policy_location::Preference;
let x0 = LocationPolicyLocation::new().set_or_clear_preference(Some(Preference::Deny));
let x1 = LocationPolicyLocation::new().set_or_clear_preference(Some(Preference::Unspecified));
let x_none = LocationPolicyLocation::new().set_or_clear_preference(None::<Preference>);Trait Implementations§
Source§impl Clone for LocationPolicyLocation
impl Clone for LocationPolicyLocation
Source§fn clone(&self) -> LocationPolicyLocation
fn clone(&self) -> LocationPolicyLocation
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 LocationPolicyLocation
impl Debug for LocationPolicyLocation
Source§impl Default for LocationPolicyLocation
impl Default for LocationPolicyLocation
Source§fn default() -> LocationPolicyLocation
fn default() -> LocationPolicyLocation
Returns the “default value” for a type. Read more
Source§impl Message for LocationPolicyLocation
impl Message for LocationPolicyLocation
Source§impl PartialEq for LocationPolicyLocation
impl PartialEq for LocationPolicyLocation
impl StructuralPartialEq for LocationPolicyLocation
Auto Trait Implementations§
impl Freeze for LocationPolicyLocation
impl RefUnwindSafe for LocationPolicyLocation
impl Send for LocationPolicyLocation
impl Sync for LocationPolicyLocation
impl Unpin for LocationPolicyLocation
impl UnwindSafe for LocationPolicyLocation
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