#[non_exhaustive]pub struct CreatePolicyRequest {
pub parent: String,
pub policy: Option<Policy>,
/* private fields */
}Expand description
The request sent to the CreatePolicyRequest [google.cloud.orgpolicy.v2.OrgPolicy.CreatePolicy] 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. The Google Cloud resource that will parent the new policy. Must be in one of the following forms:
projects/{project_number}projects/{project_id}folders/{folder_id}organizations/{organization_id}
policy: Option<Policy>Required. Policy to create.
Implementations§
Source§impl CreatePolicyRequest
impl CreatePolicyRequest
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_policy<T>(self, v: T) -> Self
pub fn set_policy<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_policy<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_policy<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for CreatePolicyRequest
impl Clone for CreatePolicyRequest
Source§fn clone(&self) -> CreatePolicyRequest
fn clone(&self) -> CreatePolicyRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreatePolicyRequest
impl Debug for CreatePolicyRequest
Source§impl Default for CreatePolicyRequest
impl Default for CreatePolicyRequest
Source§fn default() -> CreatePolicyRequest
fn default() -> CreatePolicyRequest
Returns the “default value” for a type. Read more
Source§impl Message for CreatePolicyRequest
impl Message for CreatePolicyRequest
Source§impl PartialEq for CreatePolicyRequest
impl PartialEq for CreatePolicyRequest
Source§fn eq(&self, other: &CreatePolicyRequest) -> bool
fn eq(&self, other: &CreatePolicyRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreatePolicyRequest
Auto Trait Implementations§
impl Freeze for CreatePolicyRequest
impl RefUnwindSafe for CreatePolicyRequest
impl Send for CreatePolicyRequest
impl Sync for CreatePolicyRequest
impl Unpin for CreatePolicyRequest
impl UnsafeUnpin for CreatePolicyRequest
impl UnwindSafe for CreatePolicyRequest
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