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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes the destination file system in the replication configuration.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Destination {
/// <p>Describes the status of the replication configuration. For more information about replication status, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html">Viewing replication details</a> in the <i>Amazon EFS User Guide</i>.</p>
pub status: crate::types::ReplicationStatus,
/// <p>The ID of the destination Amazon EFS file system.</p>
pub file_system_id: ::std::string::String,
/// <p>The Amazon Web Services Region in which the destination file system is located.</p>
pub region: ::std::string::String,
/// <p>The time when the most recent sync was successfully completed on the destination file system. Any changes to data on the source file system that occurred before this time have been successfully replicated to the destination file system. Any changes that occurred after this time might not be fully replicated.</p>
pub last_replicated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>ID of the Amazon Web Services account in which the destination file system resides.</p>
pub owner_id: ::std::option::Option<::std::string::String>,
/// <p>Message that provides details about the <code>PAUSED</code> or <code>ERRROR</code> state of the replication destination configuration. For more information about replication status messages, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html">Viewing replication details</a> in the <i>Amazon EFS User Guide</i>.</p>
pub status_message: ::std::option::Option<::std::string::String>,
/// <p>Amazon Resource Name (ARN) of the IAM role in the source account that allows Amazon EFS to perform replication on its behalf. This is optional for same-account replication and required for cross-account replication.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
}
impl Destination {
/// <p>Describes the status of the replication configuration. For more information about replication status, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html">Viewing replication details</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn status(&self) -> &crate::types::ReplicationStatus {
&self.status
}
/// <p>The ID of the destination Amazon EFS file system.</p>
pub fn file_system_id(&self) -> &str {
use std::ops::Deref;
self.file_system_id.deref()
}
/// <p>The Amazon Web Services Region in which the destination file system is located.</p>
pub fn region(&self) -> &str {
use std::ops::Deref;
self.region.deref()
}
/// <p>The time when the most recent sync was successfully completed on the destination file system. Any changes to data on the source file system that occurred before this time have been successfully replicated to the destination file system. Any changes that occurred after this time might not be fully replicated.</p>
pub fn last_replicated_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_replicated_timestamp.as_ref()
}
/// <p>ID of the Amazon Web Services account in which the destination file system resides.</p>
pub fn owner_id(&self) -> ::std::option::Option<&str> {
self.owner_id.as_deref()
}
/// <p>Message that provides details about the <code>PAUSED</code> or <code>ERRROR</code> state of the replication destination configuration. For more information about replication status messages, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html">Viewing replication details</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn status_message(&self) -> ::std::option::Option<&str> {
self.status_message.as_deref()
}
/// <p>Amazon Resource Name (ARN) of the IAM role in the source account that allows Amazon EFS to perform replication on its behalf. This is optional for same-account replication and required for cross-account replication.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
}
impl Destination {
/// Creates a new builder-style object to manufacture [`Destination`](crate::types::Destination).
pub fn builder() -> crate::types::builders::DestinationBuilder {
crate::types::builders::DestinationBuilder::default()
}
}
/// A builder for [`Destination`](crate::types::Destination).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DestinationBuilder {
pub(crate) status: ::std::option::Option<crate::types::ReplicationStatus>,
pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
pub(crate) region: ::std::option::Option<::std::string::String>,
pub(crate) last_replicated_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) owner_id: ::std::option::Option<::std::string::String>,
pub(crate) status_message: ::std::option::Option<::std::string::String>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
}
impl DestinationBuilder {
/// <p>Describes the status of the replication configuration. For more information about replication status, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html">Viewing replication details</a> in the <i>Amazon EFS User Guide</i>.</p>
/// This field is required.
pub fn status(mut self, input: crate::types::ReplicationStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>Describes the status of the replication configuration. For more information about replication status, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html">Viewing replication details</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::ReplicationStatus>) -> Self {
self.status = input;
self
}
/// <p>Describes the status of the replication configuration. For more information about replication status, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html">Viewing replication details</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::ReplicationStatus> {
&self.status
}
/// <p>The ID of the destination Amazon EFS file system.</p>
/// This field is required.
pub fn file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.file_system_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the destination Amazon EFS file system.</p>
pub fn set_file_system_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.file_system_id = input;
self
}
/// <p>The ID of the destination Amazon EFS file system.</p>
pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
&self.file_system_id
}
/// <p>The Amazon Web Services Region in which the destination file system is located.</p>
/// This field is required.
pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.region = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Web Services Region in which the destination file system is located.</p>
pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.region = input;
self
}
/// <p>The Amazon Web Services Region in which the destination file system is located.</p>
pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
&self.region
}
/// <p>The time when the most recent sync was successfully completed on the destination file system. Any changes to data on the source file system that occurred before this time have been successfully replicated to the destination file system. Any changes that occurred after this time might not be fully replicated.</p>
pub fn last_replicated_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_replicated_timestamp = ::std::option::Option::Some(input);
self
}
/// <p>The time when the most recent sync was successfully completed on the destination file system. Any changes to data on the source file system that occurred before this time have been successfully replicated to the destination file system. Any changes that occurred after this time might not be fully replicated.</p>
pub fn set_last_replicated_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_replicated_timestamp = input;
self
}
/// <p>The time when the most recent sync was successfully completed on the destination file system. Any changes to data on the source file system that occurred before this time have been successfully replicated to the destination file system. Any changes that occurred after this time might not be fully replicated.</p>
pub fn get_last_replicated_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_replicated_timestamp
}
/// <p>ID of the Amazon Web Services account in which the destination file system resides.</p>
pub fn owner_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.owner_id = ::std::option::Option::Some(input.into());
self
}
/// <p>ID of the Amazon Web Services account in which the destination file system resides.</p>
pub fn set_owner_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.owner_id = input;
self
}
/// <p>ID of the Amazon Web Services account in which the destination file system resides.</p>
pub fn get_owner_id(&self) -> &::std::option::Option<::std::string::String> {
&self.owner_id
}
/// <p>Message that provides details about the <code>PAUSED</code> or <code>ERRROR</code> state of the replication destination configuration. For more information about replication status messages, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html">Viewing replication details</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_message = ::std::option::Option::Some(input.into());
self
}
/// <p>Message that provides details about the <code>PAUSED</code> or <code>ERRROR</code> state of the replication destination configuration. For more information about replication status messages, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html">Viewing replication details</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_message = input;
self
}
/// <p>Message that provides details about the <code>PAUSED</code> or <code>ERRROR</code> state of the replication destination configuration. For more information about replication status messages, see <a href="https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html">Viewing replication details</a> in the <i>Amazon EFS User Guide</i>.</p>
pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
&self.status_message
}
/// <p>Amazon Resource Name (ARN) of the IAM role in the source account that allows Amazon EFS to perform replication on its behalf. This is optional for same-account replication and required for cross-account replication.</p>
pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>Amazon Resource Name (ARN) of the IAM role in the source account that allows Amazon EFS to perform replication on its behalf. This is optional for same-account replication and required for cross-account replication.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>Amazon Resource Name (ARN) of the IAM role in the source account that allows Amazon EFS to perform replication on its behalf. This is optional for same-account replication and required for cross-account replication.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// Consumes the builder and constructs a [`Destination`](crate::types::Destination).
/// This method will fail if any of the following fields are not set:
/// - [`status`](crate::types::builders::DestinationBuilder::status)
/// - [`file_system_id`](crate::types::builders::DestinationBuilder::file_system_id)
/// - [`region`](crate::types::builders::DestinationBuilder::region)
pub fn build(self) -> ::std::result::Result<crate::types::Destination, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Destination {
status: self.status.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"status",
"status was not specified but it is required when building Destination",
)
})?,
file_system_id: self.file_system_id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"file_system_id",
"file_system_id was not specified but it is required when building Destination",
)
})?,
region: self.region.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"region",
"region was not specified but it is required when building Destination",
)
})?,
last_replicated_timestamp: self.last_replicated_timestamp,
owner_id: self.owner_id,
status_message: self.status_message,
role_arn: self.role_arn,
})
}
}