aws-sdk-codegurusecurity 1.98.0

AWS SDK for Amazon CodeGuru Security
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetMetricsSummaryInput {
    /// <p>The date you want to retrieve summary metrics from, rounded to the nearest day. The date must be within the past two years.</p>
    pub date: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl GetMetricsSummaryInput {
    /// <p>The date you want to retrieve summary metrics from, rounded to the nearest day. The date must be within the past two years.</p>
    pub fn date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.date.as_ref()
    }
}
impl GetMetricsSummaryInput {
    /// Creates a new builder-style object to manufacture [`GetMetricsSummaryInput`](crate::operation::get_metrics_summary::GetMetricsSummaryInput).
    pub fn builder() -> crate::operation::get_metrics_summary::builders::GetMetricsSummaryInputBuilder {
        crate::operation::get_metrics_summary::builders::GetMetricsSummaryInputBuilder::default()
    }
}

/// A builder for [`GetMetricsSummaryInput`](crate::operation::get_metrics_summary::GetMetricsSummaryInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetMetricsSummaryInputBuilder {
    pub(crate) date: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl GetMetricsSummaryInputBuilder {
    /// <p>The date you want to retrieve summary metrics from, rounded to the nearest day. The date must be within the past two years.</p>
    /// This field is required.
    pub fn date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date you want to retrieve summary metrics from, rounded to the nearest day. The date must be within the past two years.</p>
    pub fn set_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.date = input;
        self
    }
    /// <p>The date you want to retrieve summary metrics from, rounded to the nearest day. The date must be within the past two years.</p>
    pub fn get_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.date
    }
    /// Consumes the builder and constructs a [`GetMetricsSummaryInput`](crate::operation::get_metrics_summary::GetMetricsSummaryInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_metrics_summary::GetMetricsSummaryInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_metrics_summary::GetMetricsSummaryInput { date: self.date })
    }
}