Skip to main content

clientapi_pbs/models/
config_notifications_update_smtp_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 ConfigNotificationsUpdateSmtpRequest {
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    /// List of properties to delete.
26    #[serde(rename = "delete", skip_serializing_if = "Option::is_none")]
27    pub delete: Option<Vec<models::PbsConfigNotificationsInlineEnum3>>,
28
29    /// Prevent changes if current configuration file has different SHA256 digest. This can be used to prevent concurrent modifications.
30    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
31    pub digest: Option<String>,
32
33    /// Disable this target.
34    #[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
35    pub disable: Option<bool>,
36
37    /// `From` address for the mail. SMTP relays might require that this address is owned by the user in order to avoid spoofing. The `From` header in the email will be set to `$author <$from-address>`.
38    #[serde(rename = "from-address", skip_serializing_if = "Option::is_none")]
39    pub from_address: Option<String>,
40
41    /// Mail address to send a mail to.
42    #[serde(rename = "mailto", skip_serializing_if = "Option::is_none")]
43    pub mailto: Option<Vec<String>>,
44
45    /// Users to send a mail to. The email address of the user will be looked up in users.cfg.
46    #[serde(rename = "mailto-user", skip_serializing_if = "Option::is_none")]
47    pub mailto_user: Option<Vec<String>>,
48
49    /// Connection security
50    #[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
51    pub mode: Option<models::PbsConfigNotificationsModeEnum>,
52
53    /// SMTP authentication password
54    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
55    pub password: Option<String>,
56
57    /// The port to connect to. If not set, the used port defaults to 25 (insecure), 465 (tls) or 587 (starttls), depending on the value of mode
58    #[serde(rename = "port", skip_serializing_if = "Option::is_none")]
59    pub port: Option<i32>,
60
61    /// Host name or IP of the SMTP relay.
62    #[serde(rename = "server", skip_serializing_if = "Option::is_none")]
63    pub server: Option<String>,
64
65    /// Username to use during authentication. If no username is set, no authentication will be performed. The PLAIN and LOGIN authentication methods are supported
66    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
67    pub username: Option<String>,
68
69
70}
71
72impl ConfigNotificationsUpdateSmtpRequest {
73    pub fn new() -> ConfigNotificationsUpdateSmtpRequest {
74        ConfigNotificationsUpdateSmtpRequest {
75            
76            author: None,
77            
78            comment: None,
79            
80            delete: None,
81            
82            digest: None,
83            
84            disable: None,
85            
86            from_address: None,
87            
88            mailto: None,
89            
90            mailto_user: None,
91            
92            mode: None,
93            
94            password: None,
95            
96            port: None,
97            
98            server: None,
99            
100            username: None,
101            
102        }
103    }
104}
105
106