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