windmill_api/models/
update_protection_rule_request.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UpdateProtectionRuleRequest {
16 #[serde(rename = "rules")]
18 pub rules: Vec<models::ProtectionRuleKind>,
19 #[serde(rename = "bypass_groups")]
21 pub bypass_groups: Vec<String>,
22 #[serde(rename = "bypass_users")]
24 pub bypass_users: Vec<String>,
25}
26
27impl UpdateProtectionRuleRequest {
28 pub fn new(rules: Vec<models::ProtectionRuleKind>, bypass_groups: Vec<String>, bypass_users: Vec<String>) -> UpdateProtectionRuleRequest {
29 UpdateProtectionRuleRequest {
30 rules,
31 bypass_groups,
32 bypass_users,
33 }
34 }
35}
36