Skip to main content

clientapi_pbs/models/
config_notifications_create_sendmail_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 ConfigNotificationsCreateSendmailRequest {
16
17    /// Author of the mail. Defaults to 'Proxmox Backup Server ($hostname)'
18    #[serde(rename = "author", skip_serializing_if = "Option::is_none")]
19    pub author: Option<String>,
20
21    /// Comment.
22    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
23    pub comment: Option<String>,
24
25    /// Disable this target.
26    #[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
27    pub disable: Option<bool>,
28
29    /// Deprecated.
30    #[serde(rename = "filter", skip_serializing_if = "Option::is_none")]
31    pub filter: Option<String>,
32
33    /// `From` address for sent E-Mails. If the parameter is not set, the plugin will fall back to the email-from setting from node.cfg (PBS). If that is also not set, the plugin will default to root@$hostname, where $hostname is the hostname of the node.
34    #[serde(rename = "from-address", skip_serializing_if = "Option::is_none")]
35    pub from_address: Option<String>,
36
37    /// Mail address to send a mail to.
38    #[serde(rename = "mailto", skip_serializing_if = "Option::is_none")]
39    pub mailto: Option<Vec<String>>,
40
41    /// Users to send a mail to. The email address of the user will be looked up in users.cfg.
42    #[serde(rename = "mailto-user", skip_serializing_if = "Option::is_none")]
43    pub mailto_user: Option<Vec<String>>,
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
54}
55
56impl ConfigNotificationsCreateSendmailRequest {
57    pub fn new(name: String) -> ConfigNotificationsCreateSendmailRequest {
58        ConfigNotificationsCreateSendmailRequest {
59            
60            author: None,
61            
62            comment: None,
63            
64            disable: None,
65            
66            filter: None,
67            
68            from_address: None,
69            
70            mailto: None,
71            
72            mailto_user: None,
73            
74            name,
75            
76            origin: None,
77            
78        }
79    }
80}
81
82