aws_sdk_drs/types/
_recovery_life_cycle.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>An object representing the Source Network recovery Lifecycle.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RecoveryLifeCycle {
7    /// <p>The date and time the last Source Network recovery was initiated.</p>
8    pub api_call_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
9    /// <p>The ID of the Job that was used to last recover the Source Network.</p>
10    pub job_id: ::std::option::Option<::std::string::String>,
11    /// <p>The status of the last recovery status of this Source Network.</p>
12    pub last_recovery_result: ::std::option::Option<crate::types::RecoveryResult>,
13}
14impl RecoveryLifeCycle {
15    /// <p>The date and time the last Source Network recovery was initiated.</p>
16    pub fn api_call_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
17        self.api_call_date_time.as_ref()
18    }
19    /// <p>The ID of the Job that was used to last recover the Source Network.</p>
20    pub fn job_id(&self) -> ::std::option::Option<&str> {
21        self.job_id.as_deref()
22    }
23    /// <p>The status of the last recovery status of this Source Network.</p>
24    pub fn last_recovery_result(&self) -> ::std::option::Option<&crate::types::RecoveryResult> {
25        self.last_recovery_result.as_ref()
26    }
27}
28impl RecoveryLifeCycle {
29    /// Creates a new builder-style object to manufacture [`RecoveryLifeCycle`](crate::types::RecoveryLifeCycle).
30    pub fn builder() -> crate::types::builders::RecoveryLifeCycleBuilder {
31        crate::types::builders::RecoveryLifeCycleBuilder::default()
32    }
33}
34
35/// A builder for [`RecoveryLifeCycle`](crate::types::RecoveryLifeCycle).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct RecoveryLifeCycleBuilder {
39    pub(crate) api_call_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
40    pub(crate) job_id: ::std::option::Option<::std::string::String>,
41    pub(crate) last_recovery_result: ::std::option::Option<crate::types::RecoveryResult>,
42}
43impl RecoveryLifeCycleBuilder {
44    /// <p>The date and time the last Source Network recovery was initiated.</p>
45    pub fn api_call_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
46        self.api_call_date_time = ::std::option::Option::Some(input);
47        self
48    }
49    /// <p>The date and time the last Source Network recovery was initiated.</p>
50    pub fn set_api_call_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
51        self.api_call_date_time = input;
52        self
53    }
54    /// <p>The date and time the last Source Network recovery was initiated.</p>
55    pub fn get_api_call_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
56        &self.api_call_date_time
57    }
58    /// <p>The ID of the Job that was used to last recover the Source Network.</p>
59    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.job_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The ID of the Job that was used to last recover the Source Network.</p>
64    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.job_id = input;
66        self
67    }
68    /// <p>The ID of the Job that was used to last recover the Source Network.</p>
69    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.job_id
71    }
72    /// <p>The status of the last recovery status of this Source Network.</p>
73    pub fn last_recovery_result(mut self, input: crate::types::RecoveryResult) -> Self {
74        self.last_recovery_result = ::std::option::Option::Some(input);
75        self
76    }
77    /// <p>The status of the last recovery status of this Source Network.</p>
78    pub fn set_last_recovery_result(mut self, input: ::std::option::Option<crate::types::RecoveryResult>) -> Self {
79        self.last_recovery_result = input;
80        self
81    }
82    /// <p>The status of the last recovery status of this Source Network.</p>
83    pub fn get_last_recovery_result(&self) -> &::std::option::Option<crate::types::RecoveryResult> {
84        &self.last_recovery_result
85    }
86    /// Consumes the builder and constructs a [`RecoveryLifeCycle`](crate::types::RecoveryLifeCycle).
87    pub fn build(self) -> crate::types::RecoveryLifeCycle {
88        crate::types::RecoveryLifeCycle {
89            api_call_date_time: self.api_call_date_time,
90            job_id: self.job_id,
91            last_recovery_result: self.last_recovery_result,
92        }
93    }
94}