#[non_exhaustive]pub struct CreateCustomConstraintRequest {
pub parent: String,
pub custom_constraint: Option<CustomConstraint>,
/* private fields */
}Expand description
The request sent to the CreateCustomConstraintRequest [google.cloud.orgpolicy.v2.OrgPolicy.CreateCustomConstraint] method.
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.parent: StringRequired. Must be in the following form:
organizations/{organization_id}
custom_constraint: Option<CustomConstraint>Required. Custom constraint to create.
Implementations§
Source§impl CreateCustomConstraintRequest
impl CreateCustomConstraintRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sets the value of parent.
Sourcepub fn set_custom_constraint<T>(self, v: T) -> Selfwhere
T: Into<CustomConstraint>,
pub fn set_custom_constraint<T>(self, v: T) -> Selfwhere
T: Into<CustomConstraint>,
Sets the value of custom_constraint.
Sourcepub fn set_or_clear_custom_constraint<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomConstraint>,
pub fn set_or_clear_custom_constraint<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomConstraint>,
Sets or clears the value of custom_constraint.
Trait Implementations§
Source§impl Clone for CreateCustomConstraintRequest
impl Clone for CreateCustomConstraintRequest
Source§fn clone(&self) -> CreateCustomConstraintRequest
fn clone(&self) -> CreateCustomConstraintRequest
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 Default for CreateCustomConstraintRequest
impl Default for CreateCustomConstraintRequest
Source§fn default() -> CreateCustomConstraintRequest
fn default() -> CreateCustomConstraintRequest
Returns the “default value” for a type. Read more
Source§impl PartialEq for CreateCustomConstraintRequest
impl PartialEq for CreateCustomConstraintRequest
Source§fn eq(&self, other: &CreateCustomConstraintRequest) -> bool
fn eq(&self, other: &CreateCustomConstraintRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateCustomConstraintRequest
Auto Trait Implementations§
impl Freeze for CreateCustomConstraintRequest
impl RefUnwindSafe for CreateCustomConstraintRequest
impl Send for CreateCustomConstraintRequest
impl Sync for CreateCustomConstraintRequest
impl Unpin for CreateCustomConstraintRequest
impl UnwindSafe for CreateCustomConstraintRequest
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