aws_sdk_glue/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>A unique name for an integration in Glue.</p>
7    pub integration_name: ::std::option::Option<::std::string::String>,
8    /// <p>The ARN of the source resource for the integration.</p>
9    pub source_arn: ::std::option::Option<::std::string::String>,
10    /// <p>The ARN of the target resource for the integration.</p>
11    pub target_arn: ::std::option::Option<::std::string::String>,
12    /// <p>A description of the integration.</p>
13    pub description: ::std::option::Option<::std::string::String>,
14    /// <p>Selects source tables for the integration using Maxwell filter syntax.</p>
15    pub data_filter: ::std::option::Option<::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. This can only be provided if <code>KMSKeyId</code> is provided.</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 configuration settings.</p>
23    pub integration_config: ::std::option::Option<crate::types::IntegrationConfig>,
24}
25impl CreateIntegrationInput {
26    /// <p>A unique name for an integration in Glue.</p>
27    pub fn integration_name(&self) -> ::std::option::Option<&str> {
28        self.integration_name.as_deref()
29    }
30    /// <p>The ARN of the source resource for the integration.</p>
31    pub fn source_arn(&self) -> ::std::option::Option<&str> {
32        self.source_arn.as_deref()
33    }
34    /// <p>The ARN of the target resource for the integration.</p>
35    pub fn target_arn(&self) -> ::std::option::Option<&str> {
36        self.target_arn.as_deref()
37    }
38    /// <p>A description of the integration.</p>
39    pub fn description(&self) -> ::std::option::Option<&str> {
40        self.description.as_deref()
41    }
42    /// <p>Selects source tables for the integration using Maxwell filter syntax.</p>
43    pub fn data_filter(&self) -> ::std::option::Option<&str> {
44        self.data_filter.as_deref()
45    }
46    /// <p>The ARN of a KMS key used for encrypting the channel.</p>
47    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
48        self.kms_key_id.as_deref()
49    }
50    /// <p>An optional set of non-secret key–value pairs that contains additional contextual information for encryption. This can only be provided if <code>KMSKeyId</code> is provided.</p>
51    pub fn additional_encryption_context(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
52        self.additional_encryption_context.as_ref()
53    }
54    /// <p>Metadata assigned to the resource consisting of a list of key-value pairs.</p>
55    ///
56    /// 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()`.
57    pub fn tags(&self) -> &[crate::types::Tag] {
58        self.tags.as_deref().unwrap_or_default()
59    }
60    /// <p>The configuration settings.</p>
61    pub fn integration_config(&self) -> ::std::option::Option<&crate::types::IntegrationConfig> {
62        self.integration_config.as_ref()
63    }
64}
65impl CreateIntegrationInput {
66    /// Creates a new builder-style object to manufacture [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
67    pub fn builder() -> crate::operation::create_integration::builders::CreateIntegrationInputBuilder {
68        crate::operation::create_integration::builders::CreateIntegrationInputBuilder::default()
69    }
70}
71
72/// A builder for [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
73#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
74#[non_exhaustive]
75pub struct CreateIntegrationInputBuilder {
76    pub(crate) integration_name: ::std::option::Option<::std::string::String>,
77    pub(crate) source_arn: ::std::option::Option<::std::string::String>,
78    pub(crate) target_arn: ::std::option::Option<::std::string::String>,
79    pub(crate) description: ::std::option::Option<::std::string::String>,
80    pub(crate) data_filter: ::std::option::Option<::std::string::String>,
81    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
82    pub(crate) additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
83    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
84    pub(crate) integration_config: ::std::option::Option<crate::types::IntegrationConfig>,
85}
86impl CreateIntegrationInputBuilder {
87    /// <p>A unique name for an integration in Glue.</p>
88    /// This field is required.
89    pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.integration_name = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>A unique name for an integration in Glue.</p>
94    pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.integration_name = input;
96        self
97    }
98    /// <p>A unique name for an integration in Glue.</p>
99    pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> {
100        &self.integration_name
101    }
102    /// <p>The ARN of the source resource for the integration.</p>
103    /// This field is required.
104    pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105        self.source_arn = ::std::option::Option::Some(input.into());
106        self
107    }
108    /// <p>The ARN of the source resource for the integration.</p>
109    pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110        self.source_arn = input;
111        self
112    }
113    /// <p>The ARN of the source resource for the integration.</p>
114    pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
115        &self.source_arn
116    }
117    /// <p>The ARN of the target resource for the integration.</p>
118    /// This field is required.
119    pub fn target_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.target_arn = ::std::option::Option::Some(input.into());
121        self
122    }
123    /// <p>The ARN of the target resource for the integration.</p>
124    pub fn set_target_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.target_arn = input;
126        self
127    }
128    /// <p>The ARN of the target resource for the integration.</p>
129    pub fn get_target_arn(&self) -> &::std::option::Option<::std::string::String> {
130        &self.target_arn
131    }
132    /// <p>A description of the integration.</p>
133    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
134        self.description = ::std::option::Option::Some(input.into());
135        self
136    }
137    /// <p>A description of the integration.</p>
138    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
139        self.description = input;
140        self
141    }
142    /// <p>A description of the integration.</p>
143    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
144        &self.description
145    }
146    /// <p>Selects source tables for the integration using Maxwell filter syntax.</p>
147    pub fn data_filter(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
148        self.data_filter = ::std::option::Option::Some(input.into());
149        self
150    }
151    /// <p>Selects source tables for the integration using Maxwell filter syntax.</p>
152    pub fn set_data_filter(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
153        self.data_filter = input;
154        self
155    }
156    /// <p>Selects source tables for the integration using Maxwell filter syntax.</p>
157    pub fn get_data_filter(&self) -> &::std::option::Option<::std::string::String> {
158        &self.data_filter
159    }
160    /// <p>The ARN of a KMS key used for encrypting the channel.</p>
161    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162        self.kms_key_id = ::std::option::Option::Some(input.into());
163        self
164    }
165    /// <p>The ARN of a KMS key used for encrypting the channel.</p>
166    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.kms_key_id = input;
168        self
169    }
170    /// <p>The ARN of a KMS key used for encrypting the channel.</p>
171    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
172        &self.kms_key_id
173    }
174    /// Adds a key-value pair to `additional_encryption_context`.
175    ///
176    /// To override the contents of this collection use [`set_additional_encryption_context`](Self::set_additional_encryption_context).
177    ///
178    /// <p>An optional set of non-secret key–value pairs that contains additional contextual information for encryption. This can only be provided if <code>KMSKeyId</code> is provided.</p>
179    pub fn additional_encryption_context(
180        mut self,
181        k: impl ::std::convert::Into<::std::string::String>,
182        v: impl ::std::convert::Into<::std::string::String>,
183    ) -> Self {
184        let mut hash_map = self.additional_encryption_context.unwrap_or_default();
185        hash_map.insert(k.into(), v.into());
186        self.additional_encryption_context = ::std::option::Option::Some(hash_map);
187        self
188    }
189    /// <p>An optional set of non-secret key–value pairs that contains additional contextual information for encryption. This can only be provided if <code>KMSKeyId</code> is provided.</p>
190    pub fn set_additional_encryption_context(
191        mut self,
192        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
193    ) -> Self {
194        self.additional_encryption_context = input;
195        self
196    }
197    /// <p>An optional set of non-secret key–value pairs that contains additional contextual information for encryption. This can only be provided if <code>KMSKeyId</code> is provided.</p>
198    pub fn get_additional_encryption_context(
199        &self,
200    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
201        &self.additional_encryption_context
202    }
203    /// Appends an item to `tags`.
204    ///
205    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
206    ///
207    /// <p>Metadata assigned to the resource consisting of a list of key-value pairs.</p>
208    pub fn tags(mut self, input: crate::types::Tag) -> Self {
209        let mut v = self.tags.unwrap_or_default();
210        v.push(input);
211        self.tags = ::std::option::Option::Some(v);
212        self
213    }
214    /// <p>Metadata assigned to the resource consisting of a list of key-value pairs.</p>
215    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
216        self.tags = input;
217        self
218    }
219    /// <p>Metadata assigned to the resource consisting of a list of key-value pairs.</p>
220    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
221        &self.tags
222    }
223    /// <p>The configuration settings.</p>
224    pub fn integration_config(mut self, input: crate::types::IntegrationConfig) -> Self {
225        self.integration_config = ::std::option::Option::Some(input);
226        self
227    }
228    /// <p>The configuration settings.</p>
229    pub fn set_integration_config(mut self, input: ::std::option::Option<crate::types::IntegrationConfig>) -> Self {
230        self.integration_config = input;
231        self
232    }
233    /// <p>The configuration settings.</p>
234    pub fn get_integration_config(&self) -> &::std::option::Option<crate::types::IntegrationConfig> {
235        &self.integration_config
236    }
237    /// Consumes the builder and constructs a [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
238    pub fn build(
239        self,
240    ) -> ::std::result::Result<crate::operation::create_integration::CreateIntegrationInput, ::aws_smithy_types::error::operation::BuildError> {
241        ::std::result::Result::Ok(crate::operation::create_integration::CreateIntegrationInput {
242            integration_name: self.integration_name,
243            source_arn: self.source_arn,
244            target_arn: self.target_arn,
245            description: self.description,
246            data_filter: self.data_filter,
247            kms_key_id: self.kms_key_id,
248            additional_encryption_context: self.additional_encryption_context,
249            tags: self.tags,
250            integration_config: self.integration_config,
251        })
252    }
253}