windmill-api 1.683.2

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.683.2
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateProtectionRuleRequest {
    /// Configuration of protection restrictions
    #[serde(rename = "rules")]
    pub rules: Vec<models::ProtectionRuleKind>,
    /// Groups that can bypass this ruleset
    #[serde(rename = "bypass_groups")]
    pub bypass_groups: Vec<String>,
    /// Users that can bypass this ruleset
    #[serde(rename = "bypass_users")]
    pub bypass_users: Vec<String>,
}

impl UpdateProtectionRuleRequest {
    pub fn new(rules: Vec<models::ProtectionRuleKind>, bypass_groups: Vec<String>, bypass_users: Vec<String>) -> UpdateProtectionRuleRequest {
        UpdateProtectionRuleRequest {
            rules,
            bypass_groups,
            bypass_users,
        }
    }
}