Skip to main content

clientapi_pve/models/
cluster_notifications_get_matcher_response_data.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-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 ClusterNotificationsGetMatcherResponseData {
16
17    /// Comment
18    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
19    pub comment: Option<String>,
20
21    /// Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
22    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
23    pub digest: Option<String>,
24
25    /// Disable this matcher
26    #[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
27    pub disable: Option<models::PveBoolean>,
28
29    /// Invert match of the whole matcher
30    #[serde(rename = "invert-match", skip_serializing_if = "Option::is_none")]
31    pub invert_match: Option<models::PveBoolean>,
32
33    /// Match notification timestamp
34    #[serde(rename = "match-calendar", skip_serializing_if = "Option::is_none")]
35    pub match_calendar: Option<Vec<String>>,
36
37    /// Metadata fields to match (regex or exact match). Must be in the form (regex|exact):<field>=<value>
38    #[serde(rename = "match-field", skip_serializing_if = "Option::is_none")]
39    pub match_field: Option<Vec<String>>,
40
41    /// Notification severities to match
42    #[serde(rename = "match-severity", skip_serializing_if = "Option::is_none")]
43    pub match_severity: Option<Vec<String>>,
44
45    /// Choose between 'all' and 'any' for when multiple properties are specified
46    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
47    pub mode: Option<models::PveModeModeEnum>,
48
49    /// Name of the matcher.
50    #[serde(rename = "name")]
51    pub name: String,
52
53    /// Targets to notify on match
54    #[serde(rename = "target", skip_serializing_if = "Option::is_none")]
55    pub target: Option<Vec<String>>,
56
57
58}
59
60impl ClusterNotificationsGetMatcherResponseData {
61    pub fn new(name: String) -> ClusterNotificationsGetMatcherResponseData {
62        ClusterNotificationsGetMatcherResponseData {
63            
64            comment: None,
65            
66            digest: None,
67            
68            disable: None,
69            
70            invert_match: None,
71            
72            match_calendar: None,
73            
74            match_field: None,
75            
76            match_severity: None,
77            
78            mode: None,
79            
80            name,
81            
82            target: None,
83            
84        }
85    }
86}
87
88