aws_sdk_dynamodbstreams/operation/describe_stream/
_describe_stream_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input of a <code>DescribeStream</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeStreamInput {
7    /// <p>The Amazon Resource Name (ARN) for the stream.</p>
8    pub stream_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The maximum number of shard objects to return. The upper limit is 100.</p>
10    pub limit: ::std::option::Option<i32>,
11    /// <p>The shard ID of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedShardId</code> in the previous operation.</p>
12    pub exclusive_start_shard_id: ::std::option::Option<::std::string::String>,
13    /// <p>This optional field contains the filter definition for the <code>DescribeStream</code> API.</p>
14    pub shard_filter: ::std::option::Option<crate::types::ShardFilter>,
15}
16impl DescribeStreamInput {
17    /// <p>The Amazon Resource Name (ARN) for the stream.</p>
18    pub fn stream_arn(&self) -> ::std::option::Option<&str> {
19        self.stream_arn.as_deref()
20    }
21    /// <p>The maximum number of shard objects to return. The upper limit is 100.</p>
22    pub fn limit(&self) -> ::std::option::Option<i32> {
23        self.limit
24    }
25    /// <p>The shard ID of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedShardId</code> in the previous operation.</p>
26    pub fn exclusive_start_shard_id(&self) -> ::std::option::Option<&str> {
27        self.exclusive_start_shard_id.as_deref()
28    }
29    /// <p>This optional field contains the filter definition for the <code>DescribeStream</code> API.</p>
30    pub fn shard_filter(&self) -> ::std::option::Option<&crate::types::ShardFilter> {
31        self.shard_filter.as_ref()
32    }
33}
34impl DescribeStreamInput {
35    /// Creates a new builder-style object to manufacture [`DescribeStreamInput`](crate::operation::describe_stream::DescribeStreamInput).
36    pub fn builder() -> crate::operation::describe_stream::builders::DescribeStreamInputBuilder {
37        crate::operation::describe_stream::builders::DescribeStreamInputBuilder::default()
38    }
39}
40
41/// A builder for [`DescribeStreamInput`](crate::operation::describe_stream::DescribeStreamInput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct DescribeStreamInputBuilder {
45    pub(crate) stream_arn: ::std::option::Option<::std::string::String>,
46    pub(crate) limit: ::std::option::Option<i32>,
47    pub(crate) exclusive_start_shard_id: ::std::option::Option<::std::string::String>,
48    pub(crate) shard_filter: ::std::option::Option<crate::types::ShardFilter>,
49}
50impl DescribeStreamInputBuilder {
51    /// <p>The Amazon Resource Name (ARN) for the stream.</p>
52    /// This field is required.
53    pub fn stream_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.stream_arn = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The Amazon Resource Name (ARN) for the stream.</p>
58    pub fn set_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.stream_arn = input;
60        self
61    }
62    /// <p>The Amazon Resource Name (ARN) for the stream.</p>
63    pub fn get_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
64        &self.stream_arn
65    }
66    /// <p>The maximum number of shard objects to return. The upper limit is 100.</p>
67    pub fn limit(mut self, input: i32) -> Self {
68        self.limit = ::std::option::Option::Some(input);
69        self
70    }
71    /// <p>The maximum number of shard objects to return. The upper limit is 100.</p>
72    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
73        self.limit = input;
74        self
75    }
76    /// <p>The maximum number of shard objects to return. The upper limit is 100.</p>
77    pub fn get_limit(&self) -> &::std::option::Option<i32> {
78        &self.limit
79    }
80    /// <p>The shard ID of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedShardId</code> in the previous operation.</p>
81    pub fn exclusive_start_shard_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.exclusive_start_shard_id = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The shard ID of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedShardId</code> in the previous operation.</p>
86    pub fn set_exclusive_start_shard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.exclusive_start_shard_id = input;
88        self
89    }
90    /// <p>The shard ID of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedShardId</code> in the previous operation.</p>
91    pub fn get_exclusive_start_shard_id(&self) -> &::std::option::Option<::std::string::String> {
92        &self.exclusive_start_shard_id
93    }
94    /// <p>This optional field contains the filter definition for the <code>DescribeStream</code> API.</p>
95    pub fn shard_filter(mut self, input: crate::types::ShardFilter) -> Self {
96        self.shard_filter = ::std::option::Option::Some(input);
97        self
98    }
99    /// <p>This optional field contains the filter definition for the <code>DescribeStream</code> API.</p>
100    pub fn set_shard_filter(mut self, input: ::std::option::Option<crate::types::ShardFilter>) -> Self {
101        self.shard_filter = input;
102        self
103    }
104    /// <p>This optional field contains the filter definition for the <code>DescribeStream</code> API.</p>
105    pub fn get_shard_filter(&self) -> &::std::option::Option<crate::types::ShardFilter> {
106        &self.shard_filter
107    }
108    /// Consumes the builder and constructs a [`DescribeStreamInput`](crate::operation::describe_stream::DescribeStreamInput).
109    pub fn build(
110        self,
111    ) -> ::std::result::Result<crate::operation::describe_stream::DescribeStreamInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::describe_stream::DescribeStreamInput {
113            stream_arn: self.stream_arn,
114            limit: self.limit,
115            exclusive_start_shard_id: self.exclusive_start_shard_id,
116            shard_filter: self.shard_filter,
117        })
118    }
119}