Skip to main content

clientapi_pbs/models/
config_notifications_create_matchers_request.rs

1/*
2 * Proxmox Backup Server API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ConfigNotificationsCreateMatchersRequest {
16
17    /// Comment.
18    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
19    pub comment: Option<String>,
20
21    /// Disable this matcher.
22    #[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
23    pub disable: Option<bool>,
24
25    /// Invert match of the whole filter.
26    #[serde(rename = "invert-match", skip_serializing_if = "Option::is_none")]
27    pub invert_match: Option<bool>,
28
29    /// List of matched severity levels.
30    #[serde(rename = "match-calendar", skip_serializing_if = "Option::is_none")]
31    pub match_calendar: Option<Vec<String>>,
32
33    /// List of matched metadata fields.
34    #[serde(rename = "match-field", skip_serializing_if = "Option::is_none")]
35    pub match_field: Option<Vec<String>>,
36
37    /// List of matched severity levels.
38    #[serde(rename = "match-severity", skip_serializing_if = "Option::is_none")]
39    pub match_severity: Option<Vec<String>>,
40
41    /// The mode in which the results of matches are combined.
42    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
43    pub mode: Option<models::PbsModeModeEnum>,
44
45    /// Name schema for targets and matchers
46    #[serde(rename = "name")]
47    pub name: String,
48
49    /// The origin of a notification configuration entry.
50    #[serde(rename = "origin", skip_serializing_if = "Option::is_none")]
51    pub origin: Option<models::PbsOriginEnum>,
52
53    /// Targets to notify.
54    #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
55    pub target: Option<Vec<String>>,
56
57
58}
59
60impl ConfigNotificationsCreateMatchersRequest {
61    pub fn new(name: String) -> ConfigNotificationsCreateMatchersRequest {
62        ConfigNotificationsCreateMatchersRequest {
63            
64            comment: None,
65            
66            disable: None,
67            
68            invert_match: None,
69            
70            match_calendar: None,
71            
72            match_field: None,
73            
74            match_severity: None,
75            
76            mode: None,
77            
78            name,
79            
80            origin: None,
81            
82            target: None,
83            
84        }
85    }
86}
87
88