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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Specifies the location of 1-15 occurrences of sensitive data that was detected by a managed data identifier or a custom data identifier and produced a sensitive data finding.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Occurrences {
/// <p>An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file. This value is null for all other types of files.</p>
/// <p>Each Cell object specifies a cell or field that contains the sensitive data.</p>
pub cells: ::std::option::Option<::std::vec::Vec<crate::types::Cell>>,
/// <p>An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text file such as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines that contains the sensitive data, and the position of the data on the specified line or lines.</p>
/// <p>This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the location of sensitive data in: unstructured sections of an otherwise structured file, such as a comment in a file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that has any column names that contain sensitive data.</p>
pub line_ranges: ::std::option::Option<::std::vec::Vec<crate::types::Range>>,
/// <p>Reserved for future use.</p>
pub offset_ranges: ::std::option::Option<::std::vec::Vec<crate::types::Range>>,
/// <p>An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. This value is null for all other types of files.</p>
/// <p>Each Page object specifies a page that contains the sensitive data.</p>
pub pages: ::std::option::Option<::std::vec::Vec<crate::types::Page>>,
/// <p>An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache Parquet file, JSON file, or JSON Lines file. This value is null for all other types of files.</p>
/// <p>For an Avro object container or Parquet file, each Record object specifies a record index and the path to a field in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object specifies the path to a field or array that contains the sensitive data. For a JSON Lines file, it also specifies the index of the line that contains the data.</p>
pub records: ::std::option::Option<::std::vec::Vec<crate::types::Record>>,
}
impl Occurrences {
/// <p>An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file. This value is null for all other types of files.</p>
/// <p>Each Cell object specifies a cell or field that contains the sensitive 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 `.cells.is_none()`.
pub fn cells(&self) -> &[crate::types::Cell] {
self.cells.as_deref().unwrap_or_default()
}
/// <p>An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text file such as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines that contains the sensitive data, and the position of the data on the specified line or lines.</p>
/// <p>This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the location of sensitive data in: unstructured sections of an otherwise structured file, such as a comment in a file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that has any column names that contain sensitive 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 `.line_ranges.is_none()`.
pub fn line_ranges(&self) -> &[crate::types::Range] {
self.line_ranges.as_deref().unwrap_or_default()
}
/// <p>Reserved for future use.</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>An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. This value is null for all other types of files.</p>
/// <p>Each Page object specifies a page that contains the sensitive 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 `.pages.is_none()`.
pub fn pages(&self) -> &[crate::types::Page] {
self.pages.as_deref().unwrap_or_default()
}
/// <p>An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache Parquet file, JSON file, or JSON Lines file. This value is null for all other types of files.</p>
/// <p>For an Avro object container or Parquet file, each Record object specifies a record index and the path to a field in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object specifies the path to a field or array that contains the sensitive data. For a JSON Lines file, it also specifies the index of the line that contains the 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 `.records.is_none()`.
pub fn records(&self) -> &[crate::types::Record] {
self.records.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) cells: ::std::option::Option<::std::vec::Vec<crate::types::Cell>>,
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>>,
}
impl OccurrencesBuilder {
/// Appends an item to `cells`.
///
/// To override the contents of this collection use [`set_cells`](Self::set_cells).
///
/// <p>An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file. This value is null for all other types of files.</p>
/// <p>Each Cell object specifies a cell or field that contains the sensitive data.</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>An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file. This value is null for all other types of files.</p>
/// <p>Each Cell object specifies a cell or field that contains the sensitive data.</p>
pub fn set_cells(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Cell>>) -> Self {
self.cells = input;
self
}
/// <p>An array of objects, one for each occurrence of sensitive data in a Microsoft Excel workbook, CSV file, or TSV file. This value is null for all other types of files.</p>
/// <p>Each Cell object specifies a cell or field that contains the sensitive data.</p>
pub fn get_cells(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Cell>> {
&self.cells
}
/// Appends an item to `line_ranges`.
///
/// To override the contents of this collection use [`set_line_ranges`](Self::set_line_ranges).
///
/// <p>An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text file such as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines that contains the sensitive data, and the position of the data on the specified line or lines.</p>
/// <p>This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the location of sensitive data in: unstructured sections of an otherwise structured file, such as a comment in a file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that has any column names that contain sensitive data.</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>An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text file such as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines that contains the sensitive data, and the position of the data on the specified line or lines.</p>
/// <p>This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the location of sensitive data in: unstructured sections of an otherwise structured file, such as a comment in a file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that has any column names that contain sensitive data.</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>An array of objects, one for each occurrence of sensitive data in an email message or a non-binary text file such as an HTML, TXT, or XML file. Each Range object specifies a line or inclusive range of lines that contains the sensitive data, and the position of the data on the specified line or lines.</p>
/// <p>This value is often null for file types that are supported by Cell, Page, or Record objects. Exceptions are the location of sensitive data in: unstructured sections of an otherwise structured file, such as a comment in a file; a malformed file that Amazon Macie analyzes as plain text; and, a CSV or TSV file that has any column names that contain sensitive data.</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>Reserved for future use.</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>Reserved for future use.</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>Reserved for future use.</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>An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. This value is null for all other types of files.</p>
/// <p>Each Page object specifies a page that contains the sensitive data.</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>An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. This value is null for all other types of files.</p>
/// <p>Each Page object specifies a page that contains the sensitive data.</p>
pub fn set_pages(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Page>>) -> Self {
self.pages = input;
self
}
/// <p>An array of objects, one for each occurrence of sensitive data in an Adobe Portable Document Format file. This value is null for all other types of files.</p>
/// <p>Each Page object specifies a page that contains the sensitive data.</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>An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache Parquet file, JSON file, or JSON Lines file. This value is null for all other types of files.</p>
/// <p>For an Avro object container or Parquet file, each Record object specifies a record index and the path to a field in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object specifies the path to a field or array that contains the sensitive data. For a JSON Lines file, it also specifies the index of the line that contains the data.</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>An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache Parquet file, JSON file, or JSON Lines file. This value is null for all other types of files.</p>
/// <p>For an Avro object container or Parquet file, each Record object specifies a record index and the path to a field in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object specifies the path to a field or array that contains the sensitive data. For a JSON Lines file, it also specifies the index of the line that contains the data.</p>
pub fn set_records(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Record>>) -> Self {
self.records = input;
self
}
/// <p>An array of objects, one for each occurrence of sensitive data in an Apache Avro object container, Apache Parquet file, JSON file, or JSON Lines file. This value is null for all other types of files.</p>
/// <p>For an Avro object container or Parquet file, each Record object specifies a record index and the path to a field in a record that contains the sensitive data. For a JSON or JSON Lines file, each Record object specifies the path to a field or array that contains the sensitive data. For a JSON Lines file, it also specifies the index of the line that contains the data.</p>
pub fn get_records(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Record>> {
&self.records
}
/// Consumes the builder and constructs a [`Occurrences`](crate::types::Occurrences).
pub fn build(self) -> crate::types::Occurrences {
crate::types::Occurrences {
cells: self.cells,
line_ranges: self.line_ranges,
offset_ranges: self.offset_ranges,
pages: self.pages,
records: self.records,
}
}
}