#[non_exhaustive]pub struct UpdateBranchRuleRequest {
pub branch_rule: Option<BranchRule>,
pub validate_only: bool,
pub update_mask: Option<FieldMask>,
/* private fields */
}Expand description
UpdateBranchRuleRequest is the request to update a branchRule.
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.branch_rule: Option<BranchRule>§validate_only: boolOptional. If set, validate the request and preview the review, but do not actually post it. (https://google.aip.dev/163, for declarative friendly)
update_mask: Option<FieldMask>Required. Field mask is used to specify the fields to be overwritten in the branchRule resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. The special value “*” means full replacement.
Implementations§
Source§impl UpdateBranchRuleRequest
impl UpdateBranchRuleRequest
pub fn new() -> Self
Sourcepub fn set_branch_rule<T>(self, v: T) -> Selfwhere
T: Into<BranchRule>,
pub fn set_branch_rule<T>(self, v: T) -> Selfwhere
T: Into<BranchRule>,
Sets the value of branch_rule.
§Example
ⓘ
use google_cloud_securesourcemanager_v1::model::BranchRule;
let x = UpdateBranchRuleRequest::new().set_branch_rule(BranchRule::default()/* use setters */);Sourcepub fn set_or_clear_branch_rule<T>(self, v: Option<T>) -> Selfwhere
T: Into<BranchRule>,
pub fn set_or_clear_branch_rule<T>(self, v: Option<T>) -> Selfwhere
T: Into<BranchRule>,
Sets or clears the value of branch_rule.
§Example
ⓘ
use google_cloud_securesourcemanager_v1::model::BranchRule;
let x = UpdateBranchRuleRequest::new().set_or_clear_branch_rule(Some(BranchRule::default()/* use setters */));
let x = UpdateBranchRuleRequest::new().set_or_clear_branch_rule(None::<BranchRule>);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 = UpdateBranchRuleRequest::new().set_validate_only(true);Sourcepub fn set_update_mask<T>(self, v: T) -> Self
pub fn set_update_mask<T>(self, v: T) -> Self
Sets the value of update_mask.
§Example
ⓘ
use wkt::FieldMask;
let x = UpdateBranchRuleRequest::new().set_update_mask(FieldMask::default()/* use setters */);Sourcepub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_mask<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_mask.
§Example
ⓘ
use wkt::FieldMask;
let x = UpdateBranchRuleRequest::new().set_or_clear_update_mask(Some(FieldMask::default()/* use setters */));
let x = UpdateBranchRuleRequest::new().set_or_clear_update_mask(None::<FieldMask>);Trait Implementations§
Source§impl Clone for UpdateBranchRuleRequest
impl Clone for UpdateBranchRuleRequest
Source§fn clone(&self) -> UpdateBranchRuleRequest
fn clone(&self) -> UpdateBranchRuleRequest
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 UpdateBranchRuleRequest
impl Debug for UpdateBranchRuleRequest
Source§impl Default for UpdateBranchRuleRequest
impl Default for UpdateBranchRuleRequest
Source§fn default() -> UpdateBranchRuleRequest
fn default() -> UpdateBranchRuleRequest
Returns the “default value” for a type. Read more
Source§impl Message for UpdateBranchRuleRequest
impl Message for UpdateBranchRuleRequest
Source§impl PartialEq for UpdateBranchRuleRequest
impl PartialEq for UpdateBranchRuleRequest
impl StructuralPartialEq for UpdateBranchRuleRequest
Auto Trait Implementations§
impl Freeze for UpdateBranchRuleRequest
impl RefUnwindSafe for UpdateBranchRuleRequest
impl Send for UpdateBranchRuleRequest
impl Sync for UpdateBranchRuleRequest
impl Unpin for UpdateBranchRuleRequest
impl UnwindSafe for UpdateBranchRuleRequest
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