aws_sdk_sms/types/
_replication_run.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents a replication run.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ReplicationRun {
7    /// <p>The ID of the replication run.</p>
8    pub replication_run_id: ::std::option::Option<::std::string::String>,
9    /// <p>The state of the replication run.</p>
10    pub state: ::std::option::Option<crate::types::ReplicationRunState>,
11    /// <p>The type of replication run.</p>
12    pub r#type: ::std::option::Option<crate::types::ReplicationRunType>,
13    /// <p>Details about the current stage of the replication run.</p>
14    pub stage_details: ::std::option::Option<crate::types::ReplicationRunStageDetails>,
15    /// <p>The description of the current status of the replication job.</p>
16    pub status_message: ::std::option::Option<::std::string::String>,
17    /// <p>The ID of the Amazon Machine Image (AMI) from the replication run.</p>
18    pub ami_id: ::std::option::Option<::std::string::String>,
19    /// <p>The start time of the next replication run.</p>
20    pub scheduled_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
21    /// <p>The completion time of the last replication run.</p>
22    pub completed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
23    /// <p>The description of the replication run.</p>
24    pub description: ::std::option::Option<::std::string::String>,
25    /// <p>Indicates whether the replication run should produce an encrypted AMI.</p>
26    pub encrypted: ::std::option::Option<bool>,
27    /// <p>The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:</p>
28    /// <ul>
29    /// <li>
30    /// <p>KMS key ID</p></li>
31    /// <li>
32    /// <p>KMS key alias</p></li>
33    /// <li>
34    /// <p>ARN referring to the KMS key ID</p></li>
35    /// <li>
36    /// <p>ARN referring to the KMS key alias</p></li>
37    /// </ul>
38    /// <p>If encrypted is <i>true</i> but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.</p>
39    pub kms_key_id: ::std::option::Option<::std::string::String>,
40}
41impl ReplicationRun {
42    /// <p>The ID of the replication run.</p>
43    pub fn replication_run_id(&self) -> ::std::option::Option<&str> {
44        self.replication_run_id.as_deref()
45    }
46    /// <p>The state of the replication run.</p>
47    pub fn state(&self) -> ::std::option::Option<&crate::types::ReplicationRunState> {
48        self.state.as_ref()
49    }
50    /// <p>The type of replication run.</p>
51    pub fn r#type(&self) -> ::std::option::Option<&crate::types::ReplicationRunType> {
52        self.r#type.as_ref()
53    }
54    /// <p>Details about the current stage of the replication run.</p>
55    pub fn stage_details(&self) -> ::std::option::Option<&crate::types::ReplicationRunStageDetails> {
56        self.stage_details.as_ref()
57    }
58    /// <p>The description of the current status of the replication job.</p>
59    pub fn status_message(&self) -> ::std::option::Option<&str> {
60        self.status_message.as_deref()
61    }
62    /// <p>The ID of the Amazon Machine Image (AMI) from the replication run.</p>
63    pub fn ami_id(&self) -> ::std::option::Option<&str> {
64        self.ami_id.as_deref()
65    }
66    /// <p>The start time of the next replication run.</p>
67    pub fn scheduled_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
68        self.scheduled_start_time.as_ref()
69    }
70    /// <p>The completion time of the last replication run.</p>
71    pub fn completed_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
72        self.completed_time.as_ref()
73    }
74    /// <p>The description of the replication run.</p>
75    pub fn description(&self) -> ::std::option::Option<&str> {
76        self.description.as_deref()
77    }
78    /// <p>Indicates whether the replication run should produce an encrypted AMI.</p>
79    pub fn encrypted(&self) -> ::std::option::Option<bool> {
80        self.encrypted
81    }
82    /// <p>The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:</p>
83    /// <ul>
84    /// <li>
85    /// <p>KMS key ID</p></li>
86    /// <li>
87    /// <p>KMS key alias</p></li>
88    /// <li>
89    /// <p>ARN referring to the KMS key ID</p></li>
90    /// <li>
91    /// <p>ARN referring to the KMS key alias</p></li>
92    /// </ul>
93    /// <p>If encrypted is <i>true</i> but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.</p>
94    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
95        self.kms_key_id.as_deref()
96    }
97}
98impl ReplicationRun {
99    /// Creates a new builder-style object to manufacture [`ReplicationRun`](crate::types::ReplicationRun).
100    pub fn builder() -> crate::types::builders::ReplicationRunBuilder {
101        crate::types::builders::ReplicationRunBuilder::default()
102    }
103}
104
105/// A builder for [`ReplicationRun`](crate::types::ReplicationRun).
106#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
107#[non_exhaustive]
108pub struct ReplicationRunBuilder {
109    pub(crate) replication_run_id: ::std::option::Option<::std::string::String>,
110    pub(crate) state: ::std::option::Option<crate::types::ReplicationRunState>,
111    pub(crate) r#type: ::std::option::Option<crate::types::ReplicationRunType>,
112    pub(crate) stage_details: ::std::option::Option<crate::types::ReplicationRunStageDetails>,
113    pub(crate) status_message: ::std::option::Option<::std::string::String>,
114    pub(crate) ami_id: ::std::option::Option<::std::string::String>,
115    pub(crate) scheduled_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
116    pub(crate) completed_time: ::std::option::Option<::aws_smithy_types::DateTime>,
117    pub(crate) description: ::std::option::Option<::std::string::String>,
118    pub(crate) encrypted: ::std::option::Option<bool>,
119    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
120}
121impl ReplicationRunBuilder {
122    /// <p>The ID of the replication run.</p>
123    pub fn replication_run_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.replication_run_id = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>The ID of the replication run.</p>
128    pub fn set_replication_run_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.replication_run_id = input;
130        self
131    }
132    /// <p>The ID of the replication run.</p>
133    pub fn get_replication_run_id(&self) -> &::std::option::Option<::std::string::String> {
134        &self.replication_run_id
135    }
136    /// <p>The state of the replication run.</p>
137    pub fn state(mut self, input: crate::types::ReplicationRunState) -> Self {
138        self.state = ::std::option::Option::Some(input);
139        self
140    }
141    /// <p>The state of the replication run.</p>
142    pub fn set_state(mut self, input: ::std::option::Option<crate::types::ReplicationRunState>) -> Self {
143        self.state = input;
144        self
145    }
146    /// <p>The state of the replication run.</p>
147    pub fn get_state(&self) -> &::std::option::Option<crate::types::ReplicationRunState> {
148        &self.state
149    }
150    /// <p>The type of replication run.</p>
151    pub fn r#type(mut self, input: crate::types::ReplicationRunType) -> Self {
152        self.r#type = ::std::option::Option::Some(input);
153        self
154    }
155    /// <p>The type of replication run.</p>
156    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ReplicationRunType>) -> Self {
157        self.r#type = input;
158        self
159    }
160    /// <p>The type of replication run.</p>
161    pub fn get_type(&self) -> &::std::option::Option<crate::types::ReplicationRunType> {
162        &self.r#type
163    }
164    /// <p>Details about the current stage of the replication run.</p>
165    pub fn stage_details(mut self, input: crate::types::ReplicationRunStageDetails) -> Self {
166        self.stage_details = ::std::option::Option::Some(input);
167        self
168    }
169    /// <p>Details about the current stage of the replication run.</p>
170    pub fn set_stage_details(mut self, input: ::std::option::Option<crate::types::ReplicationRunStageDetails>) -> Self {
171        self.stage_details = input;
172        self
173    }
174    /// <p>Details about the current stage of the replication run.</p>
175    pub fn get_stage_details(&self) -> &::std::option::Option<crate::types::ReplicationRunStageDetails> {
176        &self.stage_details
177    }
178    /// <p>The description of the current status of the replication job.</p>
179    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180        self.status_message = ::std::option::Option::Some(input.into());
181        self
182    }
183    /// <p>The description of the current status of the replication job.</p>
184    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185        self.status_message = input;
186        self
187    }
188    /// <p>The description of the current status of the replication job.</p>
189    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
190        &self.status_message
191    }
192    /// <p>The ID of the Amazon Machine Image (AMI) from the replication run.</p>
193    pub fn ami_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
194        self.ami_id = ::std::option::Option::Some(input.into());
195        self
196    }
197    /// <p>The ID of the Amazon Machine Image (AMI) from the replication run.</p>
198    pub fn set_ami_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
199        self.ami_id = input;
200        self
201    }
202    /// <p>The ID of the Amazon Machine Image (AMI) from the replication run.</p>
203    pub fn get_ami_id(&self) -> &::std::option::Option<::std::string::String> {
204        &self.ami_id
205    }
206    /// <p>The start time of the next replication run.</p>
207    pub fn scheduled_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
208        self.scheduled_start_time = ::std::option::Option::Some(input);
209        self
210    }
211    /// <p>The start time of the next replication run.</p>
212    pub fn set_scheduled_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
213        self.scheduled_start_time = input;
214        self
215    }
216    /// <p>The start time of the next replication run.</p>
217    pub fn get_scheduled_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
218        &self.scheduled_start_time
219    }
220    /// <p>The completion time of the last replication run.</p>
221    pub fn completed_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
222        self.completed_time = ::std::option::Option::Some(input);
223        self
224    }
225    /// <p>The completion time of the last replication run.</p>
226    pub fn set_completed_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
227        self.completed_time = input;
228        self
229    }
230    /// <p>The completion time of the last replication run.</p>
231    pub fn get_completed_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
232        &self.completed_time
233    }
234    /// <p>The description of the replication run.</p>
235    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
236        self.description = ::std::option::Option::Some(input.into());
237        self
238    }
239    /// <p>The description of the replication run.</p>
240    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
241        self.description = input;
242        self
243    }
244    /// <p>The description of the replication run.</p>
245    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
246        &self.description
247    }
248    /// <p>Indicates whether the replication run should produce an encrypted AMI.</p>
249    pub fn encrypted(mut self, input: bool) -> Self {
250        self.encrypted = ::std::option::Option::Some(input);
251        self
252    }
253    /// <p>Indicates whether the replication run should produce an encrypted AMI.</p>
254    pub fn set_encrypted(mut self, input: ::std::option::Option<bool>) -> Self {
255        self.encrypted = input;
256        self
257    }
258    /// <p>Indicates whether the replication run should produce an encrypted AMI.</p>
259    pub fn get_encrypted(&self) -> &::std::option::Option<bool> {
260        &self.encrypted
261    }
262    /// <p>The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:</p>
263    /// <ul>
264    /// <li>
265    /// <p>KMS key ID</p></li>
266    /// <li>
267    /// <p>KMS key alias</p></li>
268    /// <li>
269    /// <p>ARN referring to the KMS key ID</p></li>
270    /// <li>
271    /// <p>ARN referring to the KMS key alias</p></li>
272    /// </ul>
273    /// <p>If encrypted is <i>true</i> but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.</p>
274    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
275        self.kms_key_id = ::std::option::Option::Some(input.into());
276        self
277    }
278    /// <p>The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:</p>
279    /// <ul>
280    /// <li>
281    /// <p>KMS key ID</p></li>
282    /// <li>
283    /// <p>KMS key alias</p></li>
284    /// <li>
285    /// <p>ARN referring to the KMS key ID</p></li>
286    /// <li>
287    /// <p>ARN referring to the KMS key alias</p></li>
288    /// </ul>
289    /// <p>If encrypted is <i>true</i> but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.</p>
290    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
291        self.kms_key_id = input;
292        self
293    }
294    /// <p>The ID of the KMS key for replication jobs that produce encrypted AMIs. This value can be any of the following:</p>
295    /// <ul>
296    /// <li>
297    /// <p>KMS key ID</p></li>
298    /// <li>
299    /// <p>KMS key alias</p></li>
300    /// <li>
301    /// <p>ARN referring to the KMS key ID</p></li>
302    /// <li>
303    /// <p>ARN referring to the KMS key alias</p></li>
304    /// </ul>
305    /// <p>If encrypted is <i>true</i> but a KMS key ID is not specified, the customer's default KMS key for Amazon EBS is used.</p>
306    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
307        &self.kms_key_id
308    }
309    /// Consumes the builder and constructs a [`ReplicationRun`](crate::types::ReplicationRun).
310    pub fn build(self) -> crate::types::ReplicationRun {
311        crate::types::ReplicationRun {
312            replication_run_id: self.replication_run_id,
313            state: self.state,
314            r#type: self.r#type,
315            stage_details: self.stage_details,
316            status_message: self.status_message,
317            ami_id: self.ami_id,
318            scheduled_start_time: self.scheduled_start_time,
319            completed_time: self.completed_time,
320            description: self.description,
321            encrypted: self.encrypted,
322            kms_key_id: self.kms_key_id,
323        }
324    }
325}