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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A container for what Amazon S3 Storage Lens configuration includes.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Include {
/// <p>A container for the S3 Storage Lens bucket includes.</p>
pub buckets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>A container for the S3 Storage Lens Region includes.</p>
pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl Include {
/// <p>A container for the S3 Storage Lens bucket includes.</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 `.buckets.is_none()`.
pub fn buckets(&self) -> &[::std::string::String] {
self.buckets.as_deref().unwrap_or_default()
}
/// <p>A container for the S3 Storage Lens Region includes.</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 `.regions.is_none()`.
pub fn regions(&self) -> &[::std::string::String] {
self.regions.as_deref().unwrap_or_default()
}
}
impl Include {
/// Creates a new builder-style object to manufacture [`Include`](crate::types::Include).
pub fn builder() -> crate::types::builders::IncludeBuilder {
crate::types::builders::IncludeBuilder::default()
}
}
/// A builder for [`Include`](crate::types::Include).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct IncludeBuilder {
pub(crate) buckets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl IncludeBuilder {
/// Appends an item to `buckets`.
///
/// To override the contents of this collection use [`set_buckets`](Self::set_buckets).
///
/// <p>A container for the S3 Storage Lens bucket includes.</p>
pub fn buckets(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.buckets.unwrap_or_default();
v.push(input.into());
self.buckets = ::std::option::Option::Some(v);
self
}
/// <p>A container for the S3 Storage Lens bucket includes.</p>
pub fn set_buckets(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.buckets = input;
self
}
/// <p>A container for the S3 Storage Lens bucket includes.</p>
pub fn get_buckets(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.buckets
}
/// Appends an item to `regions`.
///
/// To override the contents of this collection use [`set_regions`](Self::set_regions).
///
/// <p>A container for the S3 Storage Lens Region includes.</p>
pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.regions.unwrap_or_default();
v.push(input.into());
self.regions = ::std::option::Option::Some(v);
self
}
/// <p>A container for the S3 Storage Lens Region includes.</p>
pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.regions = input;
self
}
/// <p>A container for the S3 Storage Lens Region includes.</p>
pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.regions
}
/// Consumes the builder and constructs a [`Include`](crate::types::Include).
pub fn build(self) -> crate::types::Include {
crate::types::Include {
buckets: self.buckets,
regions: self.regions,
}
}
}