Skip to main content

aws_sdk_mgn/types/
_source_server.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct SourceServer {
6    /// <p>Source server ID.</p>
7    pub source_server_id: ::std::option::Option<::std::string::String>,
8    /// <p>Source server ARN.</p>
9    pub arn: ::std::option::Option<::std::string::String>,
10    /// <p>Source server archived status.</p>
11    pub is_archived: ::std::option::Option<bool>,
12    /// <p>Source server Tags.</p>
13    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
14    /// <p>Source server launched instance.</p>
15    pub launched_instance: ::std::option::Option<crate::types::LaunchedInstance>,
16    /// <p>Source server data replication info.</p>
17    pub data_replication_info: ::std::option::Option<crate::types::DataReplicationInfo>,
18    /// <p>Source server lifecycle state.</p>
19    pub life_cycle: ::std::option::Option<crate::types::LifeCycle>,
20    /// <p>Source server properties.</p>
21    pub source_properties: ::std::option::Option<crate::types::SourceProperties>,
22    /// <p>Source server replication type.</p>
23    pub replication_type: ::std::option::Option<crate::types::ReplicationType>,
24    /// <p>Source server vCenter client id.</p>
25    pub vcenter_client_id: ::std::option::Option<::std::string::String>,
26    /// <p>Source server application ID.</p>
27    pub application_id: ::std::option::Option<::std::string::String>,
28    /// <p>Source server user provided ID.</p>
29    pub user_provided_id: ::std::option::Option<::std::string::String>,
30    /// <p>Source server fqdn for action framework.</p>
31    pub fqdn_for_action_framework: ::std::option::Option<::std::string::String>,
32    /// <p>Source Server connector action.</p>
33    pub connector_action: ::std::option::Option<crate::types::SourceServerConnectorAction>,
34}
35impl SourceServer {
36    /// <p>Source server ID.</p>
37    pub fn source_server_id(&self) -> ::std::option::Option<&str> {
38        self.source_server_id.as_deref()
39    }
40    /// <p>Source server ARN.</p>
41    pub fn arn(&self) -> ::std::option::Option<&str> {
42        self.arn.as_deref()
43    }
44    /// <p>Source server archived status.</p>
45    pub fn is_archived(&self) -> ::std::option::Option<bool> {
46        self.is_archived
47    }
48    /// <p>Source server Tags.</p>
49    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
50        self.tags.as_ref()
51    }
52    /// <p>Source server launched instance.</p>
53    pub fn launched_instance(&self) -> ::std::option::Option<&crate::types::LaunchedInstance> {
54        self.launched_instance.as_ref()
55    }
56    /// <p>Source server data replication info.</p>
57    pub fn data_replication_info(&self) -> ::std::option::Option<&crate::types::DataReplicationInfo> {
58        self.data_replication_info.as_ref()
59    }
60    /// <p>Source server lifecycle state.</p>
61    pub fn life_cycle(&self) -> ::std::option::Option<&crate::types::LifeCycle> {
62        self.life_cycle.as_ref()
63    }
64    /// <p>Source server properties.</p>
65    pub fn source_properties(&self) -> ::std::option::Option<&crate::types::SourceProperties> {
66        self.source_properties.as_ref()
67    }
68    /// <p>Source server replication type.</p>
69    pub fn replication_type(&self) -> ::std::option::Option<&crate::types::ReplicationType> {
70        self.replication_type.as_ref()
71    }
72    /// <p>Source server vCenter client id.</p>
73    pub fn vcenter_client_id(&self) -> ::std::option::Option<&str> {
74        self.vcenter_client_id.as_deref()
75    }
76    /// <p>Source server application ID.</p>
77    pub fn application_id(&self) -> ::std::option::Option<&str> {
78        self.application_id.as_deref()
79    }
80    /// <p>Source server user provided ID.</p>
81    pub fn user_provided_id(&self) -> ::std::option::Option<&str> {
82        self.user_provided_id.as_deref()
83    }
84    /// <p>Source server fqdn for action framework.</p>
85    pub fn fqdn_for_action_framework(&self) -> ::std::option::Option<&str> {
86        self.fqdn_for_action_framework.as_deref()
87    }
88    /// <p>Source Server connector action.</p>
89    pub fn connector_action(&self) -> ::std::option::Option<&crate::types::SourceServerConnectorAction> {
90        self.connector_action.as_ref()
91    }
92}
93impl ::std::fmt::Debug for SourceServer {
94    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
95        let mut formatter = f.debug_struct("SourceServer");
96        formatter.field("source_server_id", &self.source_server_id);
97        formatter.field("arn", &self.arn);
98        formatter.field("is_archived", &self.is_archived);
99        formatter.field("tags", &"*** Sensitive Data Redacted ***");
100        formatter.field("launched_instance", &self.launched_instance);
101        formatter.field("data_replication_info", &self.data_replication_info);
102        formatter.field("life_cycle", &self.life_cycle);
103        formatter.field("source_properties", &self.source_properties);
104        formatter.field("replication_type", &self.replication_type);
105        formatter.field("vcenter_client_id", &self.vcenter_client_id);
106        formatter.field("application_id", &self.application_id);
107        formatter.field("user_provided_id", &self.user_provided_id);
108        formatter.field("fqdn_for_action_framework", &self.fqdn_for_action_framework);
109        formatter.field("connector_action", &self.connector_action);
110        formatter.finish()
111    }
112}
113impl SourceServer {
114    /// Creates a new builder-style object to manufacture [`SourceServer`](crate::types::SourceServer).
115    pub fn builder() -> crate::types::builders::SourceServerBuilder {
116        crate::types::builders::SourceServerBuilder::default()
117    }
118}
119
120/// A builder for [`SourceServer`](crate::types::SourceServer).
121#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
122#[non_exhaustive]
123pub struct SourceServerBuilder {
124    pub(crate) source_server_id: ::std::option::Option<::std::string::String>,
125    pub(crate) arn: ::std::option::Option<::std::string::String>,
126    pub(crate) is_archived: ::std::option::Option<bool>,
127    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
128    pub(crate) launched_instance: ::std::option::Option<crate::types::LaunchedInstance>,
129    pub(crate) data_replication_info: ::std::option::Option<crate::types::DataReplicationInfo>,
130    pub(crate) life_cycle: ::std::option::Option<crate::types::LifeCycle>,
131    pub(crate) source_properties: ::std::option::Option<crate::types::SourceProperties>,
132    pub(crate) replication_type: ::std::option::Option<crate::types::ReplicationType>,
133    pub(crate) vcenter_client_id: ::std::option::Option<::std::string::String>,
134    pub(crate) application_id: ::std::option::Option<::std::string::String>,
135    pub(crate) user_provided_id: ::std::option::Option<::std::string::String>,
136    pub(crate) fqdn_for_action_framework: ::std::option::Option<::std::string::String>,
137    pub(crate) connector_action: ::std::option::Option<crate::types::SourceServerConnectorAction>,
138}
139impl SourceServerBuilder {
140    /// <p>Source server ID.</p>
141    pub fn source_server_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.source_server_id = ::std::option::Option::Some(input.into());
143        self
144    }
145    /// <p>Source server ID.</p>
146    pub fn set_source_server_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.source_server_id = input;
148        self
149    }
150    /// <p>Source server ID.</p>
151    pub fn get_source_server_id(&self) -> &::std::option::Option<::std::string::String> {
152        &self.source_server_id
153    }
154    /// <p>Source server ARN.</p>
155    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156        self.arn = ::std::option::Option::Some(input.into());
157        self
158    }
159    /// <p>Source server ARN.</p>
160    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161        self.arn = input;
162        self
163    }
164    /// <p>Source server ARN.</p>
165    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
166        &self.arn
167    }
168    /// <p>Source server archived status.</p>
169    pub fn is_archived(mut self, input: bool) -> Self {
170        self.is_archived = ::std::option::Option::Some(input);
171        self
172    }
173    /// <p>Source server archived status.</p>
174    pub fn set_is_archived(mut self, input: ::std::option::Option<bool>) -> Self {
175        self.is_archived = input;
176        self
177    }
178    /// <p>Source server archived status.</p>
179    pub fn get_is_archived(&self) -> &::std::option::Option<bool> {
180        &self.is_archived
181    }
182    /// Adds a key-value pair to `tags`.
183    ///
184    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
185    ///
186    /// <p>Source server Tags.</p>
187    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
188        let mut hash_map = self.tags.unwrap_or_default();
189        hash_map.insert(k.into(), v.into());
190        self.tags = ::std::option::Option::Some(hash_map);
191        self
192    }
193    /// <p>Source server Tags.</p>
194    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
195        self.tags = input;
196        self
197    }
198    /// <p>Source server Tags.</p>
199    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
200        &self.tags
201    }
202    /// <p>Source server launched instance.</p>
203    pub fn launched_instance(mut self, input: crate::types::LaunchedInstance) -> Self {
204        self.launched_instance = ::std::option::Option::Some(input);
205        self
206    }
207    /// <p>Source server launched instance.</p>
208    pub fn set_launched_instance(mut self, input: ::std::option::Option<crate::types::LaunchedInstance>) -> Self {
209        self.launched_instance = input;
210        self
211    }
212    /// <p>Source server launched instance.</p>
213    pub fn get_launched_instance(&self) -> &::std::option::Option<crate::types::LaunchedInstance> {
214        &self.launched_instance
215    }
216    /// <p>Source server data replication info.</p>
217    pub fn data_replication_info(mut self, input: crate::types::DataReplicationInfo) -> Self {
218        self.data_replication_info = ::std::option::Option::Some(input);
219        self
220    }
221    /// <p>Source server data replication info.</p>
222    pub fn set_data_replication_info(mut self, input: ::std::option::Option<crate::types::DataReplicationInfo>) -> Self {
223        self.data_replication_info = input;
224        self
225    }
226    /// <p>Source server data replication info.</p>
227    pub fn get_data_replication_info(&self) -> &::std::option::Option<crate::types::DataReplicationInfo> {
228        &self.data_replication_info
229    }
230    /// <p>Source server lifecycle state.</p>
231    pub fn life_cycle(mut self, input: crate::types::LifeCycle) -> Self {
232        self.life_cycle = ::std::option::Option::Some(input);
233        self
234    }
235    /// <p>Source server lifecycle state.</p>
236    pub fn set_life_cycle(mut self, input: ::std::option::Option<crate::types::LifeCycle>) -> Self {
237        self.life_cycle = input;
238        self
239    }
240    /// <p>Source server lifecycle state.</p>
241    pub fn get_life_cycle(&self) -> &::std::option::Option<crate::types::LifeCycle> {
242        &self.life_cycle
243    }
244    /// <p>Source server properties.</p>
245    pub fn source_properties(mut self, input: crate::types::SourceProperties) -> Self {
246        self.source_properties = ::std::option::Option::Some(input);
247        self
248    }
249    /// <p>Source server properties.</p>
250    pub fn set_source_properties(mut self, input: ::std::option::Option<crate::types::SourceProperties>) -> Self {
251        self.source_properties = input;
252        self
253    }
254    /// <p>Source server properties.</p>
255    pub fn get_source_properties(&self) -> &::std::option::Option<crate::types::SourceProperties> {
256        &self.source_properties
257    }
258    /// <p>Source server replication type.</p>
259    pub fn replication_type(mut self, input: crate::types::ReplicationType) -> Self {
260        self.replication_type = ::std::option::Option::Some(input);
261        self
262    }
263    /// <p>Source server replication type.</p>
264    pub fn set_replication_type(mut self, input: ::std::option::Option<crate::types::ReplicationType>) -> Self {
265        self.replication_type = input;
266        self
267    }
268    /// <p>Source server replication type.</p>
269    pub fn get_replication_type(&self) -> &::std::option::Option<crate::types::ReplicationType> {
270        &self.replication_type
271    }
272    /// <p>Source server vCenter client id.</p>
273    pub fn vcenter_client_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
274        self.vcenter_client_id = ::std::option::Option::Some(input.into());
275        self
276    }
277    /// <p>Source server vCenter client id.</p>
278    pub fn set_vcenter_client_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
279        self.vcenter_client_id = input;
280        self
281    }
282    /// <p>Source server vCenter client id.</p>
283    pub fn get_vcenter_client_id(&self) -> &::std::option::Option<::std::string::String> {
284        &self.vcenter_client_id
285    }
286    /// <p>Source server application ID.</p>
287    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
288        self.application_id = ::std::option::Option::Some(input.into());
289        self
290    }
291    /// <p>Source server application ID.</p>
292    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
293        self.application_id = input;
294        self
295    }
296    /// <p>Source server application ID.</p>
297    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
298        &self.application_id
299    }
300    /// <p>Source server user provided ID.</p>
301    pub fn user_provided_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
302        self.user_provided_id = ::std::option::Option::Some(input.into());
303        self
304    }
305    /// <p>Source server user provided ID.</p>
306    pub fn set_user_provided_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
307        self.user_provided_id = input;
308        self
309    }
310    /// <p>Source server user provided ID.</p>
311    pub fn get_user_provided_id(&self) -> &::std::option::Option<::std::string::String> {
312        &self.user_provided_id
313    }
314    /// <p>Source server fqdn for action framework.</p>
315    pub fn fqdn_for_action_framework(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
316        self.fqdn_for_action_framework = ::std::option::Option::Some(input.into());
317        self
318    }
319    /// <p>Source server fqdn for action framework.</p>
320    pub fn set_fqdn_for_action_framework(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
321        self.fqdn_for_action_framework = input;
322        self
323    }
324    /// <p>Source server fqdn for action framework.</p>
325    pub fn get_fqdn_for_action_framework(&self) -> &::std::option::Option<::std::string::String> {
326        &self.fqdn_for_action_framework
327    }
328    /// <p>Source Server connector action.</p>
329    pub fn connector_action(mut self, input: crate::types::SourceServerConnectorAction) -> Self {
330        self.connector_action = ::std::option::Option::Some(input);
331        self
332    }
333    /// <p>Source Server connector action.</p>
334    pub fn set_connector_action(mut self, input: ::std::option::Option<crate::types::SourceServerConnectorAction>) -> Self {
335        self.connector_action = input;
336        self
337    }
338    /// <p>Source Server connector action.</p>
339    pub fn get_connector_action(&self) -> &::std::option::Option<crate::types::SourceServerConnectorAction> {
340        &self.connector_action
341    }
342    /// Consumes the builder and constructs a [`SourceServer`](crate::types::SourceServer).
343    pub fn build(self) -> crate::types::SourceServer {
344        crate::types::SourceServer {
345            source_server_id: self.source_server_id,
346            arn: self.arn,
347            is_archived: self.is_archived,
348            tags: self.tags,
349            launched_instance: self.launched_instance,
350            data_replication_info: self.data_replication_info,
351            life_cycle: self.life_cycle,
352            source_properties: self.source_properties,
353            replication_type: self.replication_type,
354            vcenter_client_id: self.vcenter_client_id,
355            application_id: self.application_id,
356            user_provided_id: self.user_provided_id,
357            fqdn_for_action_framework: self.fqdn_for_action_framework,
358            connector_action: self.connector_action,
359        }
360    }
361}
362impl ::std::fmt::Debug for SourceServerBuilder {
363    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
364        let mut formatter = f.debug_struct("SourceServerBuilder");
365        formatter.field("source_server_id", &self.source_server_id);
366        formatter.field("arn", &self.arn);
367        formatter.field("is_archived", &self.is_archived);
368        formatter.field("tags", &"*** Sensitive Data Redacted ***");
369        formatter.field("launched_instance", &self.launched_instance);
370        formatter.field("data_replication_info", &self.data_replication_info);
371        formatter.field("life_cycle", &self.life_cycle);
372        formatter.field("source_properties", &self.source_properties);
373        formatter.field("replication_type", &self.replication_type);
374        formatter.field("vcenter_client_id", &self.vcenter_client_id);
375        formatter.field("application_id", &self.application_id);
376        formatter.field("user_provided_id", &self.user_provided_id);
377        formatter.field("fqdn_for_action_framework", &self.fqdn_for_action_framework);
378        formatter.field("connector_action", &self.connector_action);
379        formatter.finish()
380    }
381}