aws_sdk_keyspacesstreams/operation/get_stream/_get_stream_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetStreamInput {
6 /// <p>The Amazon Resource Name (ARN) of the stream for which detailed information is requested. This uniquely identifies the specific stream you want to get information about.</p>
7 pub stream_arn: ::std::option::Option<::std::string::String>,
8 /// <p>The maximum number of shard objects to return in a single <code>GetStream</code> request. Default value is 100. The minimum value is 1 and the maximum value is 100.</p>
9 pub max_results: ::std::option::Option<i32>,
10 /// <p>Optional filter criteria to apply when retrieving shards. You can filter shards based on their state or other attributes to narrow down the results returned by the <code>GetStream</code> operation.</p>
11 pub shard_filter: ::std::option::Option<crate::types::ShardFilter>,
12 /// <p>An optional pagination token provided by a previous <code>GetStream</code> operation. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>maxResults</code>.</p>
13 pub next_token: ::std::option::Option<::std::string::String>,
14}
15impl GetStreamInput {
16 /// <p>The Amazon Resource Name (ARN) of the stream for which detailed information is requested. This uniquely identifies the specific stream you want to get information about.</p>
17 pub fn stream_arn(&self) -> ::std::option::Option<&str> {
18 self.stream_arn.as_deref()
19 }
20 /// <p>The maximum number of shard objects to return in a single <code>GetStream</code> request. Default value is 100. The minimum value is 1 and the maximum value is 100.</p>
21 pub fn max_results(&self) -> ::std::option::Option<i32> {
22 self.max_results
23 }
24 /// <p>Optional filter criteria to apply when retrieving shards. You can filter shards based on their state or other attributes to narrow down the results returned by the <code>GetStream</code> operation.</p>
25 pub fn shard_filter(&self) -> ::std::option::Option<&crate::types::ShardFilter> {
26 self.shard_filter.as_ref()
27 }
28 /// <p>An optional pagination token provided by a previous <code>GetStream</code> operation. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>maxResults</code>.</p>
29 pub fn next_token(&self) -> ::std::option::Option<&str> {
30 self.next_token.as_deref()
31 }
32}
33impl GetStreamInput {
34 /// Creates a new builder-style object to manufacture [`GetStreamInput`](crate::operation::get_stream::GetStreamInput).
35 pub fn builder() -> crate::operation::get_stream::builders::GetStreamInputBuilder {
36 crate::operation::get_stream::builders::GetStreamInputBuilder::default()
37 }
38}
39
40/// A builder for [`GetStreamInput`](crate::operation::get_stream::GetStreamInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetStreamInputBuilder {
44 pub(crate) stream_arn: ::std::option::Option<::std::string::String>,
45 pub(crate) max_results: ::std::option::Option<i32>,
46 pub(crate) shard_filter: ::std::option::Option<crate::types::ShardFilter>,
47 pub(crate) next_token: ::std::option::Option<::std::string::String>,
48}
49impl GetStreamInputBuilder {
50 /// <p>The Amazon Resource Name (ARN) of the stream for which detailed information is requested. This uniquely identifies the specific stream you want to get information about.</p>
51 /// This field is required.
52 pub fn stream_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.stream_arn = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>The Amazon Resource Name (ARN) of the stream for which detailed information is requested. This uniquely identifies the specific stream you want to get information about.</p>
57 pub fn set_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.stream_arn = input;
59 self
60 }
61 /// <p>The Amazon Resource Name (ARN) of the stream for which detailed information is requested. This uniquely identifies the specific stream you want to get information about.</p>
62 pub fn get_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
63 &self.stream_arn
64 }
65 /// <p>The maximum number of shard objects to return in a single <code>GetStream</code> request. Default value is 100. The minimum value is 1 and the maximum value is 100.</p>
66 pub fn max_results(mut self, input: i32) -> Self {
67 self.max_results = ::std::option::Option::Some(input);
68 self
69 }
70 /// <p>The maximum number of shard objects to return in a single <code>GetStream</code> request. Default value is 100. The minimum value is 1 and the maximum value is 100.</p>
71 pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
72 self.max_results = input;
73 self
74 }
75 /// <p>The maximum number of shard objects to return in a single <code>GetStream</code> request. Default value is 100. The minimum value is 1 and the maximum value is 100.</p>
76 pub fn get_max_results(&self) -> &::std::option::Option<i32> {
77 &self.max_results
78 }
79 /// <p>Optional filter criteria to apply when retrieving shards. You can filter shards based on their state or other attributes to narrow down the results returned by the <code>GetStream</code> operation.</p>
80 pub fn shard_filter(mut self, input: crate::types::ShardFilter) -> Self {
81 self.shard_filter = ::std::option::Option::Some(input);
82 self
83 }
84 /// <p>Optional filter criteria to apply when retrieving shards. You can filter shards based on their state or other attributes to narrow down the results returned by the <code>GetStream</code> operation.</p>
85 pub fn set_shard_filter(mut self, input: ::std::option::Option<crate::types::ShardFilter>) -> Self {
86 self.shard_filter = input;
87 self
88 }
89 /// <p>Optional filter criteria to apply when retrieving shards. You can filter shards based on their state or other attributes to narrow down the results returned by the <code>GetStream</code> operation.</p>
90 pub fn get_shard_filter(&self) -> &::std::option::Option<crate::types::ShardFilter> {
91 &self.shard_filter
92 }
93 /// <p>An optional pagination token provided by a previous <code>GetStream</code> operation. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>maxResults</code>.</p>
94 pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
95 self.next_token = ::std::option::Option::Some(input.into());
96 self
97 }
98 /// <p>An optional pagination token provided by a previous <code>GetStream</code> operation. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>maxResults</code>.</p>
99 pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
100 self.next_token = input;
101 self
102 }
103 /// <p>An optional pagination token provided by a previous <code>GetStream</code> operation. If this parameter is specified, the response includes only records beyond the token, up to the value specified by <code>maxResults</code>.</p>
104 pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
105 &self.next_token
106 }
107 /// Consumes the builder and constructs a [`GetStreamInput`](crate::operation::get_stream::GetStreamInput).
108 pub fn build(self) -> ::std::result::Result<crate::operation::get_stream::GetStreamInput, ::aws_smithy_types::error::operation::BuildError> {
109 ::std::result::Result::Ok(crate::operation::get_stream::GetStreamInput {
110 stream_arn: self.stream_arn,
111 max_results: self.max_results,
112 shard_filter: self.shard_filter,
113 next_token: self.next_token,
114 })
115 }
116}