Skip to main content

aws_sdk_securityhub/operation/get_finding_aggregator/
_get_finding_aggregator_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetFindingAggregatorOutput {
6    /// <p>The ARN of the finding aggregator.</p>
7    pub finding_aggregator_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The home Region. Findings generated in linked Regions are replicated and sent to the home Region.</p>
9    pub finding_aggregation_region: ::std::option::Option<::std::string::String>,
10    /// <p>Indicates whether to link all Regions, all Regions except for a list of excluded Regions, or a list of included Regions.</p>
11    pub region_linking_mode: ::std::option::Option<::std::string::String>,
12    /// <p>The list of excluded Regions or included Regions.</p>
13    pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14    _request_id: Option<String>,
15}
16impl GetFindingAggregatorOutput {
17    /// <p>The ARN of the finding aggregator.</p>
18    pub fn finding_aggregator_arn(&self) -> ::std::option::Option<&str> {
19        self.finding_aggregator_arn.as_deref()
20    }
21    /// <p>The home Region. Findings generated in linked Regions are replicated and sent to the home Region.</p>
22    pub fn finding_aggregation_region(&self) -> ::std::option::Option<&str> {
23        self.finding_aggregation_region.as_deref()
24    }
25    /// <p>Indicates whether to link all Regions, all Regions except for a list of excluded Regions, or a list of included Regions.</p>
26    pub fn region_linking_mode(&self) -> ::std::option::Option<&str> {
27        self.region_linking_mode.as_deref()
28    }
29    /// <p>The list of excluded Regions or included Regions.</p>
30    ///
31    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.regions.is_none()`.
32    pub fn regions(&self) -> &[::std::string::String] {
33        self.regions.as_deref().unwrap_or_default()
34    }
35}
36impl ::aws_types::request_id::RequestId for GetFindingAggregatorOutput {
37    fn request_id(&self) -> Option<&str> {
38        self._request_id.as_deref()
39    }
40}
41impl GetFindingAggregatorOutput {
42    /// Creates a new builder-style object to manufacture [`GetFindingAggregatorOutput`](crate::operation::get_finding_aggregator::GetFindingAggregatorOutput).
43    pub fn builder() -> crate::operation::get_finding_aggregator::builders::GetFindingAggregatorOutputBuilder {
44        crate::operation::get_finding_aggregator::builders::GetFindingAggregatorOutputBuilder::default()
45    }
46}
47
48/// A builder for [`GetFindingAggregatorOutput`](crate::operation::get_finding_aggregator::GetFindingAggregatorOutput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct GetFindingAggregatorOutputBuilder {
52    pub(crate) finding_aggregator_arn: ::std::option::Option<::std::string::String>,
53    pub(crate) finding_aggregation_region: ::std::option::Option<::std::string::String>,
54    pub(crate) region_linking_mode: ::std::option::Option<::std::string::String>,
55    pub(crate) regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
56    _request_id: Option<String>,
57}
58impl GetFindingAggregatorOutputBuilder {
59    /// <p>The ARN of the finding aggregator.</p>
60    pub fn finding_aggregator_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.finding_aggregator_arn = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The ARN of the finding aggregator.</p>
65    pub fn set_finding_aggregator_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.finding_aggregator_arn = input;
67        self
68    }
69    /// <p>The ARN of the finding aggregator.</p>
70    pub fn get_finding_aggregator_arn(&self) -> &::std::option::Option<::std::string::String> {
71        &self.finding_aggregator_arn
72    }
73    /// <p>The home Region. Findings generated in linked Regions are replicated and sent to the home Region.</p>
74    pub fn finding_aggregation_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.finding_aggregation_region = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The home Region. Findings generated in linked Regions are replicated and sent to the home Region.</p>
79    pub fn set_finding_aggregation_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.finding_aggregation_region = input;
81        self
82    }
83    /// <p>The home Region. Findings generated in linked Regions are replicated and sent to the home Region.</p>
84    pub fn get_finding_aggregation_region(&self) -> &::std::option::Option<::std::string::String> {
85        &self.finding_aggregation_region
86    }
87    /// <p>Indicates whether to link all Regions, all Regions except for a list of excluded Regions, or a list of included Regions.</p>
88    pub fn region_linking_mode(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.region_linking_mode = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>Indicates whether to link all Regions, all Regions except for a list of excluded Regions, or a list of included Regions.</p>
93    pub fn set_region_linking_mode(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.region_linking_mode = input;
95        self
96    }
97    /// <p>Indicates whether to link all Regions, all Regions except for a list of excluded Regions, or a list of included Regions.</p>
98    pub fn get_region_linking_mode(&self) -> &::std::option::Option<::std::string::String> {
99        &self.region_linking_mode
100    }
101    /// Appends an item to `regions`.
102    ///
103    /// To override the contents of this collection use [`set_regions`](Self::set_regions).
104    ///
105    /// <p>The list of excluded Regions or included Regions.</p>
106    pub fn regions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
107        let mut v = self.regions.unwrap_or_default();
108        v.push(input.into());
109        self.regions = ::std::option::Option::Some(v);
110        self
111    }
112    /// <p>The list of excluded Regions or included Regions.</p>
113    pub fn set_regions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
114        self.regions = input;
115        self
116    }
117    /// <p>The list of excluded Regions or included Regions.</p>
118    pub fn get_regions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
119        &self.regions
120    }
121    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
122        self._request_id = Some(request_id.into());
123        self
124    }
125
126    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
127        self._request_id = request_id;
128        self
129    }
130    /// Consumes the builder and constructs a [`GetFindingAggregatorOutput`](crate::operation::get_finding_aggregator::GetFindingAggregatorOutput).
131    pub fn build(self) -> crate::operation::get_finding_aggregator::GetFindingAggregatorOutput {
132        crate::operation::get_finding_aggregator::GetFindingAggregatorOutput {
133            finding_aggregator_arn: self.finding_aggregator_arn,
134            finding_aggregation_region: self.finding_aggregation_region,
135            region_linking_mode: self.region_linking_mode,
136            regions: self.regions,
137            _request_id: self._request_id,
138        }
139    }
140}