aws_sdk_apigatewayv2/operation/get_api/
_get_api_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetApiOutput {
6 pub api_endpoint: ::std::option::Option<::std::string::String>,
8 pub api_gateway_managed: ::std::option::Option<bool>,
10 pub api_id: ::std::option::Option<::std::string::String>,
12 pub api_key_selection_expression: ::std::option::Option<::std::string::String>,
14 pub cors_configuration: ::std::option::Option<crate::types::Cors>,
16 pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
18 pub description: ::std::option::Option<::std::string::String>,
20 pub disable_schema_validation: ::std::option::Option<bool>,
22 pub disable_execute_api_endpoint: ::std::option::Option<bool>,
24 pub import_info: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
26 pub ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
28 pub name: ::std::option::Option<::std::string::String>,
30 pub protocol_type: ::std::option::Option<crate::types::ProtocolType>,
32 pub route_selection_expression: ::std::option::Option<::std::string::String>,
34 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
36 pub version: ::std::option::Option<::std::string::String>,
38 pub warnings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
40 _request_id: Option<String>,
41}
42impl GetApiOutput {
43 pub fn api_endpoint(&self) -> ::std::option::Option<&str> {
45 self.api_endpoint.as_deref()
46 }
47 pub fn api_gateway_managed(&self) -> ::std::option::Option<bool> {
49 self.api_gateway_managed
50 }
51 pub fn api_id(&self) -> ::std::option::Option<&str> {
53 self.api_id.as_deref()
54 }
55 pub fn api_key_selection_expression(&self) -> ::std::option::Option<&str> {
57 self.api_key_selection_expression.as_deref()
58 }
59 pub fn cors_configuration(&self) -> ::std::option::Option<&crate::types::Cors> {
61 self.cors_configuration.as_ref()
62 }
63 pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
65 self.created_date.as_ref()
66 }
67 pub fn description(&self) -> ::std::option::Option<&str> {
69 self.description.as_deref()
70 }
71 pub fn disable_schema_validation(&self) -> ::std::option::Option<bool> {
73 self.disable_schema_validation
74 }
75 pub fn disable_execute_api_endpoint(&self) -> ::std::option::Option<bool> {
77 self.disable_execute_api_endpoint
78 }
79 pub fn import_info(&self) -> &[::std::string::String] {
83 self.import_info.as_deref().unwrap_or_default()
84 }
85 pub fn ip_address_type(&self) -> ::std::option::Option<&crate::types::IpAddressType> {
87 self.ip_address_type.as_ref()
88 }
89 pub fn name(&self) -> ::std::option::Option<&str> {
91 self.name.as_deref()
92 }
93 pub fn protocol_type(&self) -> ::std::option::Option<&crate::types::ProtocolType> {
95 self.protocol_type.as_ref()
96 }
97 pub fn route_selection_expression(&self) -> ::std::option::Option<&str> {
99 self.route_selection_expression.as_deref()
100 }
101 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
103 self.tags.as_ref()
104 }
105 pub fn version(&self) -> ::std::option::Option<&str> {
107 self.version.as_deref()
108 }
109 pub fn warnings(&self) -> &[::std::string::String] {
113 self.warnings.as_deref().unwrap_or_default()
114 }
115}
116impl ::aws_types::request_id::RequestId for GetApiOutput {
117 fn request_id(&self) -> Option<&str> {
118 self._request_id.as_deref()
119 }
120}
121impl GetApiOutput {
122 pub fn builder() -> crate::operation::get_api::builders::GetApiOutputBuilder {
124 crate::operation::get_api::builders::GetApiOutputBuilder::default()
125 }
126}
127
128#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
130#[non_exhaustive]
131pub struct GetApiOutputBuilder {
132 pub(crate) api_endpoint: ::std::option::Option<::std::string::String>,
133 pub(crate) api_gateway_managed: ::std::option::Option<bool>,
134 pub(crate) api_id: ::std::option::Option<::std::string::String>,
135 pub(crate) api_key_selection_expression: ::std::option::Option<::std::string::String>,
136 pub(crate) cors_configuration: ::std::option::Option<crate::types::Cors>,
137 pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
138 pub(crate) description: ::std::option::Option<::std::string::String>,
139 pub(crate) disable_schema_validation: ::std::option::Option<bool>,
140 pub(crate) disable_execute_api_endpoint: ::std::option::Option<bool>,
141 pub(crate) import_info: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
142 pub(crate) ip_address_type: ::std::option::Option<crate::types::IpAddressType>,
143 pub(crate) name: ::std::option::Option<::std::string::String>,
144 pub(crate) protocol_type: ::std::option::Option<crate::types::ProtocolType>,
145 pub(crate) route_selection_expression: ::std::option::Option<::std::string::String>,
146 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
147 pub(crate) version: ::std::option::Option<::std::string::String>,
148 pub(crate) warnings: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
149 _request_id: Option<String>,
150}
151impl GetApiOutputBuilder {
152 pub fn api_endpoint(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154 self.api_endpoint = ::std::option::Option::Some(input.into());
155 self
156 }
157 pub fn set_api_endpoint(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159 self.api_endpoint = input;
160 self
161 }
162 pub fn get_api_endpoint(&self) -> &::std::option::Option<::std::string::String> {
164 &self.api_endpoint
165 }
166 pub fn api_gateway_managed(mut self, input: bool) -> Self {
168 self.api_gateway_managed = ::std::option::Option::Some(input);
169 self
170 }
171 pub fn set_api_gateway_managed(mut self, input: ::std::option::Option<bool>) -> Self {
173 self.api_gateway_managed = input;
174 self
175 }
176 pub fn get_api_gateway_managed(&self) -> &::std::option::Option<bool> {
178 &self.api_gateway_managed
179 }
180 pub fn api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182 self.api_id = ::std::option::Option::Some(input.into());
183 self
184 }
185 pub fn set_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187 self.api_id = input;
188 self
189 }
190 pub fn get_api_id(&self) -> &::std::option::Option<::std::string::String> {
192 &self.api_id
193 }
194 pub fn api_key_selection_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
196 self.api_key_selection_expression = ::std::option::Option::Some(input.into());
197 self
198 }
199 pub fn set_api_key_selection_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
201 self.api_key_selection_expression = input;
202 self
203 }
204 pub fn get_api_key_selection_expression(&self) -> &::std::option::Option<::std::string::String> {
206 &self.api_key_selection_expression
207 }
208 pub fn cors_configuration(mut self, input: crate::types::Cors) -> Self {
210 self.cors_configuration = ::std::option::Option::Some(input);
211 self
212 }
213 pub fn set_cors_configuration(mut self, input: ::std::option::Option<crate::types::Cors>) -> Self {
215 self.cors_configuration = input;
216 self
217 }
218 pub fn get_cors_configuration(&self) -> &::std::option::Option<crate::types::Cors> {
220 &self.cors_configuration
221 }
222 pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
224 self.created_date = ::std::option::Option::Some(input);
225 self
226 }
227 pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
229 self.created_date = input;
230 self
231 }
232 pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
234 &self.created_date
235 }
236 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238 self.description = ::std::option::Option::Some(input.into());
239 self
240 }
241 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243 self.description = input;
244 self
245 }
246 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
248 &self.description
249 }
250 pub fn disable_schema_validation(mut self, input: bool) -> Self {
252 self.disable_schema_validation = ::std::option::Option::Some(input);
253 self
254 }
255 pub fn set_disable_schema_validation(mut self, input: ::std::option::Option<bool>) -> Self {
257 self.disable_schema_validation = input;
258 self
259 }
260 pub fn get_disable_schema_validation(&self) -> &::std::option::Option<bool> {
262 &self.disable_schema_validation
263 }
264 pub fn disable_execute_api_endpoint(mut self, input: bool) -> Self {
266 self.disable_execute_api_endpoint = ::std::option::Option::Some(input);
267 self
268 }
269 pub fn set_disable_execute_api_endpoint(mut self, input: ::std::option::Option<bool>) -> Self {
271 self.disable_execute_api_endpoint = input;
272 self
273 }
274 pub fn get_disable_execute_api_endpoint(&self) -> &::std::option::Option<bool> {
276 &self.disable_execute_api_endpoint
277 }
278 pub fn import_info(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
284 let mut v = self.import_info.unwrap_or_default();
285 v.push(input.into());
286 self.import_info = ::std::option::Option::Some(v);
287 self
288 }
289 pub fn set_import_info(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
291 self.import_info = input;
292 self
293 }
294 pub fn get_import_info(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
296 &self.import_info
297 }
298 pub fn ip_address_type(mut self, input: crate::types::IpAddressType) -> Self {
300 self.ip_address_type = ::std::option::Option::Some(input);
301 self
302 }
303 pub fn set_ip_address_type(mut self, input: ::std::option::Option<crate::types::IpAddressType>) -> Self {
305 self.ip_address_type = input;
306 self
307 }
308 pub fn get_ip_address_type(&self) -> &::std::option::Option<crate::types::IpAddressType> {
310 &self.ip_address_type
311 }
312 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
314 self.name = ::std::option::Option::Some(input.into());
315 self
316 }
317 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
319 self.name = input;
320 self
321 }
322 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
324 &self.name
325 }
326 pub fn protocol_type(mut self, input: crate::types::ProtocolType) -> Self {
328 self.protocol_type = ::std::option::Option::Some(input);
329 self
330 }
331 pub fn set_protocol_type(mut self, input: ::std::option::Option<crate::types::ProtocolType>) -> Self {
333 self.protocol_type = input;
334 self
335 }
336 pub fn get_protocol_type(&self) -> &::std::option::Option<crate::types::ProtocolType> {
338 &self.protocol_type
339 }
340 pub fn route_selection_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
342 self.route_selection_expression = ::std::option::Option::Some(input.into());
343 self
344 }
345 pub fn set_route_selection_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
347 self.route_selection_expression = input;
348 self
349 }
350 pub fn get_route_selection_expression(&self) -> &::std::option::Option<::std::string::String> {
352 &self.route_selection_expression
353 }
354 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
360 let mut hash_map = self.tags.unwrap_or_default();
361 hash_map.insert(k.into(), v.into());
362 self.tags = ::std::option::Option::Some(hash_map);
363 self
364 }
365 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
367 self.tags = input;
368 self
369 }
370 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
372 &self.tags
373 }
374 pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
376 self.version = ::std::option::Option::Some(input.into());
377 self
378 }
379 pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
381 self.version = input;
382 self
383 }
384 pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
386 &self.version
387 }
388 pub fn warnings(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
394 let mut v = self.warnings.unwrap_or_default();
395 v.push(input.into());
396 self.warnings = ::std::option::Option::Some(v);
397 self
398 }
399 pub fn set_warnings(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
401 self.warnings = input;
402 self
403 }
404 pub fn get_warnings(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
406 &self.warnings
407 }
408 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
409 self._request_id = Some(request_id.into());
410 self
411 }
412
413 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
414 self._request_id = request_id;
415 self
416 }
417 pub fn build(self) -> crate::operation::get_api::GetApiOutput {
419 crate::operation::get_api::GetApiOutput {
420 api_endpoint: self.api_endpoint,
421 api_gateway_managed: self.api_gateway_managed,
422 api_id: self.api_id,
423 api_key_selection_expression: self.api_key_selection_expression,
424 cors_configuration: self.cors_configuration,
425 created_date: self.created_date,
426 description: self.description,
427 disable_schema_validation: self.disable_schema_validation,
428 disable_execute_api_endpoint: self.disable_execute_api_endpoint,
429 import_info: self.import_info,
430 ip_address_type: self.ip_address_type,
431 name: self.name,
432 protocol_type: self.protocol_type,
433 route_selection_expression: self.route_selection_expression,
434 tags: self.tags,
435 version: self.version,
436 warnings: self.warnings,
437 _request_id: self._request_id,
438 }
439 }
440}