Skip to main content

aws_sdk_pinpoint/types/
_application_date_range_kpi_response.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides the results of a query that retrieved the data for a standard metric that applies to an application, and provides information about that query.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ApplicationDateRangeKpiResponse {
7    /// <p>The unique identifier for the application that the metric applies to.</p>
8    pub application_id: ::std::option::Option<::std::string::String>,
9    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
10    pub end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
11    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
12    pub kpi_name: ::std::option::Option<::std::string::String>,
13    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
14    pub kpi_result: ::std::option::Option<crate::types::BaseKpiResult>,
15    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Application Metrics resource because the resource returns all results in a single page.</p>
16    pub next_token: ::std::option::Option<::std::string::String>,
17    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
18    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
19}
20impl ApplicationDateRangeKpiResponse {
21    /// <p>The unique identifier for the application that the metric applies to.</p>
22    pub fn application_id(&self) -> ::std::option::Option<&str> {
23        self.application_id.as_deref()
24    }
25    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
26    pub fn end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
27        self.end_time.as_ref()
28    }
29    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
30    pub fn kpi_name(&self) -> ::std::option::Option<&str> {
31        self.kpi_name.as_deref()
32    }
33    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
34    pub fn kpi_result(&self) -> ::std::option::Option<&crate::types::BaseKpiResult> {
35        self.kpi_result.as_ref()
36    }
37    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Application Metrics resource because the resource returns all results in a single page.</p>
38    pub fn next_token(&self) -> ::std::option::Option<&str> {
39        self.next_token.as_deref()
40    }
41    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
42    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
43        self.start_time.as_ref()
44    }
45}
46impl ApplicationDateRangeKpiResponse {
47    /// Creates a new builder-style object to manufacture [`ApplicationDateRangeKpiResponse`](crate::types::ApplicationDateRangeKpiResponse).
48    pub fn builder() -> crate::types::builders::ApplicationDateRangeKpiResponseBuilder {
49        crate::types::builders::ApplicationDateRangeKpiResponseBuilder::default()
50    }
51}
52
53/// A builder for [`ApplicationDateRangeKpiResponse`](crate::types::ApplicationDateRangeKpiResponse).
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
55#[non_exhaustive]
56pub struct ApplicationDateRangeKpiResponseBuilder {
57    pub(crate) application_id: ::std::option::Option<::std::string::String>,
58    pub(crate) end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
59    pub(crate) kpi_name: ::std::option::Option<::std::string::String>,
60    pub(crate) kpi_result: ::std::option::Option<crate::types::BaseKpiResult>,
61    pub(crate) next_token: ::std::option::Option<::std::string::String>,
62    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
63}
64impl ApplicationDateRangeKpiResponseBuilder {
65    /// <p>The unique identifier for the application that the metric applies to.</p>
66    /// This field is required.
67    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.application_id = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The unique identifier for the application that the metric applies to.</p>
72    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.application_id = input;
74        self
75    }
76    /// <p>The unique identifier for the application that the metric applies to.</p>
77    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.application_id
79    }
80    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
81    /// This field is required.
82    pub fn end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
83        self.end_time = ::std::option::Option::Some(input);
84        self
85    }
86    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
87    pub fn set_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
88        self.end_time = input;
89        self
90    }
91    /// <p>The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
92    pub fn get_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
93        &self.end_time
94    }
95    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
96    /// This field is required.
97    pub fn kpi_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.kpi_name = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
102    pub fn set_kpi_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.kpi_name = input;
104        self
105    }
106    /// <p>The name of the metric, also referred to as a <i>key performance indicator (KPI)</i>, that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the <a href="https://docs.aws.amazon.com/pinpoint/latest/developerguide/analytics-standard-metrics.html">Amazon Pinpoint Developer Guide</a>.</p>
107    pub fn get_kpi_name(&self) -> &::std::option::Option<::std::string::String> {
108        &self.kpi_name
109    }
110    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
111    /// This field is required.
112    pub fn kpi_result(mut self, input: crate::types::BaseKpiResult) -> Self {
113        self.kpi_result = ::std::option::Option::Some(input);
114        self
115    }
116    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
117    pub fn set_kpi_result(mut self, input: ::std::option::Option<crate::types::BaseKpiResult>) -> Self {
118        self.kpi_result = input;
119        self
120    }
121    /// <p>An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.</p>
122    pub fn get_kpi_result(&self) -> &::std::option::Option<crate::types::BaseKpiResult> {
123        &self.kpi_result
124    }
125    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Application Metrics resource because the resource returns all results in a single page.</p>
126    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.next_token = ::std::option::Option::Some(input.into());
128        self
129    }
130    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Application Metrics resource because the resource returns all results in a single page.</p>
131    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.next_token = input;
133        self
134    }
135    /// <p>The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Application Metrics resource because the resource returns all results in a single page.</p>
136    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
137        &self.next_token
138    }
139    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
140    /// This field is required.
141    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
142        self.start_time = ::std::option::Option::Some(input);
143        self
144    }
145    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
146    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
147        self.start_time = input;
148        self
149    }
150    /// <p>The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.</p>
151    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
152        &self.start_time
153    }
154    /// Consumes the builder and constructs a [`ApplicationDateRangeKpiResponse`](crate::types::ApplicationDateRangeKpiResponse).
155    pub fn build(self) -> crate::types::ApplicationDateRangeKpiResponse {
156        crate::types::ApplicationDateRangeKpiResponse {
157            application_id: self.application_id,
158            end_time: self.end_time,
159            kpi_name: self.kpi_name,
160            kpi_result: self.kpi_result,
161            next_token: self.next_token,
162            start_time: self.start_time,
163        }
164    }
165}