aws-sdk-pi 1.101.0

AWS SDK for AWS Performance Insights
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>List of data objects which provide details about source metrics. This field can be used to determine the PI metric to render for the insight. This data type also includes static values for the metrics for the Insight that were calculated and included in text and annotations on the DB load chart.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Data {
    /// <p>This field determines the Performance Insights metric to render for the insight. The <code>name</code> field refers to a Performance Insights metric.</p>
    pub performance_insights_metric: ::std::option::Option<crate::types::PerformanceInsightsMetric>,
}
impl Data {
    /// <p>This field determines the Performance Insights metric to render for the insight. The <code>name</code> field refers to a Performance Insights metric.</p>
    pub fn performance_insights_metric(&self) -> ::std::option::Option<&crate::types::PerformanceInsightsMetric> {
        self.performance_insights_metric.as_ref()
    }
}
impl Data {
    /// Creates a new builder-style object to manufacture [`Data`](crate::types::Data).
    pub fn builder() -> crate::types::builders::DataBuilder {
        crate::types::builders::DataBuilder::default()
    }
}

/// A builder for [`Data`](crate::types::Data).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DataBuilder {
    pub(crate) performance_insights_metric: ::std::option::Option<crate::types::PerformanceInsightsMetric>,
}
impl DataBuilder {
    /// <p>This field determines the Performance Insights metric to render for the insight. The <code>name</code> field refers to a Performance Insights metric.</p>
    pub fn performance_insights_metric(mut self, input: crate::types::PerformanceInsightsMetric) -> Self {
        self.performance_insights_metric = ::std::option::Option::Some(input);
        self
    }
    /// <p>This field determines the Performance Insights metric to render for the insight. The <code>name</code> field refers to a Performance Insights metric.</p>
    pub fn set_performance_insights_metric(mut self, input: ::std::option::Option<crate::types::PerformanceInsightsMetric>) -> Self {
        self.performance_insights_metric = input;
        self
    }
    /// <p>This field determines the Performance Insights metric to render for the insight. The <code>name</code> field refers to a Performance Insights metric.</p>
    pub fn get_performance_insights_metric(&self) -> &::std::option::Option<crate::types::PerformanceInsightsMetric> {
        &self.performance_insights_metric
    }
    /// Consumes the builder and constructs a [`Data`](crate::types::Data).
    pub fn build(self) -> crate::types::Data {
        crate::types::Data {
            performance_insights_metric: self.performance_insights_metric,
        }
    }
}