// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the timestamps of matched categories.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PointsOfInterest {
    /// <p>Contains the timestamp ranges (start time through end time) of matched categories and rules.</p>
    pub timestamp_ranges: ::std::option::Option<::std::vec::Vec<crate::types::TimestampRange>>,
}
impl PointsOfInterest {
    /// <p>Contains the timestamp ranges (start time through end time) of matched categories and rules.</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 `.timestamp_ranges.is_none()`.
    pub fn timestamp_ranges(&self) -> &[crate::types::TimestampRange] {
        self.timestamp_ranges.as_deref().unwrap_or_default()
    }
}
impl PointsOfInterest {
    /// Creates a new builder-style object to manufacture [`PointsOfInterest`](crate::types::PointsOfInterest).
    pub fn builder() -> crate::types::builders::PointsOfInterestBuilder {
        crate::types::builders::PointsOfInterestBuilder::default()
    }
}

/// A builder for [`PointsOfInterest`](crate::types::PointsOfInterest).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PointsOfInterestBuilder {
    pub(crate) timestamp_ranges: ::std::option::Option<::std::vec::Vec<crate::types::TimestampRange>>,
}
impl PointsOfInterestBuilder {
    /// Appends an item to `timestamp_ranges`.
    ///
    /// To override the contents of this collection use [`set_timestamp_ranges`](Self::set_timestamp_ranges).
    ///
    /// <p>Contains the timestamp ranges (start time through end time) of matched categories and rules.</p>
    pub fn timestamp_ranges(mut self, input: crate::types::TimestampRange) -> Self {
        let mut v = self.timestamp_ranges.unwrap_or_default();
        v.push(input);
        self.timestamp_ranges = ::std::option::Option::Some(v);
        self
    }
    /// <p>Contains the timestamp ranges (start time through end time) of matched categories and rules.</p>
    pub fn set_timestamp_ranges(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TimestampRange>>) -> Self {
        self.timestamp_ranges = input;
        self
    }
    /// <p>Contains the timestamp ranges (start time through end time) of matched categories and rules.</p>
    pub fn get_timestamp_ranges(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TimestampRange>> {
        &self.timestamp_ranges
    }
    /// Consumes the builder and constructs a [`PointsOfInterest`](crate::types::PointsOfInterest).
    pub fn build(self) -> crate::types::PointsOfInterest {
        crate::types::PointsOfInterest {
            timestamp_ranges: self.timestamp_ranges,
        }
    }
}
