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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateReplicationConfigurationInput {
/// <p>Specifies the Amazon EFS file system that you want to replicate. This file system cannot already be a source or destination file system in another replication configuration.</p>
#[doc(hidden)]
pub source_file_system_id: std::option::Option<std::string::String>,
/// <p>An array of destination configuration objects. Only one destination configuration object is supported.</p>
#[doc(hidden)]
pub destinations: std::option::Option<std::vec::Vec<crate::types::DestinationToCreate>>,
}
impl CreateReplicationConfigurationInput {
/// <p>Specifies the Amazon EFS file system that you want to replicate. This file system cannot already be a source or destination file system in another replication configuration.</p>
pub fn source_file_system_id(&self) -> std::option::Option<&str> {
self.source_file_system_id.as_deref()
}
/// <p>An array of destination configuration objects. Only one destination configuration object is supported.</p>
pub fn destinations(&self) -> std::option::Option<&[crate::types::DestinationToCreate]> {
self.destinations.as_deref()
}
}
impl CreateReplicationConfigurationInput {
/// Creates a new builder-style object to manufacture [`CreateReplicationConfigurationInput`](crate::operation::create_replication_configuration::CreateReplicationConfigurationInput).
pub fn builder() -> crate::operation::create_replication_configuration::builders::CreateReplicationConfigurationInputBuilder{
crate::operation::create_replication_configuration::builders::CreateReplicationConfigurationInputBuilder::default()
}
}
/// A builder for [`CreateReplicationConfigurationInput`](crate::operation::create_replication_configuration::CreateReplicationConfigurationInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreateReplicationConfigurationInputBuilder {
pub(crate) source_file_system_id: std::option::Option<std::string::String>,
pub(crate) destinations: std::option::Option<std::vec::Vec<crate::types::DestinationToCreate>>,
}
impl CreateReplicationConfigurationInputBuilder {
/// <p>Specifies the Amazon EFS file system that you want to replicate. This file system cannot already be a source or destination file system in another replication configuration.</p>
pub fn source_file_system_id(mut self, input: impl Into<std::string::String>) -> Self {
self.source_file_system_id = Some(input.into());
self
}
/// <p>Specifies the Amazon EFS file system that you want to replicate. This file system cannot already be a source or destination file system in another replication configuration.</p>
pub fn set_source_file_system_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.source_file_system_id = input;
self
}
/// Appends an item to `destinations`.
///
/// To override the contents of this collection use [`set_destinations`](Self::set_destinations).
///
/// <p>An array of destination configuration objects. Only one destination configuration object is supported.</p>
pub fn destinations(mut self, input: crate::types::DestinationToCreate) -> Self {
let mut v = self.destinations.unwrap_or_default();
v.push(input);
self.destinations = Some(v);
self
}
/// <p>An array of destination configuration objects. Only one destination configuration object is supported.</p>
pub fn set_destinations(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::DestinationToCreate>>,
) -> Self {
self.destinations = input;
self
}
/// Consumes the builder and constructs a [`CreateReplicationConfigurationInput`](crate::operation::create_replication_configuration::CreateReplicationConfigurationInput).
pub fn build(
self,
) -> Result<
crate::operation::create_replication_configuration::CreateReplicationConfigurationInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::operation::create_replication_configuration::CreateReplicationConfigurationInput {
source_file_system_id: self.source_file_system_id
,
destinations: self.destinations
,
}
)
}
}