aws-sdk-rtbfabric 1.24.0

AWS SDK for RTBFabric
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetLinkOutput {
    /// <p>The unique identifier of the gateway.</p>
    pub gateway_id: ::std::string::String,
    /// <p>The unique identifier of the peer gateway.</p>
    pub peer_gateway_id: ::std::string::String,
    /// <p>The status of the link.</p>
    pub status: crate::types::LinkStatus,
    /// <p>The timestamp of when the link was created.</p>
    pub created_at: ::aws_smithy_types::DateTime,
    /// <p>The timestamp of when the link was updated.</p>
    pub updated_at: ::aws_smithy_types::DateTime,
    /// <p>The direction of the link.</p>
    pub direction: ::std::option::Option<crate::types::LinkDirection>,
    /// <p>The configuration of flow modules.</p>
    pub flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>,
    /// <p>The configuration of pending flow modules.</p>
    pub pending_flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>,
    /// <p>Attributes of the link.</p>
    pub attributes: ::std::option::Option<crate::types::LinkAttributes>,
    /// <p>Settings for the application logs.</p>
    pub log_settings: ::std::option::Option<crate::types::LinkLogSettings>,
    /// <p>The connectivity type of the link.</p>
    pub connectivity_type: ::std::option::Option<crate::types::ConnectivityType>,
    /// <p>The unique identifier of the link.</p>
    pub link_id: ::std::string::String,
    /// <p>A map of the key-value pairs for the tag or tags assigned to the specified resource.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>Boolean to specify if an HTTP responder is allowed.</p>
    pub http_responder_allowed: ::std::option::Option<bool>,
    /// <p>The timeout value in milliseconds.</p>
    pub timeout_in_millis: ::std::option::Option<i64>,
    _request_id: Option<String>,
}
impl GetLinkOutput {
    /// <p>The unique identifier of the gateway.</p>
    pub fn gateway_id(&self) -> &str {
        use std::ops::Deref;
        self.gateway_id.deref()
    }
    /// <p>The unique identifier of the peer gateway.</p>
    pub fn peer_gateway_id(&self) -> &str {
        use std::ops::Deref;
        self.peer_gateway_id.deref()
    }
    /// <p>The status of the link.</p>
    pub fn status(&self) -> &crate::types::LinkStatus {
        &self.status
    }
    /// <p>The timestamp of when the link was created.</p>
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// <p>The timestamp of when the link was updated.</p>
    pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
        &self.updated_at
    }
    /// <p>The direction of the link.</p>
    pub fn direction(&self) -> ::std::option::Option<&crate::types::LinkDirection> {
        self.direction.as_ref()
    }
    /// <p>The configuration of flow modules.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.flow_modules.is_none()`.
    pub fn flow_modules(&self) -> &[crate::types::ModuleConfiguration] {
        self.flow_modules.as_deref().unwrap_or_default()
    }
    /// <p>The configuration of pending flow modules.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.pending_flow_modules.is_none()`.
    pub fn pending_flow_modules(&self) -> &[crate::types::ModuleConfiguration] {
        self.pending_flow_modules.as_deref().unwrap_or_default()
    }
    /// <p>Attributes of the link.</p>
    pub fn attributes(&self) -> ::std::option::Option<&crate::types::LinkAttributes> {
        self.attributes.as_ref()
    }
    /// <p>Settings for the application logs.</p>
    pub fn log_settings(&self) -> ::std::option::Option<&crate::types::LinkLogSettings> {
        self.log_settings.as_ref()
    }
    /// <p>The connectivity type of the link.</p>
    pub fn connectivity_type(&self) -> ::std::option::Option<&crate::types::ConnectivityType> {
        self.connectivity_type.as_ref()
    }
    /// <p>The unique identifier of the link.</p>
    pub fn link_id(&self) -> &str {
        use std::ops::Deref;
        self.link_id.deref()
    }
    /// <p>A map of the key-value pairs for the tag or tags assigned to the specified resource.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>Boolean to specify if an HTTP responder is allowed.</p>
    pub fn http_responder_allowed(&self) -> ::std::option::Option<bool> {
        self.http_responder_allowed
    }
    /// <p>The timeout value in milliseconds.</p>
    pub fn timeout_in_millis(&self) -> ::std::option::Option<i64> {
        self.timeout_in_millis
    }
}
impl ::aws_types::request_id::RequestId for GetLinkOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetLinkOutput {
    /// Creates a new builder-style object to manufacture [`GetLinkOutput`](crate::operation::get_link::GetLinkOutput).
    pub fn builder() -> crate::operation::get_link::builders::GetLinkOutputBuilder {
        crate::operation::get_link::builders::GetLinkOutputBuilder::default()
    }
}

