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
use serde::{Deserialize, Serialize};
#[allow(unused_imports)]
use super::*;
/// Provides the information used to update the mirror configuration for a management station.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct UpdateMirrorConfigurationDetails {
/// Path to the data volume on the management station where software source mirrors are stored.
pub directory: String,
/// Default mirror listening port for http.
pub port: String,
/// Default mirror listening port for https.
pub sslport: String,
/// Path to the SSL cerfificate.
#[serde(skip_serializing_if = "Option::is_none")]
pub sslcert: Option<String>,
/// When enabled, the SSL certificate is verified whenever an instance installs or updates a package from a software source that is mirrored on the management station.
#[serde(skip_serializing_if = "Option::is_none")]
pub is_sslverify_enabled: Option<bool>,
}
/// Required fields for UpdateMirrorConfigurationDetails
pub struct UpdateMirrorConfigurationDetailsRequired {
/// Path to the data volume on the management station where software source mirrors are stored.
pub directory: String,
/// Default mirror listening port for http.
pub port: String,
/// Default mirror listening port for https.
pub sslport: String,
}
impl UpdateMirrorConfigurationDetails {
/// Create a new UpdateMirrorConfigurationDetails with required fields
pub fn new(required: UpdateMirrorConfigurationDetailsRequired) -> Self {
Self {
directory: required.directory,
port: required.port,
sslport: required.sslport,
sslcert: None,
is_sslverify_enabled: None,
}
}
/// Set directory
pub fn set_directory(mut self, value: String) -> Self {
self.directory = value;
self
}
/// Set port
pub fn set_port(mut self, value: String) -> Self {
self.port = value;
self
}
/// Set sslport
pub fn set_sslport(mut self, value: String) -> Self {
self.sslport = value;
self
}
/// Set sslcert
pub fn set_sslcert(mut self, value: Option<String>) -> Self {
self.sslcert = value;
self
}
/// Set is_sslverify_enabled
pub fn set_is_sslverify_enabled(mut self, value: Option<bool>) -> Self {
self.is_sslverify_enabled = value;
self
}
/// Set sslcert (unwraps Option)
pub fn with_sslcert(mut self, value: impl Into<String>) -> Self {
self.sslcert = Some(value.into());
self
}
/// Set is_sslverify_enabled (unwraps Option)
pub fn with_is_sslverify_enabled(mut self, value: bool) -> Self {
self.is_sslverify_enabled = Some(value);
self
}
}