aws_sdk_securityhub/operation/describe_hub/
_describe_hub_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 DescribeHubOutput {
6    /// <p>The ARN of the Hub resource that was retrieved.</p>
7    pub hub_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The date and time when Security Hub was enabled in the account.</p>
9    pub subscribed_at: ::std::option::Option<::std::string::String>,
10    /// <p>Whether to automatically enable new controls when they are added to standards that are enabled.</p>
11    /// <p>If set to <code>true</code>, then new controls for enabled standards are enabled automatically. If set to <code>false</code>, then new controls are not enabled.</p>
12    /// <p>When you automatically enable new controls, you can interact with the controls in the console and programmatically immediately after release. However, automatically enabled controls have a temporary default status of <code>DISABLED</code>. It can take up to several days for Security Hub to process the control release and designate the control as <code>ENABLED</code> in your account. During the processing period, you can manually enable or disable a control, and Security Hub will maintain that designation regardless of whether you have <code>AutoEnableControls</code> set to <code>true</code>.</p>
13    pub auto_enable_controls: ::std::option::Option<bool>,
14    /// <p>Specifies whether the calling account has consolidated control findings turned on. If the value for this field is set to <code>SECURITY_CONTROL</code>, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards.</p>
15    /// <p>If the value for this field is set to <code>STANDARD_CONTROL</code>, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards.</p>
16    /// <p>The value for this field in a member account matches the value in the administrator account. For accounts that aren't part of an organization, the default value of this field is <code>SECURITY_CONTROL</code> if you enabled Security Hub on or after February 23, 2023.</p>
17    pub control_finding_generator: ::std::option::Option<crate::types::ControlFindingGenerator>,
18    _request_id: Option<String>,
19}
20impl DescribeHubOutput {
21    /// <p>The ARN of the Hub resource that was retrieved.</p>
22    pub fn hub_arn(&self) -> ::std::option::Option<&str> {
23        self.hub_arn.as_deref()
24    }
25    /// <p>The date and time when Security Hub was enabled in the account.</p>
26    pub fn subscribed_at(&self) -> ::std::option::Option<&str> {
27        self.subscribed_at.as_deref()
28    }
29    /// <p>Whether to automatically enable new controls when they are added to standards that are enabled.</p>
30    /// <p>If set to <code>true</code>, then new controls for enabled standards are enabled automatically. If set to <code>false</code>, then new controls are not enabled.</p>
31    /// <p>When you automatically enable new controls, you can interact with the controls in the console and programmatically immediately after release. However, automatically enabled controls have a temporary default status of <code>DISABLED</code>. It can take up to several days for Security Hub to process the control release and designate the control as <code>ENABLED</code> in your account. During the processing period, you can manually enable or disable a control, and Security Hub will maintain that designation regardless of whether you have <code>AutoEnableControls</code> set to <code>true</code>.</p>
32    pub fn auto_enable_controls(&self) -> ::std::option::Option<bool> {
33        self.auto_enable_controls
34    }
35    /// <p>Specifies whether the calling account has consolidated control findings turned on. If the value for this field is set to <code>SECURITY_CONTROL</code>, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards.</p>
36    /// <p>If the value for this field is set to <code>STANDARD_CONTROL</code>, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards.</p>
37    /// <p>The value for this field in a member account matches the value in the administrator account. For accounts that aren't part of an organization, the default value of this field is <code>SECURITY_CONTROL</code> if you enabled Security Hub on or after February 23, 2023.</p>
38    pub fn control_finding_generator(&self) -> ::std::option::Option<&crate::types::ControlFindingGenerator> {
39        self.control_finding_generator.as_ref()
40    }
41}
42impl ::aws_types::request_id::RequestId for DescribeHubOutput {
43    fn request_id(&self) -> Option<&str> {
44        self._request_id.as_deref()
45    }
46}
47impl DescribeHubOutput {
48    /// Creates a new builder-style object to manufacture [`DescribeHubOutput`](crate::operation::describe_hub::DescribeHubOutput).
49    pub fn builder() -> crate::operation::describe_hub::builders::DescribeHubOutputBuilder {
50        crate::operation::describe_hub::builders::DescribeHubOutputBuilder::default()
51    }
52}
53
54/// A builder for [`DescribeHubOutput`](crate::operation::describe_hub::DescribeHubOutput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct DescribeHubOutputBuilder {
58    pub(crate) hub_arn: ::std::option::Option<::std::string::String>,
59    pub(crate) subscribed_at: ::std::option::Option<::std::string::String>,
60    pub(crate) auto_enable_controls: ::std::option::Option<bool>,
61    pub(crate) control_finding_generator: ::std::option::Option<crate::types::ControlFindingGenerator>,
62    _request_id: Option<String>,
63}
64impl DescribeHubOutputBuilder {
65    /// <p>The ARN of the Hub resource that was retrieved.</p>
66    pub fn hub_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        self.hub_arn = ::std::option::Option::Some(input.into());
68        self
69    }
70    /// <p>The ARN of the Hub resource that was retrieved.</p>
71    pub fn set_hub_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72        self.hub_arn = input;
73        self
74    }
75    /// <p>The ARN of the Hub resource that was retrieved.</p>
76    pub fn get_hub_arn(&self) -> &::std::option::Option<::std::string::String> {
77        &self.hub_arn
78    }
79    /// <p>The date and time when Security Hub was enabled in the account.</p>
80    pub fn subscribed_at(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81        self.subscribed_at = ::std::option::Option::Some(input.into());
82        self
83    }
84    /// <p>The date and time when Security Hub was enabled in the account.</p>
85    pub fn set_subscribed_at(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.subscribed_at = input;
87        self
88    }
89    /// <p>The date and time when Security Hub was enabled in the account.</p>
90    pub fn get_subscribed_at(&self) -> &::std::option::Option<::std::string::String> {
91        &self.subscribed_at
92    }
93    /// <p>Whether to automatically enable new controls when they are added to standards that are enabled.</p>
94    /// <p>If set to <code>true</code>, then new controls for enabled standards are enabled automatically. If set to <code>false</code>, then new controls are not enabled.</p>
95    /// <p>When you automatically enable new controls, you can interact with the controls in the console and programmatically immediately after release. However, automatically enabled controls have a temporary default status of <code>DISABLED</code>. It can take up to several days for Security Hub to process the control release and designate the control as <code>ENABLED</code> in your account. During the processing period, you can manually enable or disable a control, and Security Hub will maintain that designation regardless of whether you have <code>AutoEnableControls</code> set to <code>true</code>.</p>
96    pub fn auto_enable_controls(mut self, input: bool) -> Self {
97        self.auto_enable_controls = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>Whether to automatically enable new controls when they are added to standards that are enabled.</p>
101    /// <p>If set to <code>true</code>, then new controls for enabled standards are enabled automatically. If set to <code>false</code>, then new controls are not enabled.</p>
102    /// <p>When you automatically enable new controls, you can interact with the controls in the console and programmatically immediately after release. However, automatically enabled controls have a temporary default status of <code>DISABLED</code>. It can take up to several days for Security Hub to process the control release and designate the control as <code>ENABLED</code> in your account. During the processing period, you can manually enable or disable a control, and Security Hub will maintain that designation regardless of whether you have <code>AutoEnableControls</code> set to <code>true</code>.</p>
103    pub fn set_auto_enable_controls(mut self, input: ::std::option::Option<bool>) -> Self {
104        self.auto_enable_controls = input;
105        self
106    }
107    /// <p>Whether to automatically enable new controls when they are added to standards that are enabled.</p>
108    /// <p>If set to <code>true</code>, then new controls for enabled standards are enabled automatically. If set to <code>false</code>, then new controls are not enabled.</p>
109    /// <p>When you automatically enable new controls, you can interact with the controls in the console and programmatically immediately after release. However, automatically enabled controls have a temporary default status of <code>DISABLED</code>. It can take up to several days for Security Hub to process the control release and designate the control as <code>ENABLED</code> in your account. During the processing period, you can manually enable or disable a control, and Security Hub will maintain that designation regardless of whether you have <code>AutoEnableControls</code> set to <code>true</code>.</p>
110    pub fn get_auto_enable_controls(&self) -> &::std::option::Option<bool> {
111        &self.auto_enable_controls
112    }
113    /// <p>Specifies whether the calling account has consolidated control findings turned on. If the value for this field is set to <code>SECURITY_CONTROL</code>, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards.</p>
114    /// <p>If the value for this field is set to <code>STANDARD_CONTROL</code>, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards.</p>
115    /// <p>The value for this field in a member account matches the value in the administrator account. For accounts that aren't part of an organization, the default value of this field is <code>SECURITY_CONTROL</code> if you enabled Security Hub on or after February 23, 2023.</p>
116    pub fn control_finding_generator(mut self, input: crate::types::ControlFindingGenerator) -> Self {
117        self.control_finding_generator = ::std::option::Option::Some(input);
118        self
119    }
120    /// <p>Specifies whether the calling account has consolidated control findings turned on. If the value for this field is set to <code>SECURITY_CONTROL</code>, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards.</p>
121    /// <p>If the value for this field is set to <code>STANDARD_CONTROL</code>, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards.</p>
122    /// <p>The value for this field in a member account matches the value in the administrator account. For accounts that aren't part of an organization, the default value of this field is <code>SECURITY_CONTROL</code> if you enabled Security Hub on or after February 23, 2023.</p>
123    pub fn set_control_finding_generator(mut self, input: ::std::option::Option<crate::types::ControlFindingGenerator>) -> Self {
124        self.control_finding_generator = input;
125        self
126    }
127    /// <p>Specifies whether the calling account has consolidated control findings turned on. If the value for this field is set to <code>SECURITY_CONTROL</code>, Security Hub generates a single finding for a control check even when the check applies to multiple enabled standards.</p>
128    /// <p>If the value for this field is set to <code>STANDARD_CONTROL</code>, Security Hub generates separate findings for a control check when the check applies to multiple enabled standards.</p>
129    /// <p>The value for this field in a member account matches the value in the administrator account. For accounts that aren't part of an organization, the default value of this field is <code>SECURITY_CONTROL</code> if you enabled Security Hub on or after February 23, 2023.</p>
130    pub fn get_control_finding_generator(&self) -> &::std::option::Option<crate::types::ControlFindingGenerator> {
131        &self.control_finding_generator
132    }
133    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
134        self._request_id = Some(request_id.into());
135        self
136    }
137
138    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
139        self._request_id = request_id;
140        self
141    }
142    /// Consumes the builder and constructs a [`DescribeHubOutput`](crate::operation::describe_hub::DescribeHubOutput).
143    pub fn build(self) -> crate::operation::describe_hub::DescribeHubOutput {
144        crate::operation::describe_hub::DescribeHubOutput {
145            hub_arn: self.hub_arn,
146            subscribed_at: self.subscribed_at,
147            auto_enable_controls: self.auto_enable_controls,
148            control_finding_generator: self.control_finding_generator,
149            _request_id: self._request_id,
150        }
151    }
152}