1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeHubOutput {
/// <p>The ARN of the Hub resource that was retrieved.</p>
pub hub_arn: ::std::option::Option<::std::string::String>,
/// <p>The date and time when Security Hub was enabled in the account.</p>
pub subscribed_at: ::std::option::Option<::std::string::String>,
/// <p>Whether to automatically enable new controls when they are added to standards that are enabled.</p>
/// <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>
pub auto_enable_controls: ::std::option::Option<bool>,
/// <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>
/// <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>
/// <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>
pub control_finding_generator: ::std::option::Option<crate::types::ControlFindingGenerator>,
_request_id: Option<String>,
}
impl DescribeHubOutput {
/// <p>The ARN of the Hub resource that was retrieved.</p>
pub fn hub_arn(&self) -> ::std::option::Option<&str> {
self.hub_arn.as_deref()
}
/// <p>The date and time when Security Hub was enabled in the account.</p>
pub fn subscribed_at(&self) -> ::std::option::Option<&str> {
self.subscribed_at.as_deref()
}
/// <p>Whether to automatically enable new controls when they are added to standards that are enabled.</p>
/// <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>
pub fn auto_enable_controls(&self) -> ::std::option::Option<bool> {
self.auto_enable_controls
}
/// <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>
/// <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>
/// <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>
pub fn control_finding_generator(&self) -> ::std::option::Option<&crate::types::ControlFindingGenerator> {
self.control_finding_generator.as_ref()
}
}
impl ::aws_http::request_id::RequestId for DescribeHubOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeHubOutput {
/// Creates a new builder-style object to manufacture [`DescribeHubOutput`](crate::operation::describe_hub::DescribeHubOutput).
pub fn builder() -> crate::operation::describe_hub::builders::DescribeHubOutputBuilder {
crate::operation::describe_hub::builders::DescribeHubOutputBuilder::default()
}
}
/// A builder for [`DescribeHubOutput`](crate::operation::describe_hub::DescribeHubOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DescribeHubOutputBuilder {
pub(crate) hub_arn: ::std::option::Option<::std::string::String>,
pub(crate) subscribed_at: ::std::option::Option<::std::string::String>,
pub(crate) auto_enable_controls: ::std::option::Option<bool>,
pub(crate) control_finding_generator: ::std::option::Option<crate::types::ControlFindingGenerator>,
_request_id: Option<String>,
}
impl DescribeHubOutputBuilder {
/// <p>The ARN of the Hub resource that was retrieved.</p>
pub fn hub_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.hub_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the Hub resource that was retrieved.</p>
pub fn set_hub_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.hub_arn = input;
self
}
/// <p>The ARN of the Hub resource that was retrieved.</p>
pub fn get_hub_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.hub_arn
}
/// <p>The date and time when Security Hub was enabled in the account.</p>
pub fn subscribed_at(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.subscribed_at = ::std::option::Option::Some(input.into());
self
}
/// <p>The date and time when Security Hub was enabled in the account.</p>
pub fn set_subscribed_at(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.subscribed_at = input;
self
}
/// <p>The date and time when Security Hub was enabled in the account.</p>
pub fn get_subscribed_at(&self) -> &::std::option::Option<::std::string::String> {
&self.subscribed_at
}
/// <p>Whether to automatically enable new controls when they are added to standards that are enabled.</p>
/// <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>
pub fn auto_enable_controls(mut self, input: bool) -> Self {
self.auto_enable_controls = ::std::option::Option::Some(input);
self
}
/// <p>Whether to automatically enable new controls when they are added to standards that are enabled.</p>
/// <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>
pub fn set_auto_enable_controls(mut self, input: ::std::option::Option<bool>) -> Self {
self.auto_enable_controls = input;
self
}
/// <p>Whether to automatically enable new controls when they are added to standards that are enabled.</p>
/// <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>
pub fn get_auto_enable_controls(&self) -> &::std::option::Option<bool> {
&self.auto_enable_controls
}
/// <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>
/// <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>
/// <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>
pub fn control_finding_generator(mut self, input: crate::types::ControlFindingGenerator) -> Self {
self.control_finding_generator = ::std::option::Option::Some(input);
self
}
/// <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>
/// <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>
/// <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>
pub fn set_control_finding_generator(mut self, input: ::std::option::Option<crate::types::ControlFindingGenerator>) -> Self {
self.control_finding_generator = input;
self
}
/// <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>
/// <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>
/// <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>
pub fn get_control_finding_generator(&self) -> &::std::option::Option<crate::types::ControlFindingGenerator> {
&self.control_finding_generator
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`DescribeHubOutput`](crate::operation::describe_hub::DescribeHubOutput).
pub fn build(self) -> crate::operation::describe_hub::DescribeHubOutput {
crate::operation::describe_hub::DescribeHubOutput {
hub_arn: self.hub_arn,
subscribed_at: self.subscribed_at,
auto_enable_controls: self.auto_enable_controls,
control_finding_generator: self.control_finding_generator,
_request_id: self._request_id,
}
}
}