aws_sdk_securityhub/operation/describe_standards/_describe_standards_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 DescribeStandardsInput {
6 /// <p>The token that is required for pagination. On your first call to the <code>DescribeStandards</code> operation, set the value of this parameter to <code>NULL</code>.</p>
7 /// <p>For subsequent calls to the operation, to continue listing data, set the value of this parameter to the value returned from the previous response.</p>
8 pub next_token: ::std::option::Option<::std::string::String>,
9 /// <p>The maximum number of standards to return.</p>
10 pub max_results: ::std::option::Option<i32>,
11 /// <p>A list of cloud providers to filter the standards by. For example, specify <code>Azure</code> to return only standards that evaluate Azure resources.</p>
12 pub providers: ::std::option::Option<::std::vec::Vec<crate::types::StandardsProvider>>,
13}
14impl DescribeStandardsInput {
15 /// <p>The token that is required for pagination. On your first call to the <code>DescribeStandards</code> operation, set the value of this parameter to <code>NULL</code>.</p>
16 /// <p>For subsequent calls to the operation, to continue listing data, set the value of this parameter to the value returned from the previous response.</p>
17 pub fn next_token(&self) -> ::std::option::Option<&str> {
18 self.next_token.as_deref()
19 }
20 /// <p>The maximum number of standards to return.</p>
21 pub fn max_results(&self) -> ::std::option::Option<i32> {
22 self.max_results
23 }
24 /// <p>A list of cloud providers to filter the standards by. For example, specify <code>Azure</code> to return only standards that evaluate Azure resources.</p>
25 ///
26 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.providers.is_none()`.
27 pub fn providers(&self) -> &[crate::types::StandardsProvider] {
28 self.providers.as_deref().unwrap_or_default()
29 }
30}
31impl DescribeStandardsInput {
32 /// Creates a new builder-style object to manufacture [`DescribeStandardsInput`](crate::operation::describe_standards::DescribeStandardsInput).
33 pub fn builder() -> crate::operation::describe_standards::builders::DescribeStandardsInputBuilder {
34 crate::operation::describe_standards::builders::DescribeStandardsInputBuilder::default()
35 }
36}
37
38/// A builder for [`DescribeStandardsInput`](crate::operation::describe_standards::DescribeStandardsInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DescribeStandardsInputBuilder {
42 pub(crate) next_token: ::std::option::Option<::std::string::String>,
43 pub(crate) max_results: ::std::option::Option<i32>,
44 pub(crate) providers: ::std::option::Option<::std::vec::Vec<crate::types::StandardsProvider>>,
45}
46impl DescribeStandardsInputBuilder {
47 /// <p>The token that is required for pagination. On your first call to the <code>DescribeStandards</code> operation, set the value of this parameter to <code>NULL</code>.</p>
48 /// <p>For subsequent calls to the operation, to continue listing data, set the value of this parameter to the value returned from the previous response.</p>
49 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50 self.next_token = ::std::option::Option::Some(input.into());
51 self
52 }
53 /// <p>The token that is required for pagination. On your first call to the <code>DescribeStandards</code> operation, set the value of this parameter to <code>NULL</code>.</p>
54 /// <p>For subsequent calls to the operation, to continue listing data, set the value of this parameter to the value returned from the previous response.</p>
55 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
56 self.next_token = input;
57 self
58 }
59 /// <p>The token that is required for pagination. On your first call to the <code>DescribeStandards</code> operation, set the value of this parameter to <code>NULL</code>.</p>
60 /// <p>For subsequent calls to the operation, to continue listing data, set the value of this parameter to the value returned from the previous response.</p>
61 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
62 &self.next_token
63 }
64 /// <p>The maximum number of standards to return.</p>
65 pub fn max_results(mut self, input: i32) -> Self {
66 self.max_results = ::std::option::Option::Some(input);
67 self
68 }
69 /// <p>The maximum number of standards to return.</p>
70 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
71 self.max_results = input;
72 self
73 }
74 /// <p>The maximum number of standards to return.</p>
75 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
76 &self.max_results
77 }
78 /// Appends an item to `providers`.
79 ///
80 /// To override the contents of this collection use [`set_providers`](Self::set_providers).
81 ///
82 /// <p>A list of cloud providers to filter the standards by. For example, specify <code>Azure</code> to return only standards that evaluate Azure resources.</p>
83 pub fn providers(mut self, input: crate::types::StandardsProvider) -> Self {
84 let mut v = self.providers.unwrap_or_default();
85 v.push(input);
86 self.providers = ::std::option::Option::Some(v);
87 self
88 }
89 /// <p>A list of cloud providers to filter the standards by. For example, specify <code>Azure</code> to return only standards that evaluate Azure resources.</p>
90 pub fn set_providers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StandardsProvider>>) -> Self {
91 self.providers = input;
92 self
93 }
94 /// <p>A list of cloud providers to filter the standards by. For example, specify <code>Azure</code> to return only standards that evaluate Azure resources.</p>
95 pub fn get_providers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StandardsProvider>> {
96 &self.providers
97 }
98 /// Consumes the builder and constructs a [`DescribeStandardsInput`](crate::operation::describe_standards::DescribeStandardsInput).
99 pub fn build(
100 self,
101 ) -> ::std::result::Result<crate::operation::describe_standards::DescribeStandardsInput, ::aws_smithy_types::error::operation::BuildError> {
102 ::std::result::Result::Ok(crate::operation::describe_standards::DescribeStandardsInput {
103 next_token: self.next_token,
104 max_results: self.max_results,
105 providers: self.providers,
106 })
107 }
108}