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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.</p>
/// <p>Event destinations, such as Amazon Kinesis Firehose, are associated with configuration sets, which enable you to publish email sending events. For information about using configuration sets, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/monitor-sending-activity.html">Amazon SES Developer Guide</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct KinesisFirehoseDestination {
    /// <p>The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.</p>
    pub iam_role_arn: ::std::string::String,
    /// <p>The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.</p>
    pub delivery_stream_arn: ::std::string::String,
}
impl KinesisFirehoseDestination {
    /// <p>The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.</p>
    pub fn iam_role_arn(&self) -> &str {
        use std::ops::Deref;
        self.iam_role_arn.deref()
    }
    /// <p>The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.</p>
    pub fn delivery_stream_arn(&self) -> &str {
        use std::ops::Deref;
        self.delivery_stream_arn.deref()
    }
}
impl KinesisFirehoseDestination {
    /// Creates a new builder-style object to manufacture [`KinesisFirehoseDestination`](crate::types::KinesisFirehoseDestination).
    pub fn builder() -> crate::types::builders::KinesisFirehoseDestinationBuilder {
        crate::types::builders::KinesisFirehoseDestinationBuilder::default()
    }
}

/// A builder for [`KinesisFirehoseDestination`](crate::types::KinesisFirehoseDestination).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct KinesisFirehoseDestinationBuilder {
    pub(crate) iam_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) delivery_stream_arn: ::std::option::Option<::std::string::String>,
}
impl KinesisFirehoseDestinationBuilder {
    /// <p>The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.</p>
    /// This field is required.
    pub fn iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.iam_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.</p>
    pub fn set_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.iam_role_arn = input;
        self
    }
    /// <p>The ARN of the IAM role under which Amazon SES publishes email sending events to the Amazon Kinesis Firehose stream.</p>
    pub fn get_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.iam_role_arn
    }
    /// <p>The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.</p>
    /// This field is required.
    pub fn delivery_stream_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.delivery_stream_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.</p>
    pub fn set_delivery_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.delivery_stream_arn = input;
        self
    }
    /// <p>The ARN of the Amazon Kinesis Firehose stream that email sending events should be published to.</p>
    pub fn get_delivery_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.delivery_stream_arn
    }
    /// Consumes the builder and constructs a [`KinesisFirehoseDestination`](crate::types::KinesisFirehoseDestination).
    /// This method will fail if any of the following fields are not set:
    /// - [`iam_role_arn`](crate::types::builders::KinesisFirehoseDestinationBuilder::iam_role_arn)
    /// - [`delivery_stream_arn`](crate::types::builders::KinesisFirehoseDestinationBuilder::delivery_stream_arn)
    pub fn build(self) -> ::std::result::Result<crate::types::KinesisFirehoseDestination, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::KinesisFirehoseDestination {
            iam_role_arn: self.iam_role_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "iam_role_arn",
                    "iam_role_arn was not specified but it is required when building KinesisFirehoseDestination",
                )
            })?,
            delivery_stream_arn: self.delivery_stream_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "delivery_stream_arn",
                    "delivery_stream_arn was not specified but it is required when building KinesisFirehoseDestination",
                )
            })?,
        })
    }
}