aws_sdk_pipes/types/_dead_letter_config.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>A <code>DeadLetterConfig</code> object that contains information about a dead-letter queue configuration.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeadLetterConfig {
7 /// <p>The ARN of the specified target for the dead-letter queue.</p>
8 /// <p>For Amazon Kinesis stream and Amazon DynamoDB stream sources, specify either an Amazon SNS topic or Amazon SQS queue ARN.</p>
9 pub arn: ::std::option::Option<::std::string::String>,
10}
11impl DeadLetterConfig {
12 /// <p>The ARN of the specified target for the dead-letter queue.</p>
13 /// <p>For Amazon Kinesis stream and Amazon DynamoDB stream sources, specify either an Amazon SNS topic or Amazon SQS queue ARN.</p>
14 pub fn arn(&self) -> ::std::option::Option<&str> {
15 self.arn.as_deref()
16 }
17}
18impl DeadLetterConfig {
19 /// Creates a new builder-style object to manufacture [`DeadLetterConfig`](crate::types::DeadLetterConfig).
20 pub fn builder() -> crate::types::builders::DeadLetterConfigBuilder {
21 crate::types::builders::DeadLetterConfigBuilder::default()
22 }
23}
24
25/// A builder for [`DeadLetterConfig`](crate::types::DeadLetterConfig).
26#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
27#[non_exhaustive]
28pub struct DeadLetterConfigBuilder {
29 pub(crate) arn: ::std::option::Option<::std::string::String>,
30}
31impl DeadLetterConfigBuilder {
32 /// <p>The ARN of the specified target for the dead-letter queue.</p>
33 /// <p>For Amazon Kinesis stream and Amazon DynamoDB stream sources, specify either an Amazon SNS topic or Amazon SQS queue ARN.</p>
34 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
35 self.arn = ::std::option::Option::Some(input.into());
36 self
37 }
38 /// <p>The ARN of the specified target for the dead-letter queue.</p>
39 /// <p>For Amazon Kinesis stream and Amazon DynamoDB stream sources, specify either an Amazon SNS topic or Amazon SQS queue ARN.</p>
40 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
41 self.arn = input;
42 self
43 }
44 /// <p>The ARN of the specified target for the dead-letter queue.</p>
45 /// <p>For Amazon Kinesis stream and Amazon DynamoDB stream sources, specify either an Amazon SNS topic or Amazon SQS queue ARN.</p>
46 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
47 &self.arn
48 }
49 /// Consumes the builder and constructs a [`DeadLetterConfig`](crate::types::DeadLetterConfig).
50 pub fn build(self) -> crate::types::DeadLetterConfig {
51 crate::types::DeadLetterConfig { arn: self.arn }
52 }
53}