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
// 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 PutSynchronizationConfigurationInput {
/// <p>The ID or Amazon Resource Name (ARN) of the S3 File System to configure synchronization for.</p>
pub file_system_id: ::std::option::Option<::std::string::String>,
/// <p>The version number of the current synchronization configuration. Omit this value when creating a synchronization configuration for the first time. For subsequent updates, provide this value for optimistic concurrency control. If the version number does not match the current configuration, the request fails with a <code>ConflictException</code>.</p>
pub latest_version_number: ::std::option::Option<i32>,
/// <p>An array of import data rules that control how data is imported from S3 into the file system.</p>
pub import_data_rules: ::std::option::Option<::std::vec::Vec<crate::types::ImportDataRule>>,
/// <p>An array of expiration data rules that control when cached data expires from the file system.</p>
pub expiration_data_rules: ::std::option::Option<::std::vec::Vec<crate::types::ExpirationDataRule>>,
}
impl PutSynchronizationConfigurationInput {
/// <p>The ID or Amazon Resource Name (ARN) of the S3 File System to configure synchronization for.</p>
pub fn file_system_id(&self) -> ::std::option::Option<&str> {
self.file_system_id.as_deref()
}
/// <p>The version number of the current synchronization configuration. Omit this value when creating a synchronization configuration for the first time. For subsequent updates, provide this value for optimistic concurrency control. If the version number does not match the current configuration, the request fails with a <code>ConflictException</code>.</p>
pub fn latest_version_number(&self) -> ::std::option::Option<i32> {
self.latest_version_number
}
/// <p>An array of import data rules that control how data is imported from S3 into the file system.</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 `.import_data_rules.is_none()`.
pub fn import_data_rules(&self) -> &[crate::types::ImportDataRule] {
self.import_data_rules.as_deref().unwrap_or_default()
}
/// <p>An array of expiration data rules that control when cached data expires from the file system.</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 `.expiration_data_rules.is_none()`.
pub fn expiration_data_rules(&self) -> &[crate::types::ExpirationDataRule] {
self.expiration_data_rules.as_deref().unwrap_or_default()
}
}
impl PutSynchronizationConfigurationInput {
/// Creates a new builder-style object to manufacture [`PutSynchronizationConfigurationInput`](crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationInput).
pub fn builder() -> crate::operation::put_synchronization_configuration::builders::PutSynchronizationConfigurationInputBuilder {
crate::operation::put_synchronization_configuration::builders::PutSynchronizationConfigurationInputBuilder::default()
}
}
/// A builder for [`PutSynchronizationConfigurationInput`](crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutSynchronizationConfigurationInputBuilder {
pub(crate) file_system_id: ::std::option::Option<::std::string::String>,
pub(crate) latest_version_number: ::std::option::Option<i32>,
pub(crate) import_data_rules: ::std::option::Option<::std::vec::Vec<crate::types::ImportDataRule>>,
pub(crate) expiration_data_rules: ::std::option::Option<::std::vec::Vec<crate::types::ExpirationDataRule>>,
}
impl PutSynchronizationConfigurationInputBuilder {
/// <p>The ID or Amazon Resource Name (ARN) of the S3 File System to configure synchronization for.</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 or Amazon Resource Name (ARN) of the S3 File System to configure synchronization for.</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 or Amazon Resource Name (ARN) of the S3 File System to configure synchronization for.</p>
pub fn get_file_system_id(&self) -> &::std::option::Option<::std::string::String> {
&self.file_system_id
}
/// <p>The version number of the current synchronization configuration. Omit this value when creating a synchronization configuration for the first time. For subsequent updates, provide this value for optimistic concurrency control. If the version number does not match the current configuration, the request fails with a <code>ConflictException</code>.</p>
pub fn latest_version_number(mut self, input: i32) -> Self {
self.latest_version_number = ::std::option::Option::Some(input);
self
}
/// <p>The version number of the current synchronization configuration. Omit this value when creating a synchronization configuration for the first time. For subsequent updates, provide this value for optimistic concurrency control. If the version number does not match the current configuration, the request fails with a <code>ConflictException</code>.</p>
pub fn set_latest_version_number(mut self, input: ::std::option::Option<i32>) -> Self {
self.latest_version_number = input;
self
}
/// <p>The version number of the current synchronization configuration. Omit this value when creating a synchronization configuration for the first time. For subsequent updates, provide this value for optimistic concurrency control. If the version number does not match the current configuration, the request fails with a <code>ConflictException</code>.</p>
pub fn get_latest_version_number(&self) -> &::std::option::Option<i32> {
&self.latest_version_number
}
/// Appends an item to `import_data_rules`.
///
/// To override the contents of this collection use [`set_import_data_rules`](Self::set_import_data_rules).
///
/// <p>An array of import data rules that control how data is imported from S3 into the file system.</p>
pub fn import_data_rules(mut self, input: crate::types::ImportDataRule) -> Self {
let mut v = self.import_data_rules.unwrap_or_default();
v.push(input);
self.import_data_rules = ::std::option::Option::Some(v);
self
}
/// <p>An array of import data rules that control how data is imported from S3 into the file system.</p>
pub fn set_import_data_rules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ImportDataRule>>) -> Self {
self.import_data_rules = input;
self
}
/// <p>An array of import data rules that control how data is imported from S3 into the file system.</p>
pub fn get_import_data_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ImportDataRule>> {
&self.import_data_rules
}
/// Appends an item to `expiration_data_rules`.
///
/// To override the contents of this collection use [`set_expiration_data_rules`](Self::set_expiration_data_rules).
///
/// <p>An array of expiration data rules that control when cached data expires from the file system.</p>
pub fn expiration_data_rules(mut self, input: crate::types::ExpirationDataRule) -> Self {
let mut v = self.expiration_data_rules.unwrap_or_default();
v.push(input);
self.expiration_data_rules = ::std::option::Option::Some(v);
self
}
/// <p>An array of expiration data rules that control when cached data expires from the file system.</p>
pub fn set_expiration_data_rules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ExpirationDataRule>>) -> Self {
self.expiration_data_rules = input;
self
}
/// <p>An array of expiration data rules that control when cached data expires from the file system.</p>
pub fn get_expiration_data_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ExpirationDataRule>> {
&self.expiration_data_rules
}
/// Consumes the builder and constructs a [`PutSynchronizationConfigurationInput`](crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(
crate::operation::put_synchronization_configuration::PutSynchronizationConfigurationInput {
file_system_id: self.file_system_id,
latest_version_number: self.latest_version_number,
import_data_rules: self.import_data_rules,
expiration_data_rules: self.expiration_data_rules,
},
)
}
}