aws_sdk_route53/operation/list_cidr_collections/
_list_cidr_collections_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 ListCidrCollectionsInput {
6    /// <p>An opaque pagination token to indicate where the service is to begin enumerating results.</p>
7    /// <p>If no value is provided, the listing of results starts from the beginning.</p>
8    pub next_token: ::std::option::Option<::std::string::String>,
9    /// <p>The maximum number of CIDR collections to return in the response.</p>
10    pub max_results: ::std::option::Option<i32>,
11}
12impl ListCidrCollectionsInput {
13    /// <p>An opaque pagination token to indicate where the service is to begin enumerating results.</p>
14    /// <p>If no value is provided, the listing of results starts from the beginning.</p>
15    pub fn next_token(&self) -> ::std::option::Option<&str> {
16        self.next_token.as_deref()
17    }
18    /// <p>The maximum number of CIDR collections to return in the response.</p>
19    pub fn max_results(&self) -> ::std::option::Option<i32> {
20        self.max_results
21    }
22}
23impl ListCidrCollectionsInput {
24    /// Creates a new builder-style object to manufacture [`ListCidrCollectionsInput`](crate::operation::list_cidr_collections::ListCidrCollectionsInput).
25    pub fn builder() -> crate::operation::list_cidr_collections::builders::ListCidrCollectionsInputBuilder {
26        crate::operation::list_cidr_collections::builders::ListCidrCollectionsInputBuilder::default()
27    }
28}
29
30/// A builder for [`ListCidrCollectionsInput`](crate::operation::list_cidr_collections::ListCidrCollectionsInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct ListCidrCollectionsInputBuilder {
34    pub(crate) next_token: ::std::option::Option<::std::string::String>,
35    pub(crate) max_results: ::std::option::Option<i32>,
36}
37impl ListCidrCollectionsInputBuilder {
38    /// <p>An opaque pagination token to indicate where the service is to begin enumerating results.</p>
39    /// <p>If no value is provided, the listing of results starts from the beginning.</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>An opaque pagination token to indicate where the service is to begin enumerating results.</p>
45    /// <p>If no value is provided, the listing of results starts from the beginning.</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>An opaque pagination token to indicate where the service is to begin enumerating results.</p>
51    /// <p>If no value is provided, the listing of results starts from the beginning.</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 CIDR collections to return in the response.</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 CIDR collections to return in the response.</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 CIDR collections to return in the response.</p>
66    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
67        &self.max_results
68    }
69    /// Consumes the builder and constructs a [`ListCidrCollectionsInput`](crate::operation::list_cidr_collections::ListCidrCollectionsInput).
70    pub fn build(
71        self,
72    ) -> ::std::result::Result<crate::operation::list_cidr_collections::ListCidrCollectionsInput, ::aws_smithy_types::error::operation::BuildError>
73    {
74        ::std::result::Result::Ok(crate::operation::list_cidr_collections::ListCidrCollectionsInput {
75            next_token: self.next_token,
76            max_results: self.max_results,
77        })
78    }
79}