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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides information about custom data identifiers that produced a sensitive data finding, and the number of occurrences of the data that they detected for the finding.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CustomDataIdentifiers {
/// <p>The custom data identifiers that detected the data, and the number of occurrences of the data that each identifier detected.</p>
pub detections: ::std::option::Option<::std::vec::Vec<crate::types::CustomDetection>>,
/// <p>The total number of occurrences of the data that was detected by the custom data identifiers and produced the finding.</p>
pub total_count: ::std::option::Option<i64>,
}
impl CustomDataIdentifiers {
/// <p>The custom data identifiers that detected the data, and the number of occurrences of the data that each identifier detected.</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 `.detections.is_none()`.
pub fn detections(&self) -> &[crate::types::CustomDetection] {
self.detections.as_deref().unwrap_or_default()
}
/// <p>The total number of occurrences of the data that was detected by the custom data identifiers and produced the finding.</p>
pub fn total_count(&self) -> ::std::option::Option<i64> {
self.total_count
}
}
impl CustomDataIdentifiers {
/// Creates a new builder-style object to manufacture [`CustomDataIdentifiers`](crate::types::CustomDataIdentifiers).
pub fn builder() -> crate::types::builders::CustomDataIdentifiersBuilder {
crate::types::builders::CustomDataIdentifiersBuilder::default()
}
}
/// A builder for [`CustomDataIdentifiers`](crate::types::CustomDataIdentifiers).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CustomDataIdentifiersBuilder {
pub(crate) detections: ::std::option::Option<::std::vec::Vec<crate::types::CustomDetection>>,
pub(crate) total_count: ::std::option::Option<i64>,
}
impl CustomDataIdentifiersBuilder {
/// Appends an item to `detections`.
///
/// To override the contents of this collection use [`set_detections`](Self::set_detections).
///
/// <p>The custom data identifiers that detected the data, and the number of occurrences of the data that each identifier detected.</p>
pub fn detections(mut self, input: crate::types::CustomDetection) -> Self {
let mut v = self.detections.unwrap_or_default();
v.push(input);
self.detections = ::std::option::Option::Some(v);
self
}
/// <p>The custom data identifiers that detected the data, and the number of occurrences of the data that each identifier detected.</p>
pub fn set_detections(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CustomDetection>>) -> Self {
self.detections = input;
self
}
/// <p>The custom data identifiers that detected the data, and the number of occurrences of the data that each identifier detected.</p>
pub fn get_detections(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CustomDetection>> {
&self.detections
}
/// <p>The total number of occurrences of the data that was detected by the custom data identifiers and produced the finding.</p>
pub fn total_count(mut self, input: i64) -> Self {
self.total_count = ::std::option::Option::Some(input);
self
}
/// <p>The total number of occurrences of the data that was detected by the custom data identifiers and produced the finding.</p>
pub fn set_total_count(mut self, input: ::std::option::Option<i64>) -> Self {
self.total_count = input;
self
}
/// <p>The total number of occurrences of the data that was detected by the custom data identifiers and produced the finding.</p>
pub fn get_total_count(&self) -> &::std::option::Option<i64> {
&self.total_count
}
/// Consumes the builder and constructs a [`CustomDataIdentifiers`](crate::types::CustomDataIdentifiers).
pub fn build(self) -> crate::types::CustomDataIdentifiers {
crate::types::CustomDataIdentifiers {
detections: self.detections,
total_count: self.total_count,
}
}
}