aws_sdk_fms/operation/list_policies/_list_policies_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 ListPoliciesInput {
6 /// <p>If you specify a value for <code>MaxResults</code> and you have more <code>PolicySummary</code> objects than the number that you specify for <code>MaxResults</code>, Firewall Manager returns a <code>NextToken</code> value in the response that allows you to list another group of <code>PolicySummary</code> objects. For the second and subsequent <code>ListPolicies</code> requests, specify the value of <code>NextToken</code> from the previous response to get information about another batch of <code>PolicySummary</code> objects.</p>
7 pub next_token: ::std::option::Option<::std::string::String>,
8 /// <p>Specifies the number of <code>PolicySummary</code> objects that you want Firewall Manager to return for this request. If you have more <code>PolicySummary</code> objects than the number that you specify for <code>MaxResults</code>, the response includes a <code>NextToken</code> value that you can use to get another batch of <code>PolicySummary</code> objects.</p>
9 pub max_results: ::std::option::Option<i32>,
10}
11impl ListPoliciesInput {
12 /// <p>If you specify a value for <code>MaxResults</code> and you have more <code>PolicySummary</code> objects than the number that you specify for <code>MaxResults</code>, Firewall Manager returns a <code>NextToken</code> value in the response that allows you to list another group of <code>PolicySummary</code> objects. For the second and subsequent <code>ListPolicies</code> requests, specify the value of <code>NextToken</code> from the previous response to get information about another batch of <code>PolicySummary</code> objects.</p>
13 pub fn next_token(&self) -> ::std::option::Option<&str> {
14 self.next_token.as_deref()
15 }
16 /// <p>Specifies the number of <code>PolicySummary</code> objects that you want Firewall Manager to return for this request. If you have more <code>PolicySummary</code> objects than the number that you specify for <code>MaxResults</code>, the response includes a <code>NextToken</code> value that you can use to get another batch of <code>PolicySummary</code> objects.</p>
17 pub fn max_results(&self) -> ::std::option::Option<i32> {
18 self.max_results
19 }
20}
21impl ListPoliciesInput {
22 /// Creates a new builder-style object to manufacture [`ListPoliciesInput`](crate::operation::list_policies::ListPoliciesInput).
23 pub fn builder() -> crate::operation::list_policies::builders::ListPoliciesInputBuilder {
24 crate::operation::list_policies::builders::ListPoliciesInputBuilder::default()
25 }
26}
27
28/// A builder for [`ListPoliciesInput`](crate::operation::list_policies::ListPoliciesInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct ListPoliciesInputBuilder {
32 pub(crate) next_token: ::std::option::Option<::std::string::String>,
33 pub(crate) max_results: ::std::option::Option<i32>,
34}
35impl ListPoliciesInputBuilder {
36 /// <p>If you specify a value for <code>MaxResults</code> and you have more <code>PolicySummary</code> objects than the number that you specify for <code>MaxResults</code>, Firewall Manager returns a <code>NextToken</code> value in the response that allows you to list another group of <code>PolicySummary</code> objects. For the second and subsequent <code>ListPolicies</code> requests, specify the value of <code>NextToken</code> from the previous response to get information about another batch of <code>PolicySummary</code> objects.</p>
37 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
38 self.next_token = ::std::option::Option::Some(input.into());
39 self
40 }
41 /// <p>If you specify a value for <code>MaxResults</code> and you have more <code>PolicySummary</code> objects than the number that you specify for <code>MaxResults</code>, Firewall Manager returns a <code>NextToken</code> value in the response that allows you to list another group of <code>PolicySummary</code> objects. For the second and subsequent <code>ListPolicies</code> requests, specify the value of <code>NextToken</code> from the previous response to get information about another batch of <code>PolicySummary</code> objects.</p>
42 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
43 self.next_token = input;
44 self
45 }
46 /// <p>If you specify a value for <code>MaxResults</code> and you have more <code>PolicySummary</code> objects than the number that you specify for <code>MaxResults</code>, Firewall Manager returns a <code>NextToken</code> value in the response that allows you to list another group of <code>PolicySummary</code> objects. For the second and subsequent <code>ListPolicies</code> requests, specify the value of <code>NextToken</code> from the previous response to get information about another batch of <code>PolicySummary</code> objects.</p>
47 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
48 &self.next_token
49 }
50 /// <p>Specifies the number of <code>PolicySummary</code> objects that you want Firewall Manager to return for this request. If you have more <code>PolicySummary</code> objects than the number that you specify for <code>MaxResults</code>, the response includes a <code>NextToken</code> value that you can use to get another batch of <code>PolicySummary</code> objects.</p>
51 pub fn max_results(mut self, input: i32) -> Self {
52 self.max_results = ::std::option::Option::Some(input);
53 self
54 }
55 /// <p>Specifies the number of <code>PolicySummary</code> objects that you want Firewall Manager to return for this request. If you have more <code>PolicySummary</code> objects than the number that you specify for <code>MaxResults</code>, the response includes a <code>NextToken</code> value that you can use to get another batch of <code>PolicySummary</code> objects.</p>
56 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
57 self.max_results = input;
58 self
59 }
60 /// <p>Specifies the number of <code>PolicySummary</code> objects that you want Firewall Manager to return for this request. If you have more <code>PolicySummary</code> objects than the number that you specify for <code>MaxResults</code>, the response includes a <code>NextToken</code> value that you can use to get another batch of <code>PolicySummary</code> objects.</p>
61 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
62 &self.max_results
63 }
64 /// Consumes the builder and constructs a [`ListPoliciesInput`](crate::operation::list_policies::ListPoliciesInput).
65 pub fn build(
66 self,
67 ) -> ::std::result::Result<crate::operation::list_policies::ListPoliciesInput, ::aws_smithy_types::error::operation::BuildError> {
68 ::std::result::Result::Ok(crate::operation::list_policies::ListPoliciesInput {
69 next_token: self.next_token,
70 max_results: self.max_results,
71 })
72 }
73}