1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
* Proxmox Virtual Environment API
*
* Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
*
* The version of the OpenAPI document: 9.x
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClusterNotificationsGetSmtpEndpointResponseData {
/// Author of the mail. Defaults to 'Proxmox VE'.
#[serde(rename = "author", skip_serializing_if = "Option::is_none")]
pub author: Option<String>,
/// Comment
#[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
pub comment: Option<String>,
/// Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
#[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
pub digest: Option<String>,
/// Disable this target
#[serde(rename = "disable", skip_serializing_if = "Option::is_none")]
pub disable: Option<models::PveBoolean>,
/// `From` address for the mail
#[serde(rename = "from-address")]
pub from_address: String,
/// List of email recipients
#[serde(rename = "mailto", skip_serializing_if = "Option::is_none")]
pub mailto: Option<Vec<String>>,
/// List of users
#[serde(rename = "mailto-user", skip_serializing_if = "Option::is_none")]
pub mailto_user: Option<Vec<String>>,
/// Determine which encryption method shall be used for the connection.
#[serde(rename = "mode", skip_serializing_if = "Option::is_none")]
pub mode: Option<models::PveClusterNotificationsModeEnum>,
/// The name of the endpoint.
#[serde(rename = "name")]
pub name: String,
/// The port to be used. Defaults to 465 for TLS based connections, 587 for STARTTLS based connections and port 25 for insecure plain-text connections.
#[serde(rename = "port", skip_serializing_if = "Option::is_none")]
pub port: Option<i64>,
/// The address of the SMTP server.
#[serde(rename = "server")]
pub server: String,
/// Username for SMTP authentication
#[serde(rename = "username", skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
impl ClusterNotificationsGetSmtpEndpointResponseData {
pub fn new(from_address: String, name: String, server: String) -> ClusterNotificationsGetSmtpEndpointResponseData {
ClusterNotificationsGetSmtpEndpointResponseData {
author: None,
comment: None,
digest: None,
disable: None,
from_address,
mailto: None,
mailto_user: None,
mode: None,
name,
port: None,
server,
username: None,
}
}
}