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
// 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>
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>
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>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.destinations.is_none()`.
pub fn destinations(&self) -> &[crate::types::DestinationToCreate] {
self.destinations.as_deref().unwrap_or_default()
}
}
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>
/// This field is required.
pub fn source_file_system_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source_file_system_id = ::std::option::Option::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
}
/// <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 get_source_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
&self.source_file_system_id
}
/// 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 = ::std::option::Option::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
}
/// <p>An array of destination configuration objects. Only one destination configuration object is supported.</p>
pub fn get_destinations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DestinationToCreate>> {
&self.destinations
}
/// Consumes the builder and constructs a [`CreateReplicationConfigurationInput`](crate::operation::create_replication_configuration::CreateReplicationConfigurationInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::create_replication_configuration::CreateReplicationConfigurationInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::create_replication_configuration::CreateReplicationConfigurationInput {
source_file_system_id: self.source_file_system_id,
destinations: self.destinations,
})
}
}