Skip to main content

aws_sdk_ec2/operation/describe_local_gateway_virtual_interface_groups/
_describe_local_gateway_virtual_interface_groups_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 DescribeLocalGatewayVirtualInterfaceGroupsInput {
6    /// <p>The IDs of the virtual interface groups.</p>
7    pub local_gateway_virtual_interface_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8    /// <p>One or more filters.</p>
9    /// <ul>
10    /// <li>
11    /// <p><code>local-gateway-id</code> - The ID of a local gateway.</p></li>
12    /// <li>
13    /// <p><code>local-gateway-virtual-interface-group-id</code> - The ID of the virtual interface group.</p></li>
14    /// <li>
15    /// <p><code>local-gateway-virtual-interface-id</code> - The ID of the virtual interface.</p></li>
16    /// <li>
17    /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the local gateway virtual interface group.</p></li>
18    /// </ul>
19    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
20    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
21    pub max_results: ::std::option::Option<i32>,
22    /// <p>The token for the next page of results.</p>
23    pub next_token: ::std::option::Option<::std::string::String>,
24    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
25    pub dry_run: ::std::option::Option<bool>,
26}
27impl DescribeLocalGatewayVirtualInterfaceGroupsInput {
28    /// <p>The IDs of the virtual interface groups.</p>
29    ///
30    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.local_gateway_virtual_interface_group_ids.is_none()`.
31    pub fn local_gateway_virtual_interface_group_ids(&self) -> &[::std::string::String] {
32        self.local_gateway_virtual_interface_group_ids.as_deref().unwrap_or_default()
33    }
34    /// <p>One or more filters.</p>
35    /// <ul>
36    /// <li>
37    /// <p><code>local-gateway-id</code> - The ID of a local gateway.</p></li>
38    /// <li>
39    /// <p><code>local-gateway-virtual-interface-group-id</code> - The ID of the virtual interface group.</p></li>
40    /// <li>
41    /// <p><code>local-gateway-virtual-interface-id</code> - The ID of the virtual interface.</p></li>
42    /// <li>
43    /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the local gateway virtual interface group.</p></li>
44    /// </ul>
45    ///
46    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
47    pub fn filters(&self) -> &[crate::types::Filter] {
48        self.filters.as_deref().unwrap_or_default()
49    }
50    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
51    pub fn max_results(&self) -> ::std::option::Option<i32> {
52        self.max_results
53    }
54    /// <p>The token for the next page of results.</p>
55    pub fn next_token(&self) -> ::std::option::Option<&str> {
56        self.next_token.as_deref()
57    }
58    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
59    pub fn dry_run(&self) -> ::std::option::Option<bool> {
60        self.dry_run
61    }
62}
63impl DescribeLocalGatewayVirtualInterfaceGroupsInput {
64    /// Creates a new builder-style object to manufacture [`DescribeLocalGatewayVirtualInterfaceGroupsInput`](crate::operation::describe_local_gateway_virtual_interface_groups::DescribeLocalGatewayVirtualInterfaceGroupsInput).
65    pub fn builder(
66    ) -> crate::operation::describe_local_gateway_virtual_interface_groups::builders::DescribeLocalGatewayVirtualInterfaceGroupsInputBuilder {
67        crate::operation::describe_local_gateway_virtual_interface_groups::builders::DescribeLocalGatewayVirtualInterfaceGroupsInputBuilder::default()
68    }
69}
70
71/// A builder for [`DescribeLocalGatewayVirtualInterfaceGroupsInput`](crate::operation::describe_local_gateway_virtual_interface_groups::DescribeLocalGatewayVirtualInterfaceGroupsInput).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
73#[non_exhaustive]
74pub struct DescribeLocalGatewayVirtualInterfaceGroupsInputBuilder {
75    pub(crate) local_gateway_virtual_interface_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
76    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
77    pub(crate) max_results: ::std::option::Option<i32>,
78    pub(crate) next_token: ::std::option::Option<::std::string::String>,
79    pub(crate) dry_run: ::std::option::Option<bool>,
80}
81impl DescribeLocalGatewayVirtualInterfaceGroupsInputBuilder {
82    /// Appends an item to `local_gateway_virtual_interface_group_ids`.
83    ///
84    /// To override the contents of this collection use [`set_local_gateway_virtual_interface_group_ids`](Self::set_local_gateway_virtual_interface_group_ids).
85    ///
86    /// <p>The IDs of the virtual interface groups.</p>
87    pub fn local_gateway_virtual_interface_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88        let mut v = self.local_gateway_virtual_interface_group_ids.unwrap_or_default();
89        v.push(input.into());
90        self.local_gateway_virtual_interface_group_ids = ::std::option::Option::Some(v);
91        self
92    }
93    /// <p>The IDs of the virtual interface groups.</p>
94    pub fn set_local_gateway_virtual_interface_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
95        self.local_gateway_virtual_interface_group_ids = input;
96        self
97    }
98    /// <p>The IDs of the virtual interface groups.</p>
99    pub fn get_local_gateway_virtual_interface_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
100        &self.local_gateway_virtual_interface_group_ids
101    }
102    /// Appends an item to `filters`.
103    ///
104    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
105    ///
106    /// <p>One or more filters.</p>
107    /// <ul>
108    /// <li>
109    /// <p><code>local-gateway-id</code> - The ID of a local gateway.</p></li>
110    /// <li>
111    /// <p><code>local-gateway-virtual-interface-group-id</code> - The ID of the virtual interface group.</p></li>
112    /// <li>
113    /// <p><code>local-gateway-virtual-interface-id</code> - The ID of the virtual interface.</p></li>
114    /// <li>
115    /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the local gateway virtual interface group.</p></li>
116    /// </ul>
117    pub fn filters(mut self, input: crate::types::Filter) -> Self {
118        let mut v = self.filters.unwrap_or_default();
119        v.push(input);
120        self.filters = ::std::option::Option::Some(v);
121        self
122    }
123    /// <p>One or more filters.</p>
124    /// <ul>
125    /// <li>
126    /// <p><code>local-gateway-id</code> - The ID of a local gateway.</p></li>
127    /// <li>
128    /// <p><code>local-gateway-virtual-interface-group-id</code> - The ID of the virtual interface group.</p></li>
129    /// <li>
130    /// <p><code>local-gateway-virtual-interface-id</code> - The ID of the virtual interface.</p></li>
131    /// <li>
132    /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the local gateway virtual interface group.</p></li>
133    /// </ul>
134    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
135        self.filters = input;
136        self
137    }
138    /// <p>One or more filters.</p>
139    /// <ul>
140    /// <li>
141    /// <p><code>local-gateway-id</code> - The ID of a local gateway.</p></li>
142    /// <li>
143    /// <p><code>local-gateway-virtual-interface-group-id</code> - The ID of the virtual interface group.</p></li>
144    /// <li>
145    /// <p><code>local-gateway-virtual-interface-id</code> - The ID of the virtual interface.</p></li>
146    /// <li>
147    /// <p><code>owner-id</code> - The ID of the Amazon Web Services account that owns the local gateway virtual interface group.</p></li>
148    /// </ul>
149    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
150        &self.filters
151    }
152    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
153    pub fn max_results(mut self, input: i32) -> Self {
154        self.max_results = ::std::option::Option::Some(input);
155        self
156    }
157    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
158    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
159        self.max_results = input;
160        self
161    }
162    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p>
163    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
164        &self.max_results
165    }
166    /// <p>The token for the next page of results.</p>
167    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168        self.next_token = ::std::option::Option::Some(input.into());
169        self
170    }
171    /// <p>The token for the next page of results.</p>
172    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173        self.next_token = input;
174        self
175    }
176    /// <p>The token for the next page of results.</p>
177    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
178        &self.next_token
179    }
180    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
181    pub fn dry_run(mut self, input: bool) -> Self {
182        self.dry_run = ::std::option::Option::Some(input);
183        self
184    }
185    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
186    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
187        self.dry_run = input;
188        self
189    }
190    /// <p>Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>
191    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
192        &self.dry_run
193    }
194    /// Consumes the builder and constructs a [`DescribeLocalGatewayVirtualInterfaceGroupsInput`](crate::operation::describe_local_gateway_virtual_interface_groups::DescribeLocalGatewayVirtualInterfaceGroupsInput).
195    pub fn build(
196        self,
197    ) -> ::std::result::Result<
198        crate::operation::describe_local_gateway_virtual_interface_groups::DescribeLocalGatewayVirtualInterfaceGroupsInput,
199        ::aws_smithy_types::error::operation::BuildError,
200    > {
201        ::std::result::Result::Ok(
202            crate::operation::describe_local_gateway_virtual_interface_groups::DescribeLocalGatewayVirtualInterfaceGroupsInput {
203                local_gateway_virtual_interface_group_ids: self.local_gateway_virtual_interface_group_ids,
204                filters: self.filters,
205                max_results: self.max_results,
206                next_token: self.next_token,
207                dry_run: self.dry_run,
208            },
209        )
210    }
211}