aws_sdk_resourceexplorer2/types/
_resource_count.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about the number of results that match the query. At this time, Amazon Web Services Resource Explorer doesn't count more than 1,000 matches for any query. This structure provides information about whether the query exceeded this limit.</p>
4/// <p>This field is included in every page when you paginate the results.</p>
5#[non_exhaustive]
6#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
7pub struct ResourceCount {
8    /// <p>The number of resources that match the search query. This value can't exceed 1,000. If there are more than 1,000 resources that match the query, then only 1,000 are counted and the <code>Complete</code> field is set to false. We recommend that you refine your query to return a smaller number of results.</p>
9    pub total_resources: ::std::option::Option<i64>,
10    /// <p>Indicates whether the <code>TotalResources</code> value represents an exhaustive count of search results.</p>
11    /// <ul>
12    /// <li>
13    /// <p>If <code>True</code>, it indicates that the search was exhaustive. Every resource that matches the query was counted.</p></li>
14    /// <li>
15    /// <p>If <code>False</code>, then the search reached the limit of 1,000 matching results, and stopped counting.</p></li>
16    /// </ul>
17    pub complete: ::std::option::Option<bool>,
18}
19impl ResourceCount {
20    /// <p>The number of resources that match the search query. This value can't exceed 1,000. If there are more than 1,000 resources that match the query, then only 1,000 are counted and the <code>Complete</code> field is set to false. We recommend that you refine your query to return a smaller number of results.</p>
21    pub fn total_resources(&self) -> ::std::option::Option<i64> {
22        self.total_resources
23    }
24    /// <p>Indicates whether the <code>TotalResources</code> value represents an exhaustive count of search results.</p>
25    /// <ul>
26    /// <li>
27    /// <p>If <code>True</code>, it indicates that the search was exhaustive. Every resource that matches the query was counted.</p></li>
28    /// <li>
29    /// <p>If <code>False</code>, then the search reached the limit of 1,000 matching results, and stopped counting.</p></li>
30    /// </ul>
31    pub fn complete(&self) -> ::std::option::Option<bool> {
32        self.complete
33    }
34}
35impl ResourceCount {
36    /// Creates a new builder-style object to manufacture [`ResourceCount`](crate::types::ResourceCount).
37    pub fn builder() -> crate::types::builders::ResourceCountBuilder {
38        crate::types::builders::ResourceCountBuilder::default()
39    }
40}
41
42/// A builder for [`ResourceCount`](crate::types::ResourceCount).
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct ResourceCountBuilder {
46    pub(crate) total_resources: ::std::option::Option<i64>,
47    pub(crate) complete: ::std::option::Option<bool>,
48}
49impl ResourceCountBuilder {
50    /// <p>The number of resources that match the search query. This value can't exceed 1,000. If there are more than 1,000 resources that match the query, then only 1,000 are counted and the <code>Complete</code> field is set to false. We recommend that you refine your query to return a smaller number of results.</p>
51    pub fn total_resources(mut self, input: i64) -> Self {
52        self.total_resources = ::std::option::Option::Some(input);
53        self
54    }
55    /// <p>The number of resources that match the search query. This value can't exceed 1,000. If there are more than 1,000 resources that match the query, then only 1,000 are counted and the <code>Complete</code> field is set to false. We recommend that you refine your query to return a smaller number of results.</p>
56    pub fn set_total_resources(mut self, input: ::std::option::Option<i64>) -> Self {
57        self.total_resources = input;
58        self
59    }
60    /// <p>The number of resources that match the search query. This value can't exceed 1,000. If there are more than 1,000 resources that match the query, then only 1,000 are counted and the <code>Complete</code> field is set to false. We recommend that you refine your query to return a smaller number of results.</p>
61    pub fn get_total_resources(&self) -> &::std::option::Option<i64> {
62        &self.total_resources
63    }
64    /// <p>Indicates whether the <code>TotalResources</code> value represents an exhaustive count of search results.</p>
65    /// <ul>
66    /// <li>
67    /// <p>If <code>True</code>, it indicates that the search was exhaustive. Every resource that matches the query was counted.</p></li>
68    /// <li>
69    /// <p>If <code>False</code>, then the search reached the limit of 1,000 matching results, and stopped counting.</p></li>
70    /// </ul>
71    pub fn complete(mut self, input: bool) -> Self {
72        self.complete = ::std::option::Option::Some(input);
73        self
74    }
75    /// <p>Indicates whether the <code>TotalResources</code> value represents an exhaustive count of search results.</p>
76    /// <ul>
77    /// <li>
78    /// <p>If <code>True</code>, it indicates that the search was exhaustive. Every resource that matches the query was counted.</p></li>
79    /// <li>
80    /// <p>If <code>False</code>, then the search reached the limit of 1,000 matching results, and stopped counting.</p></li>
81    /// </ul>
82    pub fn set_complete(mut self, input: ::std::option::Option<bool>) -> Self {
83        self.complete = input;
84        self
85    }
86    /// <p>Indicates whether the <code>TotalResources</code> value represents an exhaustive count of search results.</p>
87    /// <ul>
88    /// <li>
89    /// <p>If <code>True</code>, it indicates that the search was exhaustive. Every resource that matches the query was counted.</p></li>
90    /// <li>
91    /// <p>If <code>False</code>, then the search reached the limit of 1,000 matching results, and stopped counting.</p></li>
92    /// </ul>
93    pub fn get_complete(&self) -> &::std::option::Option<bool> {
94        &self.complete
95    }
96    /// Consumes the builder and constructs a [`ResourceCount`](crate::types::ResourceCount).
97    pub fn build(self) -> crate::types::ResourceCount {
98        crate::types::ResourceCount {
99            total_resources: self.total_resources,
100            complete: self.complete,
101        }
102    }
103}