Skip to main content

aws_sdk_config/types/
_aggregate_conformance_pack_compliance_summary.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Provides a summary of compliance based on either account ID or region.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AggregateConformancePackComplianceSummary {
7    /// <p>Returns an <code>AggregateConformancePackComplianceCount</code> object.</p>
8    pub compliance_summary: ::std::option::Option<crate::types::AggregateConformancePackComplianceCount>,
9    /// <p>Groups the result based on Amazon Web Services account ID or Amazon Web Services Region.</p>
10    pub group_name: ::std::option::Option<::std::string::String>,
11}
12impl AggregateConformancePackComplianceSummary {
13    /// <p>Returns an <code>AggregateConformancePackComplianceCount</code> object.</p>
14    pub fn compliance_summary(&self) -> ::std::option::Option<&crate::types::AggregateConformancePackComplianceCount> {
15        self.compliance_summary.as_ref()
16    }
17    /// <p>Groups the result based on Amazon Web Services account ID or Amazon Web Services Region.</p>
18    pub fn group_name(&self) -> ::std::option::Option<&str> {
19        self.group_name.as_deref()
20    }
21}
22impl AggregateConformancePackComplianceSummary {
23    /// Creates a new builder-style object to manufacture [`AggregateConformancePackComplianceSummary`](crate::types::AggregateConformancePackComplianceSummary).
24    pub fn builder() -> crate::types::builders::AggregateConformancePackComplianceSummaryBuilder {
25        crate::types::builders::AggregateConformancePackComplianceSummaryBuilder::default()
26    }
27}
28
29/// A builder for [`AggregateConformancePackComplianceSummary`](crate::types::AggregateConformancePackComplianceSummary).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct AggregateConformancePackComplianceSummaryBuilder {
33    pub(crate) compliance_summary: ::std::option::Option<crate::types::AggregateConformancePackComplianceCount>,
34    pub(crate) group_name: ::std::option::Option<::std::string::String>,
35}
36impl AggregateConformancePackComplianceSummaryBuilder {
37    /// <p>Returns an <code>AggregateConformancePackComplianceCount</code> object.</p>
38    pub fn compliance_summary(mut self, input: crate::types::AggregateConformancePackComplianceCount) -> Self {
39        self.compliance_summary = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>Returns an <code>AggregateConformancePackComplianceCount</code> object.</p>
43    pub fn set_compliance_summary(mut self, input: ::std::option::Option<crate::types::AggregateConformancePackComplianceCount>) -> Self {
44        self.compliance_summary = input;
45        self
46    }
47    /// <p>Returns an <code>AggregateConformancePackComplianceCount</code> object.</p>
48    pub fn get_compliance_summary(&self) -> &::std::option::Option<crate::types::AggregateConformancePackComplianceCount> {
49        &self.compliance_summary
50    }
51    /// <p>Groups the result based on Amazon Web Services account ID or Amazon Web Services Region.</p>
52    pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.group_name = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>Groups the result based on Amazon Web Services account ID or Amazon Web Services Region.</p>
57    pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.group_name = input;
59        self
60    }
61    /// <p>Groups the result based on Amazon Web Services account ID or Amazon Web Services Region.</p>
62    pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
63        &self.group_name
64    }
65    /// Consumes the builder and constructs a [`AggregateConformancePackComplianceSummary`](crate::types::AggregateConformancePackComplianceSummary).
66    pub fn build(self) -> crate::types::AggregateConformancePackComplianceSummary {
67        crate::types::AggregateConformancePackComplianceSummary {
68            compliance_summary: self.compliance_summary,
69            group_name: self.group_name,
70        }
71    }
72}