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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents all of the data describing a particular stream.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Stream {
/// <p>The Amazon Resource Name (ARN) for the stream.</p>
pub stream_arn: ::std::option::Option<::std::string::String>,
/// <p>The DynamoDB table with which the stream is associated.</p>
pub table_name: ::std::option::Option<::std::string::String>,
/// <p>A timestamp, in ISO 8601 format, for this stream.</p>
/// <p>Note that <code>LatestStreamLabel</code> is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:</p>
/// <ul>
/// <li>
/// <p>the Amazon Web Services customer ID.</p></li>
/// <li>
/// <p>the table name</p></li>
/// <li>
/// <p>the <code>StreamLabel</code></p></li>
/// </ul>
pub stream_label: ::std::option::Option<::std::string::String>,
}
impl Stream {
/// <p>The Amazon Resource Name (ARN) for the stream.</p>
pub fn stream_arn(&self) -> ::std::option::Option<&str> {
self.stream_arn.as_deref()
}
/// <p>The DynamoDB table with which the stream is associated.</p>
pub fn table_name(&self) -> ::std::option::Option<&str> {
self.table_name.as_deref()
}
/// <p>A timestamp, in ISO 8601 format, for this stream.</p>
/// <p>Note that <code>LatestStreamLabel</code> is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:</p>
/// <ul>
/// <li>
/// <p>the Amazon Web Services customer ID.</p></li>
/// <li>
/// <p>the table name</p></li>
/// <li>
/// <p>the <code>StreamLabel</code></p></li>
/// </ul>
pub fn stream_label(&self) -> ::std::option::Option<&str> {
self.stream_label.as_deref()
}
}
impl Stream {
/// Creates a new builder-style object to manufacture [`Stream`](crate::types::Stream).
pub fn builder() -> crate::types::builders::StreamBuilder {
crate::types::builders::StreamBuilder::default()
}
}
/// A builder for [`Stream`](crate::types::Stream).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StreamBuilder {
pub(crate) stream_arn: ::std::option::Option<::std::string::String>,
pub(crate) table_name: ::std::option::Option<::std::string::String>,
pub(crate) stream_label: ::std::option::Option<::std::string::String>,
}
impl StreamBuilder {
/// <p>The Amazon Resource Name (ARN) for the stream.</p>
pub fn stream_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.stream_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) for the stream.</p>
pub fn set_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.stream_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) for the stream.</p>
pub fn get_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.stream_arn
}
/// <p>The DynamoDB table with which the stream is associated.</p>
pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.table_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The DynamoDB table with which the stream is associated.</p>
pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.table_name = input;
self
}
/// <p>The DynamoDB table with which the stream is associated.</p>
pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
&self.table_name
}
/// <p>A timestamp, in ISO 8601 format, for this stream.</p>
/// <p>Note that <code>LatestStreamLabel</code> is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:</p>
/// <ul>
/// <li>
/// <p>the Amazon Web Services customer ID.</p></li>
/// <li>
/// <p>the table name</p></li>
/// <li>
/// <p>the <code>StreamLabel</code></p></li>
/// </ul>
pub fn stream_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.stream_label = ::std::option::Option::Some(input.into());
self
}
/// <p>A timestamp, in ISO 8601 format, for this stream.</p>
/// <p>Note that <code>LatestStreamLabel</code> is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:</p>
/// <ul>
/// <li>
/// <p>the Amazon Web Services customer ID.</p></li>
/// <li>
/// <p>the table name</p></li>
/// <li>
/// <p>the <code>StreamLabel</code></p></li>
/// </ul>
pub fn set_stream_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.stream_label = input;
self
}
/// <p>A timestamp, in ISO 8601 format, for this stream.</p>
/// <p>Note that <code>LatestStreamLabel</code> is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:</p>
/// <ul>
/// <li>
/// <p>the Amazon Web Services customer ID.</p></li>
/// <li>
/// <p>the table name</p></li>
/// <li>
/// <p>the <code>StreamLabel</code></p></li>
/// </ul>
pub fn get_stream_label(&self) -> &::std::option::Option<::std::string::String> {
&self.stream_label
}
/// Consumes the builder and constructs a [`Stream`](crate::types::Stream).
pub fn build(self) -> crate::types::Stream {
crate::types::Stream {
stream_arn: self.stream_arn,
table_name: self.table_name,
stream_label: self.stream_label,
}
}
}