aws_sdk_redshift/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 Amazon Resource Name (ARN) of the Amazon 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>An Key Management Service (KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, the default Amazon Web Services owned key is used.</p>
13 pub kms_key_id: ::std::option::Option<::std::string::String>,
14 /// <p>A list of tags.</p>
15 pub tag_list: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
16 /// <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>
17 /// <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
18 pub additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
19 /// <p>A description of the integration.</p>
20 pub description: ::std::option::Option<::std::string::String>,
21}
22impl CreateIntegrationInput {
23 /// <p>The Amazon Resource Name (ARN) of the database to use as the source for replication.</p>
24 pub fn source_arn(&self) -> ::std::option::Option<&str> {
25 self.source_arn.as_deref()
26 }
27 /// <p>The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.</p>
28 pub fn target_arn(&self) -> ::std::option::Option<&str> {
29 self.target_arn.as_deref()
30 }
31 /// <p>The name of the integration.</p>
32 pub fn integration_name(&self) -> ::std::option::Option<&str> {
33 self.integration_name.as_deref()
34 }
35 /// <p>An Key Management Service (KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, the default Amazon Web Services owned key is used.</p>
36 pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
37 self.kms_key_id.as_deref()
38 }
39 /// <p>A list of tags.</p>
40 ///
41 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_list.is_none()`.
42 pub fn tag_list(&self) -> &[crate::types::Tag] {
43 self.tag_list.as_deref().unwrap_or_default()
44 }
45 /// <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>
46 /// <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
47 pub fn additional_encryption_context(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
48 self.additional_encryption_context.as_ref()
49 }
50 /// <p>A description of the integration.</p>
51 pub fn description(&self) -> ::std::option::Option<&str> {
52 self.description.as_deref()
53 }
54}
55impl CreateIntegrationInput {
56 /// Creates a new builder-style object to manufacture [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
57 pub fn builder() -> crate::operation::create_integration::builders::CreateIntegrationInputBuilder {
58 crate::operation::create_integration::builders::CreateIntegrationInputBuilder::default()
59 }
60}
61
62/// A builder for [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
64#[non_exhaustive]
65pub struct CreateIntegrationInputBuilder {
66 pub(crate) source_arn: ::std::option::Option<::std::string::String>,
67 pub(crate) target_arn: ::std::option::Option<::std::string::String>,
68 pub(crate) integration_name: ::std::option::Option<::std::string::String>,
69 pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
70 pub(crate) tag_list: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
71 pub(crate) additional_encryption_context: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
72 pub(crate) description: ::std::option::Option<::std::string::String>,
73}
74impl CreateIntegrationInputBuilder {
75 /// <p>The Amazon Resource Name (ARN) of the database to use as the source for replication.</p>
76 /// This field is required.
77 pub fn source_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78 self.source_arn = ::std::option::Option::Some(input.into());
79 self
80 }
81 /// <p>The Amazon Resource Name (ARN) of the database to use as the source for replication.</p>
82 pub fn set_source_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83 self.source_arn = input;
84 self
85 }
86 /// <p>The Amazon Resource Name (ARN) of the database to use as the source for replication.</p>
87 pub fn get_source_arn(&self) -> &::std::option::Option<::std::string::String> {
88 &self.source_arn
89 }
90 /// <p>The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.</p>
91 /// This field is required.
92 pub fn target_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93 self.target_arn = ::std::option::Option::Some(input.into());
94 self
95 }
96 /// <p>The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.</p>
97 pub fn set_target_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98 self.target_arn = input;
99 self
100 }
101 /// <p>The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.</p>
102 pub fn get_target_arn(&self) -> &::std::option::Option<::std::string::String> {
103 &self.target_arn
104 }
105 /// <p>The name of the integration.</p>
106 /// This field is required.
107 pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 self.integration_name = ::std::option::Option::Some(input.into());
109 self
110 }
111 /// <p>The name of the integration.</p>
112 pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
113 self.integration_name = input;
114 self
115 }
116 /// <p>The name of the integration.</p>
117 pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> {
118 &self.integration_name
119 }
120 /// <p>An Key Management Service (KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, the default Amazon Web Services owned key is used.</p>
121 pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
122 self.kms_key_id = ::std::option::Option::Some(input.into());
123 self
124 }
125 /// <p>An Key Management Service (KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, the default Amazon Web Services owned key is used.</p>
126 pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
127 self.kms_key_id = input;
128 self
129 }
130 /// <p>An Key Management Service (KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, the default Amazon Web Services owned key is used.</p>
131 pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
132 &self.kms_key_id
133 }
134 /// Appends an item to `tag_list`.
135 ///
136 /// To override the contents of this collection use [`set_tag_list`](Self::set_tag_list).
137 ///
138 /// <p>A list of tags.</p>
139 pub fn tag_list(mut self, input: crate::types::Tag) -> Self {
140 let mut v = self.tag_list.unwrap_or_default();
141 v.push(input);
142 self.tag_list = ::std::option::Option::Some(v);
143 self
144 }
145 /// <p>A list of tags.</p>
146 pub fn set_tag_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
147 self.tag_list = input;
148 self
149 }
150 /// <p>A list of tags.</p>
151 pub fn get_tag_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
152 &self.tag_list
153 }
154 /// Adds a key-value pair to `additional_encryption_context`.
155 ///
156 /// To override the contents of this collection use [`set_additional_encryption_context`](Self::set_additional_encryption_context).
157 ///
158 /// <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>
159 /// <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
160 pub fn additional_encryption_context(
161 mut self,
162 k: impl ::std::convert::Into<::std::string::String>,
163 v: impl ::std::convert::Into<::std::string::String>,
164 ) -> Self {
165 let mut hash_map = self.additional_encryption_context.unwrap_or_default();
166 hash_map.insert(k.into(), v.into());
167 self.additional_encryption_context = ::std::option::Option::Some(hash_map);
168 self
169 }
170 /// <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>
171 /// <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
172 pub fn set_additional_encryption_context(
173 mut self,
174 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
175 ) -> Self {
176 self.additional_encryption_context = input;
177 self
178 }
179 /// <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>
180 /// <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
181 pub fn get_additional_encryption_context(
182 &self,
183 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
184 &self.additional_encryption_context
185 }
186 /// <p>A description of the integration.</p>
187 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188 self.description = ::std::option::Option::Some(input.into());
189 self
190 }
191 /// <p>A description of the integration.</p>
192 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193 self.description = input;
194 self
195 }
196 /// <p>A description of the integration.</p>
197 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
198 &self.description
199 }
200 /// Consumes the builder and constructs a [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
201 pub fn build(
202 self,
203 ) -> ::std::result::Result<crate::operation::create_integration::CreateIntegrationInput, ::aws_smithy_types::error::operation::BuildError> {
204 ::std::result::Result::Ok(crate::operation::create_integration::CreateIntegrationInput {
205 source_arn: self.source_arn,
206 target_arn: self.target_arn,
207 integration_name: self.integration_name,
208 kms_key_id: self.kms_key_id,
209 tag_list: self.tag_list,
210 additional_encryption_context: self.additional_encryption_context,
211 description: self.description,
212 })
213 }
214}