/// A builder for [`GetLinkOutput`](crate::operation::get_link::GetLinkOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetLinkOutputBuilder {
    pub(crate) gateway_id: ::std::option::Option<::std::string::String>,
    pub(crate) peer_gateway_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::LinkStatus>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) direction: ::std::option::Option<crate::types::LinkDirection>,
    pub(crate) flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>,
    pub(crate) pending_flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>,
    pub(crate) attributes: ::std::option::Option<crate::types::LinkAttributes>,
    pub(crate) log_settings: ::std::option::Option<crate::types::LinkLogSettings>,
    pub(crate) connectivity_type: ::std::option::Option<crate::types::ConnectivityType>,
    pub(crate) link_id: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) http_responder_allowed: ::std::option::Option<bool>,
    pub(crate) timeout_in_millis: ::std::option::Option<i64>,
    _request_id: Option<String>,
}
impl GetLinkOutputBuilder {
    /// <p>The unique identifier of the gateway.</p>
    /// This field is required.
    pub fn gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.gateway_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the gateway.</p>
    pub fn set_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.gateway_id = input;
        self
    }
    /// <p>The unique identifier of the gateway.</p>
    pub fn get_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.gateway_id
    }
    /// <p>The unique identifier of the peer gateway.</p>
    /// This field is required.
    pub fn peer_gateway_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.peer_gateway_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the peer gateway.</p>
    pub fn set_peer_gateway_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.peer_gateway_id = input;
        self
    }
    /// <p>The unique identifier of the peer gateway.</p>
    pub fn get_peer_gateway_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.peer_gateway_id
    }
    /// <p>The status of the link.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::LinkStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the link.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::LinkStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the link.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::LinkStatus> {
        &self.status
    }
    /// <p>The timestamp of when the link was created.</p>
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of when the link was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The timestamp of when the link was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The timestamp of when the link was updated.</p>
    /// This field is required.
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of when the link was updated.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>The timestamp of when the link was updated.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// <p>The direction of the link.</p>
    pub fn direction(mut self, input: crate::types::LinkDirection) -> Self {
        self.direction = ::std::option::Option::Some(input);
        self
    }
    /// <p>The direction of the link.</p>
    pub fn set_direction(mut self, input: ::std::option::Option<crate::types::LinkDirection>) -> Self {
        self.direction = input;
        self
    }
    /// <p>The direction of the link.</p>
    pub fn get_direction(&self) -> &::std::option::Option<crate::types::LinkDirection> {
        &self.direction
    }
    /// Appends an item to `flow_modules`.
    ///
    /// To override the contents of this collection use [`set_flow_modules`](Self::set_flow_modules).
    ///
    /// <p>The configuration of flow modules.</p>
    pub fn flow_modules(mut self, input: crate::types::ModuleConfiguration) -> Self {
        let mut v = self.flow_modules.unwrap_or_default();
        v.push(input);
        self.flow_modules = ::std::option::Option::Some(v);
        self
    }
    /// <p>The configuration of flow modules.</p>
    pub fn set_flow_modules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>) -> Self {
        self.flow_modules = input;
        self
    }
    /// <p>The configuration of flow modules.</p>
    pub fn get_flow_modules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>> {
        &self.flow_modules
    }
    /// Appends an item to `pending_flow_modules`.
    ///
    /// To override the contents of this collection use [`set_pending_flow_modules`](Self::set_pending_flow_modules).
    ///
    /// <p>The configuration of pending flow modules.</p>
    pub fn pending_flow_modules(mut self, input: crate::types::ModuleConfiguration) -> Self {
        let mut v = self.pending_flow_modules.unwrap_or_default();
        v.push(input);
        self.pending_flow_modules = ::std::option::Option::Some(v);
        self
    }
    /// <p>The configuration of pending flow modules.</p>
    pub fn set_pending_flow_modules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>>) -> Self {
        self.pending_flow_modules = input;
        self
    }
    /// <p>The configuration of pending flow modules.</p>
    pub fn get_pending_flow_modules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ModuleConfiguration>> {
        &self.pending_flow_modules
    }
    /// <p>Attributes of the link.</p>
    pub fn attributes(mut self, input: crate::types::LinkAttributes) -> Self {
        self.attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>Attributes of the link.</p>
    pub fn set_attributes(mut self, input: ::std::option::Option<crate::types::LinkAttributes>) -> Self {
        self.attributes = input;
        self
    }
    /// <p>Attributes of the link.</p>
    pub fn get_attributes(&self) -> &::std::option::Option<crate::types::LinkAttributes> {
        &self.attributes
    }
    /// <p>Settings for the application logs.</p>
    pub fn log_settings(mut self, input: crate::types::LinkLogSettings) -> Self {
        self.log_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>Settings for the application logs.</p>
    pub fn set_log_settings(mut self, input: ::std::option::Option<crate::types::LinkLogSettings>) -> Self {
        self.log_settings = input;
        self
    }
    /// <p>Settings for the application logs.</p>
    pub fn get_log_settings(&self) -> &::std::option::Option<crate::types::LinkLogSettings> {
        &self.log_settings
    }
    /// <p>The connectivity type of the link.</p>
    pub fn connectivity_type(mut self, input: crate::types::ConnectivityType) -> Self {
        self.connectivity_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The connectivity type of the link.</p>
    pub fn set_connectivity_type(mut self, input: ::std::option::Option<crate::types::ConnectivityType>) -> Self {
        self.connectivity_type = input;
        self
    }
    /// <p>The connectivity type of the link.</p>
    pub fn get_connectivity_type(&self) -> &::std::option::Option<crate::types::ConnectivityType> {
        &self.connectivity_type
    }
    /// <p>The unique identifier of the link.</p>
    /// This field is required.
    pub fn link_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.link_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the link.</p>
    pub fn set_link_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.link_id = input;
        self
    }
    /// <p>The unique identifier of the link.</p>
    pub fn get_link_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.link_id
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A map of the key-value pairs for the tag or tags assigned to the specified resource.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map of the key-value pairs for the tag or tags assigned to the specified resource.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A map of the key-value pairs for the tag or tags assigned to the specified resource.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>Boolean to specify if an HTTP responder is allowed.</p>
    pub fn http_responder_allowed(mut self, input: bool) -> Self {
        self.http_responder_allowed = ::std::option::Option::Some(input);
        self
    }
    /// <p>Boolean to specify if an HTTP responder is allowed.</p>
    pub fn set_http_responder_allowed(mut self, input: ::std::option::Option<bool>) -> Self {
        self.http_responder_allowed = input;
        self
    }
    /// <p>Boolean to specify if an HTTP responder is allowed.</p>
    pub fn get_http_responder_allowed(&self) -> &::std::option::Option<bool> {
        &self.http_responder_allowed
    }
    /// <p>The timeout value in milliseconds.</p>
    pub fn timeout_in_millis(mut self, input: i64) -> Self {
        self.timeout_in_millis = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timeout value in milliseconds.</p>
    pub fn set_timeout_in_millis(mut self, input: ::std::option::Option<i64>) -> Self {
        self.timeout_in_millis = input;
        self
    }
    /// <p>The timeout value in milliseconds.</p>
    pub fn get_timeout_in_millis(&self) -> &::std::option::Option<i64> {
        &self.timeout_in_millis
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetLinkOutput`](crate::operation::get_link::GetLinkOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`gateway_id`](crate::operation::get_link::builders::GetLinkOutputBuilder::gateway_id)
    /// - [`peer_gateway_id`](crate::operation::get_link::builders::GetLinkOutputBuilder::peer_gateway_id)
    /// - [`status`](crate::operation::get_link::builders::GetLinkOutputBuilder::status)
    /// - [`created_at`](crate::operation::get_link::builders::GetLinkOutputBuilder::created_at)
    /// - [`updated_at`](crate::operation::get_link::builders::GetLinkOutputBuilder::updated_at)
    /// - [`link_id`](crate::operation::get_link::builders::GetLinkOutputBuilder::link_id)
    pub fn build(self) -> ::std::result::Result<crate::operation::get_link::GetLinkOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_link::GetLinkOutput {
            gateway_id: self.gateway_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "gateway_id",
                    "gateway_id was not specified but it is required when building GetLinkOutput",
                )
            })?,
            peer_gateway_id: self.peer_gateway_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "peer_gateway_id",
                    "peer_gateway_id was not specified but it is required when building GetLinkOutput",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building GetLinkOutput",
                )
            })?,
            created_at: self.created_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_at",
                    "created_at was not specified but it is required when building GetLinkOutput",
                )
            })?,
            updated_at: self.updated_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "updated_at",
                    "updated_at was not specified but it is required when building GetLinkOutput",
                )
            })?,
            direction: self.direction,
            flow_modules: self.flow_modules,
            pending_flow_modules: self.pending_flow_modules,
            attributes: self.attributes,
            log_settings: self.log_settings,
            connectivity_type: self.connectivity_type,
            link_id: self.link_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "link_id",
                    "link_id was not specified but it is required when building GetLinkOutput",
                )
            })?,
            tags: self.tags,
            http_responder_allowed: self.http_responder_allowed,
            timeout_in_millis: self.timeout_in_millis,
            _request_id: self._request_id,
        })
    }
}