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 CreateIntegrationOutput {
6/// <p>The Amazon Resource Name (ARN) of the integration.</p>
7pub integration_arn: ::std::option::Option<::std::string::String>,
8/// <p>The name of the integration.</p>
9pub integration_name: ::std::option::Option<::std::string::String>,
10/// <p>The Amazon Resource Name (ARN) of the database used as the source for replication.</p>
11pub source_arn: ::std::option::Option<::std::string::String>,
12/// <p>The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.</p>
13pub target_arn: ::std::option::Option<::std::string::String>,
14/// <p>The current status of the integration.</p>
15pub status: ::std::option::Option<crate::types::ZeroEtlIntegrationStatus>,
16/// <p>Any errors associated with the integration.</p>
17pub errors: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationError>>,
18/// <p>The time (UTC) when the integration was created.</p>
19pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
20/// <p>The description of the integration.</p>
21pub description: ::std::option::Option<::std::string::String>,
22/// <p>The Key Management Service (KMS) key identifier for the key used to encrypt the integration.</p>
23pub kms_key_id: ::std::option::Option<::std::string::String>,
24/// <p>The encryption context for the integration. 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>
25pub additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26/// <p>The list of tags associated with the integration.</p>
27pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
28 _request_id: Option<String>,
29}
30impl CreateIntegrationOutput {
31/// <p>The Amazon Resource Name (ARN) of the integration.</p>
32pub fn integration_arn(&self) -> ::std::option::Option<&str> {
33self.integration_arn.as_deref()
34 }
35/// <p>The name of the integration.</p>
36pub fn integration_name(&self) -> ::std::option::Option<&str> {
37self.integration_name.as_deref()
38 }
39/// <p>The Amazon Resource Name (ARN) of the database used as the source for replication.</p>
40pub fn source_arn(&self) -> ::std::option::Option<&str> {
41self.source_arn.as_deref()
42 }
43/// <p>The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.</p>
44pub fn target_arn(&self) -> ::std::option::Option<&str> {
45self.target_arn.as_deref()
46 }
47/// <p>The current status of the integration.</p>
48pub fn status(&self) -> ::std::option::Option<&crate::types::ZeroEtlIntegrationStatus> {
49self.status.as_ref()
50 }
51/// <p>Any errors associated with the integration.</p>
52 ///
53 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.errors.is_none()`.
54pub fn errors(&self) -> &[crate::types::IntegrationError] {
55self.errors.as_deref().unwrap_or_default()
56 }
57/// <p>The time (UTC) when the integration was created.</p>
58pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59self.create_time.as_ref()
60 }
61/// <p>The description of the integration.</p>
62pub fn description(&self) -> ::std::option::Option<&str> {
63self.description.as_deref()
64 }
65/// <p>The Key Management Service (KMS) key identifier for the key used to encrypt the integration.</p>
66pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
67self.kms_key_id.as_deref()
68 }
69/// <p>The encryption context for the integration. 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>
70pub fn additional_encryption_context(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
71self.additional_encryption_context.as_ref()
72 }
73/// <p>The list of tags associated with the integration.</p>
74 ///
75 /// 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()`.
76pub fn tags(&self) -> &[crate::types::Tag] {
77self.tags.as_deref().unwrap_or_default()
78 }
79}
80impl ::aws_types::request_id::RequestId for CreateIntegrationOutput {
81fn request_id(&self) -> Option<&str> {
82self._request_id.as_deref()
83 }
84}
85impl CreateIntegrationOutput {
86/// Creates a new builder-style object to manufacture [`CreateIntegrationOutput`](crate::operation::create_integration::CreateIntegrationOutput).
87pub fn builder() -> crate::operation::create_integration::builders::CreateIntegrationOutputBuilder {
88crate::operation::create_integration::builders::CreateIntegrationOutputBuilder::default()
89 }
90}
9192/// A builder for [`CreateIntegrationOutput`](crate::operation::create_integration::CreateIntegrationOutput).
93#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
94#[non_exhaustive]
95pub struct CreateIntegrationOutputBuilder {
96pub(crate) integration_arn: ::std::option::Option<::std::string::String>,
97pub(crate) integration_name: ::std::option::Option<::std::string::String>,
98pub(crate) source_arn: ::std::option::Option<::std::string::String>,
99pub(crate) target_arn: ::std::option::Option<::std::string::String>,
100pub(crate) status: ::std::option::Option<crate::types::ZeroEtlIntegrationStatus>,
101pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationError>>,
102pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
103pub(crate) description: ::std::option::Option<::std::string::String>,
104pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
105pub(crate) additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
106pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
107 _request_id: Option<String>,
108}
109impl CreateIntegrationOutputBuilder {
110/// <p>The Amazon Resource Name (ARN) of the integration.</p>
111pub fn integration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112self.integration_arn = ::std::option::Option::Some(input.into());
113self
114}
115/// <p>The Amazon Resource Name (ARN) of the integration.</p>
116pub fn set_integration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117self.integration_arn = input;
118self
119}
120/// <p>The Amazon Resource Name (ARN) of the integration.</p>
121pub fn get_integration_arn(&self) -> &::std::option::Option<::std::string::String> {
122&self.integration_arn
123 }
124/// <p>The name of the integration.</p>
125pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
126self.integration_name = ::std::option::Option::Some(input.into());
127self
128}
129/// <p>The name of the integration.</p>
130pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
131self.integration_name = input;
132self
133}
134/// <p>The name of the integration.</p>
135pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> {
136&self.integration_name
137 }
138/// <p>The Amazon Resource Name (ARN) of the database used as the source for replication.</p>
139pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140self.source_arn = ::std::option::Option::Some(input.into());
141self
142}
143/// <p>The Amazon Resource Name (ARN) of the database used as the source for replication.</p>
144pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145self.source_arn = input;
146self
147}
148/// <p>The Amazon Resource Name (ARN) of the database used as the source for replication.</p>
149pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
150&self.source_arn
151 }
152/// <p>The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.</p>
153pub fn target_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
154self.target_arn = ::std::option::Option::Some(input.into());
155self
156}
157/// <p>The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.</p>
158pub fn set_target_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
159self.target_arn = input;
160self
161}
162/// <p>The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.</p>
163pub fn get_target_arn(&self) -> &::std::option::Option<::std::string::String> {
164&self.target_arn
165 }
166/// <p>The current status of the integration.</p>
167pub fn status(mut self, input: crate::types::ZeroEtlIntegrationStatus) -> Self {
168self.status = ::std::option::Option::Some(input);
169self
170}
171/// <p>The current status of the integration.</p>
172pub fn set_status(mut self, input: ::std::option::Option<crate::types::ZeroEtlIntegrationStatus>) -> Self {
173self.status = input;
174self
175}
176/// <p>The current status of the integration.</p>
177pub fn get_status(&self) -> &::std::option::Option<crate::types::ZeroEtlIntegrationStatus> {
178&self.status
179 }
180/// Appends an item to `errors`.
181 ///
182 /// To override the contents of this collection use [`set_errors`](Self::set_errors).
183 ///
184 /// <p>Any errors associated with the integration.</p>
185pub fn errors(mut self, input: crate::types::IntegrationError) -> Self {
186let mut v = self.errors.unwrap_or_default();
187 v.push(input);
188self.errors = ::std::option::Option::Some(v);
189self
190}
191/// <p>Any errors associated with the integration.</p>
192pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationError>>) -> Self {
193self.errors = input;
194self
195}
196/// <p>Any errors associated with the integration.</p>
197pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IntegrationError>> {
198&self.errors
199 }
200/// <p>The time (UTC) when the integration was created.</p>
201pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
202self.create_time = ::std::option::Option::Some(input);
203self
204}
205/// <p>The time (UTC) when the integration was created.</p>
206pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
207self.create_time = input;
208self
209}
210/// <p>The time (UTC) when the integration was created.</p>
211pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
212&self.create_time
213 }
214/// <p>The description of the integration.</p>
215pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
216self.description = ::std::option::Option::Some(input.into());
217self
218}
219/// <p>The description of the integration.</p>
220pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
221self.description = input;
222self
223}
224/// <p>The description of the integration.</p>
225pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
226&self.description
227 }
228/// <p>The Key Management Service (KMS) key identifier for the key used to encrypt the integration.</p>
229pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
230self.kms_key_id = ::std::option::Option::Some(input.into());
231self
232}
233/// <p>The Key Management Service (KMS) key identifier for the key used to encrypt the integration.</p>
234pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
235self.kms_key_id = input;
236self
237}
238/// <p>The Key Management Service (KMS) key identifier for the key used to encrypt the integration.</p>
239pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
240&self.kms_key_id
241 }
242/// Adds a key-value pair to `additional_encryption_context`.
243 ///
244 /// To override the contents of this collection use [`set_additional_encryption_context`](Self::set_additional_encryption_context).
245 ///
246 /// <p>The encryption context for the integration. 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>
247pub fn additional_encryption_context(
248mut self,
249 k: impl ::std::convert::Into<::std::string::String>,
250 v: impl ::std::convert::Into<::std::string::String>,
251 ) -> Self {
252let mut hash_map = self.additional_encryption_context.unwrap_or_default();
253 hash_map.insert(k.into(), v.into());
254self.additional_encryption_context = ::std::option::Option::Some(hash_map);
255self
256}
257/// <p>The encryption context for the integration. 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>
258pub fn set_additional_encryption_context(
259mut self,
260 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
261 ) -> Self {
262self.additional_encryption_context = input;
263self
264}
265/// <p>The encryption context for the integration. 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>
266pub fn get_additional_encryption_context(
267&self,
268 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
269&self.additional_encryption_context
270 }
271/// Appends an item to `tags`.
272 ///
273 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
274 ///
275 /// <p>The list of tags associated with the integration.</p>
276pub fn tags(mut self, input: crate::types::Tag) -> Self {
277let mut v = self.tags.unwrap_or_default();
278 v.push(input);
279self.tags = ::std::option::Option::Some(v);
280self
281}
282/// <p>The list of tags associated with the integration.</p>
283pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
284self.tags = input;
285self
286}
287/// <p>The list of tags associated with the integration.</p>
288pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
289&self.tags
290 }
291pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
292self._request_id = Some(request_id.into());
293self
294}
295296pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
297self._request_id = request_id;
298self
299}
300/// Consumes the builder and constructs a [`CreateIntegrationOutput`](crate::operation::create_integration::CreateIntegrationOutput).
301pub fn build(self) -> crate::operation::create_integration::CreateIntegrationOutput {
302crate::operation::create_integration::CreateIntegrationOutput {
303 integration_arn: self.integration_arn,
304 integration_name: self.integration_name,
305 source_arn: self.source_arn,
306 target_arn: self.target_arn,
307 status: self.status,
308 errors: self.errors,
309 create_time: self.create_time,
310 description: self.description,
311 kms_key_id: self.kms_key_id,
312 additional_encryption_context: self.additional_encryption_context,
313 tags: self.tags,
314 _request_id: self._request_id,
315 }
316 }
317}