aws_sdk_networkmanager/operation/get_network_resource_counts/
_get_network_resource_counts_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 GetNetworkResourceCountsInput {
6    /// <p>The ID of the global network.</p>
7    pub global_network_id: ::std::option::Option<::std::string::String>,
8    /// <p>The resource type.</p>
9    /// <p>The following are the supported resource types for Direct Connect:</p>
10    /// <ul>
11    /// <li>
12    /// <p><code>dxcon</code></p></li>
13    /// <li>
14    /// <p><code>dx-gateway</code></p></li>
15    /// <li>
16    /// <p><code>dx-vif</code></p></li>
17    /// </ul>
18    /// <p>The following are the supported resource types for Network Manager:</p>
19    /// <ul>
20    /// <li>
21    /// <p><code>attachment</code></p></li>
22    /// <li>
23    /// <p><code>connect-peer</code></p></li>
24    /// <li>
25    /// <p><code>connection</code></p></li>
26    /// <li>
27    /// <p><code>core-network</code></p></li>
28    /// <li>
29    /// <p><code>device</code></p></li>
30    /// <li>
31    /// <p><code>link</code></p></li>
32    /// <li>
33    /// <p><code>peering</code></p></li>
34    /// <li>
35    /// <p><code>site</code></p></li>
36    /// </ul>
37    /// <p>The following are the supported resource types for Amazon VPC:</p>
38    /// <ul>
39    /// <li>
40    /// <p><code>customer-gateway</code></p></li>
41    /// <li>
42    /// <p><code>transit-gateway</code></p></li>
43    /// <li>
44    /// <p><code>transit-gateway-attachment</code></p></li>
45    /// <li>
46    /// <p><code>transit-gateway-connect-peer</code></p></li>
47    /// <li>
48    /// <p><code>transit-gateway-route-table</code></p></li>
49    /// <li>
50    /// <p><code>vpn-connection</code></p></li>
51    /// </ul>
52    pub resource_type: ::std::option::Option<::std::string::String>,
53    /// <p>The maximum number of results to return.</p>
54    pub max_results: ::std::option::Option<i32>,
55    /// <p>The token for the next page of results.</p>
56    pub next_token: ::std::option::Option<::std::string::String>,
57}
58impl GetNetworkResourceCountsInput {
59    /// <p>The ID of the global network.</p>
60    pub fn global_network_id(&self) -> ::std::option::Option<&str> {
61        self.global_network_id.as_deref()
62    }
63    /// <p>The resource type.</p>
64    /// <p>The following are the supported resource types for Direct Connect:</p>
65    /// <ul>
66    /// <li>
67    /// <p><code>dxcon</code></p></li>
68    /// <li>
69    /// <p><code>dx-gateway</code></p></li>
70    /// <li>
71    /// <p><code>dx-vif</code></p></li>
72    /// </ul>
73    /// <p>The following are the supported resource types for Network Manager:</p>
74    /// <ul>
75    /// <li>
76    /// <p><code>attachment</code></p></li>
77    /// <li>
78    /// <p><code>connect-peer</code></p></li>
79    /// <li>
80    /// <p><code>connection</code></p></li>
81    /// <li>
82    /// <p><code>core-network</code></p></li>
83    /// <li>
84    /// <p><code>device</code></p></li>
85    /// <li>
86    /// <p><code>link</code></p></li>
87    /// <li>
88    /// <p><code>peering</code></p></li>
89    /// <li>
90    /// <p><code>site</code></p></li>
91    /// </ul>
92    /// <p>The following are the supported resource types for Amazon VPC:</p>
93    /// <ul>
94    /// <li>
95    /// <p><code>customer-gateway</code></p></li>
96    /// <li>
97    /// <p><code>transit-gateway</code></p></li>
98    /// <li>
99    /// <p><code>transit-gateway-attachment</code></p></li>
100    /// <li>
101    /// <p><code>transit-gateway-connect-peer</code></p></li>
102    /// <li>
103    /// <p><code>transit-gateway-route-table</code></p></li>
104    /// <li>
105    /// <p><code>vpn-connection</code></p></li>
106    /// </ul>
107    pub fn resource_type(&self) -> ::std::option::Option<&str> {
108        self.resource_type.as_deref()
109    }
110    /// <p>The maximum number of results to return.</p>
111    pub fn max_results(&self) -> ::std::option::Option<i32> {
112        self.max_results
113    }
114    /// <p>The token for the next page of results.</p>
115    pub fn next_token(&self) -> ::std::option::Option<&str> {
116        self.next_token.as_deref()
117    }
118}
119impl GetNetworkResourceCountsInput {
120    /// Creates a new builder-style object to manufacture [`GetNetworkResourceCountsInput`](crate::operation::get_network_resource_counts::GetNetworkResourceCountsInput).
121    pub fn builder() -> crate::operation::get_network_resource_counts::builders::GetNetworkResourceCountsInputBuilder {
122        crate::operation::get_network_resource_counts::builders::GetNetworkResourceCountsInputBuilder::default()
123    }
124}
125
126/// A builder for [`GetNetworkResourceCountsInput`](crate::operation::get_network_resource_counts::GetNetworkResourceCountsInput).
127#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
128#[non_exhaustive]
129pub struct GetNetworkResourceCountsInputBuilder {
130    pub(crate) global_network_id: ::std::option::Option<::std::string::String>,
131    pub(crate) resource_type: ::std::option::Option<::std::string::String>,
132    pub(crate) max_results: ::std::option::Option<i32>,
133    pub(crate) next_token: ::std::option::Option<::std::string::String>,
134}
135impl GetNetworkResourceCountsInputBuilder {
136    /// <p>The ID of the global network.</p>
137    /// This field is required.
138    pub fn global_network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
139        self.global_network_id = ::std::option::Option::Some(input.into());
140        self
141    }
142    /// <p>The ID of the global network.</p>
143    pub fn set_global_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
144        self.global_network_id = input;
145        self
146    }
147    /// <p>The ID of the global network.</p>
148    pub fn get_global_network_id(&self) -> &::std::option::Option<::std::string::String> {
149        &self.global_network_id
150    }
151    /// <p>The resource type.</p>
152    /// <p>The following are the supported resource types for Direct Connect:</p>
153    /// <ul>
154    /// <li>
155    /// <p><code>dxcon</code></p></li>
156    /// <li>
157    /// <p><code>dx-gateway</code></p></li>
158    /// <li>
159    /// <p><code>dx-vif</code></p></li>
160    /// </ul>
161    /// <p>The following are the supported resource types for Network Manager:</p>
162    /// <ul>
163    /// <li>
164    /// <p><code>attachment</code></p></li>
165    /// <li>
166    /// <p><code>connect-peer</code></p></li>
167    /// <li>
168    /// <p><code>connection</code></p></li>
169    /// <li>
170    /// <p><code>core-network</code></p></li>
171    /// <li>
172    /// <p><code>device</code></p></li>
173    /// <li>
174    /// <p><code>link</code></p></li>
175    /// <li>
176    /// <p><code>peering</code></p></li>
177    /// <li>
178    /// <p><code>site</code></p></li>
179    /// </ul>
180    /// <p>The following are the supported resource types for Amazon VPC:</p>
181    /// <ul>
182    /// <li>
183    /// <p><code>customer-gateway</code></p></li>
184    /// <li>
185    /// <p><code>transit-gateway</code></p></li>
186    /// <li>
187    /// <p><code>transit-gateway-attachment</code></p></li>
188    /// <li>
189    /// <p><code>transit-gateway-connect-peer</code></p></li>
190    /// <li>
191    /// <p><code>transit-gateway-route-table</code></p></li>
192    /// <li>
193    /// <p><code>vpn-connection</code></p></li>
194    /// </ul>
195    pub fn resource_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196        self.resource_type = ::std::option::Option::Some(input.into());
197        self
198    }
199    /// <p>The resource type.</p>
200    /// <p>The following are the supported resource types for Direct Connect:</p>
201    /// <ul>
202    /// <li>
203    /// <p><code>dxcon</code></p></li>
204    /// <li>
205    /// <p><code>dx-gateway</code></p></li>
206    /// <li>
207    /// <p><code>dx-vif</code></p></li>
208    /// </ul>
209    /// <p>The following are the supported resource types for Network Manager:</p>
210    /// <ul>
211    /// <li>
212    /// <p><code>attachment</code></p></li>
213    /// <li>
214    /// <p><code>connect-peer</code></p></li>
215    /// <li>
216    /// <p><code>connection</code></p></li>
217    /// <li>
218    /// <p><code>core-network</code></p></li>
219    /// <li>
220    /// <p><code>device</code></p></li>
221    /// <li>
222    /// <p><code>link</code></p></li>
223    /// <li>
224    /// <p><code>peering</code></p></li>
225    /// <li>
226    /// <p><code>site</code></p></li>
227    /// </ul>
228    /// <p>The following are the supported resource types for Amazon VPC:</p>
229    /// <ul>
230    /// <li>
231    /// <p><code>customer-gateway</code></p></li>
232    /// <li>
233    /// <p><code>transit-gateway</code></p></li>
234    /// <li>
235    /// <p><code>transit-gateway-attachment</code></p></li>
236    /// <li>
237    /// <p><code>transit-gateway-connect-peer</code></p></li>
238    /// <li>
239    /// <p><code>transit-gateway-route-table</code></p></li>
240    /// <li>
241    /// <p><code>vpn-connection</code></p></li>
242    /// </ul>
243    pub fn set_resource_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244        self.resource_type = input;
245        self
246    }
247    /// <p>The resource type.</p>
248    /// <p>The following are the supported resource types for Direct Connect:</p>
249    /// <ul>
250    /// <li>
251    /// <p><code>dxcon</code></p></li>
252    /// <li>
253    /// <p><code>dx-gateway</code></p></li>
254    /// <li>
255    /// <p><code>dx-vif</code></p></li>
256    /// </ul>
257    /// <p>The following are the supported resource types for Network Manager:</p>
258    /// <ul>
259    /// <li>
260    /// <p><code>attachment</code></p></li>
261    /// <li>
262    /// <p><code>connect-peer</code></p></li>
263    /// <li>
264    /// <p><code>connection</code></p></li>
265    /// <li>
266    /// <p><code>core-network</code></p></li>
267    /// <li>
268    /// <p><code>device</code></p></li>
269    /// <li>
270    /// <p><code>link</code></p></li>
271    /// <li>
272    /// <p><code>peering</code></p></li>
273    /// <li>
274    /// <p><code>site</code></p></li>
275    /// </ul>
276    /// <p>The following are the supported resource types for Amazon VPC:</p>
277    /// <ul>
278    /// <li>
279    /// <p><code>customer-gateway</code></p></li>
280    /// <li>
281    /// <p><code>transit-gateway</code></p></li>
282    /// <li>
283    /// <p><code>transit-gateway-attachment</code></p></li>
284    /// <li>
285    /// <p><code>transit-gateway-connect-peer</code></p></li>
286    /// <li>
287    /// <p><code>transit-gateway-route-table</code></p></li>
288    /// <li>
289    /// <p><code>vpn-connection</code></p></li>
290    /// </ul>
291    pub fn get_resource_type(&self) -> &::std::option::Option<::std::string::String> {
292        &self.resource_type
293    }
294    /// <p>The maximum number of results to return.</p>
295    pub fn max_results(mut self, input: i32) -> Self {
296        self.max_results = ::std::option::Option::Some(input);
297        self
298    }
299    /// <p>The maximum number of results to return.</p>
300    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
301        self.max_results = input;
302        self
303    }
304    /// <p>The maximum number of results to return.</p>
305    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
306        &self.max_results
307    }
308    /// <p>The token for the next page of results.</p>
309    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
310        self.next_token = ::std::option::Option::Some(input.into());
311        self
312    }
313    /// <p>The token for the next page of results.</p>
314    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
315        self.next_token = input;
316        self
317    }
318    /// <p>The token for the next page of results.</p>
319    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
320        &self.next_token
321    }
322    /// Consumes the builder and constructs a [`GetNetworkResourceCountsInput`](crate::operation::get_network_resource_counts::GetNetworkResourceCountsInput).
323    pub fn build(
324        self,
325    ) -> ::std::result::Result<
326        crate::operation::get_network_resource_counts::GetNetworkResourceCountsInput,
327        ::aws_smithy_types::error::operation::BuildError,
328    > {
329        ::std::result::Result::Ok(crate::operation::get_network_resource_counts::GetNetworkResourceCountsInput {
330            global_network_id: self.global_network_id,
331            resource_type: self.resource_type,
332            max_results: self.max_results,
333            next_token: self.next_token,
334        })
335    }
336}