aws_sdk_dynamodbstreams/operation/list_streams/
_list_streams_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>ListStreams</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ListStreamsInput {
7    /// <p>If this parameter is provided, then only the streams associated with this table name are returned.</p>
8    pub table_name: ::std::option::Option<::std::string::String>,
9    /// <p>The maximum number of streams to return. The upper limit is 100.</p>
10    pub limit: ::std::option::Option<i32>,
11    /// <p>The ARN (Amazon Resource Name) of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedStreamArn</code> in the previous operation.</p>
12    pub exclusive_start_stream_arn: ::std::option::Option<::std::string::String>,
13}
14impl ListStreamsInput {
15    /// <p>If this parameter is provided, then only the streams associated with this table name are returned.</p>
16    pub fn table_name(&self) -> ::std::option::Option<&str> {
17        self.table_name.as_deref()
18    }
19    /// <p>The maximum number of streams to return. The upper limit is 100.</p>
20    pub fn limit(&self) -> ::std::option::Option<i32> {
21        self.limit
22    }
23    /// <p>The ARN (Amazon Resource Name) of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedStreamArn</code> in the previous operation.</p>
24    pub fn exclusive_start_stream_arn(&self) -> ::std::option::Option<&str> {
25        self.exclusive_start_stream_arn.as_deref()
26    }
27}
28impl ListStreamsInput {
29    /// Creates a new builder-style object to manufacture [`ListStreamsInput`](crate::operation::list_streams::ListStreamsInput).
30    pub fn builder() -> crate::operation::list_streams::builders::ListStreamsInputBuilder {
31        crate::operation::list_streams::builders::ListStreamsInputBuilder::default()
32    }
33}
34
35/// A builder for [`ListStreamsInput`](crate::operation::list_streams::ListStreamsInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct ListStreamsInputBuilder {
39    pub(crate) table_name: ::std::option::Option<::std::string::String>,
40    pub(crate) limit: ::std::option::Option<i32>,
41    pub(crate) exclusive_start_stream_arn: ::std::option::Option<::std::string::String>,
42}
43impl ListStreamsInputBuilder {
44    /// <p>If this parameter is provided, then only the streams associated with this table name are returned.</p>
45    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.table_name = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>If this parameter is provided, then only the streams associated with this table name are returned.</p>
50    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.table_name = input;
52        self
53    }
54    /// <p>If this parameter is provided, then only the streams associated with this table name are returned.</p>
55    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
56        &self.table_name
57    }
58    /// <p>The maximum number of streams to return. The upper limit is 100.</p>
59    pub fn limit(mut self, input: i32) -> Self {
60        self.limit = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The maximum number of streams to return. The upper limit is 100.</p>
64    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
65        self.limit = input;
66        self
67    }
68    /// <p>The maximum number of streams to return. The upper limit is 100.</p>
69    pub fn get_limit(&self) -> &::std::option::Option<i32> {
70        &self.limit
71    }
72    /// <p>The ARN (Amazon Resource Name) of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedStreamArn</code> in the previous operation.</p>
73    pub fn exclusive_start_stream_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.exclusive_start_stream_arn = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The ARN (Amazon Resource Name) of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedStreamArn</code> in the previous operation.</p>
78    pub fn set_exclusive_start_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.exclusive_start_stream_arn = input;
80        self
81    }
82    /// <p>The ARN (Amazon Resource Name) of the first item that this operation will evaluate. Use the value that was returned for <code>LastEvaluatedStreamArn</code> in the previous operation.</p>
83    pub fn get_exclusive_start_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
84        &self.exclusive_start_stream_arn
85    }
86    /// Consumes the builder and constructs a [`ListStreamsInput`](crate::operation::list_streams::ListStreamsInput).
87    pub fn build(self) -> ::std::result::Result<crate::operation::list_streams::ListStreamsInput, ::aws_smithy_types::error::operation::BuildError> {
88        ::std::result::Result::Ok(crate::operation::list_streams::ListStreamsInput {
89            table_name: self.table_name,
90            limit: self.limit,
91            exclusive_start_stream_arn: self.exclusive_start_stream_arn,
92        })
93    }
94}