aws_sdk_glue/operation/modify_integration/
_modify_integration_output.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 ModifyIntegrationOutput {
6    /// <p>The ARN of the source for the integration.</p>
7    pub source_arn: ::std::string::String,
8    /// <p>The ARN of the target for the integration.</p>
9    pub target_arn: ::std::string::String,
10    /// <p>A unique name for an integration in Glue.</p>
11    pub integration_name: ::std::string::String,
12    /// <p>A description of the integration.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>The Amazon Resource Name (ARN) for the integration.</p>
15    pub integration_arn: ::std::string::String,
16    /// <p>The ARN of a KMS key used for encrypting the channel.</p>
17    pub kms_key_id: ::std::option::Option<::std::string::String>,
18    /// <p>An optional set of non-secret key–value pairs that contains additional contextual information for encryption.</p>
19    pub additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
20    /// <p>Metadata assigned to the resource consisting of a list of key-value pairs.</p>
21    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
22    /// <p>The status of the integration being modified.</p>
23    /// <p>The possible statuses are:</p>
24    /// <ul>
25    /// <li>
26    /// <p>CREATING: The integration is being created.</p></li>
27    /// <li>
28    /// <p>ACTIVE: The integration creation succeeds.</p></li>
29    /// <li>
30    /// <p>MODIFYING: The integration is being modified.</p></li>
31    /// <li>
32    /// <p>FAILED: The integration creation fails.</p></li>
33    /// <li>
34    /// <p>DELETING: The integration is deleted.</p></li>
35    /// <li>
36    /// <p>SYNCING: The integration is synchronizing.</p></li>
37    /// <li>
38    /// <p>NEEDS_ATTENTION: The integration needs attention, such as synchronization.</p></li>
39    /// </ul>
40    pub status: crate::types::IntegrationStatus,
41    /// <p>The time when the integration was created, in UTC.</p>
42    pub create_time: ::aws_smithy_types::DateTime,
43    /// <p>A list of errors associated with the integration modification.</p>
44    pub errors: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationError>>,
45    /// <p>Selects source tables for the integration using Maxwell filter syntax.</p>
46    pub data_filter: ::std::option::Option<::std::string::String>,
47    /// <p>Properties associated with the integration.</p>
48    pub integration_config: ::std::option::Option<crate::types::IntegrationConfig>,
49    _request_id: Option<String>,
50}
51impl ModifyIntegrationOutput {
52    /// <p>The ARN of the source for the integration.</p>
53    pub fn source_arn(&self) -> &str {
54        use std::ops::Deref;
55        self.source_arn.deref()
56    }
57    /// <p>The ARN of the target for the integration.</p>
58    pub fn target_arn(&self) -> &str {
59        use std::ops::Deref;
60        self.target_arn.deref()
61    }
62    /// <p>A unique name for an integration in Glue.</p>
63    pub fn integration_name(&self) -> &str {
64        use std::ops::Deref;
65        self.integration_name.deref()
66    }
67    /// <p>A description of the integration.</p>
68    pub fn description(&self) -> ::std::option::Option<&str> {
69        self.description.as_deref()
70    }
71    /// <p>The Amazon Resource Name (ARN) for the integration.</p>
72    pub fn integration_arn(&self) -> &str {
73        use std::ops::Deref;
74        self.integration_arn.deref()
75    }
76    /// <p>The ARN of a KMS key used for encrypting the channel.</p>
77    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
78        self.kms_key_id.as_deref()
79    }
80    /// <p>An optional set of non-secret key–value pairs that contains additional contextual information for encryption.</p>
81    pub fn additional_encryption_context(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
82        self.additional_encryption_context.as_ref()
83    }
84    /// <p>Metadata assigned to the resource consisting of a list of key-value pairs.</p>
85    ///
86    /// 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()`.
87    pub fn tags(&self) -> &[crate::types::Tag] {
88        self.tags.as_deref().unwrap_or_default()
89    }
90    /// <p>The status of the integration being modified.</p>
91    /// <p>The possible statuses are:</p>
92    /// <ul>
93    /// <li>
94    /// <p>CREATING: The integration is being created.</p></li>
95    /// <li>
96    /// <p>ACTIVE: The integration creation succeeds.</p></li>
97    /// <li>
98    /// <p>MODIFYING: The integration is being modified.</p></li>
99    /// <li>
100    /// <p>FAILED: The integration creation fails.</p></li>
101    /// <li>
102    /// <p>DELETING: The integration is deleted.</p></li>
103    /// <li>
104    /// <p>SYNCING: The integration is synchronizing.</p></li>
105    /// <li>
106    /// <p>NEEDS_ATTENTION: The integration needs attention, such as synchronization.</p></li>
107    /// </ul>
108    pub fn status(&self) -> &crate::types::IntegrationStatus {
109        &self.status
110    }
111    /// <p>The time when the integration was created, in UTC.</p>
112    pub fn create_time(&self) -> &::aws_smithy_types::DateTime {
113        &self.create_time
114    }
115    /// <p>A list of errors associated with the integration modification.</p>
116    ///
117    /// 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()`.
118    pub fn errors(&self) -> &[crate::types::IntegrationError] {
119        self.errors.as_deref().unwrap_or_default()
120    }
121    /// <p>Selects source tables for the integration using Maxwell filter syntax.</p>
122    pub fn data_filter(&self) -> ::std::option::Option<&str> {
123        self.data_filter.as_deref()
124    }
125    /// <p>Properties associated with the integration.</p>
126    pub fn integration_config(&self) -> ::std::option::Option<&crate::types::IntegrationConfig> {
127        self.integration_config.as_ref()
128    }
129}
130impl ::aws_types::request_id::RequestId for ModifyIntegrationOutput {
131    fn request_id(&self) -> Option<&str> {
132        self._request_id.as_deref()
133    }
134}
135impl ModifyIntegrationOutput {
136    /// Creates a new builder-style object to manufacture [`ModifyIntegrationOutput`](crate::operation::modify_integration::ModifyIntegrationOutput).
137    pub fn builder() -> crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder {
138        crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder::default()
139    }
140}
141
142/// A builder for [`ModifyIntegrationOutput`](crate::operation::modify_integration::ModifyIntegrationOutput).
143#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
144#[non_exhaustive]
145pub struct ModifyIntegrationOutputBuilder {
146    pub(crate) source_arn: ::std::option::Option<::std::string::String>,
147    pub(crate) target_arn: ::std::option::Option<::std::string::String>,
148    pub(crate) integration_name: ::std::option::Option<::std::string::String>,
149    pub(crate) description: ::std::option::Option<::std::string::String>,
150    pub(crate) integration_arn: ::std::option::Option<::std::string::String>,
151    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
152    pub(crate) additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
153    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
154    pub(crate) status: ::std::option::Option<crate::types::IntegrationStatus>,
155    pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
156    pub(crate) errors: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationError>>,
157    pub(crate) data_filter: ::std::option::Option<::std::string::String>,
158    pub(crate) integration_config: ::std::option::Option<crate::types::IntegrationConfig>,
159    _request_id: Option<String>,
160}
161impl ModifyIntegrationOutputBuilder {
162    /// <p>The ARN of the source for the integration.</p>
163    /// This field is required.
164    pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
165        self.source_arn = ::std::option::Option::Some(input.into());
166        self
167    }
168    /// <p>The ARN of the source for the integration.</p>
169    pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
170        self.source_arn = input;
171        self
172    }
173    /// <p>The ARN of the source for the integration.</p>
174    pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
175        &self.source_arn
176    }
177    /// <p>The ARN of the target for the integration.</p>
178    /// This field is required.
179    pub fn target_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
180        self.target_arn = ::std::option::Option::Some(input.into());
181        self
182    }
183    /// <p>The ARN of the target for the integration.</p>
184    pub fn set_target_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
185        self.target_arn = input;
186        self
187    }
188    /// <p>The ARN of the target for the integration.</p>
189    pub fn get_target_arn(&self) -> &::std::option::Option<::std::string::String> {
190        &self.target_arn
191    }
192    /// <p>A unique name for an integration in Glue.</p>
193    /// This field is required.
194    pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
195        self.integration_name = ::std::option::Option::Some(input.into());
196        self
197    }
198    /// <p>A unique name for an integration in Glue.</p>
199    pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
200        self.integration_name = input;
201        self
202    }
203    /// <p>A unique name for an integration in Glue.</p>
204    pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> {
205        &self.integration_name
206    }
207    /// <p>A description of the integration.</p>
208    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
209        self.description = ::std::option::Option::Some(input.into());
210        self
211    }
212    /// <p>A description of the integration.</p>
213    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
214        self.description = input;
215        self
216    }
217    /// <p>A description of the integration.</p>
218    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
219        &self.description
220    }
221    /// <p>The Amazon Resource Name (ARN) for the integration.</p>
222    /// This field is required.
223    pub fn integration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
224        self.integration_arn = ::std::option::Option::Some(input.into());
225        self
226    }
227    /// <p>The Amazon Resource Name (ARN) for the integration.</p>
228    pub fn set_integration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
229        self.integration_arn = input;
230        self
231    }
232    /// <p>The Amazon Resource Name (ARN) for the integration.</p>
233    pub fn get_integration_arn(&self) -> &::std::option::Option<::std::string::String> {
234        &self.integration_arn
235    }
236    /// <p>The ARN of a KMS key used for encrypting the channel.</p>
237    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
238        self.kms_key_id = ::std::option::Option::Some(input.into());
239        self
240    }
241    /// <p>The ARN of a KMS key used for encrypting the channel.</p>
242    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
243        self.kms_key_id = input;
244        self
245    }
246    /// <p>The ARN of a KMS key used for encrypting the channel.</p>
247    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
248        &self.kms_key_id
249    }
250    /// Adds a key-value pair to `additional_encryption_context`.
251    ///
252    /// To override the contents of this collection use [`set_additional_encryption_context`](Self::set_additional_encryption_context).
253    ///
254    /// <p>An optional set of non-secret key–value pairs that contains additional contextual information for encryption.</p>
255    pub fn additional_encryption_context(
256        mut self,
257        k: impl ::std::convert::Into<::std::string::String>,
258        v: impl ::std::convert::Into<::std::string::String>,
259    ) -> Self {
260        let mut hash_map = self.additional_encryption_context.unwrap_or_default();
261        hash_map.insert(k.into(), v.into());
262        self.additional_encryption_context = ::std::option::Option::Some(hash_map);
263        self
264    }
265    /// <p>An optional set of non-secret key–value pairs that contains additional contextual information for encryption.</p>
266    pub fn set_additional_encryption_context(
267        mut self,
268        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
269    ) -> Self {
270        self.additional_encryption_context = input;
271        self
272    }
273    /// <p>An optional set of non-secret key–value pairs that contains additional contextual information for encryption.</p>
274    pub fn get_additional_encryption_context(
275        &self,
276    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
277        &self.additional_encryption_context
278    }
279    /// Appends an item to `tags`.
280    ///
281    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
282    ///
283    /// <p>Metadata assigned to the resource consisting of a list of key-value pairs.</p>
284    pub fn tags(mut self, input: crate::types::Tag) -> Self {
285        let mut v = self.tags.unwrap_or_default();
286        v.push(input);
287        self.tags = ::std::option::Option::Some(v);
288        self
289    }
290    /// <p>Metadata assigned to the resource consisting of a list of key-value pairs.</p>
291    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
292        self.tags = input;
293        self
294    }
295    /// <p>Metadata assigned to the resource consisting of a list of key-value pairs.</p>
296    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
297        &self.tags
298    }
299    /// <p>The status of the integration being modified.</p>
300    /// <p>The possible statuses are:</p>
301    /// <ul>
302    /// <li>
303    /// <p>CREATING: The integration is being created.</p></li>
304    /// <li>
305    /// <p>ACTIVE: The integration creation succeeds.</p></li>
306    /// <li>
307    /// <p>MODIFYING: The integration is being modified.</p></li>
308    /// <li>
309    /// <p>FAILED: The integration creation fails.</p></li>
310    /// <li>
311    /// <p>DELETING: The integration is deleted.</p></li>
312    /// <li>
313    /// <p>SYNCING: The integration is synchronizing.</p></li>
314    /// <li>
315    /// <p>NEEDS_ATTENTION: The integration needs attention, such as synchronization.</p></li>
316    /// </ul>
317    /// This field is required.
318    pub fn status(mut self, input: crate::types::IntegrationStatus) -> Self {
319        self.status = ::std::option::Option::Some(input);
320        self
321    }
322    /// <p>The status of the integration being modified.</p>
323    /// <p>The possible statuses are:</p>
324    /// <ul>
325    /// <li>
326    /// <p>CREATING: The integration is being created.</p></li>
327    /// <li>
328    /// <p>ACTIVE: The integration creation succeeds.</p></li>
329    /// <li>
330    /// <p>MODIFYING: The integration is being modified.</p></li>
331    /// <li>
332    /// <p>FAILED: The integration creation fails.</p></li>
333    /// <li>
334    /// <p>DELETING: The integration is deleted.</p></li>
335    /// <li>
336    /// <p>SYNCING: The integration is synchronizing.</p></li>
337    /// <li>
338    /// <p>NEEDS_ATTENTION: The integration needs attention, such as synchronization.</p></li>
339    /// </ul>
340    pub fn set_status(mut self, input: ::std::option::Option<crate::types::IntegrationStatus>) -> Self {
341        self.status = input;
342        self
343    }
344    /// <p>The status of the integration being modified.</p>
345    /// <p>The possible statuses are:</p>
346    /// <ul>
347    /// <li>
348    /// <p>CREATING: The integration is being created.</p></li>
349    /// <li>
350    /// <p>ACTIVE: The integration creation succeeds.</p></li>
351    /// <li>
352    /// <p>MODIFYING: The integration is being modified.</p></li>
353    /// <li>
354    /// <p>FAILED: The integration creation fails.</p></li>
355    /// <li>
356    /// <p>DELETING: The integration is deleted.</p></li>
357    /// <li>
358    /// <p>SYNCING: The integration is synchronizing.</p></li>
359    /// <li>
360    /// <p>NEEDS_ATTENTION: The integration needs attention, such as synchronization.</p></li>
361    /// </ul>
362    pub fn get_status(&self) -> &::std::option::Option<crate::types::IntegrationStatus> {
363        &self.status
364    }
365    /// <p>The time when the integration was created, in UTC.</p>
366    /// This field is required.
367    pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
368        self.create_time = ::std::option::Option::Some(input);
369        self
370    }
371    /// <p>The time when the integration was created, in UTC.</p>
372    pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
373        self.create_time = input;
374        self
375    }
376    /// <p>The time when the integration was created, in UTC.</p>
377    pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
378        &self.create_time
379    }
380    /// Appends an item to `errors`.
381    ///
382    /// To override the contents of this collection use [`set_errors`](Self::set_errors).
383    ///
384    /// <p>A list of errors associated with the integration modification.</p>
385    pub fn errors(mut self, input: crate::types::IntegrationError) -> Self {
386        let mut v = self.errors.unwrap_or_default();
387        v.push(input);
388        self.errors = ::std::option::Option::Some(v);
389        self
390    }
391    /// <p>A list of errors associated with the integration modification.</p>
392    pub fn set_errors(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationError>>) -> Self {
393        self.errors = input;
394        self
395    }
396    /// <p>A list of errors associated with the integration modification.</p>
397    pub fn get_errors(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IntegrationError>> {
398        &self.errors
399    }
400    /// <p>Selects source tables for the integration using Maxwell filter syntax.</p>
401    pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
402        self.data_filter = ::std::option::Option::Some(input.into());
403        self
404    }
405    /// <p>Selects source tables for the integration using Maxwell filter syntax.</p>
406    pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
407        self.data_filter = input;
408        self
409    }
410    /// <p>Selects source tables for the integration using Maxwell filter syntax.</p>
411    pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> {
412        &self.data_filter
413    }
414    /// <p>Properties associated with the integration.</p>
415    pub fn integration_config(mut self, input: crate::types::IntegrationConfig) -> Self {
416        self.integration_config = ::std::option::Option::Some(input);
417        self
418    }
419    /// <p>Properties associated with the integration.</p>
420    pub fn set_integration_config(mut self, input: ::std::option::Option<crate::types::IntegrationConfig>) -> Self {
421        self.integration_config = input;
422        self
423    }
424    /// <p>Properties associated with the integration.</p>
425    pub fn get_integration_config(&self) -> &::std::option::Option<crate::types::IntegrationConfig> {
426        &self.integration_config
427    }
428    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
429        self._request_id = Some(request_id.into());
430        self
431    }
432
433    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
434        self._request_id = request_id;
435        self
436    }
437    /// Consumes the builder and constructs a [`ModifyIntegrationOutput`](crate::operation::modify_integration::ModifyIntegrationOutput).
438    /// This method will fail if any of the following fields are not set:
439    /// - [`source_arn`](crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder::source_arn)
440    /// - [`target_arn`](crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder::target_arn)
441    /// - [`integration_name`](crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder::integration_name)
442    /// - [`integration_arn`](crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder::integration_arn)
443    /// - [`status`](crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder::status)
444    /// - [`create_time`](crate::operation::modify_integration::builders::ModifyIntegrationOutputBuilder::create_time)
445    pub fn build(
446        self,
447    ) -> ::std::result::Result<crate::operation::modify_integration::ModifyIntegrationOutput, ::aws_smithy_types::error::operation::BuildError> {
448        ::std::result::Result::Ok(crate::operation::modify_integration::ModifyIntegrationOutput {
449            source_arn: self.source_arn.ok_or_else(|| {
450                ::aws_smithy_types::error::operation::BuildError::missing_field(
451                    "source_arn",
452                    "source_arn was not specified but it is required when building ModifyIntegrationOutput",
453                )
454            })?,
455            target_arn: self.target_arn.ok_or_else(|| {
456                ::aws_smithy_types::error::operation::BuildError::missing_field(
457                    "target_arn",
458                    "target_arn was not specified but it is required when building ModifyIntegrationOutput",
459                )
460            })?,
461            integration_name: self.integration_name.ok_or_else(|| {
462                ::aws_smithy_types::error::operation::BuildError::missing_field(
463                    "integration_name",
464                    "integration_name was not specified but it is required when building ModifyIntegrationOutput",
465                )
466            })?,
467            description: self.description,
468            integration_arn: self.integration_arn.ok_or_else(|| {
469                ::aws_smithy_types::error::operation::BuildError::missing_field(
470                    "integration_arn",
471                    "integration_arn was not specified but it is required when building ModifyIntegrationOutput",
472                )
473            })?,
474            kms_key_id: self.kms_key_id,
475            additional_encryption_context: self.additional_encryption_context,
476            tags: self.tags,
477            status: self.status.ok_or_else(|| {
478                ::aws_smithy_types::error::operation::BuildError::missing_field(
479                    "status",
480                    "status was not specified but it is required when building ModifyIntegrationOutput",
481                )
482            })?,
483            create_time: self.create_time.ok_or_else(|| {
484                ::aws_smithy_types::error::operation::BuildError::missing_field(
485                    "create_time",
486                    "create_time was not specified but it is required when building ModifyIntegrationOutput",
487                )
488            })?,
489            errors: self.errors,
490            data_filter: self.data_filter,
491            integration_config: self.integration_config,
492            _request_id: self._request_id,
493        })
494    }
495}