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
// 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 PutEventConfigurationInput {
/// <p>The name of the trail for which you want to update event configuration settings.</p>
pub trail_name: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) or ID suffix of the ARN of the event data store for which event configuration settings are updated.</p>
pub event_data_store: ::std::option::Option<::std::string::String>,
/// <p>The maximum allowed size for events to be stored in the specified event data store. If you are using context key selectors, MaxEventSize must be set to Large.</p>
pub max_event_size: ::std::option::Option<crate::types::MaxEventSize>,
/// <p>A list of context key selectors that will be included to provide enriched event data.</p>
pub context_key_selectors: ::std::option::Option<::std::vec::Vec<crate::types::ContextKeySelector>>,
/// <p>The list of aggregation configurations that you want to configure for the trail.</p>
pub aggregation_configurations: ::std::option::Option<::std::vec::Vec<crate::types::AggregationConfiguration>>,
}
impl PutEventConfigurationInput {
/// <p>The name of the trail for which you want to update event configuration settings.</p>
pub fn trail_name(&self) -> ::std::option::Option<&str> {
self.trail_name.as_deref()
}
/// <p>The Amazon Resource Name (ARN) or ID suffix of the ARN of the event data store for which event configuration settings are updated.</p>
pub fn event_data_store(&self) -> ::std::option::Option<&str> {
self.event_data_store.as_deref()
}
/// <p>The maximum allowed size for events to be stored in the specified event data store. If you are using context key selectors, MaxEventSize must be set to Large.</p>
pub fn max_event_size(&self) -> ::std::option::Option<&crate::types::MaxEventSize> {
self.max_event_size.as_ref()
}
/// <p>A list of context key selectors that will be included to provide enriched event data.</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 `.context_key_selectors.is_none()`.
pub fn context_key_selectors(&self) -> &[crate::types::ContextKeySelector] {
self.context_key_selectors.as_deref().unwrap_or_default()
}
/// <p>The list of aggregation configurations that you want to configure for the trail.</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 `.aggregation_configurations.is_none()`.
pub fn aggregation_configurations(&self) -> &[crate::types::AggregationConfiguration] {
self.aggregation_configurations.as_deref().unwrap_or_default()
}
}
impl PutEventConfigurationInput {
/// Creates a new builder-style object to manufacture [`PutEventConfigurationInput`](crate::operation::put_event_configuration::PutEventConfigurationInput).
pub fn builder() -> crate::operation::put_event_configuration::builders::PutEventConfigurationInputBuilder {
crate::operation::put_event_configuration::builders::PutEventConfigurationInputBuilder::default()
}
}
/// A builder for [`PutEventConfigurationInput`](crate::operation::put_event_configuration::PutEventConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutEventConfigurationInputBuilder {
pub(crate) trail_name: ::std::option::Option<::std::string::String>,
pub(crate) event_data_store: ::std::option::Option<::std::string::String>,
pub(crate) max_event_size: ::std::option::Option<crate::types::MaxEventSize>,
pub(crate) context_key_selectors: ::std::option::Option<::std::vec::Vec<crate::types::ContextKeySelector>>,
pub(crate) aggregation_configurations: ::std::option::Option<::std::vec::Vec<crate::types::AggregationConfiguration>>,
}
impl PutEventConfigurationInputBuilder {
/// <p>The name of the trail for which you want to update event configuration settings.</p>
pub fn trail_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.trail_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the trail for which you want to update event configuration settings.</p>
pub fn set_trail_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.trail_name = input;
self
}
/// <p>The name of the trail for which you want to update event configuration settings.</p>
pub fn get_trail_name(&self) -> &::std::option::Option<::std::string::String> {
&self.trail_name
}
/// <p>The Amazon Resource Name (ARN) or ID suffix of the ARN of the event data store for which event configuration settings are updated.</p>
pub fn event_data_store(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.event_data_store = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) or ID suffix of the ARN of the event data store for which event configuration settings are updated.</p>
pub fn set_event_data_store(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.event_data_store = input;
self
}
/// <p>The Amazon Resource Name (ARN) or ID suffix of the ARN of the event data store for which event configuration settings are updated.</p>
pub fn get_event_data_store(&self) -> &::std::option::Option<::std::string::String> {
&self.event_data_store
}
/// <p>The maximum allowed size for events to be stored in the specified event data store. If you are using context key selectors, MaxEventSize must be set to Large.</p>
pub fn max_event_size(mut self, input: crate::types::MaxEventSize) -> Self {
self.max_event_size = ::std::option::Option::Some(input);
self
}
/// <p>The maximum allowed size for events to be stored in the specified event data store. If you are using context key selectors, MaxEventSize must be set to Large.</p>
pub fn set_max_event_size(mut self, input: ::std::option::Option<crate::types::MaxEventSize>) -> Self {
self.max_event_size = input;
self
}
/// <p>The maximum allowed size for events to be stored in the specified event data store. If you are using context key selectors, MaxEventSize must be set to Large.</p>
pub fn get_max_event_size(&self) -> &::std::option::Option<crate::types::MaxEventSize> {
&self.max_event_size
}
/// Appends an item to `context_key_selectors`.
///
/// To override the contents of this collection use [`set_context_key_selectors`](Self::set_context_key_selectors).
///
/// <p>A list of context key selectors that will be included to provide enriched event data.</p>
pub fn context_key_selectors(mut self, input: crate::types::ContextKeySelector) -> Self {
let mut v = self.context_key_selectors.unwrap_or_default();
v.push(input);
self.context_key_selectors = ::std::option::Option::Some(v);
self
}
/// <p>A list of context key selectors that will be included to provide enriched event data.</p>
pub fn set_context_key_selectors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ContextKeySelector>>) -> Self {
self.context_key_selectors = input;
self
}
/// <p>A list of context key selectors that will be included to provide enriched event data.</p>
pub fn get_context_key_selectors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ContextKeySelector>> {
&self.context_key_selectors
}
/// Appends an item to `aggregation_configurations`.
///
/// To override the contents of this collection use [`set_aggregation_configurations`](Self::set_aggregation_configurations).
///
/// <p>The list of aggregation configurations that you want to configure for the trail.</p>
pub fn aggregation_configurations(mut self, input: crate::types::AggregationConfiguration) -> Self {
let mut v = self.aggregation_configurations.unwrap_or_default();
v.push(input);
self.aggregation_configurations = ::std::option::Option::Some(v);
self
}
/// <p>The list of aggregation configurations that you want to configure for the trail.</p>
pub fn set_aggregation_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AggregationConfiguration>>) -> Self {
self.aggregation_configurations = input;
self
}
/// <p>The list of aggregation configurations that you want to configure for the trail.</p>
pub fn get_aggregation_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AggregationConfiguration>> {
&self.aggregation_configurations
}
/// Consumes the builder and constructs a [`PutEventConfigurationInput`](crate::operation::put_event_configuration::PutEventConfigurationInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::put_event_configuration::PutEventConfigurationInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::put_event_configuration::PutEventConfigurationInput {
trail_name: self.trail_name,
event_data_store: self.event_data_store,
max_event_size: self.max_event_size,
context_key_selectors: self.context_key_selectors,
aggregation_configurations: self.aggregation_configurations,
})
}
}