aws_sdk_securityhub/operation/batch_get_standards_control_associations/_batch_get_standards_control_associations_input.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 BatchGetStandardsControlAssociationsInput {
6 /// <p>An array with one or more objects that includes a security control (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) and the Amazon Resource Name (ARN) of a standard. This field is used to query the enablement status of a control in a specified standard. The security control ID or ARN is the same across standards.</p>
7 pub standards_control_association_ids: ::std::option::Option<::std::vec::Vec<crate::types::StandardsControlAssociationId>>,
8}
9impl BatchGetStandardsControlAssociationsInput {
10 /// <p>An array with one or more objects that includes a security control (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) and the Amazon Resource Name (ARN) of a standard. This field is used to query the enablement status of a control in a specified standard. The security control ID or ARN is the same across standards.</p>
11 ///
12 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.standards_control_association_ids.is_none()`.
13 pub fn standards_control_association_ids(&self) -> &[crate::types::StandardsControlAssociationId] {
14 self.standards_control_association_ids.as_deref().unwrap_or_default()
15 }
16}
17impl BatchGetStandardsControlAssociationsInput {
18 /// Creates a new builder-style object to manufacture [`BatchGetStandardsControlAssociationsInput`](crate::operation::batch_get_standards_control_associations::BatchGetStandardsControlAssociationsInput).
19 pub fn builder() -> crate::operation::batch_get_standards_control_associations::builders::BatchGetStandardsControlAssociationsInputBuilder {
20 crate::operation::batch_get_standards_control_associations::builders::BatchGetStandardsControlAssociationsInputBuilder::default()
21 }
22}
23
24/// A builder for [`BatchGetStandardsControlAssociationsInput`](crate::operation::batch_get_standards_control_associations::BatchGetStandardsControlAssociationsInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct BatchGetStandardsControlAssociationsInputBuilder {
28 pub(crate) standards_control_association_ids: ::std::option::Option<::std::vec::Vec<crate::types::StandardsControlAssociationId>>,
29}
30impl BatchGetStandardsControlAssociationsInputBuilder {
31 /// Appends an item to `standards_control_association_ids`.
32 ///
33 /// To override the contents of this collection use [`set_standards_control_association_ids`](Self::set_standards_control_association_ids).
34 ///
35 /// <p>An array with one or more objects that includes a security control (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) and the Amazon Resource Name (ARN) of a standard. This field is used to query the enablement status of a control in a specified standard. The security control ID or ARN is the same across standards.</p>
36 pub fn standards_control_association_ids(mut self, input: crate::types::StandardsControlAssociationId) -> Self {
37 let mut v = self.standards_control_association_ids.unwrap_or_default();
38 v.push(input);
39 self.standards_control_association_ids = ::std::option::Option::Some(v);
40 self
41 }
42 /// <p>An array with one or more objects that includes a security control (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) and the Amazon Resource Name (ARN) of a standard. This field is used to query the enablement status of a control in a specified standard. The security control ID or ARN is the same across standards.</p>
43 pub fn set_standards_control_association_ids(
44 mut self,
45 input: ::std::option::Option<::std::vec::Vec<crate::types::StandardsControlAssociationId>>,
46 ) -> Self {
47 self.standards_control_association_ids = input;
48 self
49 }
50 /// <p>An array with one or more objects that includes a security control (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) and the Amazon Resource Name (ARN) of a standard. This field is used to query the enablement status of a control in a specified standard. The security control ID or ARN is the same across standards.</p>
51 pub fn get_standards_control_association_ids(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StandardsControlAssociationId>> {
52 &self.standards_control_association_ids
53 }
54 /// Consumes the builder and constructs a [`BatchGetStandardsControlAssociationsInput`](crate::operation::batch_get_standards_control_associations::BatchGetStandardsControlAssociationsInput).
55 pub fn build(
56 self,
57 ) -> ::std::result::Result<
58 crate::operation::batch_get_standards_control_associations::BatchGetStandardsControlAssociationsInput,
59 ::aws_smithy_types::error::operation::BuildError,
60 > {
61 ::std::result::Result::Ok(
62 crate::operation::batch_get_standards_control_associations::BatchGetStandardsControlAssociationsInput {
63 standards_control_association_ids: self.standards_control_association_ids,
64 },
65 )
66 }
67}