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}
12impl DescribeStandardsInput {
13    /// <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>
14    /// <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>
15    pub fn next_token(&self) -> ::std::option::Option<&str> {
16        self.next_token.as_deref()
17    }
18    /// <p>The maximum number of standards to return.</p>
19    pub fn max_results(&self) -> ::std::option::Option<i32> {
20        self.max_results
21    }
22}
23impl DescribeStandardsInput {
24    /// Creates a new builder-style object to manufacture [`DescribeStandardsInput`](crate::operation::describe_standards::DescribeStandardsInput).
25    pub fn builder() -> crate::operation::describe_standards::builders::DescribeStandardsInputBuilder {
26        crate::operation::describe_standards::builders::DescribeStandardsInputBuilder::default()
27    }
28}
29
30/// A builder for [`DescribeStandardsInput`](crate::operation::describe_standards::DescribeStandardsInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct DescribeStandardsInputBuilder {
34    pub(crate) next_token: ::std::option::Option<::std::string::String>,
35    pub(crate) max_results: ::std::option::Option<i32>,
36}
37impl DescribeStandardsInputBuilder {
38    /// <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>
39    /// <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>
40    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41        self.next_token = ::std::option::Option::Some(input.into());
42        self
43    }
44    /// <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>
45    /// <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>
46    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47        self.next_token = input;
48        self
49    }
50    /// <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>
51    /// <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>
52    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
53        &self.next_token
54    }
55    /// <p>The maximum number of standards to return.</p>
56    pub fn max_results(mut self, input: i32) -> Self {
57        self.max_results = ::std::option::Option::Some(input);
58        self
59    }
60    /// <p>The maximum number of standards to return.</p>
61    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
62        self.max_results = input;
63        self
64    }
65    /// <p>The maximum number of standards to return.</p>
66    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
67        &self.max_results
68    }
69    /// Consumes the builder and constructs a [`DescribeStandardsInput`](crate::operation::describe_standards::DescribeStandardsInput).
70    pub fn build(
71        self,
72    ) -> ::std::result::Result<crate::operation::describe_standards::DescribeStandardsInput, ::aws_smithy_types::error::operation::BuildError> {
73        ::std::result::Result::Ok(crate::operation::describe_standards::DescribeStandardsInput {
74            next_token: self.next_token,
75            max_results: self.max_results,
76        })
77    }
78}