aws_sdk_inspector2/operation/list_coverage/
_list_coverage_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 ListCoverageInput {
6    /// <p>The maximum number of results the response can return. If your request would return more than the maximum the response will return a <code>nextToken</code> value, use this value when you call the action again to get the remaining results.</p>
7    pub max_results: ::std::option::Option<i32>,
8    /// <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. If your response returns more than the <code>maxResults</code> maximum value it will also return a <code>nextToken</code> value. For subsequent calls, use the <code>nextToken</code> value returned from the previous request to continue listing results after the first page.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10    /// <p>An object that contains details on the filters to apply to the coverage data for your environment.</p>
11    pub filter_criteria: ::std::option::Option<crate::types::CoverageFilterCriteria>,
12}
13impl ListCoverageInput {
14    /// <p>The maximum number of results the response can return. If your request would return more than the maximum the response will return a <code>nextToken</code> value, use this value when you call the action again to get the remaining results.</p>
15    pub fn max_results(&self) -> ::std::option::Option<i32> {
16        self.max_results
17    }
18    /// <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. If your response returns more than the <code>maxResults</code> maximum value it will also return a <code>nextToken</code> value. For subsequent calls, use the <code>nextToken</code> value returned from the previous request to continue listing results after the first page.</p>
19    pub fn next_token(&self) -> ::std::option::Option<&str> {
20        self.next_token.as_deref()
21    }
22    /// <p>An object that contains details on the filters to apply to the coverage data for your environment.</p>
23    pub fn filter_criteria(&self) -> ::std::option::Option<&crate::types::CoverageFilterCriteria> {
24        self.filter_criteria.as_ref()
25    }
26}
27impl ListCoverageInput {
28    /// Creates a new builder-style object to manufacture [`ListCoverageInput`](crate::operation::list_coverage::ListCoverageInput).
29    pub fn builder() -> crate::operation::list_coverage::builders::ListCoverageInputBuilder {
30        crate::operation::list_coverage::builders::ListCoverageInputBuilder::default()
31    }
32}
33
34/// A builder for [`ListCoverageInput`](crate::operation::list_coverage::ListCoverageInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct ListCoverageInputBuilder {
38    pub(crate) max_results: ::std::option::Option<i32>,
39    pub(crate) next_token: ::std::option::Option<::std::string::String>,
40    pub(crate) filter_criteria: ::std::option::Option<crate::types::CoverageFilterCriteria>,
41}
42impl ListCoverageInputBuilder {
43    /// <p>The maximum number of results the response can return. If your request would return more than the maximum the response will return a <code>nextToken</code> value, use this value when you call the action again to get the remaining results.</p>
44    pub fn max_results(mut self, input: i32) -> Self {
45        self.max_results = ::std::option::Option::Some(input);
46        self
47    }
48    /// <p>The maximum number of results the response can return. If your request would return more than the maximum the response will return a <code>nextToken</code> value, use this value when you call the action again to get the remaining results.</p>
49    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
50        self.max_results = input;
51        self
52    }
53    /// <p>The maximum number of results the response can return. If your request would return more than the maximum the response will return a <code>nextToken</code> value, use this value when you call the action again to get the remaining results.</p>
54    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
55        &self.max_results
56    }
57    /// <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. If your response returns more than the <code>maxResults</code> maximum value it will also return a <code>nextToken</code> value. For subsequent calls, use the <code>nextToken</code> value returned from the previous request to continue listing results after the first page.</p>
58    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.next_token = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. If your response returns more than the <code>maxResults</code> maximum value it will also return a <code>nextToken</code> value. For subsequent calls, use the <code>nextToken</code> value returned from the previous request to continue listing results after the first page.</p>
63    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.next_token = input;
65        self
66    }
67    /// <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request to a list action. If your response returns more than the <code>maxResults</code> maximum value it will also return a <code>nextToken</code> value. For subsequent calls, use the <code>nextToken</code> value returned from the previous request to continue listing results after the first page.</p>
68    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
69        &self.next_token
70    }
71    /// <p>An object that contains details on the filters to apply to the coverage data for your environment.</p>
72    pub fn filter_criteria(mut self, input: crate::types::CoverageFilterCriteria) -> Self {
73        self.filter_criteria = ::std::option::Option::Some(input);
74        self
75    }
76    /// <p>An object that contains details on the filters to apply to the coverage data for your environment.</p>
77    pub fn set_filter_criteria(mut self, input: ::std::option::Option<crate::types::CoverageFilterCriteria>) -> Self {
78        self.filter_criteria = input;
79        self
80    }
81    /// <p>An object that contains details on the filters to apply to the coverage data for your environment.</p>
82    pub fn get_filter_criteria(&self) -> &::std::option::Option<crate::types::CoverageFilterCriteria> {
83        &self.filter_criteria
84    }
85    /// Consumes the builder and constructs a [`ListCoverageInput`](crate::operation::list_coverage::ListCoverageInput).
86    pub fn build(
87        self,
88    ) -> ::std::result::Result<crate::operation::list_coverage::ListCoverageInput, ::aws_smithy_types::error::operation::BuildError> {
89        ::std::result::Result::Ok(crate::operation::list_coverage::ListCoverageInput {
90            max_results: self.max_results,
91            next_token: self.next_token,
92            filter_criteria: self.filter_criteria,
93        })
94    }
95}