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}
14impl DescribeStreamInput {
15    /// <p>The Amazon Resource Name (ARN) for the stream.</p>
16    pub fn stream_arn(&self) -> ::std::option::Option<&str> {
17        self.stream_arn.as_deref()
18    }
19    /// <p>The maximum number of shard objects to return. The upper limit is 100.</p>
20    pub fn limit(&self) -> ::std::option::Option<i32> {
21        self.limit
22    }
23    /// <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>
24    pub fn exclusive_start_shard_id(&self) -> ::std::option::Option<&str> {
25        self.exclusive_start_shard_id.as_deref()
26    }
27}
28impl DescribeStreamInput {
29    /// Creates a new builder-style object to manufacture [`DescribeStreamInput`](crate::operation::describe_stream::DescribeStreamInput).
30    pub fn builder() -> crate::operation::describe_stream::builders::DescribeStreamInputBuilder {
31        crate::operation::describe_stream::builders::DescribeStreamInputBuilder::default()
32    }
33}
34
35/// A builder for [`DescribeStreamInput`](crate::operation::describe_stream::DescribeStreamInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct DescribeStreamInputBuilder {
39    pub(crate) stream_arn: ::std::option::Option<::std::string::String>,
40    pub(crate) limit: ::std::option::Option<i32>,
41    pub(crate) exclusive_start_shard_id: ::std::option::Option<::std::string::String>,
42}
43impl DescribeStreamInputBuilder {
44    /// <p>The Amazon Resource Name (ARN) for the stream.</p>
45    /// This field is required.
46    pub fn stream_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47        self.stream_arn = ::std::option::Option::Some(input.into());
48        self
49    }
50    /// <p>The Amazon Resource Name (ARN) for the stream.</p>
51    pub fn set_stream_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.stream_arn = input;
53        self
54    }
55    /// <p>The Amazon Resource Name (ARN) for the stream.</p>
56    pub fn get_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
57        &self.stream_arn
58    }
59    /// <p>The maximum number of shard objects to return. The upper limit is 100.</p>
60    pub fn limit(mut self, input: i32) -> Self {
61        self.limit = ::std::option::Option::Some(input);
62        self
63    }
64    /// <p>The maximum number of shard objects to return. The upper limit is 100.</p>
65    pub fn set_limit(mut self, input: ::std::option::Option<i32>) -> Self {
66        self.limit = input;
67        self
68    }
69    /// <p>The maximum number of shard objects to return. The upper limit is 100.</p>
70    pub fn get_limit(&self) -> &::std::option::Option<i32> {
71        &self.limit
72    }
73    /// <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>
74    pub fn exclusive_start_shard_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.exclusive_start_shard_id = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <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>
79    pub fn set_exclusive_start_shard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.exclusive_start_shard_id = input;
81        self
82    }
83    /// <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>
84    pub fn get_exclusive_start_shard_id(&self) -> &::std::option::Option<::std::string::String> {
85        &self.exclusive_start_shard_id
86    }
87    /// Consumes the builder and constructs a [`DescribeStreamInput`](crate::operation::describe_stream::DescribeStreamInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::describe_stream::DescribeStreamInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::describe_stream::DescribeStreamInput {
92            stream_arn: self.stream_arn,
93            limit: self.limit,
94            exclusive_start_shard_id: self.exclusive_start_shard_id,
95        })
96    }
97}