1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Targets are the resources to be invoked when a rule is triggered. For a complete list of services and resources that can be set as a target, see <a href="https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutTargets.html">PutTargets</a>.</p>
/// <p>If you are setting the event bus of another account as the target, and that account granted permission to your account through an organization instead of directly by the account ID, then you must specify a <code>RoleArn</code> with proper permissions in the <code>Target</code> structure. For more information, see <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-cross-account-event-delivery.html">Sending and Receiving Events Between Amazon Web Services Accounts</a> in the <i>Amazon EventBridge User Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Target {
    /// <p>The ID of the target. We recommend using a memorable and unique string.</p>
    pub id: ::std::string::String,
    /// <p>The Amazon Resource Name (ARN) of the target.</p>
    pub arn: ::std::string::String,
    /// <p>The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.</p>
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// <p>Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The JavaScript Object Notation (JSON) Data Interchange Format</a>.</p>
    pub input: ::std::option::Option<::std::string::String>,
    /// <p>The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You must use JSON dot notation, not bracket notation. For more information about JSON paths, see <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.</p>
    pub input_path: ::std::option::Option<::std::string::String>,
    /// <p>Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.</p>
    pub input_transformer: ::std::option::Option<crate::types::InputTransformer>,
    /// <p>The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. If you do not include this parameter, the default is to use the <code>eventId</code> as the partition key.</p>
    pub kinesis_parameters: ::std::option::Option<crate::types::KinesisParameters>,
    /// <p>Parameters used when you are using the rule to invoke Amazon EC2 Run Command.</p>
    pub run_command_parameters: ::std::option::Option<crate::types::RunCommandParameters>,
    /// <p>Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.</p>
    pub ecs_parameters: ::std::option::Option<crate::types::EcsParameters>,
    /// <p>If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a> in the <i>Batch User Guide</i>.</p>
    pub batch_parameters: ::std::option::Option<crate::types::BatchParameters>,
    /// <p>Contains the message group ID to use when the target is a FIFO queue.</p>
    /// <p>If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.</p>
    pub sqs_parameters: ::std::option::Option<crate::types::SqsParameters>,
    /// <p>Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge ApiDestination.</p>
    /// <p>If you specify an API Gateway REST API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.</p>
    pub http_parameters: ::std::option::Option<crate::types::HttpParameters>,
    /// <p>Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.</p>
    /// <p>If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.</p>
    pub redshift_data_parameters: ::std::option::Option<crate::types::RedshiftDataParameters>,
    /// <p>Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline.</p>
    /// <p>If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.</p>
    pub sage_maker_pipeline_parameters: ::std::option::Option<crate::types::SageMakerPipelineParameters>,
    /// <p>The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter queue events to.</p>
    pub dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
    /// <p>The <code>RetryPolicy</code> object that contains the retry policy configuration to use for the dead-letter queue.</p>
    pub retry_policy: ::std::option::Option<crate::types::RetryPolicy>,
}
impl Target {
    /// <p>The ID of the target. We recommend using a memorable and unique string.</p>
    pub fn id(&self) -> &str {
        use std::ops::Deref;
        self.id.deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the target.</p>
    pub fn arn(&self) -> &str {
        use std::ops::Deref;
        self.arn.deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.</p>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The JavaScript Object Notation (JSON) Data Interchange Format</a>.</p>
    pub fn input(&self) -> ::std::option::Option<&str> {
        self.input.as_deref()
    }
    /// <p>The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You must use JSON dot notation, not bracket notation. For more information about JSON paths, see <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.</p>
    pub fn input_path(&self) -> ::std::option::Option<&str> {
        self.input_path.as_deref()
    }
    /// <p>Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.</p>
    pub fn input_transformer(&self) -> ::std::option::Option<&crate::types::InputTransformer> {
        self.input_transformer.as_ref()
    }
    /// <p>The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. If you do not include this parameter, the default is to use the <code>eventId</code> as the partition key.</p>
    pub fn kinesis_parameters(&self) -> ::std::option::Option<&crate::types::KinesisParameters> {
        self.kinesis_parameters.as_ref()
    }
    /// <p>Parameters used when you are using the rule to invoke Amazon EC2 Run Command.</p>
    pub fn run_command_parameters(&self) -> ::std::option::Option<&crate::types::RunCommandParameters> {
        self.run_command_parameters.as_ref()
    }
    /// <p>Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.</p>
    pub fn ecs_parameters(&self) -> ::std::option::Option<&crate::types::EcsParameters> {
        self.ecs_parameters.as_ref()
    }
    /// <p>If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a> in the <i>Batch User Guide</i>.</p>
    pub fn batch_parameters(&self) -> ::std::option::Option<&crate::types::BatchParameters> {
        self.batch_parameters.as_ref()
    }
    /// <p>Contains the message group ID to use when the target is a FIFO queue.</p>
    /// <p>If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.</p>
    pub fn sqs_parameters(&self) -> ::std::option::Option<&crate::types::SqsParameters> {
        self.sqs_parameters.as_ref()
    }
    /// <p>Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge ApiDestination.</p>
    /// <p>If you specify an API Gateway REST API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.</p>
    pub fn http_parameters(&self) -> ::std::option::Option<&crate::types::HttpParameters> {
        self.http_parameters.as_ref()
    }
    /// <p>Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.</p>
    /// <p>If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.</p>
    pub fn redshift_data_parameters(&self) -> ::std::option::Option<&crate::types::RedshiftDataParameters> {
        self.redshift_data_parameters.as_ref()
    }
    /// <p>Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline.</p>
    /// <p>If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.</p>
    pub fn sage_maker_pipeline_parameters(&self) -> ::std::option::Option<&crate::types::SageMakerPipelineParameters> {
        self.sage_maker_pipeline_parameters.as_ref()
    }
    /// <p>The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter queue events to.</p>
    pub fn dead_letter_config(&self) -> ::std::option::Option<&crate::types::DeadLetterConfig> {
        self.dead_letter_config.as_ref()
    }
    /// <p>The <code>RetryPolicy</code> object that contains the retry policy configuration to use for the dead-letter queue.</p>
    pub fn retry_policy(&self) -> ::std::option::Option<&crate::types::RetryPolicy> {
        self.retry_policy.as_ref()
    }
}
impl Target {
    /// Creates a new builder-style object to manufacture [`Target`](crate::types::Target).
    pub fn builder() -> crate::types::builders::TargetBuilder {
        crate::types::builders::TargetBuilder::default()
    }
}

/// A builder for [`Target`](crate::types::Target).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TargetBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) input: ::std::option::Option<::std::string::String>,
    pub(crate) input_path: ::std::option::Option<::std::string::String>,
    pub(crate) input_transformer: ::std::option::Option<crate::types::InputTransformer>,
    pub(crate) kinesis_parameters: ::std::option::Option<crate::types::KinesisParameters>,
    pub(crate) run_command_parameters: ::std::option::Option<crate::types::RunCommandParameters>,
    pub(crate) ecs_parameters: ::std::option::Option<crate::types::EcsParameters>,
    pub(crate) batch_parameters: ::std::option::Option<crate::types::BatchParameters>,
    pub(crate) sqs_parameters: ::std::option::Option<crate::types::SqsParameters>,
    pub(crate) http_parameters: ::std::option::Option<crate::types::HttpParameters>,
    pub(crate) redshift_data_parameters: ::std::option::Option<crate::types::RedshiftDataParameters>,
    pub(crate) sage_maker_pipeline_parameters: ::std::option::Option<crate::types::SageMakerPipelineParameters>,
    pub(crate) dead_letter_config: ::std::option::Option<crate::types::DeadLetterConfig>,
    pub(crate) retry_policy: ::std::option::Option<crate::types::RetryPolicy>,
}
impl TargetBuilder {
    /// <p>The ID of the target. We recommend using a memorable and unique string.</p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the target. We recommend using a memorable and unique string.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The ID of the target. We recommend using a memorable and unique string.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The Amazon Resource Name (ARN) of the target.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the target.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the target.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.</p>
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role to be used for this target when the rule is triggered. If one rule triggers multiple targets, you can use a different IAM role for each target.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// <p>Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The JavaScript Object Notation (JSON) Data Interchange Format</a>.</p>
    pub fn input(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.input = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The JavaScript Object Notation (JSON) Data Interchange Format</a>.</p>
    pub fn set_input(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.input = input;
        self
    }
    /// <p>Valid JSON text passed to the target. In this case, nothing from the event itself is passed to the target. For more information, see <a href="http://www.rfc-editor.org/rfc/rfc7159.txt">The JavaScript Object Notation (JSON) Data Interchange Format</a>.</p>
    pub fn get_input(&self) -> &::std::option::Option<::std::string::String> {
        &self.input
    }
    /// <p>The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You must use JSON dot notation, not bracket notation. For more information about JSON paths, see <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.</p>
    pub fn input_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.input_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You must use JSON dot notation, not bracket notation. For more information about JSON paths, see <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.</p>
    pub fn set_input_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.input_path = input;
        self
    }
    /// <p>The value of the JSONPath that is used for extracting part of the matched event when passing it to the target. You must use JSON dot notation, not bracket notation. For more information about JSON paths, see <a href="http://goessner.net/articles/JsonPath/">JSONPath</a>.</p>
    pub fn get_input_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.input_path
    }
    /// <p>Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.</p>
    pub fn input_transformer(mut self, input: crate::types::InputTransformer) -> Self {
        self.input_transformer = ::std::option::Option::Some(input);
        self
    }
    /// <p>Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.</p>
    pub fn set_input_transformer(mut self, input: ::std::option::Option<crate::types::InputTransformer>) -> Self {
        self.input_transformer = input;
        self
    }
    /// <p>Settings to enable you to provide custom input to a target based on certain event data. You can extract one or more key-value pairs from the event and then use that data to send customized input to the target.</p>
    pub fn get_input_transformer(&self) -> &::std::option::Option<crate::types::InputTransformer> {
        &self.input_transformer
    }
    /// <p>The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. If you do not include this parameter, the default is to use the <code>eventId</code> as the partition key.</p>
    pub fn kinesis_parameters(mut self, input: crate::types::KinesisParameters) -> Self {
        self.kinesis_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. If you do not include this parameter, the default is to use the <code>eventId</code> as the partition key.</p>
    pub fn set_kinesis_parameters(mut self, input: ::std::option::Option<crate::types::KinesisParameters>) -> Self {
        self.kinesis_parameters = input;
        self
    }
    /// <p>The custom parameter you can use to control the shard assignment, when the target is a Kinesis data stream. If you do not include this parameter, the default is to use the <code>eventId</code> as the partition key.</p>
    pub fn get_kinesis_parameters(&self) -> &::std::option::Option<crate::types::KinesisParameters> {
        &self.kinesis_parameters
    }
    /// <p>Parameters used when you are using the rule to invoke Amazon EC2 Run Command.</p>
    pub fn run_command_parameters(mut self, input: crate::types::RunCommandParameters) -> Self {
        self.run_command_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>Parameters used when you are using the rule to invoke Amazon EC2 Run Command.</p>
    pub fn set_run_command_parameters(mut self, input: ::std::option::Option<crate::types::RunCommandParameters>) -> Self {
        self.run_command_parameters = input;
        self
    }
    /// <p>Parameters used when you are using the rule to invoke Amazon EC2 Run Command.</p>
    pub fn get_run_command_parameters(&self) -> &::std::option::Option<crate::types::RunCommandParameters> {
        &self.run_command_parameters
    }
    /// <p>Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.</p>
    pub fn ecs_parameters(mut self, input: crate::types::EcsParameters) -> Self {
        self.ecs_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.</p>
    pub fn set_ecs_parameters(mut self, input: ::std::option::Option<crate::types::EcsParameters>) -> Self {
        self.ecs_parameters = input;
        self
    }
    /// <p>Contains the Amazon ECS task definition and task count to be used, if the event target is an Amazon ECS task. For more information about Amazon ECS tasks, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html">Task Definitions </a> in the <i>Amazon EC2 Container Service Developer Guide</i>.</p>
    pub fn get_ecs_parameters(&self) -> &::std::option::Option<crate::types::EcsParameters> {
        &self.ecs_parameters
    }
    /// <p>If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a> in the <i>Batch User Guide</i>.</p>
    pub fn batch_parameters(mut self, input: crate::types::BatchParameters) -> Self {
        self.batch_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a> in the <i>Batch User Guide</i>.</p>
    pub fn set_batch_parameters(mut self, input: ::std::option::Option<crate::types::BatchParameters>) -> Self {
        self.batch_parameters = input;
        self
    }
    /// <p>If the event target is an Batch job, this contains the job definition, job name, and other parameters. For more information, see <a href="https://docs.aws.amazon.com/batch/latest/userguide/jobs.html">Jobs</a> in the <i>Batch User Guide</i>.</p>
    pub fn get_batch_parameters(&self) -> &::std::option::Option<crate::types::BatchParameters> {
        &self.batch_parameters
    }
    /// <p>Contains the message group ID to use when the target is a FIFO queue.</p>
    /// <p>If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.</p>
    pub fn sqs_parameters(mut self, input: crate::types::SqsParameters) -> Self {
        self.sqs_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the message group ID to use when the target is a FIFO queue.</p>
    /// <p>If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.</p>
    pub fn set_sqs_parameters(mut self, input: ::std::option::Option<crate::types::SqsParameters>) -> Self {
        self.sqs_parameters = input;
        self
    }
    /// <p>Contains the message group ID to use when the target is a FIFO queue.</p>
    /// <p>If you specify an SQS FIFO queue as a target, the queue must have content-based deduplication enabled.</p>
    pub fn get_sqs_parameters(&self) -> &::std::option::Option<crate::types::SqsParameters> {
        &self.sqs_parameters
    }
    /// <p>Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge ApiDestination.</p>
    /// <p>If you specify an API Gateway REST API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.</p>
    pub fn http_parameters(mut self, input: crate::types::HttpParameters) -> Self {
        self.http_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge ApiDestination.</p>
    /// <p>If you specify an API Gateway REST API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.</p>
    pub fn set_http_parameters(mut self, input: ::std::option::Option<crate::types::HttpParameters>) -> Self {
        self.http_parameters = input;
        self
    }
    /// <p>Contains the HTTP parameters to use when the target is a API Gateway REST endpoint or EventBridge ApiDestination.</p>
    /// <p>If you specify an API Gateway REST API or EventBridge ApiDestination as a target, you can use this parameter to specify headers, path parameters, and query string keys/values as part of your target invoking request. If you're using ApiDestinations, the corresponding Connection can also have these values configured. In case of any conflicting keys, values from the Connection take precedence.</p>
    pub fn get_http_parameters(&self) -> &::std::option::Option<crate::types::HttpParameters> {
        &self.http_parameters
    }
    /// <p>Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.</p>
    /// <p>If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.</p>
    pub fn redshift_data_parameters(mut self, input: crate::types::RedshiftDataParameters) -> Self {
        self.redshift_data_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.</p>
    /// <p>If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.</p>
    pub fn set_redshift_data_parameters(mut self, input: ::std::option::Option<crate::types::RedshiftDataParameters>) -> Self {
        self.redshift_data_parameters = input;
        self
    }
    /// <p>Contains the Amazon Redshift Data API parameters to use when the target is a Amazon Redshift cluster.</p>
    /// <p>If you specify a Amazon Redshift Cluster as a Target, you can use this to specify parameters to invoke the Amazon Redshift Data API ExecuteStatement based on EventBridge events.</p>
    pub fn get_redshift_data_parameters(&self) -> &::std::option::Option<crate::types::RedshiftDataParameters> {
        &self.redshift_data_parameters
    }
    /// <p>Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline.</p>
    /// <p>If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.</p>
    pub fn sage_maker_pipeline_parameters(mut self, input: crate::types::SageMakerPipelineParameters) -> Self {
        self.sage_maker_pipeline_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline.</p>
    /// <p>If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.</p>
    pub fn set_sage_maker_pipeline_parameters(mut self, input: ::std::option::Option<crate::types::SageMakerPipelineParameters>) -> Self {
        self.sage_maker_pipeline_parameters = input;
        self
    }
    /// <p>Contains the SageMaker Model Building Pipeline parameters to start execution of a SageMaker Model Building Pipeline.</p>
    /// <p>If you specify a SageMaker Model Building Pipeline as a target, you can use this to specify parameters to start a pipeline execution based on EventBridge events.</p>
    pub fn get_sage_maker_pipeline_parameters(&self) -> &::std::option::Option<crate::types::SageMakerPipelineParameters> {
        &self.sage_maker_pipeline_parameters
    }
    /// <p>The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter queue events to.</p>
    pub fn dead_letter_config(mut self, input: crate::types::DeadLetterConfig) -> Self {
        self.dead_letter_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter queue events to.</p>
    pub fn set_dead_letter_config(mut self, input: ::std::option::Option<crate::types::DeadLetterConfig>) -> Self {
        self.dead_letter_config = input;
        self
    }
    /// <p>The <code>DeadLetterConfig</code> that defines the target queue to send dead-letter queue events to.</p>
    pub fn get_dead_letter_config(&self) -> &::std::option::Option<crate::types::DeadLetterConfig> {
        &self.dead_letter_config
    }
    /// <p>The <code>RetryPolicy</code> object that contains the retry policy configuration to use for the dead-letter queue.</p>
    pub fn retry_policy(mut self, input: crate::types::RetryPolicy) -> Self {
        self.retry_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The <code>RetryPolicy</code> object that contains the retry policy configuration to use for the dead-letter queue.</p>
    pub fn set_retry_policy(mut self, input: ::std::option::Option<crate::types::RetryPolicy>) -> Self {
        self.retry_policy = input;
        self
    }
    /// <p>The <code>RetryPolicy</code> object that contains the retry policy configuration to use for the dead-letter queue.</p>
    pub fn get_retry_policy(&self) -> &::std::option::Option<crate::types::RetryPolicy> {
        &self.retry_policy
    }
    /// Consumes the builder and constructs a [`Target`](crate::types::Target).
    /// This method will fail if any of the following fields are not set:
    /// - [`id`](crate::types::builders::TargetBuilder::id)
    /// - [`arn`](crate::types::builders::TargetBuilder::arn)
    pub fn build(self) -> ::std::result::Result<crate::types::Target, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Target {
            id: self.id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field("id", "id was not specified but it is required when building Target")
            })?,
            arn: self.arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "arn",
                    "arn was not specified but it is required when building Target",
                )
            })?,
            role_arn: self.role_arn,
            input: self.input,
            input_path: self.input_path,
            input_transformer: self.input_transformer,
            kinesis_parameters: self.kinesis_parameters,
            run_command_parameters: self.run_command_parameters,
            ecs_parameters: self.ecs_parameters,
            batch_parameters: self.batch_parameters,
            sqs_parameters: self.sqs_parameters,
            http_parameters: self.http_parameters,
            redshift_data_parameters: self.redshift_data_parameters,
            sage_maker_pipeline_parameters: self.sage_maker_pipeline_parameters,
            dead_letter_config: self.dead_letter_config,
            retry_policy: self.retry_policy,
        })
    }
}