aws_sdk_securityhub/operation/get_finding_aggregator/
_get_finding_aggregator_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetFindingAggregatorOutput {
6 pub finding_aggregator_arn: ::std::option::Option<::std::string::String>,
8 pub finding_aggregation_region: ::std::option::Option<::std::string::String>,
10 pub region_linking_mode: ::std::option::Option<::std::string::String>,
12 pub regions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14 _request_id: Option<String>,
15}
16impl GetFindingAggregatorOutput {
17 pub fn finding_aggregator_arn(&self) -> ::std::option::Option<&str> {
19 self.finding_aggregator_arn.as_deref()
20 }
21 pub fn finding_aggregation_region(&self) -> ::std::option::Option<&str> {
23 self.finding_aggregation_region.as_deref()
24 }
25 pub fn region_linking_mode(&self) -> ::std::option::Option<&str> {
27 self.region_linking_mode.as_deref()
28 }
29 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 pub fn builder() -> crate::operation::get_finding_aggregator::builders::GetFindingAggregatorOutputBuilder {
44 crate::operation::get_finding_aggregator::builders::GetFindingAggregatorOutputBuilder::default()
45 }
46}
47
48#[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 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 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 pub fn get_finding_aggregator_arn(&self) -> &::std::option::Option<::std::string::String> {
71 &self.finding_aggregator_arn
72 }
73 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 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 pub fn get_finding_aggregation_region(&self) -> &::std::option::Option<::std::string::String> {
85 &self.finding_aggregation_region
86 }
87 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 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 pub fn get_region_linking_mode(&self) -> &::std::option::Option<::std::string::String> {
99 &self.region_linking_mode
100 }
101 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 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 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 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}