aws_sdk_apigatewayv2/operation/get_vpc_link/
_get_vpc_link_output.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 GetVpcLinkOutput {
6    /// <p>The timestamp when the VPC link was created.</p>
7    pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
8    /// <p>The name of the VPC link.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>A list of security group IDs for the VPC link.</p>
11    pub security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12    /// <p>A list of subnet IDs to include in the VPC link.</p>
13    pub subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14    /// <p>Tags for the VPC link.</p>
15    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
16    /// <p>The ID of the VPC link.</p>
17    pub vpc_link_id: ::std::option::Option<::std::string::String>,
18    /// <p>The status of the VPC link.</p>
19    pub vpc_link_status: ::std::option::Option<crate::types::VpcLinkStatus>,
20    /// <p>A message summarizing the cause of the status of the VPC link.</p>
21    pub vpc_link_status_message: ::std::option::Option<::std::string::String>,
22    /// <p>The version of the VPC link.</p>
23    pub vpc_link_version: ::std::option::Option<crate::types::VpcLinkVersion>,
24    _request_id: Option<String>,
25}
26impl GetVpcLinkOutput {
27    /// <p>The timestamp when the VPC link was created.</p>
28    pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
29        self.created_date.as_ref()
30    }
31    /// <p>The name of the VPC link.</p>
32    pub fn name(&self) -> ::std::option::Option<&str> {
33        self.name.as_deref()
34    }
35    /// <p>A list of security group IDs for the VPC link.</p>
36    ///
37    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.security_group_ids.is_none()`.
38    pub fn security_group_ids(&self) -> &[::std::string::String] {
39        self.security_group_ids.as_deref().unwrap_or_default()
40    }
41    /// <p>A list of subnet IDs to include in the VPC link.</p>
42    ///
43    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.subnet_ids.is_none()`.
44    pub fn subnet_ids(&self) -> &[::std::string::String] {
45        self.subnet_ids.as_deref().unwrap_or_default()
46    }
47    /// <p>Tags for the VPC link.</p>
48    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
49        self.tags.as_ref()
50    }
51    /// <p>The ID of the VPC link.</p>
52    pub fn vpc_link_id(&self) -> ::std::option::Option<&str> {
53        self.vpc_link_id.as_deref()
54    }
55    /// <p>The status of the VPC link.</p>
56    pub fn vpc_link_status(&self) -> ::std::option::Option<&crate::types::VpcLinkStatus> {
57        self.vpc_link_status.as_ref()
58    }
59    /// <p>A message summarizing the cause of the status of the VPC link.</p>
60    pub fn vpc_link_status_message(&self) -> ::std::option::Option<&str> {
61        self.vpc_link_status_message.as_deref()
62    }
63    /// <p>The version of the VPC link.</p>
64    pub fn vpc_link_version(&self) -> ::std::option::Option<&crate::types::VpcLinkVersion> {
65        self.vpc_link_version.as_ref()
66    }
67}
68impl ::aws_types::request_id::RequestId for GetVpcLinkOutput {
69    fn request_id(&self) -> Option<&str> {
70        self._request_id.as_deref()
71    }
72}
73impl GetVpcLinkOutput {
74    /// Creates a new builder-style object to manufacture [`GetVpcLinkOutput`](crate::operation::get_vpc_link::GetVpcLinkOutput).
75    pub fn builder() -> crate::operation::get_vpc_link::builders::GetVpcLinkOutputBuilder {
76        crate::operation::get_vpc_link::builders::GetVpcLinkOutputBuilder::default()
77    }
78}
79
80/// A builder for [`GetVpcLinkOutput`](crate::operation::get_vpc_link::GetVpcLinkOutput).
81#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
82#[non_exhaustive]
83pub struct GetVpcLinkOutputBuilder {
84    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
85    pub(crate) name: ::std::option::Option<::std::string::String>,
86    pub(crate) security_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
87    pub(crate) subnet_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
88    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
89    pub(crate) vpc_link_id: ::std::option::Option<::std::string::String>,
90    pub(crate) vpc_link_status: ::std::option::Option<crate::types::VpcLinkStatus>,
91    pub(crate) vpc_link_status_message: ::std::option::Option<::std::string::String>,
92    pub(crate) vpc_link_version: ::std::option::Option<crate::types::VpcLinkVersion>,
93    _request_id: Option<String>,
94}
95impl GetVpcLinkOutputBuilder {
96    /// <p>The timestamp when the VPC link was created.</p>
97    pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
98        self.created_date = ::std::option::Option::Some(input);
99        self
100    }
101    /// <p>The timestamp when the VPC link was created.</p>
102    pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
103        self.created_date = input;
104        self
105    }
106    /// <p>The timestamp when the VPC link was created.</p>
107    pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
108        &self.created_date
109    }
110    /// <p>The name of the VPC link.</p>
111    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112        self.name = ::std::option::Option::Some(input.into());
113        self
114    }
115    /// <p>The name of the VPC link.</p>
116    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.name = input;
118        self
119    }
120    /// <p>The name of the VPC link.</p>
121    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
122        &self.name
123    }
124    /// Appends an item to `security_group_ids`.
125    ///
126    /// To override the contents of this collection use [`set_security_group_ids`](Self::set_security_group_ids).
127    ///
128    /// <p>A list of security group IDs for the VPC link.</p>
129    pub fn security_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130        let mut v = self.security_group_ids.unwrap_or_default();
131        v.push(input.into());
132        self.security_group_ids = ::std::option::Option::Some(v);
133        self
134    }
135    /// <p>A list of security group IDs for the VPC link.</p>
136    pub fn set_security_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
137        self.security_group_ids = input;
138        self
139    }
140    /// <p>A list of security group IDs for the VPC link.</p>
141    pub fn get_security_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
142        &self.security_group_ids
143    }
144    /// Appends an item to `subnet_ids`.
145    ///
146    /// To override the contents of this collection use [`set_subnet_ids`](Self::set_subnet_ids).
147    ///
148    /// <p>A list of subnet IDs to include in the VPC link.</p>
149    pub fn subnet_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        let mut v = self.subnet_ids.unwrap_or_default();
151        v.push(input.into());
152        self.subnet_ids = ::std::option::Option::Some(v);
153        self
154    }
155    /// <p>A list of subnet IDs to include in the VPC link.</p>
156    pub fn set_subnet_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
157        self.subnet_ids = input;
158        self
159    }
160    /// <p>A list of subnet IDs to include in the VPC link.</p>
161    pub fn get_subnet_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
162        &self.subnet_ids
163    }
164    /// Adds a key-value pair to `tags`.
165    ///
166    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
167    ///
168    /// <p>Tags for the VPC link.</p>
169    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
170        let mut hash_map = self.tags.unwrap_or_default();
171        hash_map.insert(k.into(), v.into());
172        self.tags = ::std::option::Option::Some(hash_map);
173        self
174    }
175    /// <p>Tags for the VPC link.</p>
176    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
177        self.tags = input;
178        self
179    }
180    /// <p>Tags for the VPC link.</p>
181    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
182        &self.tags
183    }
184    /// <p>The ID of the VPC link.</p>
185    pub fn vpc_link_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
186        self.vpc_link_id = ::std::option::Option::Some(input.into());
187        self
188    }
189    /// <p>The ID of the VPC link.</p>
190    pub fn set_vpc_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
191        self.vpc_link_id = input;
192        self
193    }
194    /// <p>The ID of the VPC link.</p>
195    pub fn get_vpc_link_id(&self) -> &::std::option::Option<::std::string::String> {
196        &self.vpc_link_id
197    }
198    /// <p>The status of the VPC link.</p>
199    pub fn vpc_link_status(mut self, input: crate::types::VpcLinkStatus) -> Self {
200        self.vpc_link_status = ::std::option::Option::Some(input);
201        self
202    }
203    /// <p>The status of the VPC link.</p>
204    pub fn set_vpc_link_status(mut self, input: ::std::option::Option<crate::types::VpcLinkStatus>) -> Self {
205        self.vpc_link_status = input;
206        self
207    }
208    /// <p>The status of the VPC link.</p>
209    pub fn get_vpc_link_status(&self) -> &::std::option::Option<crate::types::VpcLinkStatus> {
210        &self.vpc_link_status
211    }
212    /// <p>A message summarizing the cause of the status of the VPC link.</p>
213    pub fn vpc_link_status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214        self.vpc_link_status_message = ::std::option::Option::Some(input.into());
215        self
216    }
217    /// <p>A message summarizing the cause of the status of the VPC link.</p>
218    pub fn set_vpc_link_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219        self.vpc_link_status_message = input;
220        self
221    }
222    /// <p>A message summarizing the cause of the status of the VPC link.</p>
223    pub fn get_vpc_link_status_message(&self) -> &::std::option::Option<::std::string::String> {
224        &self.vpc_link_status_message
225    }
226    /// <p>The version of the VPC link.</p>
227    pub fn vpc_link_version(mut self, input: crate::types::VpcLinkVersion) -> Self {
228        self.vpc_link_version = ::std::option::Option::Some(input);
229        self
230    }
231    /// <p>The version of the VPC link.</p>
232    pub fn set_vpc_link_version(mut self, input: ::std::option::Option<crate::types::VpcLinkVersion>) -> Self {
233        self.vpc_link_version = input;
234        self
235    }
236    /// <p>The version of the VPC link.</p>
237    pub fn get_vpc_link_version(&self) -> &::std::option::Option<crate::types::VpcLinkVersion> {
238        &self.vpc_link_version
239    }
240    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
241        self._request_id = Some(request_id.into());
242        self
243    }
244
245    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
246        self._request_id = request_id;
247        self
248    }
249    /// Consumes the builder and constructs a [`GetVpcLinkOutput`](crate::operation::get_vpc_link::GetVpcLinkOutput).
250    pub fn build(self) -> crate::operation::get_vpc_link::GetVpcLinkOutput {
251        crate::operation::get_vpc_link::GetVpcLinkOutput {
252            created_date: self.created_date,
253            name: self.name,
254            security_group_ids: self.security_group_ids,
255            subnet_ids: self.subnet_ids,
256            tags: self.tags,
257            vpc_link_id: self.vpc_link_id,
258            vpc_link_status: self.vpc_link_status,
259            vpc_link_status_message: self.vpc_link_status_message,
260            vpc_link_version: self.vpc_link_version,
261            _request_id: self._request_id,
262        }
263    }
264}