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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents a cross-account destination that receives subscription log events.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Destination {
/// <p>The name of the destination.</p>
#[doc(hidden)]
pub destination_name: std::option::Option<std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the physical target where the log events are delivered (for example, a Kinesis stream).</p>
#[doc(hidden)]
pub target_arn: std::option::Option<std::string::String>,
/// <p>A role for impersonation, used when delivering log events to the target.</p>
#[doc(hidden)]
pub role_arn: std::option::Option<std::string::String>,
/// <p>An IAM policy document that governs which Amazon Web Services accounts can create subscription filters against this destination.</p>
#[doc(hidden)]
pub access_policy: std::option::Option<std::string::String>,
/// <p>The ARN of this destination.</p>
#[doc(hidden)]
pub arn: std::option::Option<std::string::String>,
/// <p>The creation time of the destination, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.</p>
#[doc(hidden)]
pub creation_time: std::option::Option<i64>,
}
impl Destination {
/// <p>The name of the destination.</p>
pub fn destination_name(&self) -> std::option::Option<&str> {
self.destination_name.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the physical target where the log events are delivered (for example, a Kinesis stream).</p>
pub fn target_arn(&self) -> std::option::Option<&str> {
self.target_arn.as_deref()
}
/// <p>A role for impersonation, used when delivering log events to the target.</p>
pub fn role_arn(&self) -> std::option::Option<&str> {
self.role_arn.as_deref()
}
/// <p>An IAM policy document that governs which Amazon Web Services accounts can create subscription filters against this destination.</p>
pub fn access_policy(&self) -> std::option::Option<&str> {
self.access_policy.as_deref()
}
/// <p>The ARN of this destination.</p>
pub fn arn(&self) -> std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The creation time of the destination, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.</p>
pub fn creation_time(&self) -> std::option::Option<i64> {
self.creation_time
}
}
impl Destination {
/// Creates a new builder-style object to manufacture [`Destination`](crate::types::Destination).
pub fn builder() -> crate::types::builders::DestinationBuilder {
crate::types::builders::DestinationBuilder::default()
}
}
/// A builder for [`Destination`](crate::types::Destination).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DestinationBuilder {
pub(crate) destination_name: std::option::Option<std::string::String>,
pub(crate) target_arn: std::option::Option<std::string::String>,
pub(crate) role_arn: std::option::Option<std::string::String>,
pub(crate) access_policy: std::option::Option<std::string::String>,
pub(crate) arn: std::option::Option<std::string::String>,
pub(crate) creation_time: std::option::Option<i64>,
}
impl DestinationBuilder {
/// <p>The name of the destination.</p>
pub fn destination_name(mut self, input: impl Into<std::string::String>) -> Self {
self.destination_name = Some(input.into());
self
}
/// <p>The name of the destination.</p>
pub fn set_destination_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.destination_name = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the physical target where the log events are delivered (for example, a Kinesis stream).</p>
pub fn target_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.target_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the physical target where the log events are delivered (for example, a Kinesis stream).</p>
pub fn set_target_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.target_arn = input;
self
}
/// <p>A role for impersonation, used when delivering log events to the target.</p>
pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.role_arn = Some(input.into());
self
}
/// <p>A role for impersonation, used when delivering log events to the target.</p>
pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>An IAM policy document that governs which Amazon Web Services accounts can create subscription filters against this destination.</p>
pub fn access_policy(mut self, input: impl Into<std::string::String>) -> Self {
self.access_policy = Some(input.into());
self
}
/// <p>An IAM policy document that governs which Amazon Web Services accounts can create subscription filters against this destination.</p>
pub fn set_access_policy(mut self, input: std::option::Option<std::string::String>) -> Self {
self.access_policy = input;
self
}
/// <p>The ARN of this destination.</p>
pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
self.arn = Some(input.into());
self
}
/// <p>The ARN of this destination.</p>
pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The creation time of the destination, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.</p>
pub fn creation_time(mut self, input: i64) -> Self {
self.creation_time = Some(input);
self
}
/// <p>The creation time of the destination, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.</p>
pub fn set_creation_time(mut self, input: std::option::Option<i64>) -> Self {
self.creation_time = input;
self
}
/// Consumes the builder and constructs a [`Destination`](crate::types::Destination).
pub fn build(self) -> crate::types::Destination {
crate::types::Destination {
destination_name: self.destination_name,
target_arn: self.target_arn,
role_arn: self.role_arn,
access_policy: self.access_policy,
arn: self.arn,
creation_time: self.creation_time,
}
}
}