Skip to main content

aws_sdk_securityhub/operation/batch_get_security_controls/
_batch_get_security_controls_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 BatchGetSecurityControlsOutput {
6    /// <p>An array that returns the identifier, Amazon Resource Name (ARN), and other details about a security control. The same information is returned whether the request includes <code>SecurityControlId</code> or <code>SecurityControlArn</code>.</p>
7    pub security_controls: ::std::option::Option<::std::vec::Vec<crate::types::SecurityControl>>,
8    /// <p>A security control (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) for which details cannot be returned.</p>
9    pub unprocessed_ids: ::std::option::Option<::std::vec::Vec<crate::types::UnprocessedSecurityControl>>,
10    _request_id: Option<String>,
11}
12impl BatchGetSecurityControlsOutput {
13    /// <p>An array that returns the identifier, Amazon Resource Name (ARN), and other details about a security control. The same information is returned whether the request includes <code>SecurityControlId</code> or <code>SecurityControlArn</code>.</p>
14    ///
15    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_controls.is_none()`.
16    pub fn security_controls(&self) -> &[crate::types::SecurityControl] {
17        self.security_controls.as_deref().unwrap_or_default()
18    }
19    /// <p>A security control (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) for which details cannot be returned.</p>
20    ///
21    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.unprocessed_ids.is_none()`.
22    pub fn unprocessed_ids(&self) -> &[crate::types::UnprocessedSecurityControl] {
23        self.unprocessed_ids.as_deref().unwrap_or_default()
24    }
25}
26impl ::aws_types::request_id::RequestId for BatchGetSecurityControlsOutput {
27    fn request_id(&self) -> Option<&str> {
28        self._request_id.as_deref()
29    }
30}
31impl BatchGetSecurityControlsOutput {
32    /// Creates a new builder-style object to manufacture [`BatchGetSecurityControlsOutput`](crate::operation::batch_get_security_controls::BatchGetSecurityControlsOutput).
33    pub fn builder() -> crate::operation::batch_get_security_controls::builders::BatchGetSecurityControlsOutputBuilder {
34        crate::operation::batch_get_security_controls::builders::BatchGetSecurityControlsOutputBuilder::default()
35    }
36}
37
38/// A builder for [`BatchGetSecurityControlsOutput`](crate::operation::batch_get_security_controls::BatchGetSecurityControlsOutput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct BatchGetSecurityControlsOutputBuilder {
42    pub(crate) security_controls: ::std::option::Option<::std::vec::Vec<crate::types::SecurityControl>>,
43    pub(crate) unprocessed_ids: ::std::option::Option<::std::vec::Vec<crate::types::UnprocessedSecurityControl>>,
44    _request_id: Option<String>,
45}
46impl BatchGetSecurityControlsOutputBuilder {
47    /// Appends an item to `security_controls`.
48    ///
49    /// To override the contents of this collection use [`set_security_controls`](Self::set_security_controls).
50    ///
51    /// <p>An array that returns the identifier, Amazon Resource Name (ARN), and other details about a security control. The same information is returned whether the request includes <code>SecurityControlId</code> or <code>SecurityControlArn</code>.</p>
52    pub fn security_controls(mut self, input: crate::types::SecurityControl) -> Self {
53        let mut v = self.security_controls.unwrap_or_default();
54        v.push(input);
55        self.security_controls = ::std::option::Option::Some(v);
56        self
57    }
58    /// <p>An array that returns the identifier, Amazon Resource Name (ARN), and other details about a security control. The same information is returned whether the request includes <code>SecurityControlId</code> or <code>SecurityControlArn</code>.</p>
59    pub fn set_security_controls(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SecurityControl>>) -> Self {
60        self.security_controls = input;
61        self
62    }
63    /// <p>An array that returns the identifier, Amazon Resource Name (ARN), and other details about a security control. The same information is returned whether the request includes <code>SecurityControlId</code> or <code>SecurityControlArn</code>.</p>
64    pub fn get_security_controls(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SecurityControl>> {
65        &self.security_controls
66    }
67    /// Appends an item to `unprocessed_ids`.
68    ///
69    /// To override the contents of this collection use [`set_unprocessed_ids`](Self::set_unprocessed_ids).
70    ///
71    /// <p>A security control (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) for which details cannot be returned.</p>
72    pub fn unprocessed_ids(mut self, input: crate::types::UnprocessedSecurityControl) -> Self {
73        let mut v = self.unprocessed_ids.unwrap_or_default();
74        v.push(input);
75        self.unprocessed_ids = ::std::option::Option::Some(v);
76        self
77    }
78    /// <p>A security control (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) for which details cannot be returned.</p>
79    pub fn set_unprocessed_ids(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UnprocessedSecurityControl>>) -> Self {
80        self.unprocessed_ids = input;
81        self
82    }
83    /// <p>A security control (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) for which details cannot be returned.</p>
84    pub fn get_unprocessed_ids(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UnprocessedSecurityControl>> {
85        &self.unprocessed_ids
86    }
87    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
88        self._request_id = Some(request_id.into());
89        self
90    }
91
92    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
93        self._request_id = request_id;
94        self
95    }
96    /// Consumes the builder and constructs a [`BatchGetSecurityControlsOutput`](crate::operation::batch_get_security_controls::BatchGetSecurityControlsOutput).
97    pub fn build(self) -> crate::operation::batch_get_security_controls::BatchGetSecurityControlsOutput {
98        crate::operation::batch_get_security_controls::BatchGetSecurityControlsOutput {
99            security_controls: self.security_controls,
100            unprocessed_ids: self.unprocessed_ids,
101            _request_id: self._request_id,
102        }
103    }
104}