pub struct CreateProtectionRuleRequest {
pub name: 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: StringUnique name for the protection rule
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 CreateProtectionRuleRequest
impl CreateProtectionRuleRequest
pub fn new( name: String, rules: Vec<ProtectionRuleKind>, bypass_groups: Vec<String>, bypass_users: Vec<String>, ) -> CreateProtectionRuleRequest
Trait Implementations§
Source§impl Clone for CreateProtectionRuleRequest
impl Clone for CreateProtectionRuleRequest
Source§impl Debug for CreateProtectionRuleRequest
impl Debug for CreateProtectionRuleRequest
Source§impl<'de> Deserialize<'de> for CreateProtectionRuleRequest
impl<'de> Deserialize<'de> for CreateProtectionRuleRequest
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 CreateProtectionRuleRequest
Auto Trait Implementations§
impl Forget for CreateProtectionRuleRequest
impl Freeze for CreateProtectionRuleRequestwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<ProtectionRuleKind>: Freeze,
PhantomData<String>: Freeze,
PhantomData<(String, String)>: Freeze,
impl Move for CreateProtectionRuleRequest
impl RefUnwindSafe for CreateProtectionRuleRequest
impl Send for CreateProtectionRuleRequest
impl Sync for CreateProtectionRuleRequest
impl Unpin for CreateProtectionRuleRequest
impl UnsafeUnpin for CreateProtectionRuleRequestwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<ProtectionRuleKind>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for CreateProtectionRuleRequest
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