aws-sdk-dynamodbstreams 1.99.0

AWS SDK for Amazon DynamoDB Streams
Documentation
// 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,
        }
    }
}