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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The detected occurrences of sensitive data.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Occurrences {
/// <p>Occurrences of sensitive data detected in a non-binary text file or a Microsoft Word file. Non-binary text files include files such as HTML, XML, JSON, and TXT files.</p>
pub line_ranges: ::std::option::Option<::std::vec::Vec<crate::types::Range>>,
/// <p>Occurrences of sensitive data detected in a binary text file.</p>
pub offset_ranges: ::std::option::Option<::std::vec::Vec<crate::types::Range>>,
/// <p>Occurrences of sensitive data in an Adobe Portable Document Format (PDF) file.</p>
pub pages: ::std::option::Option<::std::vec::Vec<crate::types::Page>>,
/// <p>Occurrences of sensitive data in an Apache Avro object container or an Apache Parquet file.</p>
pub records: ::std::option::Option<::std::vec::Vec<crate::types::Record>>,
/// <p>Occurrences of sensitive data detected in Microsoft Excel workbooks, comma-separated value (CSV) files, or tab-separated value (TSV) files.</p>
pub cells: ::std::option::Option<::std::vec::Vec<crate::types::Cell>>,
}
impl Occurrences {
/// <p>Occurrences of sensitive data detected in a non-binary text file or a Microsoft Word file. Non-binary text files include files such as HTML, XML, JSON, and TXT files.</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 `.line_ranges.is_none()`.
pub fn line_ranges(&self) -> &[crate::types::Range] {
self.line_ranges.as_deref().unwrap_or_default()
}
/// <p>Occurrences of sensitive data detected in a binary text file.</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 `.offset_ranges.is_none()`.
pub fn offset_ranges(&self) -> &[crate::types::Range] {
self.offset_ranges.as_deref().unwrap_or_default()
}
/// <p>Occurrences of sensitive data in an Adobe Portable Document Format (PDF) file.</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 `.pages.is_none()`.
pub fn pages(&self) -> &[crate::types::Page] {
self.pages.as_deref().unwrap_or_default()
}
/// <p>Occurrences of sensitive data in an Apache Avro object container or an Apache Parquet file.</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 `.records.is_none()`.
pub fn records(&self) -> &[crate::types::Record] {
self.records.as_deref().unwrap_or_default()
}
/// <p>Occurrences of sensitive data detected in Microsoft Excel workbooks, comma-separated value (CSV) files, or tab-separated value (TSV) files.</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 `.cells.is_none()`.
pub fn cells(&self) -> &[crate::types::Cell] {
self.cells.as_deref().unwrap_or_default()
}
}
impl Occurrences {
/// Creates a new builder-style object to manufacture [`Occurrences`](crate::types::Occurrences).
pub fn builder() -> crate::types::builders::OccurrencesBuilder {
crate::types::builders::OccurrencesBuilder::default()
}
}
/// A builder for [`Occurrences`](crate::types::Occurrences).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct OccurrencesBuilder {
pub(crate) line_ranges: ::std::option::Option<::std::vec::Vec<crate::types::Range>>,
pub(crate) offset_ranges: ::std::option::Option<::std::vec::Vec<crate::types::Range>>,
pub(crate) pages: ::std::option::Option<::std::vec::Vec<crate::types::Page>>,
pub(crate) records: ::std::option::Option<::std::vec::Vec<crate::types::Record>>,
pub(crate) cells: ::std::option::Option<::std::vec::Vec<crate::types::Cell>>,
}
impl OccurrencesBuilder {
/// Appends an item to `line_ranges`.
///
/// To override the contents of this collection use [`set_line_ranges`](Self::set_line_ranges).
///
/// <p>Occurrences of sensitive data detected in a non-binary text file or a Microsoft Word file. Non-binary text files include files such as HTML, XML, JSON, and TXT files.</p>
pub fn line_ranges(mut self, input: crate::types::Range) -> Self {
let mut v = self.line_ranges.unwrap_or_default();
v.push(input);
self.line_ranges = ::std::option::Option::Some(v);
self
}
/// <p>Occurrences of sensitive data detected in a non-binary text file or a Microsoft Word file. Non-binary text files include files such as HTML, XML, JSON, and TXT files.</p>
pub fn set_line_ranges(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Range>>) -> Self {
self.line_ranges = input;
self
}
/// <p>Occurrences of sensitive data detected in a non-binary text file or a Microsoft Word file. Non-binary text files include files such as HTML, XML, JSON, and TXT files.</p>
pub fn get_line_ranges(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Range>> {
&self.line_ranges
}
/// Appends an item to `offset_ranges`.
///
/// To override the contents of this collection use [`set_offset_ranges`](Self::set_offset_ranges).
///
/// <p>Occurrences of sensitive data detected in a binary text file.</p>
pub fn offset_ranges(mut self, input: crate::types::Range) -> Self {
let mut v = self.offset_ranges.unwrap_or_default();
v.push(input);
self.offset_ranges = ::std::option::Option::Some(v);
self
}
/// <p>Occurrences of sensitive data detected in a binary text file.</p>
pub fn set_offset_ranges(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Range>>) -> Self {
self.offset_ranges = input;
self
}
/// <p>Occurrences of sensitive data detected in a binary text file.</p>
pub fn get_offset_ranges(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Range>> {
&self.offset_ranges
}
/// Appends an item to `pages`.
///
/// To override the contents of this collection use [`set_pages`](Self::set_pages).
///
/// <p>Occurrences of sensitive data in an Adobe Portable Document Format (PDF) file.</p>
pub fn pages(mut self, input: crate::types::Page) -> Self {
let mut v = self.pages.unwrap_or_default();
v.push(input);
self.pages = ::std::option::Option::Some(v);
self
}
/// <p>Occurrences of sensitive data in an Adobe Portable Document Format (PDF) file.</p>
pub fn set_pages(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Page>>) -> Self {
self.pages = input;
self
}
/// <p>Occurrences of sensitive data in an Adobe Portable Document Format (PDF) file.</p>
pub fn get_pages(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Page>> {
&self.pages
}
/// Appends an item to `records`.
///
/// To override the contents of this collection use [`set_records`](Self::set_records).
///
/// <p>Occurrences of sensitive data in an Apache Avro object container or an Apache Parquet file.</p>
pub fn records(mut self, input: crate::types::Record) -> Self {
let mut v = self.records.unwrap_or_default();
v.push(input);
self.records = ::std::option::Option::Some(v);
self
}
/// <p>Occurrences of sensitive data in an Apache Avro object container or an Apache Parquet file.</p>
pub fn set_records(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Record>>) -> Self {
self.records = input;
self
}
/// <p>Occurrences of sensitive data in an Apache Avro object container or an Apache Parquet file.</p>
pub fn get_records(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Record>> {
&self.records
}
/// Appends an item to `cells`.
///
/// To override the contents of this collection use [`set_cells`](Self::set_cells).
///
/// <p>Occurrences of sensitive data detected in Microsoft Excel workbooks, comma-separated value (CSV) files, or tab-separated value (TSV) files.</p>
pub fn cells(mut self, input: crate::types::Cell) -> Self {
let mut v = self.cells.unwrap_or_default();
v.push(input);
self.cells = ::std::option::Option::Some(v);
self
}
/// <p>Occurrences of sensitive data detected in Microsoft Excel workbooks, comma-separated value (CSV) files, or tab-separated value (TSV) files.</p>
pub fn set_cells(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Cell>>) -> Self {
self.cells = input;
self
}
/// <p>Occurrences of sensitive data detected in Microsoft Excel workbooks, comma-separated value (CSV) files, or tab-separated value (TSV) files.</p>
pub fn get_cells(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Cell>> {
&self.cells
}
/// Consumes the builder and constructs a [`Occurrences`](crate::types::Occurrences).
pub fn build(self) -> crate::types::Occurrences {
crate::types::Occurrences {
line_ranges: self.line_ranges,
offset_ranges: self.offset_ranges,
pages: self.pages,
records: self.records,
cells: self.cells,
}
}
}