aws-sdk-dynamodbstreams 1.99.0

AWS SDK for Amazon DynamoDB Streams
Documentation
// 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>
    pub stream_arn: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of shard objects to return. The upper limit is 100.</p>
    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>
    pub exclusive_start_shard_id: ::std::option::Option<::std::string::String>,
    /// <p>This optional field contains the filter definition for the <code>DescribeStream</code> API.</p>
    pub shard_filter: ::std::option::Option<crate::types::ShardFilter>,
}
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()
    }
    /// <p>This optional field contains the filter definition for the <code>DescribeStream</code> API.</p>
    pub fn shard_filter(&self) -> ::std::option::Option<&crate::types::ShardFilter> {
        self.shard_filter.as_ref()
    }
}
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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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>,
    pub(crate) shard_filter: ::std::option::Option<crate::types::ShardFilter>,
}
impl DescribeStreamInputBuilder {
    /// <p>The Amazon Resource Name (ARN) for the stream.</p>
    /// This field is required.
    pub fn stream_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stream_arn = ::std::option::Option::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 Amazon Resource Name (ARN) for the stream.</p>
    pub fn get_stream_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.stream_arn
    }
    /// <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 = ::std::option::Option::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 maximum number of shard objects to return. The upper limit is 100.</p>
    pub fn get_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(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.exclusive_start_shard_id = ::std::option::Option::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
    }
    /// <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 get_exclusive_start_shard_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.exclusive_start_shard_id
    }
    /// <p>This optional field contains the filter definition for the <code>DescribeStream</code> API.</p>
    pub fn shard_filter(mut self, input: crate::types::ShardFilter) -> Self {
        self.shard_filter = ::std::option::Option::Some(input);
        self
    }
    /// <p>This optional field contains the filter definition for the <code>DescribeStream</code> API.</p>
    pub fn set_shard_filter(mut self, input: ::std::option::Option<crate::types::ShardFilter>) -> Self {
        self.shard_filter = input;
        self
    }
    /// <p>This optional field contains the filter definition for the <code>DescribeStream</code> API.</p>
    pub fn get_shard_filter(&self) -> &::std::option::Option<crate::types::ShardFilter> {
        &self.shard_filter
    }
    /// Consumes the builder and constructs a [`DescribeStreamInput`](crate::operation::describe_stream::DescribeStreamInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_stream::DescribeStreamInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_stream::DescribeStreamInput {
            stream_arn: self.stream_arn,
            limit: self.limit,
            exclusive_start_shard_id: self.exclusive_start_shard_id,
            shard_filter: self.shard_filter,
        })
    }
}