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
// 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 CreateDataProviderInput {
/// <p>A user-friendly name for the data provider.</p>
pub data_provider_name: ::std::option::Option<::std::string::String>,
/// <p>A user-friendly description of the data provider.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>The type of database engine for the data provider. Valid values include <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"sqlserver"</code>, <code>redshift</code>, <code>mariadb</code>, <code>mongodb</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, and <code>sybase</code>. A value of <code>"aurora"</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
pub engine: ::std::option::Option<::std::string::String>,
/// <p>Indicates whether the data provider is virtual.</p>
pub r#virtual: ::std::option::Option<bool>,
/// <p>The settings in JSON format for a data provider.</p>
pub settings: ::std::option::Option<crate::types::DataProviderSettings>,
/// <p>One or more tags to be assigned to the data provider.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateDataProviderInput {
/// <p>A user-friendly name for the data provider.</p>
pub fn data_provider_name(&self) -> ::std::option::Option<&str> {
self.data_provider_name.as_deref()
}
/// <p>A user-friendly description of the data provider.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The type of database engine for the data provider. Valid values include <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"sqlserver"</code>, <code>redshift</code>, <code>mariadb</code>, <code>mongodb</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, and <code>sybase</code>. A value of <code>"aurora"</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
pub fn engine(&self) -> ::std::option::Option<&str> {
self.engine.as_deref()
}
/// <p>Indicates whether the data provider is virtual.</p>
pub fn r#virtual(&self) -> ::std::option::Option<bool> {
self.r#virtual
}
/// <p>The settings in JSON format for a data provider.</p>
pub fn settings(&self) -> ::std::option::Option<&crate::types::DataProviderSettings> {
self.settings.as_ref()
}
/// <p>One or more tags to be assigned to the data provider.</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 `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
}
impl CreateDataProviderInput {
/// Creates a new builder-style object to manufacture [`CreateDataProviderInput`](crate::operation::create_data_provider::CreateDataProviderInput).
pub fn builder() -> crate::operation::create_data_provider::builders::CreateDataProviderInputBuilder {
crate::operation::create_data_provider::builders::CreateDataProviderInputBuilder::default()
}
}
/// A builder for [`CreateDataProviderInput`](crate::operation::create_data_provider::CreateDataProviderInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDataProviderInputBuilder {
pub(crate) data_provider_name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) engine: ::std::option::Option<::std::string::String>,
pub(crate) r#virtual: ::std::option::Option<bool>,
pub(crate) settings: ::std::option::Option<crate::types::DataProviderSettings>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateDataProviderInputBuilder {
/// <p>A user-friendly name for the data provider.</p>
pub fn data_provider_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.data_provider_name = ::std::option::Option::Some(input.into());
self
}
/// <p>A user-friendly name for the data provider.</p>
pub fn set_data_provider_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.data_provider_name = input;
self
}
/// <p>A user-friendly name for the data provider.</p>
pub fn get_data_provider_name(&self) -> &::std::option::Option<::std::string::String> {
&self.data_provider_name
}
/// <p>A user-friendly description of the data provider.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>A user-friendly description of the data provider.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>A user-friendly description of the data provider.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>The type of database engine for the data provider. Valid values include <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"sqlserver"</code>, <code>redshift</code>, <code>mariadb</code>, <code>mongodb</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, and <code>sybase</code>. A value of <code>"aurora"</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
/// This field is required.
pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.engine = ::std::option::Option::Some(input.into());
self
}
/// <p>The type of database engine for the data provider. Valid values include <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"sqlserver"</code>, <code>redshift</code>, <code>mariadb</code>, <code>mongodb</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, and <code>sybase</code>. A value of <code>"aurora"</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.engine = input;
self
}
/// <p>The type of database engine for the data provider. Valid values include <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"sqlserver"</code>, <code>redshift</code>, <code>mariadb</code>, <code>mongodb</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, and <code>sybase</code>. A value of <code>"aurora"</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
&self.engine
}
/// <p>Indicates whether the data provider is virtual.</p>
pub fn r#virtual(mut self, input: bool) -> Self {
self.r#virtual = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether the data provider is virtual.</p>
pub fn set_virtual(mut self, input: ::std::option::Option<bool>) -> Self {
self.r#virtual = input;
self
}
/// <p>Indicates whether the data provider is virtual.</p>
pub fn get_virtual(&self) -> &::std::option::Option<bool> {
&self.r#virtual
}
/// <p>The settings in JSON format for a data provider.</p>
/// This field is required.
pub fn settings(mut self, input: crate::types::DataProviderSettings) -> Self {
self.settings = ::std::option::Option::Some(input);
self
}
/// <p>The settings in JSON format for a data provider.</p>
pub fn set_settings(mut self, input: ::std::option::Option<crate::types::DataProviderSettings>) -> Self {
self.settings = input;
self
}
/// <p>The settings in JSON format for a data provider.</p>
pub fn get_settings(&self) -> &::std::option::Option<crate::types::DataProviderSettings> {
&self.settings
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>One or more tags to be assigned to the data provider.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>One or more tags to be assigned to the data provider.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>One or more tags to be assigned to the data provider.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// Consumes the builder and constructs a [`CreateDataProviderInput`](crate::operation::create_data_provider::CreateDataProviderInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_data_provider::CreateDataProviderInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_data_provider::CreateDataProviderInput {
data_provider_name: self.data_provider_name,
description: self.description,
engine: self.engine,
r#virtual: self.r#virtual,
settings: self.settings,
tags: self.tags,
})
}
}