aws_sdk_firehose/operation/update_destination/
_update_destination_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 UpdateDestinationInput {
6    /// <p>The name of the Firehose stream.</p>
7    pub delivery_stream_name: ::std::option::Option<::std::string::String>,
8    /// <p>Obtain this value from the <code>VersionId</code> result of <code>DeliveryStreamDescription</code>. This value is required, and helps the service perform conditional operations. For example, if there is an interleaving update and this value is null, then the update destination fails. After the update is successful, the <code>VersionId</code> value is updated. The service then performs a merge of the old configuration with the new configuration.</p>
9    pub current_delivery_stream_version_id: ::std::option::Option<::std::string::String>,
10    /// <p>The ID of the destination.</p>
11    pub destination_id: ::std::option::Option<::std::string::String>,
12    /// <p>\[Deprecated\] Describes an update for a destination in Amazon S3.</p>
13    #[deprecated]
14    pub s3_destination_update: ::std::option::Option<crate::types::S3DestinationUpdate>,
15    /// <p>Describes an update for a destination in Amazon S3.</p>
16    pub extended_s3_destination_update: ::std::option::Option<crate::types::ExtendedS3DestinationUpdate>,
17    /// <p>Describes an update for a destination in Amazon Redshift.</p>
18    pub redshift_destination_update: ::std::option::Option<crate::types::RedshiftDestinationUpdate>,
19    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
20    pub elasticsearch_destination_update: ::std::option::Option<crate::types::ElasticsearchDestinationUpdate>,
21    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
22    pub amazonopensearchservice_destination_update: ::std::option::Option<crate::types::AmazonopensearchserviceDestinationUpdate>,
23    /// <p>Describes an update for a destination in Splunk.</p>
24    pub splunk_destination_update: ::std::option::Option<crate::types::SplunkDestinationUpdate>,
25    /// <p>Describes an update to the specified HTTP endpoint destination.</p>
26    pub http_endpoint_destination_update: ::std::option::Option<crate::types::HttpEndpointDestinationUpdate>,
27    /// <p>Describes an update for a destination in the Serverless offering for Amazon OpenSearch Service.</p>
28    pub amazon_open_search_serverless_destination_update: ::std::option::Option<crate::types::AmazonOpenSearchServerlessDestinationUpdate>,
29    /// <p>Update to the Snowflake destination configuration settings.</p>
30    pub snowflake_destination_update: ::std::option::Option<crate::types::SnowflakeDestinationUpdate>,
31    /// <p>Describes an update for a destination in Apache Iceberg Tables.</p>
32    pub iceberg_destination_update: ::std::option::Option<crate::types::IcebergDestinationUpdate>,
33}
34impl UpdateDestinationInput {
35    /// <p>The name of the Firehose stream.</p>
36    pub fn delivery_stream_name(&self) -> ::std::option::Option<&str> {
37        self.delivery_stream_name.as_deref()
38    }
39    /// <p>Obtain this value from the <code>VersionId</code> result of <code>DeliveryStreamDescription</code>. This value is required, and helps the service perform conditional operations. For example, if there is an interleaving update and this value is null, then the update destination fails. After the update is successful, the <code>VersionId</code> value is updated. The service then performs a merge of the old configuration with the new configuration.</p>
40    pub fn current_delivery_stream_version_id(&self) -> ::std::option::Option<&str> {
41        self.current_delivery_stream_version_id.as_deref()
42    }
43    /// <p>The ID of the destination.</p>
44    pub fn destination_id(&self) -> ::std::option::Option<&str> {
45        self.destination_id.as_deref()
46    }
47    /// <p>\[Deprecated\] Describes an update for a destination in Amazon S3.</p>
48    #[deprecated]
49    pub fn s3_destination_update(&self) -> ::std::option::Option<&crate::types::S3DestinationUpdate> {
50        self.s3_destination_update.as_ref()
51    }
52    /// <p>Describes an update for a destination in Amazon S3.</p>
53    pub fn extended_s3_destination_update(&self) -> ::std::option::Option<&crate::types::ExtendedS3DestinationUpdate> {
54        self.extended_s3_destination_update.as_ref()
55    }
56    /// <p>Describes an update for a destination in Amazon Redshift.</p>
57    pub fn redshift_destination_update(&self) -> ::std::option::Option<&crate::types::RedshiftDestinationUpdate> {
58        self.redshift_destination_update.as_ref()
59    }
60    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
61    pub fn elasticsearch_destination_update(&self) -> ::std::option::Option<&crate::types::ElasticsearchDestinationUpdate> {
62        self.elasticsearch_destination_update.as_ref()
63    }
64    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
65    pub fn amazonopensearchservice_destination_update(&self) -> ::std::option::Option<&crate::types::AmazonopensearchserviceDestinationUpdate> {
66        self.amazonopensearchservice_destination_update.as_ref()
67    }
68    /// <p>Describes an update for a destination in Splunk.</p>
69    pub fn splunk_destination_update(&self) -> ::std::option::Option<&crate::types::SplunkDestinationUpdate> {
70        self.splunk_destination_update.as_ref()
71    }
72    /// <p>Describes an update to the specified HTTP endpoint destination.</p>
73    pub fn http_endpoint_destination_update(&self) -> ::std::option::Option<&crate::types::HttpEndpointDestinationUpdate> {
74        self.http_endpoint_destination_update.as_ref()
75    }
76    /// <p>Describes an update for a destination in the Serverless offering for Amazon OpenSearch Service.</p>
77    pub fn amazon_open_search_serverless_destination_update(
78        &self,
79    ) -> ::std::option::Option<&crate::types::AmazonOpenSearchServerlessDestinationUpdate> {
80        self.amazon_open_search_serverless_destination_update.as_ref()
81    }
82    /// <p>Update to the Snowflake destination configuration settings.</p>
83    pub fn snowflake_destination_update(&self) -> ::std::option::Option<&crate::types::SnowflakeDestinationUpdate> {
84        self.snowflake_destination_update.as_ref()
85    }
86    /// <p>Describes an update for a destination in Apache Iceberg Tables.</p>
87    pub fn iceberg_destination_update(&self) -> ::std::option::Option<&crate::types::IcebergDestinationUpdate> {
88        self.iceberg_destination_update.as_ref()
89    }
90}
91impl UpdateDestinationInput {
92    /// Creates a new builder-style object to manufacture [`UpdateDestinationInput`](crate::operation::update_destination::UpdateDestinationInput).
93    pub fn builder() -> crate::operation::update_destination::builders::UpdateDestinationInputBuilder {
94        crate::operation::update_destination::builders::UpdateDestinationInputBuilder::default()
95    }
96}
97
98/// A builder for [`UpdateDestinationInput`](crate::operation::update_destination::UpdateDestinationInput).
99#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
100#[non_exhaustive]
101pub struct UpdateDestinationInputBuilder {
102    pub(crate) delivery_stream_name: ::std::option::Option<::std::string::String>,
103    pub(crate) current_delivery_stream_version_id: ::std::option::Option<::std::string::String>,
104    pub(crate) destination_id: ::std::option::Option<::std::string::String>,
105    pub(crate) s3_destination_update: ::std::option::Option<crate::types::S3DestinationUpdate>,
106    pub(crate) extended_s3_destination_update: ::std::option::Option<crate::types::ExtendedS3DestinationUpdate>,
107    pub(crate) redshift_destination_update: ::std::option::Option<crate::types::RedshiftDestinationUpdate>,
108    pub(crate) elasticsearch_destination_update: ::std::option::Option<crate::types::ElasticsearchDestinationUpdate>,
109    pub(crate) amazonopensearchservice_destination_update: ::std::option::Option<crate::types::AmazonopensearchserviceDestinationUpdate>,
110    pub(crate) splunk_destination_update: ::std::option::Option<crate::types::SplunkDestinationUpdate>,
111    pub(crate) http_endpoint_destination_update: ::std::option::Option<crate::types::HttpEndpointDestinationUpdate>,
112    pub(crate) amazon_open_search_serverless_destination_update: ::std::option::Option<crate::types::AmazonOpenSearchServerlessDestinationUpdate>,
113    pub(crate) snowflake_destination_update: ::std::option::Option<crate::types::SnowflakeDestinationUpdate>,
114    pub(crate) iceberg_destination_update: ::std::option::Option<crate::types::IcebergDestinationUpdate>,
115}
116impl UpdateDestinationInputBuilder {
117    /// <p>The name of the Firehose stream.</p>
118    /// This field is required.
119    pub fn delivery_stream_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
120        self.delivery_stream_name = ::std::option::Option::Some(input.into());
121        self
122    }
123    /// <p>The name of the Firehose stream.</p>
124    pub fn set_delivery_stream_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
125        self.delivery_stream_name = input;
126        self
127    }
128    /// <p>The name of the Firehose stream.</p>
129    pub fn get_delivery_stream_name(&self) -> &::std::option::Option<::std::string::String> {
130        &self.delivery_stream_name
131    }
132    /// <p>Obtain this value from the <code>VersionId</code> result of <code>DeliveryStreamDescription</code>. This value is required, and helps the service perform conditional operations. For example, if there is an interleaving update and this value is null, then the update destination fails. After the update is successful, the <code>VersionId</code> value is updated. The service then performs a merge of the old configuration with the new configuration.</p>
133    /// This field is required.
134    pub fn current_delivery_stream_version_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
135        self.current_delivery_stream_version_id = ::std::option::Option::Some(input.into());
136        self
137    }
138    /// <p>Obtain this value from the <code>VersionId</code> result of <code>DeliveryStreamDescription</code>. This value is required, and helps the service perform conditional operations. For example, if there is an interleaving update and this value is null, then the update destination fails. After the update is successful, the <code>VersionId</code> value is updated. The service then performs a merge of the old configuration with the new configuration.</p>
139    pub fn set_current_delivery_stream_version_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
140        self.current_delivery_stream_version_id = input;
141        self
142    }
143    /// <p>Obtain this value from the <code>VersionId</code> result of <code>DeliveryStreamDescription</code>. This value is required, and helps the service perform conditional operations. For example, if there is an interleaving update and this value is null, then the update destination fails. After the update is successful, the <code>VersionId</code> value is updated. The service then performs a merge of the old configuration with the new configuration.</p>
144    pub fn get_current_delivery_stream_version_id(&self) -> &::std::option::Option<::std::string::String> {
145        &self.current_delivery_stream_version_id
146    }
147    /// <p>The ID of the destination.</p>
148    /// This field is required.
149    pub fn destination_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
150        self.destination_id = ::std::option::Option::Some(input.into());
151        self
152    }
153    /// <p>The ID of the destination.</p>
154    pub fn set_destination_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
155        self.destination_id = input;
156        self
157    }
158    /// <p>The ID of the destination.</p>
159    pub fn get_destination_id(&self) -> &::std::option::Option<::std::string::String> {
160        &self.destination_id
161    }
162    /// <p>\[Deprecated\] Describes an update for a destination in Amazon S3.</p>
163    #[deprecated]
164    pub fn s3_destination_update(mut self, input: crate::types::S3DestinationUpdate) -> Self {
165        self.s3_destination_update = ::std::option::Option::Some(input);
166        self
167    }
168    /// <p>\[Deprecated\] Describes an update for a destination in Amazon S3.</p>
169    #[deprecated]
170    pub fn set_s3_destination_update(mut self, input: ::std::option::Option<crate::types::S3DestinationUpdate>) -> Self {
171        self.s3_destination_update = input;
172        self
173    }
174    /// <p>\[Deprecated\] Describes an update for a destination in Amazon S3.</p>
175    #[deprecated]
176    pub fn get_s3_destination_update(&self) -> &::std::option::Option<crate::types::S3DestinationUpdate> {
177        &self.s3_destination_update
178    }
179    /// <p>Describes an update for a destination in Amazon S3.</p>
180    pub fn extended_s3_destination_update(mut self, input: crate::types::ExtendedS3DestinationUpdate) -> Self {
181        self.extended_s3_destination_update = ::std::option::Option::Some(input);
182        self
183    }
184    /// <p>Describes an update for a destination in Amazon S3.</p>
185    pub fn set_extended_s3_destination_update(mut self, input: ::std::option::Option<crate::types::ExtendedS3DestinationUpdate>) -> Self {
186        self.extended_s3_destination_update = input;
187        self
188    }
189    /// <p>Describes an update for a destination in Amazon S3.</p>
190    pub fn get_extended_s3_destination_update(&self) -> &::std::option::Option<crate::types::ExtendedS3DestinationUpdate> {
191        &self.extended_s3_destination_update
192    }
193    /// <p>Describes an update for a destination in Amazon Redshift.</p>
194    pub fn redshift_destination_update(mut self, input: crate::types::RedshiftDestinationUpdate) -> Self {
195        self.redshift_destination_update = ::std::option::Option::Some(input);
196        self
197    }
198    /// <p>Describes an update for a destination in Amazon Redshift.</p>
199    pub fn set_redshift_destination_update(mut self, input: ::std::option::Option<crate::types::RedshiftDestinationUpdate>) -> Self {
200        self.redshift_destination_update = input;
201        self
202    }
203    /// <p>Describes an update for a destination in Amazon Redshift.</p>
204    pub fn get_redshift_destination_update(&self) -> &::std::option::Option<crate::types::RedshiftDestinationUpdate> {
205        &self.redshift_destination_update
206    }
207    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
208    pub fn elasticsearch_destination_update(mut self, input: crate::types::ElasticsearchDestinationUpdate) -> Self {
209        self.elasticsearch_destination_update = ::std::option::Option::Some(input);
210        self
211    }
212    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
213    pub fn set_elasticsearch_destination_update(mut self, input: ::std::option::Option<crate::types::ElasticsearchDestinationUpdate>) -> Self {
214        self.elasticsearch_destination_update = input;
215        self
216    }
217    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
218    pub fn get_elasticsearch_destination_update(&self) -> &::std::option::Option<crate::types::ElasticsearchDestinationUpdate> {
219        &self.elasticsearch_destination_update
220    }
221    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
222    pub fn amazonopensearchservice_destination_update(mut self, input: crate::types::AmazonopensearchserviceDestinationUpdate) -> Self {
223        self.amazonopensearchservice_destination_update = ::std::option::Option::Some(input);
224        self
225    }
226    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
227    pub fn set_amazonopensearchservice_destination_update(
228        mut self,
229        input: ::std::option::Option<crate::types::AmazonopensearchserviceDestinationUpdate>,
230    ) -> Self {
231        self.amazonopensearchservice_destination_update = input;
232        self
233    }
234    /// <p>Describes an update for a destination in Amazon OpenSearch Service.</p>
235    pub fn get_amazonopensearchservice_destination_update(&self) -> &::std::option::Option<crate::types::AmazonopensearchserviceDestinationUpdate> {
236        &self.amazonopensearchservice_destination_update
237    }
238    /// <p>Describes an update for a destination in Splunk.</p>
239    pub fn splunk_destination_update(mut self, input: crate::types::SplunkDestinationUpdate) -> Self {
240        self.splunk_destination_update = ::std::option::Option::Some(input);
241        self
242    }
243    /// <p>Describes an update for a destination in Splunk.</p>
244    pub fn set_splunk_destination_update(mut self, input: ::std::option::Option<crate::types::SplunkDestinationUpdate>) -> Self {
245        self.splunk_destination_update = input;
246        self
247    }
248    /// <p>Describes an update for a destination in Splunk.</p>
249    pub fn get_splunk_destination_update(&self) -> &::std::option::Option<crate::types::SplunkDestinationUpdate> {
250        &self.splunk_destination_update
251    }
252    /// <p>Describes an update to the specified HTTP endpoint destination.</p>
253    pub fn http_endpoint_destination_update(mut self, input: crate::types::HttpEndpointDestinationUpdate) -> Self {
254        self.http_endpoint_destination_update = ::std::option::Option::Some(input);
255        self
256    }
257    /// <p>Describes an update to the specified HTTP endpoint destination.</p>
258    pub fn set_http_endpoint_destination_update(mut self, input: ::std::option::Option<crate::types::HttpEndpointDestinationUpdate>) -> Self {
259        self.http_endpoint_destination_update = input;
260        self
261    }
262    /// <p>Describes an update to the specified HTTP endpoint destination.</p>
263    pub fn get_http_endpoint_destination_update(&self) -> &::std::option::Option<crate::types::HttpEndpointDestinationUpdate> {
264        &self.http_endpoint_destination_update
265    }
266    /// <p>Describes an update for a destination in the Serverless offering for Amazon OpenSearch Service.</p>
267    pub fn amazon_open_search_serverless_destination_update(mut self, input: crate::types::AmazonOpenSearchServerlessDestinationUpdate) -> Self {
268        self.amazon_open_search_serverless_destination_update = ::std::option::Option::Some(input);
269        self
270    }
271    /// <p>Describes an update for a destination in the Serverless offering for Amazon OpenSearch Service.</p>
272    pub fn set_amazon_open_search_serverless_destination_update(
273        mut self,
274        input: ::std::option::Option<crate::types::AmazonOpenSearchServerlessDestinationUpdate>,
275    ) -> Self {
276        self.amazon_open_search_serverless_destination_update = input;
277        self
278    }
279    /// <p>Describes an update for a destination in the Serverless offering for Amazon OpenSearch Service.</p>
280    pub fn get_amazon_open_search_serverless_destination_update(
281        &self,
282    ) -> &::std::option::Option<crate::types::AmazonOpenSearchServerlessDestinationUpdate> {
283        &self.amazon_open_search_serverless_destination_update
284    }
285    /// <p>Update to the Snowflake destination configuration settings.</p>
286    pub fn snowflake_destination_update(mut self, input: crate::types::SnowflakeDestinationUpdate) -> Self {
287        self.snowflake_destination_update = ::std::option::Option::Some(input);
288        self
289    }
290    /// <p>Update to the Snowflake destination configuration settings.</p>
291    pub fn set_snowflake_destination_update(mut self, input: ::std::option::Option<crate::types::SnowflakeDestinationUpdate>) -> Self {
292        self.snowflake_destination_update = input;
293        self
294    }
295    /// <p>Update to the Snowflake destination configuration settings.</p>
296    pub fn get_snowflake_destination_update(&self) -> &::std::option::Option<crate::types::SnowflakeDestinationUpdate> {
297        &self.snowflake_destination_update
298    }
299    /// <p>Describes an update for a destination in Apache Iceberg Tables.</p>
300    pub fn iceberg_destination_update(mut self, input: crate::types::IcebergDestinationUpdate) -> Self {
301        self.iceberg_destination_update = ::std::option::Option::Some(input);
302        self
303    }
304    /// <p>Describes an update for a destination in Apache Iceberg Tables.</p>
305    pub fn set_iceberg_destination_update(mut self, input: ::std::option::Option<crate::types::IcebergDestinationUpdate>) -> Self {
306        self.iceberg_destination_update = input;
307        self
308    }
309    /// <p>Describes an update for a destination in Apache Iceberg Tables.</p>
310    pub fn get_iceberg_destination_update(&self) -> &::std::option::Option<crate::types::IcebergDestinationUpdate> {
311        &self.iceberg_destination_update
312    }
313    /// Consumes the builder and constructs a [`UpdateDestinationInput`](crate::operation::update_destination::UpdateDestinationInput).
314    pub fn build(
315        self,
316    ) -> ::std::result::Result<crate::operation::update_destination::UpdateDestinationInput, ::aws_smithy_types::error::operation::BuildError> {
317        ::std::result::Result::Ok(crate::operation::update_destination::UpdateDestinationInput {
318            delivery_stream_name: self.delivery_stream_name,
319            current_delivery_stream_version_id: self.current_delivery_stream_version_id,
320            destination_id: self.destination_id,
321            s3_destination_update: self.s3_destination_update,
322            extended_s3_destination_update: self.extended_s3_destination_update,
323            redshift_destination_update: self.redshift_destination_update,
324            elasticsearch_destination_update: self.elasticsearch_destination_update,
325            amazonopensearchservice_destination_update: self.amazonopensearchservice_destination_update,
326            splunk_destination_update: self.splunk_destination_update,
327            http_endpoint_destination_update: self.http_endpoint_destination_update,
328            amazon_open_search_serverless_destination_update: self.amazon_open_search_serverless_destination_update,
329            snowflake_destination_update: self.snowflake_destination_update,
330            iceberg_destination_update: self.iceberg_destination_update,
331        })
332    }
333}