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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
#[allow(unused_imports)]
use super::*;
/// Provides summary information for a management station.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ManagementStationSummary {
/// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the management station.
pub id: String,
/// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the management station.
pub compartment_id: String,
/// User-friendly name for the management station.
pub display_name: String,
/// Hostname of the management station.
pub hostname: String,
/// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance that is acting as the management station.
#[serde(skip_serializing_if = "Option::is_none")]
pub managed_instance_id: Option<String>,
/// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the registration profile used for the management station.
#[serde(skip_serializing_if = "Option::is_none")]
pub profile_id: Option<String>,
/// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the scheduled job for the mirror sync.
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_job_id: Option<String>,
/// The date and time of the next scheduled mirror sync (in [RFC 3339](https://tools.ietf.org/rfc/rfc3339) format).
#[serde(skip_serializing_if = "Option::is_none")]
pub time_next_execution: Option<DateTime<Utc>>,
/// User-specified description of the management station.
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Current state of the mirror sync for the management station.
#[serde(skip_serializing_if = "Option::is_none")]
pub overall_state: Option<OverallState>,
/// Overall health status of the managment station.
#[serde(skip_serializing_if = "Option::is_none")]
pub health_state: Option<HealthState>,
/// A decimal number representing the progress of the current mirror sync. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
#[serde(skip_serializing_if = "Option::is_none")]
pub overall_percentage: Option<i64>,
/// A decimal number representing the amount of mirror capacity used by the sync. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.
#[serde(skip_serializing_if = "Option::is_none")]
pub mirror_capacity: Option<i64>,
/// The current state of the management station.
#[serde(skip_serializing_if = "Option::is_none")]
pub lifecycle_state: Option<String>,
/// The location of the instance that is acting as the management station.
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<ManagedInstanceLocation>,
/// Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: {@code {\"Department\": \"Finance\"}}
#[serde(skip_serializing_if = "Option::is_none")]
pub freeform_tags: Option<HashMap<String, String>>,
/// Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: {@code {\"Operations\": {\"CostCenter\": \"42\"}}}
#[serde(skip_serializing_if = "Option::is_none")]
pub defined_tags: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
/// System tags for this resource. Each key is predefined and scoped to a namespace. Example: {@code {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}}
#[serde(skip_serializing_if = "Option::is_none")]
pub system_tags: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
}
/// Required fields for ManagementStationSummary
pub struct ManagementStationSummaryRequired {
/// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the management station.
pub id: String,
/// The [OCID](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment that contains the management station.
pub compartment_id: String,
/// User-friendly name for the management station.
pub display_name: String,
/// Hostname of the management station.
pub hostname: String,
}
impl ManagementStationSummary {
/// Create a new ManagementStationSummary with required fields
pub fn new(required: ManagementStationSummaryRequired) -> Self {
Self {
id: required.id,
compartment_id: required.compartment_id,
display_name: required.display_name,
hostname: required.hostname,
managed_instance_id: None,
profile_id: None,
scheduled_job_id: None,
time_next_execution: None,
description: None,
overall_state: None,
health_state: None,
overall_percentage: None,
mirror_capacity: None,
lifecycle_state: None,
location: None,
freeform_tags: None,
defined_tags: None,
system_tags: None,
}
}
/// Set id
pub fn set_id(mut self, value: String) -> Self {
self.id = value;
self
}
/// Set managed_instance_id
pub fn set_managed_instance_id(mut self, value: Option<String>) -> Self {
self.managed_instance_id = value;
self
}
/// Set compartment_id
pub fn set_compartment_id(mut self, value: String) -> Self {
self.compartment_id = value;
self
}
/// Set profile_id
pub fn set_profile_id(mut self, value: Option<String>) -> Self {
self.profile_id = value;
self
}
/// Set scheduled_job_id
pub fn set_scheduled_job_id(mut self, value: Option<String>) -> Self {
self.scheduled_job_id = value;
self
}
/// Set time_next_execution
pub fn set_time_next_execution(mut self, value: Option<DateTime<Utc>>) -> Self {
self.time_next_execution = value;
self
}
/// Set display_name
pub fn set_display_name(mut self, value: String) -> Self {
self.display_name = value;
self
}
/// Set description
pub fn set_description(mut self, value: Option<String>) -> Self {
self.description = value;
self
}
/// Set hostname
pub fn set_hostname(mut self, value: String) -> Self {
self.hostname = value;
self
}
/// Set overall_state
pub fn set_overall_state(mut self, value: Option<OverallState>) -> Self {
self.overall_state = value;
self
}
/// Set health_state
pub fn set_health_state(mut self, value: Option<HealthState>) -> Self {
self.health_state = value;
self
}
/// Set overall_percentage
pub fn set_overall_percentage(mut self, value: Option<i64>) -> Self {
self.overall_percentage = value;
self
}
/// Set mirror_capacity
pub fn set_mirror_capacity(mut self, value: Option<i64>) -> Self {
self.mirror_capacity = value;
self
}
/// Set lifecycle_state
pub fn set_lifecycle_state(mut self, value: Option<String>) -> Self {
self.lifecycle_state = value;
self
}
/// Set location
pub fn set_location(mut self, value: Option<ManagedInstanceLocation>) -> Self {
self.location = value;
self
}
/// Set freeform_tags
pub fn set_freeform_tags(mut self, value: Option<HashMap<String, String>>) -> Self {
self.freeform_tags = value;
self
}
/// Set defined_tags
pub fn set_defined_tags(
mut self,
value: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
) -> Self {
self.defined_tags = value;
self
}
/// Set system_tags
pub fn set_system_tags(
mut self,
value: Option<HashMap<String, HashMap<String, serde_json::Value>>>,
) -> Self {
self.system_tags = value;
self
}
/// Set managed_instance_id (unwraps Option)
pub fn with_managed_instance_id(mut self, value: impl Into<String>) -> Self {
self.managed_instance_id = Some(value.into());
self
}
/// Set profile_id (unwraps Option)
pub fn with_profile_id(mut self, value: impl Into<String>) -> Self {
self.profile_id = Some(value.into());
self
}
/// Set scheduled_job_id (unwraps Option)
pub fn with_scheduled_job_id(mut self, value: impl Into<String>) -> Self {
self.scheduled_job_id = Some(value.into());
self
}
/// Set time_next_execution (unwraps Option)
pub fn with_time_next_execution(mut self, value: DateTime<Utc>) -> Self {
self.time_next_execution = Some(value);
self
}
/// Set description (unwraps Option)
pub fn with_description(mut self, value: impl Into<String>) -> Self {
self.description = Some(value.into());
self
}
/// Set overall_state (unwraps Option)
pub fn with_overall_state(mut self, value: OverallState) -> Self {
self.overall_state = Some(value);
self
}
/// Set health_state (unwraps Option)
pub fn with_health_state(mut self, value: HealthState) -> Self {
self.health_state = Some(value);
self
}
/// Set overall_percentage (unwraps Option)
pub fn with_overall_percentage(mut self, value: i64) -> Self {
self.overall_percentage = Some(value);
self
}
/// Set mirror_capacity (unwraps Option)
pub fn with_mirror_capacity(mut self, value: i64) -> Self {
self.mirror_capacity = Some(value);
self
}
/// Set lifecycle_state (unwraps Option)
pub fn with_lifecycle_state(mut self, value: impl Into<String>) -> Self {
self.lifecycle_state = Some(value.into());
self
}
/// Set location (unwraps Option)
pub fn with_location(mut self, value: ManagedInstanceLocation) -> Self {
self.location = Some(value);
self
}
/// Set freeform_tags (unwraps Option)
pub fn with_freeform_tags(mut self, value: HashMap<String, String>) -> Self {
self.freeform_tags = Some(value);
self
}
/// Set defined_tags (unwraps Option)
pub fn with_defined_tags(
mut self,
value: HashMap<String, HashMap<String, serde_json::Value>>,
) -> Self {
self.defined_tags = Some(value);
self
}
/// Set system_tags (unwraps Option)
pub fn with_system_tags(
mut self,
value: HashMap<String, HashMap<String, serde_json::Value>>,
) -> Self {
self.system_tags = Some(value);
self
}
}