aws_sdk_dynamodbstreams/operation/describe_stream/
_describe_stream_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the output of a <code>DescribeStream</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeStreamOutput {
7    /// <p>A complete description of the stream, including its creation date and time, the DynamoDB table associated with the stream, the shard IDs within the stream, and the beginning and ending sequence numbers of stream records within the shards.</p>
8    pub stream_description: ::std::option::Option<crate::types::StreamDescription>,
9    _request_id: Option<String>,
10}
11impl DescribeStreamOutput {
12    /// <p>A complete description of the stream, including its creation date and time, the DynamoDB table associated with the stream, the shard IDs within the stream, and the beginning and ending sequence numbers of stream records within the shards.</p>
13    pub fn stream_description(&self) -> ::std::option::Option<&crate::types::StreamDescription> {
14        self.stream_description.as_ref()
15    }
16}
17impl ::aws_types::request_id::RequestId for DescribeStreamOutput {
18    fn request_id(&self) -> Option<&str> {
19        self._request_id.as_deref()
20    }
21}
22impl DescribeStreamOutput {
23    /// Creates a new builder-style object to manufacture [`DescribeStreamOutput`](crate::operation::describe_stream::DescribeStreamOutput).
24    pub fn builder() -> crate::operation::describe_stream::builders::DescribeStreamOutputBuilder {
25        crate::operation::describe_stream::builders::DescribeStreamOutputBuilder::default()
26    }
27}
28
29/// A builder for [`DescribeStreamOutput`](crate::operation::describe_stream::DescribeStreamOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DescribeStreamOutputBuilder {
33    pub(crate) stream_description: ::std::option::Option<crate::types::StreamDescription>,
34    _request_id: Option<String>,
35}
36impl DescribeStreamOutputBuilder {
37    /// <p>A complete description of the stream, including its creation date and time, the DynamoDB table associated with the stream, the shard IDs within the stream, and the beginning and ending sequence numbers of stream records within the shards.</p>
38    pub fn stream_description(mut self, input: crate::types::StreamDescription) -> Self {
39        self.stream_description = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>A complete description of the stream, including its creation date and time, the DynamoDB table associated with the stream, the shard IDs within the stream, and the beginning and ending sequence numbers of stream records within the shards.</p>
43    pub fn set_stream_description(mut self, input: ::std::option::Option<crate::types::StreamDescription>) -> Self {
44        self.stream_description = input;
45        self
46    }
47    /// <p>A complete description of the stream, including its creation date and time, the DynamoDB table associated with the stream, the shard IDs within the stream, and the beginning and ending sequence numbers of stream records within the shards.</p>
48    pub fn get_stream_description(&self) -> &::std::option::Option<crate::types::StreamDescription> {
49        &self.stream_description
50    }
51    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52        self._request_id = Some(request_id.into());
53        self
54    }
55
56    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57        self._request_id = request_id;
58        self
59    }
60    /// Consumes the builder and constructs a [`DescribeStreamOutput`](crate::operation::describe_stream::DescribeStreamOutput).
61    pub fn build(self) -> crate::operation::describe_stream::DescribeStreamOutput {
62        crate::operation::describe_stream::DescribeStreamOutput {
63            stream_description: self.stream_description,
64            _request_id: self._request_id,
65        }
66    }
67}