aws_sdk_dynamodbstreams/operation/describe_stream/
_describe_stream_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeStreamInput {
7 pub stream_arn: ::std::option::Option<::std::string::String>,
9 pub limit: ::std::option::Option<i32>,
11 pub exclusive_start_shard_id: ::std::option::Option<::std::string::String>,
13 pub shard_filter: ::std::option::Option<crate::types::ShardFilter>,
15}
16impl DescribeStreamInput {
17 pub fn stream_arn(&self) -> ::std::option::Option<&str> {
19 self.stream_arn.as_deref()
20 }
21 pub fn limit(&self) -> ::std::option::Option<i32> {
23 self.limit
24 }
25 pub fn exclusive_start_shard_id(&self) -> ::std::option::Option<&str> {
27 self.exclusive_start_shard_id.as_deref()
28 }
29 pub fn shard_filter(&self) -> ::std::option::Option<&crate::types::ShardFilter> {
31 self.shard_filter.as_ref()
32 }
33}
34impl DescribeStreamInput {
35 pub fn builder() -> crate::operation::describe_stream::builders::DescribeStreamInputBuilder {
37 crate::operation::describe_stream::builders::DescribeStreamInputBuilder::default()
38 }
39}
40
41#[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 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 pub fn set_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.stream_arn = input;
60 self
61 }
62 pub fn get_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
64 &self.stream_arn
65 }
66 pub fn limit(mut self, input: i32) -> Self {
68 self.limit = ::std::option::Option::Some(input);
69 self
70 }
71 pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
73 self.limit = input;
74 self
75 }
76 pub fn get_limit(&self) -> &::std::option::Option<i32> {
78 &self.limit
79 }
80 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 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 pub fn get_exclusive_start_shard_id(&self) -> &::std::option::Option<::std::string::String> {
92 &self.exclusive_start_shard_id
93 }
94 pub fn shard_filter(mut self, input: crate::types::ShardFilter) -> Self {
96 self.shard_filter = ::std::option::Option::Some(input);
97 self
98 }
99 pub fn set_shard_filter(mut self, input: ::std::option::Option<crate::types::ShardFilter>) -> Self {
101 self.shard_filter = input;
102 self
103 }
104 pub fn get_shard_filter(&self) -> &::std::option::Option<crate::types::ShardFilter> {
106 &self.shard_filter
107 }
108 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}