#[non_exhaustive]pub struct CreatePolicyBindingRequest {
pub parent: String,
pub policy_binding_id: String,
pub policy_binding: Option<PolicyBinding>,
pub validate_only: bool,
/* private fields */
}Expand description
Request message for CreatePolicyBinding method.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.parent: StringRequired. The parent resource where this policy binding will be created. The binding parent is the closest Resource Manager resource (project, folder or organization) to the binding target.
Format:
projects/{project_id}/locations/{location}projects/{project_number}/locations/{location}folders/{folder_id}/locations/{location}organizations/{organization_id}/locations/{location}
policy_binding_id: StringRequired. The ID to use for the policy binding, which will become the final component of the policy binding’s resource name.
This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, hyphens, or dots. Pattern, /[a-z][a-z0-9-.]{2,62}/.
policy_binding: Option<PolicyBinding>Required. The policy binding to create.
validate_only: boolOptional. If set, validate the request and preview the creation, but do not actually post it.
Implementations§
Source§impl CreatePolicyBindingRequest
impl CreatePolicyBindingRequest
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
Sourcepub fn set_policy_binding_id<T: Into<String>>(self, v: T) -> Self
pub fn set_policy_binding_id<T: Into<String>>(self, v: T) -> Self
Sets the value of policy_binding_id.
§Example
let x = CreatePolicyBindingRequest::new().set_policy_binding_id("example");Sourcepub fn set_policy_binding<T>(self, v: T) -> Selfwhere
T: Into<PolicyBinding>,
pub fn set_policy_binding<T>(self, v: T) -> Selfwhere
T: Into<PolicyBinding>,
Sets the value of policy_binding.
§Example
use google_cloud_iam_v3::model::PolicyBinding;
let x = CreatePolicyBindingRequest::new().set_policy_binding(PolicyBinding::default()/* use setters */);Sourcepub fn set_or_clear_policy_binding<T>(self, v: Option<T>) -> Selfwhere
T: Into<PolicyBinding>,
pub fn set_or_clear_policy_binding<T>(self, v: Option<T>) -> Selfwhere
T: Into<PolicyBinding>,
Sets or clears the value of policy_binding.
§Example
use google_cloud_iam_v3::model::PolicyBinding;
let x = CreatePolicyBindingRequest::new().set_or_clear_policy_binding(Some(PolicyBinding::default()/* use setters */));
let x = CreatePolicyBindingRequest::new().set_or_clear_policy_binding(None::<PolicyBinding>);Sourcepub fn set_validate_only<T: Into<bool>>(self, v: T) -> Self
pub fn set_validate_only<T: Into<bool>>(self, v: T) -> Self
Sets the value of validate_only.
§Example
let x = CreatePolicyBindingRequest::new().set_validate_only(true);Trait Implementations§
Source§impl Clone for CreatePolicyBindingRequest
impl Clone for CreatePolicyBindingRequest
Source§fn clone(&self) -> CreatePolicyBindingRequest
fn clone(&self) -> CreatePolicyBindingRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more