aws_sdk_securityhub/types/
_standards_control_association_id.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <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. The security control ID or ARN is the same across standards.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct StandardsControlAssociationId {
7    /// <p>The unique identifier (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) of a security control across standards.</p>
8    pub security_control_id: ::std::option::Option<::std::string::String>,
9    /// <p>The ARN of a standard.</p>
10    pub standards_arn: ::std::option::Option<::std::string::String>,
11}
12impl StandardsControlAssociationId {
13    /// <p>The unique identifier (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) of a security control across standards.</p>
14    pub fn security_control_id(&self) -> ::std::option::Option<&str> {
15        self.security_control_id.as_deref()
16    }
17    /// <p>The ARN of a standard.</p>
18    pub fn standards_arn(&self) -> ::std::option::Option<&str> {
19        self.standards_arn.as_deref()
20    }
21}
22impl StandardsControlAssociationId {
23    /// Creates a new builder-style object to manufacture [`StandardsControlAssociationId`](crate::types::StandardsControlAssociationId).
24    pub fn builder() -> crate::types::builders::StandardsControlAssociationIdBuilder {
25        crate::types::builders::StandardsControlAssociationIdBuilder::default()
26    }
27}
28
29/// A builder for [`StandardsControlAssociationId`](crate::types::StandardsControlAssociationId).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct StandardsControlAssociationIdBuilder {
33    pub(crate) security_control_id: ::std::option::Option<::std::string::String>,
34    pub(crate) standards_arn: ::std::option::Option<::std::string::String>,
35}
36impl StandardsControlAssociationIdBuilder {
37    /// <p>The unique identifier (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) of a security control across standards.</p>
38    /// This field is required.
39    pub fn security_control_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.security_control_id = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// <p>The unique identifier (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) of a security control across standards.</p>
44    pub fn set_security_control_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.security_control_id = input;
46        self
47    }
48    /// <p>The unique identifier (identified with <code>SecurityControlId</code>, <code>SecurityControlArn</code>, or a mix of both parameters) of a security control across standards.</p>
49    pub fn get_security_control_id(&self) -> &::std::option::Option<::std::string::String> {
50        &self.security_control_id
51    }
52    /// <p>The ARN of a standard.</p>
53    /// This field is required.
54    pub fn standards_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.standards_arn = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The ARN of a standard.</p>
59    pub fn set_standards_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.standards_arn = input;
61        self
62    }
63    /// <p>The ARN of a standard.</p>
64    pub fn get_standards_arn(&self) -> &::std::option::Option<::std::string::String> {
65        &self.standards_arn
66    }
67    /// Consumes the builder and constructs a [`StandardsControlAssociationId`](crate::types::StandardsControlAssociationId).
68    pub fn build(self) -> crate::types::StandardsControlAssociationId {
69        crate::types::StandardsControlAssociationId {
70            security_control_id: self.security_control_id,
71            standards_arn: self.standards_arn,
72        }
73    }
74}