aws_sdk_xray/operation/get_time_series_service_statistics/
_get_time_series_service_statistics_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetTimeSeriesServiceStatisticsOutput {
6    /// <p>The collection of statistics.</p>
7    pub time_series_service_statistics: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesServiceStatistics>>,
8    /// <p>A flag indicating whether or not a group's filter expression has been consistent, or if a returned aggregation might show statistics from an older version of the group's filter expression.</p>
9    pub contains_old_group_versions: bool,
10    /// <p>Pagination token.</p>
11    pub next_token: ::std::option::Option<::std::string::String>,
12    _request_id: Option<String>,
13}
14impl GetTimeSeriesServiceStatisticsOutput {
15    /// <p>The collection of statistics.</p>
16    ///
17    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.time_series_service_statistics.is_none()`.
18    pub fn time_series_service_statistics(&self) -> &[crate::types::TimeSeriesServiceStatistics] {
19        self.time_series_service_statistics.as_deref().unwrap_or_default()
20    }
21    /// <p>A flag indicating whether or not a group's filter expression has been consistent, or if a returned aggregation might show statistics from an older version of the group's filter expression.</p>
22    pub fn contains_old_group_versions(&self) -> bool {
23        self.contains_old_group_versions
24    }
25    /// <p>Pagination token.</p>
26    pub fn next_token(&self) -> ::std::option::Option<&str> {
27        self.next_token.as_deref()
28    }
29}
30impl ::aws_types::request_id::RequestId for GetTimeSeriesServiceStatisticsOutput {
31    fn request_id(&self) -> Option<&str> {
32        self._request_id.as_deref()
33    }
34}
35impl GetTimeSeriesServiceStatisticsOutput {
36    /// Creates a new builder-style object to manufacture [`GetTimeSeriesServiceStatisticsOutput`](crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsOutput).
37    pub fn builder() -> crate::operation::get_time_series_service_statistics::builders::GetTimeSeriesServiceStatisticsOutputBuilder {
38        crate::operation::get_time_series_service_statistics::builders::GetTimeSeriesServiceStatisticsOutputBuilder::default()
39    }
40}
41
42/// A builder for [`GetTimeSeriesServiceStatisticsOutput`](crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsOutput).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct GetTimeSeriesServiceStatisticsOutputBuilder {
46    pub(crate) time_series_service_statistics: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesServiceStatistics>>,
47    pub(crate) contains_old_group_versions: ::std::option::Option<bool>,
48    pub(crate) next_token: ::std::option::Option<::std::string::String>,
49    _request_id: Option<String>,
50}
51impl GetTimeSeriesServiceStatisticsOutputBuilder {
52    /// Appends an item to `time_series_service_statistics`.
53    ///
54    /// To override the contents of this collection use [`set_time_series_service_statistics`](Self::set_time_series_service_statistics).
55    ///
56    /// <p>The collection of statistics.</p>
57    pub fn time_series_service_statistics(mut self, input: crate::types::TimeSeriesServiceStatistics) -> Self {
58        let mut v = self.time_series_service_statistics.unwrap_or_default();
59        v.push(input);
60        self.time_series_service_statistics = ::std::option::Option::Some(v);
61        self
62    }
63    /// <p>The collection of statistics.</p>
64    pub fn set_time_series_service_statistics(
65        mut self,
66        input: ::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesServiceStatistics>>,
67    ) -> Self {
68        self.time_series_service_statistics = input;
69        self
70    }
71    /// <p>The collection of statistics.</p>
72    pub fn get_time_series_service_statistics(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TimeSeriesServiceStatistics>> {
73        &self.time_series_service_statistics
74    }
75    /// <p>A flag indicating whether or not a group's filter expression has been consistent, or if a returned aggregation might show statistics from an older version of the group's filter expression.</p>
76    pub fn contains_old_group_versions(mut self, input: bool) -> Self {
77        self.contains_old_group_versions = ::std::option::Option::Some(input);
78        self
79    }
80    /// <p>A flag indicating whether or not a group's filter expression has been consistent, or if a returned aggregation might show statistics from an older version of the group's filter expression.</p>
81    pub fn set_contains_old_group_versions(mut self, input: ::std::option::Option<bool>) -> Self {
82        self.contains_old_group_versions = input;
83        self
84    }
85    /// <p>A flag indicating whether or not a group's filter expression has been consistent, or if a returned aggregation might show statistics from an older version of the group's filter expression.</p>
86    pub fn get_contains_old_group_versions(&self) -> &::std::option::Option<bool> {
87        &self.contains_old_group_versions
88    }
89    /// <p>Pagination token.</p>
90    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91        self.next_token = ::std::option::Option::Some(input.into());
92        self
93    }
94    /// <p>Pagination token.</p>
95    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96        self.next_token = input;
97        self
98    }
99    /// <p>Pagination token.</p>
100    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
101        &self.next_token
102    }
103    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
104        self._request_id = Some(request_id.into());
105        self
106    }
107
108    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
109        self._request_id = request_id;
110        self
111    }
112    /// Consumes the builder and constructs a [`GetTimeSeriesServiceStatisticsOutput`](crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsOutput).
113    pub fn build(self) -> crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsOutput {
114        crate::operation::get_time_series_service_statistics::GetTimeSeriesServiceStatisticsOutput {
115            time_series_service_statistics: self.time_series_service_statistics,
116            contains_old_group_versions: self.contains_old_group_versions.unwrap_or_default(),
117            next_token: self.next_token,
118            _request_id: self._request_id,
119        }
120    }
121}