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