#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAccountUsageOutput {
pub monthly_account_investigation_hours: ::std::option::Option<crate::types::UsageMetric>,
pub monthly_account_evaluation_hours: ::std::option::Option<crate::types::UsageMetric>,
pub monthly_account_system_learning_hours: ::std::option::Option<crate::types::UsageMetric>,
pub monthly_account_on_demand_hours: ::std::option::Option<crate::types::UsageMetric>,
pub usage_period_start_time: ::aws_smithy_types::DateTime,
pub usage_period_end_time: ::aws_smithy_types::DateTime,
_request_id: Option<String>,
}
impl GetAccountUsageOutput {
pub fn monthly_account_investigation_hours(&self) -> ::std::option::Option<&crate::types::UsageMetric> {
self.monthly_account_investigation_hours.as_ref()
}
pub fn monthly_account_evaluation_hours(&self) -> ::std::option::Option<&crate::types::UsageMetric> {
self.monthly_account_evaluation_hours.as_ref()
}
pub fn monthly_account_system_learning_hours(&self) -> ::std::option::Option<&crate::types::UsageMetric> {
self.monthly_account_system_learning_hours.as_ref()
}
pub fn monthly_account_on_demand_hours(&self) -> ::std::option::Option<&crate::types::UsageMetric> {
self.monthly_account_on_demand_hours.as_ref()
}
pub fn usage_period_start_time(&self) -> &::aws_smithy_types::DateTime {
&self.usage_period_start_time
}
pub fn usage_period_end_time(&self) -> &::aws_smithy_types::DateTime {
&self.usage_period_end_time
}
}
impl ::aws_types::request_id::RequestId for GetAccountUsageOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetAccountUsageOutput {
pub fn builder() -> crate::operation::get_account_usage::builders::GetAccountUsageOutputBuilder {
crate::operation::get_account_usage::builders::GetAccountUsageOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAccountUsageOutputBuilder {
pub(crate) monthly_account_investigation_hours: ::std::option::Option<crate::types::UsageMetric>,
pub(crate) monthly_account_evaluation_hours: ::std::option::Option<crate::types::UsageMetric>,
pub(crate) monthly_account_system_learning_hours: ::std::option::Option<crate::types::UsageMetric>,
pub(crate) monthly_account_on_demand_hours: ::std::option::Option<crate::types::UsageMetric>,
pub(crate) usage_period_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) usage_period_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetAccountUsageOutputBuilder {
pub fn monthly_account_investigation_hours(mut self, input: crate::types::UsageMetric) -> Self {
self.monthly_account_investigation_hours = ::std::option::Option::Some(input);
self
}
pub fn set_monthly_account_investigation_hours(mut self, input: ::std::option::Option<crate::types::UsageMetric>) -> Self {
self.monthly_account_investigation_hours = input;
self
}
pub fn get_monthly_account_investigation_hours(&self) -> &::std::option::Option<crate::types::UsageMetric> {
&self.monthly_account_investigation_hours
}
pub fn monthly_account_evaluation_hours(mut self, input: crate::types::UsageMetric) -> Self {
self.monthly_account_evaluation_hours = ::std::option::Option::Some(input);
self
}
pub fn set_monthly_account_evaluation_hours(mut self, input: ::std::option::Option<crate::types::UsageMetric>) -> Self {
self.monthly_account_evaluation_hours = input;
self
}
pub fn get_monthly_account_evaluation_hours(&self) -> &::std::option::Option<crate::types::UsageMetric> {
&self.monthly_account_evaluation_hours
}
pub fn monthly_account_system_learning_hours(mut self, input: crate::types::UsageMetric) -> Self {
self.monthly_account_system_learning_hours = ::std::option::Option::Some(input);
self
}
pub fn set_monthly_account_system_learning_hours(mut self, input: ::std::option::Option<crate::types::UsageMetric>) -> Self {
self.monthly_account_system_learning_hours = input;
self
}
pub fn get_monthly_account_system_learning_hours(&self) -> &::std::option::Option<crate::types::UsageMetric> {
&self.monthly_account_system_learning_hours
}
pub fn monthly_account_on_demand_hours(mut self, input: crate::types::UsageMetric) -> Self {
self.monthly_account_on_demand_hours = ::std::option::Option::Some(input);
self
}
pub fn set_monthly_account_on_demand_hours(mut self, input: ::std::option::Option<crate::types::UsageMetric>) -> Self {
self.monthly_account_on_demand_hours = input;
self
}
pub fn get_monthly_account_on_demand_hours(&self) -> &::std::option::Option<crate::types::UsageMetric> {
&self.monthly_account_on_demand_hours
}
pub fn usage_period_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.usage_period_start_time = ::std::option::Option::Some(input);
self
}
pub fn set_usage_period_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.usage_period_start_time = input;
self
}
pub fn get_usage_period_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.usage_period_start_time
}
pub fn usage_period_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.usage_period_end_time = ::std::option::Option::Some(input);
self
}
pub fn set_usage_period_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.usage_period_end_time = input;
self
}
pub fn get_usage_period_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.usage_period_end_time
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_account_usage::GetAccountUsageOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_account_usage::GetAccountUsageOutput {
monthly_account_investigation_hours: self.monthly_account_investigation_hours,
monthly_account_evaluation_hours: self.monthly_account_evaluation_hours,
monthly_account_system_learning_hours: self.monthly_account_system_learning_hours,
monthly_account_on_demand_hours: self.monthly_account_on_demand_hours,
usage_period_start_time: self.usage_period_start_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"usage_period_start_time",
"usage_period_start_time was not specified but it is required when building GetAccountUsageOutput",
)
})?,
usage_period_end_time: self.usage_period_end_time.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"usage_period_end_time",
"usage_period_end_time was not specified but it is required when building GetAccountUsageOutput",
)
})?,
_request_id: self._request_id,
})
}
}