// 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 ListControlsInput {
/// <p>A filter that narrows the list of controls to a specific type.</p>
pub control_type: ::std::option::Option<crate::types::ControlType>,
/// <p>The pagination token that's used to fetch the next set of results.</p>
pub next_token: ::std::option::Option<::std::string::String>,
/// <p>The maximum number of results on a page or for an API request call.</p>
pub max_results: ::std::option::Option<i32>,
/// <p>A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control Catalog.</p>
/// <p>To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control domain, a control objective, or a common control. For information about how to find the ARNs for these resources, see <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListDomains.html"> <code>ListDomains</code> </a>, <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListObjectives.html"> <code>ListObjectives</code> </a>, and <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListCommonControls.html"> <code>ListCommonControls</code> </a>.</p><note>
/// <p>You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t currently supported. If you want to filter by more than one ARN, we recommend that you run the <code>ListControls</code> operation separately for each ARN.</p>
/// </note>
/// <p>Alternatively, specify <code>UNCATEGORIZED</code> to list controls that aren't mapped to a Control Catalog resource. For example, this operation might return a list of custom controls that don't belong to any control domain or control objective.</p>
pub control_catalog_id: ::std::option::Option<::std::string::String>,
}
impl ListControlsInput {
/// <p>A filter that narrows the list of controls to a specific type.</p>
pub fn control_type(&self) -> ::std::option::Option<&crate::types::ControlType> {
self.control_type.as_ref()
}
/// <p>The pagination token that's used to fetch the next set of results.</p>
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
/// <p>The maximum number of results on a page or for an API request call.</p>
pub fn max_results(&self) -> ::std::option::Option<i32> {
self.max_results
}
/// <p>A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control Catalog.</p>
/// <p>To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control domain, a control objective, or a common control. For information about how to find the ARNs for these resources, see <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListDomains.html"> <code>ListDomains</code> </a>, <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListObjectives.html"> <code>ListObjectives</code> </a>, and <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListCommonControls.html"> <code>ListCommonControls</code> </a>.</p><note>
/// <p>You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t currently supported. If you want to filter by more than one ARN, we recommend that you run the <code>ListControls</code> operation separately for each ARN.</p>
/// </note>
/// <p>Alternatively, specify <code>UNCATEGORIZED</code> to list controls that aren't mapped to a Control Catalog resource. For example, this operation might return a list of custom controls that don't belong to any control domain or control objective.</p>
pub fn control_catalog_id(&self) -> ::std::option::Option<&str> {
self.control_catalog_id.as_deref()
}
}
impl ListControlsInput {
/// Creates a new builder-style object to manufacture [`ListControlsInput`](crate::operation::list_controls::ListControlsInput).
pub fn builder() -> crate::operation::list_controls::builders::ListControlsInputBuilder {
crate::operation::list_controls::builders::ListControlsInputBuilder::default()
}
}
/// A builder for [`ListControlsInput`](crate::operation::list_controls::ListControlsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListControlsInputBuilder {
pub(crate) control_type: ::std::option::Option<crate::types::ControlType>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
pub(crate) max_results: ::std::option::Option<i32>,
pub(crate) control_catalog_id: ::std::option::Option<::std::string::String>,
}
impl ListControlsInputBuilder {
/// <p>A filter that narrows the list of controls to a specific type.</p>
/// This field is required.
pub fn control_type(mut self, input: crate::types::ControlType) -> Self {
self.control_type = ::std::option::Option::Some(input);
self
}
/// <p>A filter that narrows the list of controls to a specific type.</p>
pub fn set_control_type(mut self, input: ::std::option::Option<crate::types::ControlType>) -> Self {
self.control_type = input;
self
}
/// <p>A filter that narrows the list of controls to a specific type.</p>
pub fn get_control_type(&self) -> &::std::option::Option<crate::types::ControlType> {
&self.control_type
}
/// <p>The pagination token that's used to fetch the next set of results.</p>
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
/// <p>The pagination token that's used to fetch the next set of results.</p>
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
/// <p>The pagination token that's used to fetch the next set of results.</p>
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
/// <p>The maximum number of results on a page or for an API request call.</p>
pub fn max_results(mut self, input: i32) -> Self {
self.max_results = ::std::option::Option::Some(input);
self
}
/// <p>The maximum number of results on a page or for an API request call.</p>
pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
self.max_results = input;
self
}
/// <p>The maximum number of results on a page or for an API request call.</p>
pub fn get_max_results(&self) -> &::std::option::Option<i32> {
&self.max_results
}
/// <p>A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control Catalog.</p>
/// <p>To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control domain, a control objective, or a common control. For information about how to find the ARNs for these resources, see <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListDomains.html"> <code>ListDomains</code> </a>, <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListObjectives.html"> <code>ListObjectives</code> </a>, and <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListCommonControls.html"> <code>ListCommonControls</code> </a>.</p><note>
/// <p>You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t currently supported. If you want to filter by more than one ARN, we recommend that you run the <code>ListControls</code> operation separately for each ARN.</p>
/// </note>
/// <p>Alternatively, specify <code>UNCATEGORIZED</code> to list controls that aren't mapped to a Control Catalog resource. For example, this operation might return a list of custom controls that don't belong to any control domain or control objective.</p>
pub fn control_catalog_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.control_catalog_id = ::std::option::Option::Some(input.into());
self
}
/// <p>A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control Catalog.</p>
/// <p>To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control domain, a control objective, or a common control. For information about how to find the ARNs for these resources, see <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListDomains.html"> <code>ListDomains</code> </a>, <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListObjectives.html"> <code>ListObjectives</code> </a>, and <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListCommonControls.html"> <code>ListCommonControls</code> </a>.</p><note>
/// <p>You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t currently supported. If you want to filter by more than one ARN, we recommend that you run the <code>ListControls</code> operation separately for each ARN.</p>
/// </note>
/// <p>Alternatively, specify <code>UNCATEGORIZED</code> to list controls that aren't mapped to a Control Catalog resource. For example, this operation might return a list of custom controls that don't belong to any control domain or control objective.</p>
pub fn set_control_catalog_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.control_catalog_id = input;
self
}
/// <p>A filter that narrows the list of controls to a specific resource from the Amazon Web Services Control Catalog.</p>
/// <p>To use this parameter, specify the ARN of the Control Catalog resource. You can specify either a control domain, a control objective, or a common control. For information about how to find the ARNs for these resources, see <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListDomains.html"> <code>ListDomains</code> </a>, <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListObjectives.html"> <code>ListObjectives</code> </a>, and <a href="https://docs.aws.amazon.com/controlcatalog/latest/APIReference/API_ListCommonControls.html"> <code>ListCommonControls</code> </a>.</p><note>
/// <p>You can only filter by one Control Catalog resource at a time. Specifying multiple resource ARNs isn’t currently supported. If you want to filter by more than one ARN, we recommend that you run the <code>ListControls</code> operation separately for each ARN.</p>
/// </note>
/// <p>Alternatively, specify <code>UNCATEGORIZED</code> to list controls that aren't mapped to a Control Catalog resource. For example, this operation might return a list of custom controls that don't belong to any control domain or control objective.</p>
pub fn get_control_catalog_id(&self) -> &::std::option::Option<::std::string::String> {
&self.control_catalog_id
}
/// Consumes the builder and constructs a [`ListControlsInput`](crate::operation::list_controls::ListControlsInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::list_controls::ListControlsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_controls::ListControlsInput {
control_type: self.control_type,
next_token: self.next_token,
max_results: self.max_results,
control_catalog_id: self.control_catalog_id,
})
}
}