pub struct UpdateProtectionRuleRequest {
pub name: Option<String>,
pub rules: Vec<ProtectionRuleKind>,
pub bypass_groups: Vec<String>,
pub bypass_users: Vec<String>,
pub fork_role_mapping: Option<HashMap<String, String>>,
}Fields§
§name: Option<String>New name for the rule. Omit, or pass the current name, to leave it unchanged. The reserved dev_workspace_lock rule cannot be renamed, nor can another rule be renamed onto it.
rules: Vec<ProtectionRuleKind>Configuration of protection restrictions
bypass_groups: Vec<String>Groups that can bypass this ruleset
bypass_users: Vec<String>Users that can bypass this ruleset
fork_role_mapping: Option<HashMap<String, String>>Role a member of this workspace gets in a fork of it, keyed by the role it holds here. Unmapped roles carry over unchanged; where two rulesets map the same role, the first by name wins. On update, omitting it leaves the stored mapping unchanged.
Implementations§
Source§impl UpdateProtectionRuleRequest
impl UpdateProtectionRuleRequest
pub fn new( rules: Vec<ProtectionRuleKind>, bypass_groups: Vec<String>, bypass_users: Vec<String>, ) -> UpdateProtectionRuleRequest
Trait Implementations§
Source§impl Clone for UpdateProtectionRuleRequest
impl Clone for UpdateProtectionRuleRequest
Source§impl Debug for UpdateProtectionRuleRequest
impl Debug for UpdateProtectionRuleRequest
Source§impl<'de> Deserialize<'de> for UpdateProtectionRuleRequest
impl<'de> Deserialize<'de> for UpdateProtectionRuleRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for UpdateProtectionRuleRequest
Auto Trait Implementations§
impl Forget for UpdateProtectionRuleRequest
impl Freeze for UpdateProtectionRuleRequestwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<ProtectionRuleKind>: Freeze,
PhantomData<String>: Freeze,
PhantomData<(String, String)>: Freeze,
impl Move for UpdateProtectionRuleRequest
impl RefUnwindSafe for UpdateProtectionRuleRequest
impl Send for UpdateProtectionRuleRequest
impl Sync for UpdateProtectionRuleRequest
impl Unpin for UpdateProtectionRuleRequest
impl UnsafeUnpin for UpdateProtectionRuleRequestwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ProtectionRuleKind>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for UpdateProtectionRuleRequest
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