aws_sdk_rds/operation/create_integration/_create_integration_input.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 CreateIntegrationInput {
6 /// <p>The Amazon Resource Name (ARN) of the database to use as the source for replication.</p>
7 pub source_arn: ::std::option::Option<::std::string::String>,
8 /// <p>The ARN of the Redshift data warehouse to use as the target for replication.</p>
9 pub target_arn: ::std::option::Option<::std::string::String>,
10 /// <p>The name of the integration.</p>
11 pub integration_name: ::std::option::Option<::std::string::String>,
12 /// <p>The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, RDS uses a default Amazon Web Services owned key.</p>
13 pub kms_key_id: ::std::option::Option<::std::string::String>,
14 /// <p>An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption context</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
15 /// <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
16 pub additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
17 /// <p>A list of tags.</p>
18 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
19 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
20 /// <p>Data filtering options for the integration. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.filtering.html">Data filtering for Aurora zero-ETL integrations with Amazon Redshift</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/zero-etl.filtering.html">Data filtering for Amazon RDS zero-ETL integrations with Amazon Redshift</a>.</p>
21 pub data_filter: ::std::option::Option<::std::string::String>,
22 /// <p>A description of the integration.</p>
23 pub description: ::std::option::Option<::std::string::String>,
24}
25impl CreateIntegrationInput {
26 /// <p>The Amazon Resource Name (ARN) of the database to use as the source for replication.</p>
27 pub fn source_arn(&self) -> ::std::option::Option<&str> {
28 self.source_arn.as_deref()
29 }
30 /// <p>The ARN of the Redshift data warehouse to use as the target for replication.</p>
31 pub fn target_arn(&self) -> ::std::option::Option<&str> {
32 self.target_arn.as_deref()
33 }
34 /// <p>The name of the integration.</p>
35 pub fn integration_name(&self) -> ::std::option::Option<&str> {
36 self.integration_name.as_deref()
37 }
38 /// <p>The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, RDS uses a default Amazon Web Services owned key.</p>
39 pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
40 self.kms_key_id.as_deref()
41 }
42 /// <p>An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption context</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
43 /// <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
44 pub fn additional_encryption_context(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
45 self.additional_encryption_context.as_ref()
46 }
47 /// <p>A list of tags.</p>
48 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
49 ///
50 /// 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()`.
51 pub fn tags(&self) -> &[crate::types::Tag] {
52 self.tags.as_deref().unwrap_or_default()
53 }
54 /// <p>Data filtering options for the integration. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.filtering.html">Data filtering for Aurora zero-ETL integrations with Amazon Redshift</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/zero-etl.filtering.html">Data filtering for Amazon RDS zero-ETL integrations with Amazon Redshift</a>.</p>
55 pub fn data_filter(&self) -> ::std::option::Option<&str> {
56 self.data_filter.as_deref()
57 }
58 /// <p>A description of the integration.</p>
59 pub fn description(&self) -> ::std::option::Option<&str> {
60 self.description.as_deref()
61 }
62}
63impl CreateIntegrationInput {
64 /// Creates a new builder-style object to manufacture [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
65 pub fn builder() -> crate::operation::create_integration::builders::CreateIntegrationInputBuilder {
66 crate::operation::create_integration::builders::CreateIntegrationInputBuilder::default()
67 }
68}
69
70/// A builder for [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct CreateIntegrationInputBuilder {
74 pub(crate) source_arn: ::std::option::Option<::std::string::String>,
75 pub(crate) target_arn: ::std::option::Option<::std::string::String>,
76 pub(crate) integration_name: ::std::option::Option<::std::string::String>,
77 pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
78 pub(crate) additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
79 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
80 pub(crate) data_filter: ::std::option::Option<::std::string::String>,
81 pub(crate) description: ::std::option::Option<::std::string::String>,
82}
83impl CreateIntegrationInputBuilder {
84 /// <p>The Amazon Resource Name (ARN) of the database to use as the source for replication.</p>
85 /// This field is required.
86 pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87 self.source_arn = ::std::option::Option::Some(input.into());
88 self
89 }
90 /// <p>The Amazon Resource Name (ARN) of the database to use as the source for replication.</p>
91 pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.source_arn = input;
93 self
94 }
95 /// <p>The Amazon Resource Name (ARN) of the database to use as the source for replication.</p>
96 pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
97 &self.source_arn
98 }
99 /// <p>The ARN of the Redshift data warehouse to use as the target for replication.</p>
100 /// This field is required.
101 pub fn target_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.target_arn = ::std::option::Option::Some(input.into());
103 self
104 }
105 /// <p>The ARN of the Redshift data warehouse to use as the target for replication.</p>
106 pub fn set_target_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.target_arn = input;
108 self
109 }
110 /// <p>The ARN of the Redshift data warehouse to use as the target for replication.</p>
111 pub fn get_target_arn(&self) -> &::std::option::Option<::std::string::String> {
112 &self.target_arn
113 }
114 /// <p>The name of the integration.</p>
115 /// This field is required.
116 pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.integration_name = ::std::option::Option::Some(input.into());
118 self
119 }
120 /// <p>The name of the integration.</p>
121 pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122 self.integration_name = input;
123 self
124 }
125 /// <p>The name of the integration.</p>
126 pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> {
127 &self.integration_name
128 }
129 /// <p>The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, RDS uses a default Amazon Web Services owned key.</p>
130 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131 self.kms_key_id = ::std::option::Option::Some(input.into());
132 self
133 }
134 /// <p>The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, RDS uses a default Amazon Web Services owned key.</p>
135 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136 self.kms_key_id = input;
137 self
138 }
139 /// <p>The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, RDS uses a default Amazon Web Services owned key.</p>
140 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
141 &self.kms_key_id
142 }
143 /// Adds a key-value pair to `additional_encryption_context`.
144 ///
145 /// To override the contents of this collection use [`set_additional_encryption_context`](Self::set_additional_encryption_context).
146 ///
147 /// <p>An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption context</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
148 /// <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
149 pub fn additional_encryption_context(
150 mut self,
151 k: impl ::std::convert::Into<::std::string::String>,
152 v: impl ::std::convert::Into<::std::string::String>,
153 ) -> Self {
154 let mut hash_map = self.additional_encryption_context.unwrap_or_default();
155 hash_map.insert(k.into(), v.into());
156 self.additional_encryption_context = ::std::option::Option::Some(hash_map);
157 self
158 }
159 /// <p>An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption context</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
160 /// <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
161 pub fn set_additional_encryption_context(
162 mut self,
163 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
164 ) -> Self {
165 self.additional_encryption_context = input;
166 self
167 }
168 /// <p>An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption context</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p>
169 /// <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
170 pub fn get_additional_encryption_context(
171 &self,
172 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
173 &self.additional_encryption_context
174 }
175 /// Appends an item to `tags`.
176 ///
177 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
178 ///
179 /// <p>A list of tags.</p>
180 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
181 pub fn tags(mut self, input: crate::types::Tag) -> Self {
182 let mut v = self.tags.unwrap_or_default();
183 v.push(input);
184 self.tags = ::std::option::Option::Some(v);
185 self
186 }
187 /// <p>A list of tags.</p>
188 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
189 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
190 self.tags = input;
191 self
192 }
193 /// <p>A list of tags.</p>
194 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS resources</a> in the <i>Amazon RDS User Guide</i> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html">Tagging Amazon Aurora and Amazon RDS resources</a> in the <i>Amazon Aurora User Guide</i>.</p>
195 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
196 &self.tags
197 }
198 /// <p>Data filtering options for the integration. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.filtering.html">Data filtering for Aurora zero-ETL integrations with Amazon Redshift</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/zero-etl.filtering.html">Data filtering for Amazon RDS zero-ETL integrations with Amazon Redshift</a>.</p>
199 pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 self.data_filter = ::std::option::Option::Some(input.into());
201 self
202 }
203 /// <p>Data filtering options for the integration. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.filtering.html">Data filtering for Aurora zero-ETL integrations with Amazon Redshift</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/zero-etl.filtering.html">Data filtering for Amazon RDS zero-ETL integrations with Amazon Redshift</a>.</p>
204 pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205 self.data_filter = input;
206 self
207 }
208 /// <p>Data filtering options for the integration. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.filtering.html">Data filtering for Aurora zero-ETL integrations with Amazon Redshift</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/zero-etl.filtering.html">Data filtering for Amazon RDS zero-ETL integrations with Amazon Redshift</a>.</p>
209 pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> {
210 &self.data_filter
211 }
212 /// <p>A description of the integration.</p>
213 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214 self.description = ::std::option::Option::Some(input.into());
215 self
216 }
217 /// <p>A description of the integration.</p>
218 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219 self.description = input;
220 self
221 }
222 /// <p>A description of the integration.</p>
223 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
224 &self.description
225 }
226 /// Consumes the builder and constructs a [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
227 pub fn build(
228 self,
229 ) -> ::std::result::Result<crate::operation::create_integration::CreateIntegrationInput, ::aws_smithy_types::error::operation::BuildError> {
230 ::std::result::Result::Ok(crate::operation::create_integration::CreateIntegrationInput {
231 source_arn: self.source_arn,
232 target_arn: self.target_arn,
233 integration_name: self.integration_name,
234 kms_key_id: self.kms_key_id,
235 additional_encryption_context: self.additional_encryption_context,
236 tags: self.tags,
237 data_filter: self.data_filter,
238 description: self.description,
239 })
240 }
241}