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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The location of resources.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Location {
/// <p>A JDBC location.</p>
pub jdbc: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
/// <p>An Amazon Simple Storage Service (Amazon S3) location.</p>
pub s3: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
/// <p>An Amazon DynamoDB table location.</p>
pub dynamo_db: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
}
impl Location {
/// <p>A JDBC location.</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 `.jdbc.is_none()`.
pub fn jdbc(&self) -> &[crate::types::CodeGenNodeArg] {
self.jdbc.as_deref().unwrap_or_default()
}
/// <p>An Amazon Simple Storage Service (Amazon S3) location.</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 `.s3.is_none()`.
pub fn s3(&self) -> &[crate::types::CodeGenNodeArg] {
self.s3.as_deref().unwrap_or_default()
}
/// <p>An Amazon DynamoDB table location.</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 `.dynamo_db.is_none()`.
pub fn dynamo_db(&self) -> &[crate::types::CodeGenNodeArg] {
self.dynamo_db.as_deref().unwrap_or_default()
}
}
impl Location {
/// Creates a new builder-style object to manufacture [`Location`](crate::types::Location).
pub fn builder() -> crate::types::builders::LocationBuilder {
crate::types::builders::LocationBuilder::default()
}
}
/// A builder for [`Location`](crate::types::Location).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct LocationBuilder {
pub(crate) jdbc: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
pub(crate) s3: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
pub(crate) dynamo_db: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>,
}
impl LocationBuilder {
/// Appends an item to `jdbc`.
///
/// To override the contents of this collection use [`set_jdbc`](Self::set_jdbc).
///
/// <p>A JDBC location.</p>
pub fn jdbc(mut self, input: crate::types::CodeGenNodeArg) -> Self {
let mut v = self.jdbc.unwrap_or_default();
v.push(input);
self.jdbc = ::std::option::Option::Some(v);
self
}
/// <p>A JDBC location.</p>
pub fn set_jdbc(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>) -> Self {
self.jdbc = input;
self
}
/// <p>A JDBC location.</p>
pub fn get_jdbc(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>> {
&self.jdbc
}
/// Appends an item to `s3`.
///
/// To override the contents of this collection use [`set_s3`](Self::set_s3).
///
/// <p>An Amazon Simple Storage Service (Amazon S3) location.</p>
pub fn s3(mut self, input: crate::types::CodeGenNodeArg) -> Self {
let mut v = self.s3.unwrap_or_default();
v.push(input);
self.s3 = ::std::option::Option::Some(v);
self
}
/// <p>An Amazon Simple Storage Service (Amazon S3) location.</p>
pub fn set_s3(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>) -> Self {
self.s3 = input;
self
}
/// <p>An Amazon Simple Storage Service (Amazon S3) location.</p>
pub fn get_s3(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>> {
&self.s3
}
/// Appends an item to `dynamo_db`.
///
/// To override the contents of this collection use [`set_dynamo_db`](Self::set_dynamo_db).
///
/// <p>An Amazon DynamoDB table location.</p>
pub fn dynamo_db(mut self, input: crate::types::CodeGenNodeArg) -> Self {
let mut v = self.dynamo_db.unwrap_or_default();
v.push(input);
self.dynamo_db = ::std::option::Option::Some(v);
self
}
/// <p>An Amazon DynamoDB table location.</p>
pub fn set_dynamo_db(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>>) -> Self {
self.dynamo_db = input;
self
}
/// <p>An Amazon DynamoDB table location.</p>
pub fn get_dynamo_db(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CodeGenNodeArg>> {
&self.dynamo_db
}
/// Consumes the builder and constructs a [`Location`](crate::types::Location).
pub fn build(self) -> crate::types::Location {
crate::types::Location {
jdbc: self.jdbc,
s3: self.s3,
dynamo_db: self.dynamo_db,
}
}
}