// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`GetMetricUsage`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder) operation.
/// This operation supports pagination; See [`into_paginator()`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::into_paginator).
///
/// - The fluent builder is configurable:
/// - [`app_id(impl Into<String>)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::app_id) / [`set_app_id(Option<String>)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::set_app_id):<br>required: **true**<br>The ID of the app.<br>
/// - [`user_id(impl Into<String>)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::user_id) / [`set_user_id(Option<String>)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::set_user_id):<br>required: **true**<br>The end user whose usage is read. Do not include personally identifiable or otherwise sensitive data in this value.<br>
/// - [`started_at(DateTime)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::started_at) / [`set_started_at(Option<DateTime>)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::set_started_at):<br>required: **true**<br>Inclusive start of the reporting window (half-open \[startedAt, endedAt)).<br>
/// - [`ended_at(DateTime)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::ended_at) / [`set_ended_at(Option<DateTime>)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::set_ended_at):<br>required: **true**<br>Exclusive end of the reporting window. Must be after startedAt; the window may span at most 744 hours (31 days, the longest monthly billing period). Must not be in the future beyond a small clock-skew allowance.<br>
/// - [`scope(RequestScope)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::scope) / [`set_scope(Option<RequestScope>)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::set_scope):<br>required: **true**<br>Required. The environment: live or sandbox. sandbox reads the app's isolated test environment. Usage is kept separately per environment.<br>
/// - [`max_results(i32)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::max_results) / [`set_max_results(Option<i32>)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::set_max_results):<br>required: **false**<br>Maximum number of per-metric usage entries to return in this page (1-25, default 25).<br>
/// - [`next_token(impl Into<String>)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::next_token) / [`set_next_token(Option<String>)`](crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::set_next_token):<br>required: **false**<br>Opaque continuation token from a prior response. The window (startedAt/endedAt) must be unchanged across a pagination sequence.<br>
/// - On success, responds with [`GetMetricUsageOutput`](crate::operation::get_metric_usage::GetMetricUsageOutput) with field(s):
/// - [`usage(Vec::<MetricUsage>)`](crate::operation::get_metric_usage::GetMetricUsageOutput::usage): One entry per metric in this page, carrying its usage over the window. A metric with no events in the window is returned with usage = 0.
/// - [`next_token(Option<String>)`](crate::operation::get_metric_usage::GetMetricUsageOutput::next_token): Opaque continuation token. Present when more metrics remain; pass it back (with the same window) to read the next page. Absent on the last page.
/// - On failure, responds with [`SdkError<GetMetricUsageError>`](crate::operation::get_metric_usage::GetMetricUsageError)
pub fn get_metric_usage(&self) -> crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder {
crate::operation::get_metric_usage::builders::GetMetricUsageFluentBuilder::new(self.handle.clone())
}
}