/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.2.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookFilters {
    #[serde(rename = "user_or_folder_regex")]
    pub user_or_folder_regex: UserOrFolderRegex,
    #[serde(rename = "user_or_folder_regex_value")]
    pub user_or_folder_regex_value: String,
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "runnable_kind")]
    pub runnable_kind: models::RunnableKind,
}

impl WebhookFilters {
    pub fn new(user_or_folder_regex: UserOrFolderRegex, user_or_folder_regex_value: String, path: String, runnable_kind: models::RunnableKind) -> WebhookFilters {
        WebhookFilters {
            user_or_folder_regex,
            user_or_folder_regex_value,
            path,
            runnable_kind,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum UserOrFolderRegex {
    #[serde(rename = "*")]
    Star,
    #[serde(rename = "u")]
    U,
    #[serde(rename = "f")]
    F,
}

impl Default for UserOrFolderRegex {
    fn default() -> UserOrFolderRegex {
        Self::Star
    }
}

