aws-sdk-kinesis 0.24.0

AWS SDK for Amazon Kinesis
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[derive(Debug)]
pub(crate) struct Handle {
    pub(crate) client: aws_smithy_client::Client<
        aws_smithy_client::erase::DynConnector,
        aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
    >,
    pub(crate) conf: crate::Config,
}

/// Client for Amazon Kinesis
///
/// Client for invoking operations on Amazon Kinesis. Each operation on Amazon Kinesis is a method on this
/// this struct. `.send()` MUST be invoked on the generated operations to dispatch the request to the service.
///
/// # Examples
/// **Constructing a client and invoking an operation**
/// ```rust,no_run
/// # async fn docs() {
///     // create a shared configuration. This can be used & shared between multiple service clients.
///     let shared_config = aws_config::load_from_env().await;
///     let client = aws_sdk_kinesis::Client::new(&shared_config);
///     // invoke an operation
///     /* let rsp = client
///         .<operation_name>().
///         .<param>("some value")
///         .send().await; */
/// # }
/// ```
/// **Constructing a client with custom configuration**
/// ```rust,no_run
/// use aws_config::retry::RetryConfig;
/// # async fn docs() {
/// let shared_config = aws_config::load_from_env().await;
/// let config = aws_sdk_kinesis::config::Builder::from(&shared_config)
///   .retry_config(RetryConfig::disabled())
///   .build();
/// let client = aws_sdk_kinesis::Client::from_conf(config);
/// # }
#[derive(std::fmt::Debug)]
pub struct Client {
    handle: std::sync::Arc<Handle>,
}

impl std::clone::Clone for Client {
    fn clone(&self) -> Self {
        Self {
            handle: self.handle.clone(),
        }
    }
}

#[doc(inline)]
pub use aws_smithy_client::Builder;

impl
    From<
        aws_smithy_client::Client<
            aws_smithy_client::erase::DynConnector,
            aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
        >,
    > for Client
{
    fn from(
        client: aws_smithy_client::Client<
            aws_smithy_client::erase::DynConnector,
            aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
        >,
    ) -> Self {
        Self::with_config(client, crate::Config::builder().build())
    }
}

impl Client {
    /// Creates a client with the given service configuration.
    pub fn with_config(
        client: aws_smithy_client::Client<
            aws_smithy_client::erase::DynConnector,
            aws_smithy_client::erase::DynMiddleware<aws_smithy_client::erase::DynConnector>,
        >,
        conf: crate::Config,
    ) -> Self {
        Self {
            handle: std::sync::Arc::new(Handle { client, conf }),
        }
    }

    /// Returns the client's configuration.
    pub fn conf(&self) -> &crate::Config {
        &self.handle.conf
    }
}
impl Client {
    /// Constructs a fluent builder for the [`AddTagsToStream`](crate::client::fluent_builders::AddTagsToStream) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::AddTagsToStream::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::AddTagsToStream::set_stream_name): <p>The name of the stream.</p>
    ///   - [`tags(HashMap<String, String>)`](crate::client::fluent_builders::AddTagsToStream::tags) / [`set_tags(Option<HashMap<String, String>>)`](crate::client::fluent_builders::AddTagsToStream::set_tags): <p>A set of up to 10 key-value pairs to use to create the tags.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::AddTagsToStream::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::AddTagsToStream::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`AddTagsToStreamOutput`](crate::output::AddTagsToStreamOutput)

    /// - On failure, responds with [`SdkError<AddTagsToStreamError>`](crate::error::AddTagsToStreamError)
    pub fn add_tags_to_stream(&self) -> fluent_builders::AddTagsToStream {
        fluent_builders::AddTagsToStream::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`CreateStream`](crate::client::fluent_builders::CreateStream) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::CreateStream::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::CreateStream::set_stream_name): <p>A name to identify the stream. The stream name is scoped to the Amazon Web Services account used by the application that creates the stream. It is also scoped by Amazon Web Services Region. That is, two streams in two different Amazon Web Services accounts can have the same name. Two streams in the same Amazon Web Services account but in two different Regions can also have the same name.</p>
    ///   - [`shard_count(i32)`](crate::client::fluent_builders::CreateStream::shard_count) / [`set_shard_count(Option<i32>)`](crate::client::fluent_builders::CreateStream::set_shard_count): <p>The number of shards that the stream will use. The throughput of the stream is a function of the number of shards; more shards are required for greater provisioned throughput.</p>
    ///   - [`stream_mode_details(StreamModeDetails)`](crate::client::fluent_builders::CreateStream::stream_mode_details) / [`set_stream_mode_details(Option<StreamModeDetails>)`](crate::client::fluent_builders::CreateStream::set_stream_mode_details): <p> Indicates the capacity mode of the data stream. Currently, in Kinesis Data Streams, you can choose between an <b>on-demand</b> capacity mode and a <b>provisioned</b> capacity mode for your data streams.</p>
    /// - On success, responds with [`CreateStreamOutput`](crate::output::CreateStreamOutput)

    /// - On failure, responds with [`SdkError<CreateStreamError>`](crate::error::CreateStreamError)
    pub fn create_stream(&self) -> fluent_builders::CreateStream {
        fluent_builders::CreateStream::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`DecreaseStreamRetentionPeriod`](crate::client::fluent_builders::DecreaseStreamRetentionPeriod) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::DecreaseStreamRetentionPeriod::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::DecreaseStreamRetentionPeriod::set_stream_name): <p>The name of the stream to modify.</p>
    ///   - [`retention_period_hours(i32)`](crate::client::fluent_builders::DecreaseStreamRetentionPeriod::retention_period_hours) / [`set_retention_period_hours(Option<i32>)`](crate::client::fluent_builders::DecreaseStreamRetentionPeriod::set_retention_period_hours): <p>The new retention period of the stream, in hours. Must be less than the current retention period.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::DecreaseStreamRetentionPeriod::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::DecreaseStreamRetentionPeriod::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`DecreaseStreamRetentionPeriodOutput`](crate::output::DecreaseStreamRetentionPeriodOutput)

    /// - On failure, responds with [`SdkError<DecreaseStreamRetentionPeriodError>`](crate::error::DecreaseStreamRetentionPeriodError)
    pub fn decrease_stream_retention_period(
        &self,
    ) -> fluent_builders::DecreaseStreamRetentionPeriod {
        fluent_builders::DecreaseStreamRetentionPeriod::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`DeleteStream`](crate::client::fluent_builders::DeleteStream) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::DeleteStream::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::DeleteStream::set_stream_name): <p>The name of the stream to delete.</p>
    ///   - [`enforce_consumer_deletion(bool)`](crate::client::fluent_builders::DeleteStream::enforce_consumer_deletion) / [`set_enforce_consumer_deletion(Option<bool>)`](crate::client::fluent_builders::DeleteStream::set_enforce_consumer_deletion): <p>If this parameter is unset (<code>null</code>) or if you set it to <code>false</code>, and the stream has registered consumers, the call to <code>DeleteStream</code> fails with a <code>ResourceInUseException</code>. </p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::DeleteStream::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::DeleteStream::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`DeleteStreamOutput`](crate::output::DeleteStreamOutput)

    /// - On failure, responds with [`SdkError<DeleteStreamError>`](crate::error::DeleteStreamError)
    pub fn delete_stream(&self) -> fluent_builders::DeleteStream {
        fluent_builders::DeleteStream::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`DeregisterStreamConsumer`](crate::client::fluent_builders::DeregisterStreamConsumer) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::DeregisterStreamConsumer::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::DeregisterStreamConsumer::set_stream_arn): <p>The ARN of the Kinesis data stream that the consumer is registered with. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
    ///   - [`consumer_name(impl Into<String>)`](crate::client::fluent_builders::DeregisterStreamConsumer::consumer_name) / [`set_consumer_name(Option<String>)`](crate::client::fluent_builders::DeregisterStreamConsumer::set_consumer_name): <p>The name that you gave to the consumer.</p>
    ///   - [`consumer_arn(impl Into<String>)`](crate::client::fluent_builders::DeregisterStreamConsumer::consumer_arn) / [`set_consumer_arn(Option<String>)`](crate::client::fluent_builders::DeregisterStreamConsumer::set_consumer_arn): <p>The ARN returned by Kinesis Data Streams when you registered the consumer. If you don't know the ARN of the consumer that you want to deregister, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its ARN.</p>
    /// - On success, responds with [`DeregisterStreamConsumerOutput`](crate::output::DeregisterStreamConsumerOutput)

    /// - On failure, responds with [`SdkError<DeregisterStreamConsumerError>`](crate::error::DeregisterStreamConsumerError)
    pub fn deregister_stream_consumer(&self) -> fluent_builders::DeregisterStreamConsumer {
        fluent_builders::DeregisterStreamConsumer::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`DescribeLimits`](crate::client::fluent_builders::DescribeLimits) operation.
    ///
    /// - The fluent builder takes no input, just [`send`](crate::client::fluent_builders::DescribeLimits::send) it.

    /// - On success, responds with [`DescribeLimitsOutput`](crate::output::DescribeLimitsOutput) with field(s):
    ///   - [`shard_limit(Option<i32>)`](crate::output::DescribeLimitsOutput::shard_limit): <p>The maximum number of shards.</p>
    ///   - [`open_shard_count(Option<i32>)`](crate::output::DescribeLimitsOutput::open_shard_count): <p>The number of open shards.</p>
    ///   - [`on_demand_stream_count(Option<i32>)`](crate::output::DescribeLimitsOutput::on_demand_stream_count): <p> Indicates the number of data streams with the on-demand capacity mode.</p>
    ///   - [`on_demand_stream_count_limit(Option<i32>)`](crate::output::DescribeLimitsOutput::on_demand_stream_count_limit): <p> The maximum number of data streams with the on-demand capacity mode. </p>
    /// - On failure, responds with [`SdkError<DescribeLimitsError>`](crate::error::DescribeLimitsError)
    pub fn describe_limits(&self) -> fluent_builders::DescribeLimits {
        fluent_builders::DescribeLimits::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`DescribeStream`](crate::client::fluent_builders::DescribeStream) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::DescribeStream::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::DescribeStream::set_stream_name): <p>The name of the stream to describe.</p>
    ///   - [`limit(i32)`](crate::client::fluent_builders::DescribeStream::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::DescribeStream::set_limit): <p>The maximum number of shards to return in a single call. The default value is 100. If you specify a value greater than 100, at most 100 results are returned.</p>
    ///   - [`exclusive_start_shard_id(impl Into<String>)`](crate::client::fluent_builders::DescribeStream::exclusive_start_shard_id) / [`set_exclusive_start_shard_id(Option<String>)`](crate::client::fluent_builders::DescribeStream::set_exclusive_start_shard_id): <p>The shard ID of the shard to start with.</p>  <p>Specify this parameter to indicate that you want to describe the stream starting with the shard whose ID immediately follows <code>ExclusiveStartShardId</code>.</p>  <p>If you don't specify this parameter, the default behavior for <code>DescribeStream</code> is to describe the stream starting with the first shard in the stream.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::DescribeStream::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::DescribeStream::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`DescribeStreamOutput`](crate::output::DescribeStreamOutput) with field(s):
    ///   - [`stream_description(Option<StreamDescription>)`](crate::output::DescribeStreamOutput::stream_description): <p>The current status of the stream, the stream Amazon Resource Name (ARN), an array of shard objects that comprise the stream, and whether there are more shards available.</p>
    /// - On failure, responds with [`SdkError<DescribeStreamError>`](crate::error::DescribeStreamError)
    pub fn describe_stream(&self) -> fluent_builders::DescribeStream {
        fluent_builders::DescribeStream::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`DescribeStreamConsumer`](crate::client::fluent_builders::DescribeStreamConsumer) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::DescribeStreamConsumer::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::DescribeStreamConsumer::set_stream_arn): <p>The ARN of the Kinesis data stream that the consumer is registered with. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
    ///   - [`consumer_name(impl Into<String>)`](crate::client::fluent_builders::DescribeStreamConsumer::consumer_name) / [`set_consumer_name(Option<String>)`](crate::client::fluent_builders::DescribeStreamConsumer::set_consumer_name): <p>The name that you gave to the consumer.</p>
    ///   - [`consumer_arn(impl Into<String>)`](crate::client::fluent_builders::DescribeStreamConsumer::consumer_arn) / [`set_consumer_arn(Option<String>)`](crate::client::fluent_builders::DescribeStreamConsumer::set_consumer_arn): <p>The ARN returned by Kinesis Data Streams when you registered the consumer.</p>
    /// - On success, responds with [`DescribeStreamConsumerOutput`](crate::output::DescribeStreamConsumerOutput) with field(s):
    ///   - [`consumer_description(Option<ConsumerDescription>)`](crate::output::DescribeStreamConsumerOutput::consumer_description): <p>An object that represents the details of the consumer.</p>
    /// - On failure, responds with [`SdkError<DescribeStreamConsumerError>`](crate::error::DescribeStreamConsumerError)
    pub fn describe_stream_consumer(&self) -> fluent_builders::DescribeStreamConsumer {
        fluent_builders::DescribeStreamConsumer::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`DescribeStreamSummary`](crate::client::fluent_builders::DescribeStreamSummary) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::DescribeStreamSummary::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::DescribeStreamSummary::set_stream_name): <p>The name of the stream to describe.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::DescribeStreamSummary::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::DescribeStreamSummary::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`DescribeStreamSummaryOutput`](crate::output::DescribeStreamSummaryOutput) with field(s):
    ///   - [`stream_description_summary(Option<StreamDescriptionSummary>)`](crate::output::DescribeStreamSummaryOutput::stream_description_summary): <p>A <code>StreamDescriptionSummary</code> containing information about the stream.</p>
    /// - On failure, responds with [`SdkError<DescribeStreamSummaryError>`](crate::error::DescribeStreamSummaryError)
    pub fn describe_stream_summary(&self) -> fluent_builders::DescribeStreamSummary {
        fluent_builders::DescribeStreamSummary::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`DisableEnhancedMonitoring`](crate::client::fluent_builders::DisableEnhancedMonitoring) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::DisableEnhancedMonitoring::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::DisableEnhancedMonitoring::set_stream_name): <p>The name of the Kinesis data stream for which to disable enhanced monitoring.</p>
    ///   - [`shard_level_metrics(Vec<MetricsName>)`](crate::client::fluent_builders::DisableEnhancedMonitoring::shard_level_metrics) / [`set_shard_level_metrics(Option<Vec<MetricsName>>)`](crate::client::fluent_builders::DisableEnhancedMonitoring::set_shard_level_metrics): <p>List of shard-level metrics to disable.</p>  <p>The following are the valid shard-level metrics. The value "<code>ALL</code>" disables every metric.</p>  <ul>   <li> <p> <code>IncomingBytes</code> </p> </li>   <li> <p> <code>IncomingRecords</code> </p> </li>   <li> <p> <code>OutgoingBytes</code> </p> </li>   <li> <p> <code>OutgoingRecords</code> </p> </li>   <li> <p> <code>WriteProvisionedThroughputExceeded</code> </p> </li>   <li> <p> <code>ReadProvisionedThroughputExceeded</code> </p> </li>   <li> <p> <code>IteratorAgeMilliseconds</code> </p> </li>   <li> <p> <code>ALL</code> </p> </li>  </ul>  <p>For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html">Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::DisableEnhancedMonitoring::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::DisableEnhancedMonitoring::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`DisableEnhancedMonitoringOutput`](crate::output::DisableEnhancedMonitoringOutput) with field(s):
    ///   - [`stream_name(Option<String>)`](crate::output::DisableEnhancedMonitoringOutput::stream_name): <p>The name of the Kinesis data stream.</p>
    ///   - [`current_shard_level_metrics(Option<Vec<MetricsName>>)`](crate::output::DisableEnhancedMonitoringOutput::current_shard_level_metrics): <p>Represents the current state of the metrics that are in the enhanced state before the operation.</p>
    ///   - [`desired_shard_level_metrics(Option<Vec<MetricsName>>)`](crate::output::DisableEnhancedMonitoringOutput::desired_shard_level_metrics): <p>Represents the list of all the metrics that would be in the enhanced state after the operation.</p>
    ///   - [`stream_arn(Option<String>)`](crate::output::DisableEnhancedMonitoringOutput::stream_arn): <p>The ARN of the stream.</p>
    /// - On failure, responds with [`SdkError<DisableEnhancedMonitoringError>`](crate::error::DisableEnhancedMonitoringError)
    pub fn disable_enhanced_monitoring(&self) -> fluent_builders::DisableEnhancedMonitoring {
        fluent_builders::DisableEnhancedMonitoring::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`EnableEnhancedMonitoring`](crate::client::fluent_builders::EnableEnhancedMonitoring) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::EnableEnhancedMonitoring::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::EnableEnhancedMonitoring::set_stream_name): <p>The name of the stream for which to enable enhanced monitoring.</p>
    ///   - [`shard_level_metrics(Vec<MetricsName>)`](crate::client::fluent_builders::EnableEnhancedMonitoring::shard_level_metrics) / [`set_shard_level_metrics(Option<Vec<MetricsName>>)`](crate::client::fluent_builders::EnableEnhancedMonitoring::set_shard_level_metrics): <p>List of shard-level metrics to enable.</p>  <p>The following are the valid shard-level metrics. The value "<code>ALL</code>" enables every metric.</p>  <ul>   <li> <p> <code>IncomingBytes</code> </p> </li>   <li> <p> <code>IncomingRecords</code> </p> </li>   <li> <p> <code>OutgoingBytes</code> </p> </li>   <li> <p> <code>OutgoingRecords</code> </p> </li>   <li> <p> <code>WriteProvisionedThroughputExceeded</code> </p> </li>   <li> <p> <code>ReadProvisionedThroughputExceeded</code> </p> </li>   <li> <p> <code>IteratorAgeMilliseconds</code> </p> </li>   <li> <p> <code>ALL</code> </p> </li>  </ul>  <p>For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html">Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::EnableEnhancedMonitoring::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::EnableEnhancedMonitoring::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`EnableEnhancedMonitoringOutput`](crate::output::EnableEnhancedMonitoringOutput) with field(s):
    ///   - [`stream_name(Option<String>)`](crate::output::EnableEnhancedMonitoringOutput::stream_name): <p>The name of the Kinesis data stream.</p>
    ///   - [`current_shard_level_metrics(Option<Vec<MetricsName>>)`](crate::output::EnableEnhancedMonitoringOutput::current_shard_level_metrics): <p>Represents the current state of the metrics that are in the enhanced state before the operation.</p>
    ///   - [`desired_shard_level_metrics(Option<Vec<MetricsName>>)`](crate::output::EnableEnhancedMonitoringOutput::desired_shard_level_metrics): <p>Represents the list of all the metrics that would be in the enhanced state after the operation.</p>
    ///   - [`stream_arn(Option<String>)`](crate::output::EnableEnhancedMonitoringOutput::stream_arn): <p>The ARN of the stream.</p>
    /// - On failure, responds with [`SdkError<EnableEnhancedMonitoringError>`](crate::error::EnableEnhancedMonitoringError)
    pub fn enable_enhanced_monitoring(&self) -> fluent_builders::EnableEnhancedMonitoring {
        fluent_builders::EnableEnhancedMonitoring::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`GetRecords`](crate::client::fluent_builders::GetRecords) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`shard_iterator(impl Into<String>)`](crate::client::fluent_builders::GetRecords::shard_iterator) / [`set_shard_iterator(Option<String>)`](crate::client::fluent_builders::GetRecords::set_shard_iterator): <p>The position in the shard from which you want to start sequentially reading data records. A shard iterator specifies this position using the sequence number of a data record in the shard.</p>
    ///   - [`limit(i32)`](crate::client::fluent_builders::GetRecords::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::GetRecords::set_limit): <p>The maximum number of records to return. Specify a value of up to 10,000. If you specify a value that is greater than 10,000, <code>GetRecords</code> throws <code>InvalidArgumentException</code>. The default value is 10,000.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::GetRecords::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::GetRecords::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`GetRecordsOutput`](crate::output::GetRecordsOutput) with field(s):
    ///   - [`records(Option<Vec<Record>>)`](crate::output::GetRecordsOutput::records): <p>The data records retrieved from the shard.</p>
    ///   - [`next_shard_iterator(Option<String>)`](crate::output::GetRecordsOutput::next_shard_iterator): <p>The next position in the shard from which to start sequentially reading data records. If set to <code>null</code>, the shard has been closed and the requested iterator does not return any more data. </p>
    ///   - [`millis_behind_latest(Option<i64>)`](crate::output::GetRecordsOutput::millis_behind_latest): <p>The number of milliseconds the <code>GetRecords</code> response is from the tip of the stream, indicating how far behind current time the consumer is. A value of zero indicates that record processing is caught up, and there are no new records to process at this moment.</p>
    ///   - [`child_shards(Option<Vec<ChildShard>>)`](crate::output::GetRecordsOutput::child_shards): <p>The list of the current shard's child shards, returned in the <code>GetRecords</code> API's response only when the end of the current shard is reached.</p>
    /// - On failure, responds with [`SdkError<GetRecordsError>`](crate::error::GetRecordsError)
    pub fn get_records(&self) -> fluent_builders::GetRecords {
        fluent_builders::GetRecords::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`GetShardIterator`](crate::client::fluent_builders::GetShardIterator) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::GetShardIterator::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::GetShardIterator::set_stream_name): <p>The name of the Amazon Kinesis data stream.</p>
    ///   - [`shard_id(impl Into<String>)`](crate::client::fluent_builders::GetShardIterator::shard_id) / [`set_shard_id(Option<String>)`](crate::client::fluent_builders::GetShardIterator::set_shard_id): <p>The shard ID of the Kinesis Data Streams shard to get the iterator for.</p>
    ///   - [`shard_iterator_type(ShardIteratorType)`](crate::client::fluent_builders::GetShardIterator::shard_iterator_type) / [`set_shard_iterator_type(Option<ShardIteratorType>)`](crate::client::fluent_builders::GetShardIterator::set_shard_iterator_type): <p>Determines how the shard iterator is used to start reading data records from the shard.</p>  <p>The following are the valid Amazon Kinesis shard iterator types:</p>  <ul>   <li> <p>AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific sequence number, provided in the value <code>StartingSequenceNumber</code>.</p> </li>   <li> <p>AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted by a specific sequence number, provided in the value <code>StartingSequenceNumber</code>.</p> </li>   <li> <p>AT_TIMESTAMP - Start reading from the position denoted by a specific time stamp, provided in the value <code>Timestamp</code>.</p> </li>   <li> <p>TRIM_HORIZON - Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard.</p> </li>   <li> <p>LATEST - Start reading just after the most recent record in the shard, so that you always read the most recent data in the shard.</p> </li>  </ul>
    ///   - [`starting_sequence_number(impl Into<String>)`](crate::client::fluent_builders::GetShardIterator::starting_sequence_number) / [`set_starting_sequence_number(Option<String>)`](crate::client::fluent_builders::GetShardIterator::set_starting_sequence_number): <p>The sequence number of the data record in the shard from which to start reading. Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER.</p>
    ///   - [`timestamp(DateTime)`](crate::client::fluent_builders::GetShardIterator::timestamp) / [`set_timestamp(Option<DateTime>)`](crate::client::fluent_builders::GetShardIterator::set_timestamp): <p>The time stamp of the data record from which to start reading. Used with shard iterator type AT_TIMESTAMP. A time stamp is the Unix epoch date with precision in milliseconds. For example, <code>2016-04-04T19:58:46.480-00:00</code> or <code>1459799926.480</code>. If a record with this exact time stamp does not exist, the iterator returned is for the next (later) record. If the time stamp is older than the current trim horizon, the iterator returned is for the oldest untrimmed data record (TRIM_HORIZON).</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::GetShardIterator::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::GetShardIterator::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`GetShardIteratorOutput`](crate::output::GetShardIteratorOutput) with field(s):
    ///   - [`shard_iterator(Option<String>)`](crate::output::GetShardIteratorOutput::shard_iterator): <p>The position in the shard from which to start reading data records sequentially. A shard iterator specifies this position using the sequence number of a data record in a shard.</p>
    /// - On failure, responds with [`SdkError<GetShardIteratorError>`](crate::error::GetShardIteratorError)
    pub fn get_shard_iterator(&self) -> fluent_builders::GetShardIterator {
        fluent_builders::GetShardIterator::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`IncreaseStreamRetentionPeriod`](crate::client::fluent_builders::IncreaseStreamRetentionPeriod) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::IncreaseStreamRetentionPeriod::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::IncreaseStreamRetentionPeriod::set_stream_name): <p>The name of the stream to modify.</p>
    ///   - [`retention_period_hours(i32)`](crate::client::fluent_builders::IncreaseStreamRetentionPeriod::retention_period_hours) / [`set_retention_period_hours(Option<i32>)`](crate::client::fluent_builders::IncreaseStreamRetentionPeriod::set_retention_period_hours): <p>The new retention period of the stream, in hours. Must be more than the current retention period.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::IncreaseStreamRetentionPeriod::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::IncreaseStreamRetentionPeriod::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`IncreaseStreamRetentionPeriodOutput`](crate::output::IncreaseStreamRetentionPeriodOutput)

    /// - On failure, responds with [`SdkError<IncreaseStreamRetentionPeriodError>`](crate::error::IncreaseStreamRetentionPeriodError)
    pub fn increase_stream_retention_period(
        &self,
    ) -> fluent_builders::IncreaseStreamRetentionPeriod {
        fluent_builders::IncreaseStreamRetentionPeriod::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`ListShards`](crate::client::fluent_builders::ListShards) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::ListShards::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::ListShards::set_stream_name): <p>The name of the data stream whose shards you want to list. </p>  <p>You cannot specify this parameter if you specify the <code>NextToken</code> parameter.</p>
    ///   - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListShards::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListShards::set_next_token): <p>When the number of shards in the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of shards in the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListShards</code> to list the next set of shards.</p>  <p>Don't specify <code>StreamName</code> or <code>StreamCreationTimestamp</code> if you specify <code>NextToken</code> because the latter unambiguously identifies the stream.</p>  <p>You can optionally specify a value for the <code>MaxResults</code> parameter when you specify <code>NextToken</code>. If you specify a <code>MaxResults</code> value that is less than the number of shards that the operation returns if you don't specify <code>MaxResults</code>, the response will contain a new <code>NextToken</code> value. You can use the new <code>NextToken</code> value in a subsequent call to the <code>ListShards</code> operation.</p> <important>   <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListShards</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListShards</code>, you get <code>ExpiredNextTokenException</code>.</p>  </important>
    ///   - [`exclusive_start_shard_id(impl Into<String>)`](crate::client::fluent_builders::ListShards::exclusive_start_shard_id) / [`set_exclusive_start_shard_id(Option<String>)`](crate::client::fluent_builders::ListShards::set_exclusive_start_shard_id): <p>Specify this parameter to indicate that you want to list the shards starting with the shard whose ID immediately follows <code>ExclusiveStartShardId</code>.</p>  <p>If you don't specify this parameter, the default behavior is for <code>ListShards</code> to list the shards starting with the first one in the stream.</p>  <p>You cannot specify this parameter if you specify <code>NextToken</code>.</p>
    ///   - [`max_results(i32)`](crate::client::fluent_builders::ListShards::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListShards::set_max_results): <p>The maximum number of shards to return in a single call to <code>ListShards</code>. The maximum number of shards to return in a single call. The default value is 1000. If you specify a value greater than 1000, at most 1000 results are returned. </p>  <p>When the number of shards to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>ListShards</code> to list the next set of shards.</p>
    ///   - [`stream_creation_timestamp(DateTime)`](crate::client::fluent_builders::ListShards::stream_creation_timestamp) / [`set_stream_creation_timestamp(Option<DateTime>)`](crate::client::fluent_builders::ListShards::set_stream_creation_timestamp): <p>Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the shards for.</p>  <p>You cannot specify this parameter if you specify the <code>NextToken</code> parameter.</p>
    ///   - [`shard_filter(ShardFilter)`](crate::client::fluent_builders::ListShards::shard_filter) / [`set_shard_filter(Option<ShardFilter>)`](crate::client::fluent_builders::ListShards::set_shard_filter): <p>Enables you to filter out the response of the <code>ListShards</code> API. You can only specify one filter at a time. </p>  <p>If you use the <code>ShardFilter</code> parameter when invoking the ListShards API, the <code>Type</code> is the required property and must be specified. If you specify the <code>AT_TRIM_HORIZON</code>, <code>FROM_TRIM_HORIZON</code>, or <code>AT_LATEST</code> types, you do not need to specify either the <code>ShardId</code> or the <code>Timestamp</code> optional properties. </p>  <p>If you specify the <code>AFTER_SHARD_ID</code> type, you must also provide the value for the optional <code>ShardId</code> property. The <code>ShardId</code> property is identical in fuctionality to the <code>ExclusiveStartShardId</code> parameter of the <code>ListShards</code> API. When <code>ShardId</code> property is specified, the response includes the shards starting with the shard whose ID immediately follows the <code>ShardId</code> that you provided. </p>  <p>If you specify the <code>AT_TIMESTAMP</code> or <code>FROM_TIMESTAMP_ID</code> type, you must also provide the value for the optional <code>Timestamp</code> property. If you specify the AT_TIMESTAMP type, then all shards that were open at the provided timestamp are returned. If you specify the FROM_TIMESTAMP type, then all shards starting from the provided timestamp to TIP are returned. </p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::ListShards::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::ListShards::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`ListShardsOutput`](crate::output::ListShardsOutput) with field(s):
    ///   - [`shards(Option<Vec<Shard>>)`](crate::output::ListShardsOutput::shards): <p>An array of JSON objects. Each object represents one shard and specifies the IDs of the shard, the shard's parent, and the shard that's adjacent to the shard's parent. Each object also contains the starting and ending hash keys and the starting and ending sequence numbers for the shard.</p>
    ///   - [`next_token(Option<String>)`](crate::output::ListShardsOutput::next_token): <p>When the number of shards in the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of shards in the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListShards</code> to list the next set of shards. For more information about the use of this pagination token when calling the <code>ListShards</code> operation, see <code>ListShardsInput$NextToken</code>.</p> <important>   <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListShards</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListShards</code>, you get <code>ExpiredNextTokenException</code>.</p>  </important>
    /// - On failure, responds with [`SdkError<ListShardsError>`](crate::error::ListShardsError)
    pub fn list_shards(&self) -> fluent_builders::ListShards {
        fluent_builders::ListShards::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`ListStreamConsumers`](crate::client::fluent_builders::ListStreamConsumers) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListStreamConsumers::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::ListStreamConsumers::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::ListStreamConsumers::set_stream_arn): <p>The ARN of the Kinesis data stream for which you want to list the registered consumers. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
    ///   - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListStreamConsumers::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListStreamConsumers::set_next_token): <p>When the number of consumers that are registered with the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of consumers that are registered with the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListStreamConsumers</code> to list the next set of registered consumers.</p>  <p>Don't specify <code>StreamName</code> or <code>StreamCreationTimestamp</code> if you specify <code>NextToken</code> because the latter unambiguously identifies the stream.</p>  <p>You can optionally specify a value for the <code>MaxResults</code> parameter when you specify <code>NextToken</code>. If you specify a <code>MaxResults</code> value that is less than the number of consumers that the operation returns if you don't specify <code>MaxResults</code>, the response will contain a new <code>NextToken</code> value. You can use the new <code>NextToken</code> value in a subsequent call to the <code>ListStreamConsumers</code> operation to list the next set of consumers.</p> <important>   <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListStreamConsumers</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListStreamConsumers</code>, you get <code>ExpiredNextTokenException</code>.</p>  </important>
    ///   - [`max_results(i32)`](crate::client::fluent_builders::ListStreamConsumers::max_results) / [`set_max_results(Option<i32>)`](crate::client::fluent_builders::ListStreamConsumers::set_max_results): <p>The maximum number of consumers that you want a single call of <code>ListStreamConsumers</code> to return. The default value is 100. If you specify a value greater than 100, at most 100 results are returned. </p>
    ///   - [`stream_creation_timestamp(DateTime)`](crate::client::fluent_builders::ListStreamConsumers::stream_creation_timestamp) / [`set_stream_creation_timestamp(Option<DateTime>)`](crate::client::fluent_builders::ListStreamConsumers::set_stream_creation_timestamp): <p>Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the consumers for. </p>  <p>You can't specify this parameter if you specify the NextToken parameter. </p>
    /// - On success, responds with [`ListStreamConsumersOutput`](crate::output::ListStreamConsumersOutput) with field(s):
    ///   - [`consumers(Option<Vec<Consumer>>)`](crate::output::ListStreamConsumersOutput::consumers): <p>An array of JSON objects. Each object represents one registered consumer.</p>
    ///   - [`next_token(Option<String>)`](crate::output::ListStreamConsumersOutput::next_token): <p>When the number of consumers that are registered with the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of registered consumers, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListStreamConsumers</code> to list the next set of registered consumers. For more information about the use of this pagination token when calling the <code>ListStreamConsumers</code> operation, see <code>ListStreamConsumersInput$NextToken</code>.</p> <important>   <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListStreamConsumers</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListStreamConsumers</code>, you get <code>ExpiredNextTokenException</code>.</p>  </important>
    /// - On failure, responds with [`SdkError<ListStreamConsumersError>`](crate::error::ListStreamConsumersError)
    pub fn list_stream_consumers(&self) -> fluent_builders::ListStreamConsumers {
        fluent_builders::ListStreamConsumers::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`ListStreams`](crate::client::fluent_builders::ListStreams) operation.
    /// This operation supports pagination; See [`into_paginator()`](crate::client::fluent_builders::ListStreams::into_paginator).
    ///
    /// - The fluent builder is configurable:
    ///   - [`limit(i32)`](crate::client::fluent_builders::ListStreams::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::ListStreams::set_limit): <p>The maximum number of streams to list. The default value is 100. If you specify a value greater than 100, at most 100 results are returned.</p>
    ///   - [`exclusive_start_stream_name(impl Into<String>)`](crate::client::fluent_builders::ListStreams::exclusive_start_stream_name) / [`set_exclusive_start_stream_name(Option<String>)`](crate::client::fluent_builders::ListStreams::set_exclusive_start_stream_name): <p>The name of the stream to start the list with.</p>
    ///   - [`next_token(impl Into<String>)`](crate::client::fluent_builders::ListStreams::next_token) / [`set_next_token(Option<String>)`](crate::client::fluent_builders::ListStreams::set_next_token): <p></p>
    /// - On success, responds with [`ListStreamsOutput`](crate::output::ListStreamsOutput) with field(s):
    ///   - [`stream_names(Option<Vec<String>>)`](crate::output::ListStreamsOutput::stream_names): <p>The names of the streams that are associated with the Amazon Web Services account making the <code>ListStreams</code> request.</p>
    ///   - [`has_more_streams(Option<bool>)`](crate::output::ListStreamsOutput::has_more_streams): <p>If set to <code>true</code>, there are more streams available to list.</p>
    ///   - [`next_token(Option<String>)`](crate::output::ListStreamsOutput::next_token): <p></p>
    ///   - [`stream_summaries(Option<Vec<StreamSummary>>)`](crate::output::ListStreamsOutput::stream_summaries): <p></p>
    /// - On failure, responds with [`SdkError<ListStreamsError>`](crate::error::ListStreamsError)
    pub fn list_streams(&self) -> fluent_builders::ListStreams {
        fluent_builders::ListStreams::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`ListTagsForStream`](crate::client::fluent_builders::ListTagsForStream) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::ListTagsForStream::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::ListTagsForStream::set_stream_name): <p>The name of the stream.</p>
    ///   - [`exclusive_start_tag_key(impl Into<String>)`](crate::client::fluent_builders::ListTagsForStream::exclusive_start_tag_key) / [`set_exclusive_start_tag_key(Option<String>)`](crate::client::fluent_builders::ListTagsForStream::set_exclusive_start_tag_key): <p>The key to use as the starting point for the list of tags. If this parameter is set, <code>ListTagsForStream</code> gets all tags that occur after <code>ExclusiveStartTagKey</code>. </p>
    ///   - [`limit(i32)`](crate::client::fluent_builders::ListTagsForStream::limit) / [`set_limit(Option<i32>)`](crate::client::fluent_builders::ListTagsForStream::set_limit): <p>The number of tags to return. If this number is less than the total number of tags associated with the stream, <code>HasMoreTags</code> is set to <code>true</code>. To list additional tags, set <code>ExclusiveStartTagKey</code> to the last key in the response.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::ListTagsForStream::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::ListTagsForStream::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`ListTagsForStreamOutput`](crate::output::ListTagsForStreamOutput) with field(s):
    ///   - [`tags(Option<Vec<Tag>>)`](crate::output::ListTagsForStreamOutput::tags): <p>A list of tags associated with <code>StreamName</code>, starting with the first tag after <code>ExclusiveStartTagKey</code> and up to the specified <code>Limit</code>. </p>
    ///   - [`has_more_tags(Option<bool>)`](crate::output::ListTagsForStreamOutput::has_more_tags): <p>If set to <code>true</code>, more tags are available. To request additional tags, set <code>ExclusiveStartTagKey</code> to the key of the last tag returned.</p>
    /// - On failure, responds with [`SdkError<ListTagsForStreamError>`](crate::error::ListTagsForStreamError)
    pub fn list_tags_for_stream(&self) -> fluent_builders::ListTagsForStream {
        fluent_builders::ListTagsForStream::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`MergeShards`](crate::client::fluent_builders::MergeShards) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::MergeShards::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::MergeShards::set_stream_name): <p>The name of the stream for the merge.</p>
    ///   - [`shard_to_merge(impl Into<String>)`](crate::client::fluent_builders::MergeShards::shard_to_merge) / [`set_shard_to_merge(Option<String>)`](crate::client::fluent_builders::MergeShards::set_shard_to_merge): <p>The shard ID of the shard to combine with the adjacent shard for the merge.</p>
    ///   - [`adjacent_shard_to_merge(impl Into<String>)`](crate::client::fluent_builders::MergeShards::adjacent_shard_to_merge) / [`set_adjacent_shard_to_merge(Option<String>)`](crate::client::fluent_builders::MergeShards::set_adjacent_shard_to_merge): <p>The shard ID of the adjacent shard for the merge.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::MergeShards::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::MergeShards::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`MergeShardsOutput`](crate::output::MergeShardsOutput)

    /// - On failure, responds with [`SdkError<MergeShardsError>`](crate::error::MergeShardsError)
    pub fn merge_shards(&self) -> fluent_builders::MergeShards {
        fluent_builders::MergeShards::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`PutRecord`](crate::client::fluent_builders::PutRecord) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::PutRecord::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::PutRecord::set_stream_name): <p>The name of the stream to put the data record into.</p>
    ///   - [`data(Blob)`](crate::client::fluent_builders::PutRecord::data) / [`set_data(Option<Blob>)`](crate::client::fluent_builders::PutRecord::set_data): <p>The data blob to put into the record, which is base64-encoded when the blob is serialized. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MiB).</p>
    ///   - [`partition_key(impl Into<String>)`](crate::client::fluent_builders::PutRecord::partition_key) / [`set_partition_key(Option<String>)`](crate::client::fluent_builders::PutRecord::set_partition_key): <p>Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis Data Streams uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.</p>
    ///   - [`explicit_hash_key(impl Into<String>)`](crate::client::fluent_builders::PutRecord::explicit_hash_key) / [`set_explicit_hash_key(Option<String>)`](crate::client::fluent_builders::PutRecord::set_explicit_hash_key): <p>The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.</p>
    ///   - [`sequence_number_for_ordering(impl Into<String>)`](crate::client::fluent_builders::PutRecord::sequence_number_for_ordering) / [`set_sequence_number_for_ordering(Option<String>)`](crate::client::fluent_builders::PutRecord::set_sequence_number_for_ordering): <p>Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key. Usage: set the <code>SequenceNumberForOrdering</code> of record <i>n</i> to the sequence number of record <i>n-1</i> (as returned in the result when putting record <i>n-1</i>). If this parameter is not set, records are coarsely ordered based on arrival time.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::PutRecord::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::PutRecord::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`PutRecordOutput`](crate::output::PutRecordOutput) with field(s):
    ///   - [`shard_id(Option<String>)`](crate::output::PutRecordOutput::shard_id): <p>The shard ID of the shard where the data record was placed.</p>
    ///   - [`sequence_number(Option<String>)`](crate::output::PutRecordOutput::sequence_number): <p>The sequence number identifier that was assigned to the put data record. The sequence number for the record is unique across all records in the stream. A sequence number is the identifier associated with every record put into the stream.</p>
    ///   - [`encryption_type(Option<EncryptionType>)`](crate::output::PutRecordOutput::encryption_type): <p>The encryption type to use on the record. This parameter can be one of the following values:</p>  <ul>   <li> <p> <code>NONE</code>: Do not encrypt the records in the stream.</p> </li>   <li> <p> <code>KMS</code>: Use server-side encryption on the records in the stream using a customer-managed Amazon Web Services KMS key.</p> </li>  </ul>
    /// - On failure, responds with [`SdkError<PutRecordError>`](crate::error::PutRecordError)
    pub fn put_record(&self) -> fluent_builders::PutRecord {
        fluent_builders::PutRecord::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`PutRecords`](crate::client::fluent_builders::PutRecords) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`records(Vec<PutRecordsRequestEntry>)`](crate::client::fluent_builders::PutRecords::records) / [`set_records(Option<Vec<PutRecordsRequestEntry>>)`](crate::client::fluent_builders::PutRecords::set_records): <p>The records associated with the request.</p>
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::PutRecords::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::PutRecords::set_stream_name): <p>The stream name associated with the request.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::PutRecords::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::PutRecords::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`PutRecordsOutput`](crate::output::PutRecordsOutput) with field(s):
    ///   - [`failed_record_count(Option<i32>)`](crate::output::PutRecordsOutput::failed_record_count): <p>The number of unsuccessfully processed records in a <code>PutRecords</code> request.</p>
    ///   - [`records(Option<Vec<PutRecordsResultEntry>>)`](crate::output::PutRecordsOutput::records): <p>An array of successfully and unsuccessfully processed record results. A record that is successfully added to a stream includes <code>SequenceNumber</code> and <code>ShardId</code> in the result. A record that fails to be added to a stream includes <code>ErrorCode</code> and <code>ErrorMessage</code> in the result.</p>
    ///   - [`encryption_type(Option<EncryptionType>)`](crate::output::PutRecordsOutput::encryption_type): <p>The encryption type used on the records. This parameter can be one of the following values:</p>  <ul>   <li> <p> <code>NONE</code>: Do not encrypt the records.</p> </li>   <li> <p> <code>KMS</code>: Use server-side encryption on the records using a customer-managed Amazon Web Services KMS key.</p> </li>  </ul>
    /// - On failure, responds with [`SdkError<PutRecordsError>`](crate::error::PutRecordsError)
    pub fn put_records(&self) -> fluent_builders::PutRecords {
        fluent_builders::PutRecords::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`RegisterStreamConsumer`](crate::client::fluent_builders::RegisterStreamConsumer) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::RegisterStreamConsumer::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::RegisterStreamConsumer::set_stream_arn): <p>The ARN of the Kinesis data stream that you want to register the consumer with. For more info, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
    ///   - [`consumer_name(impl Into<String>)`](crate::client::fluent_builders::RegisterStreamConsumer::consumer_name) / [`set_consumer_name(Option<String>)`](crate::client::fluent_builders::RegisterStreamConsumer::set_consumer_name): <p>For a given Kinesis data stream, each consumer must have a unique name. However, consumer names don't have to be unique across data streams.</p>
    /// - On success, responds with [`RegisterStreamConsumerOutput`](crate::output::RegisterStreamConsumerOutput) with field(s):
    ///   - [`consumer(Option<Consumer>)`](crate::output::RegisterStreamConsumerOutput::consumer): <p>An object that represents the details of the consumer you registered. When you register a consumer, it gets an ARN that is generated by Kinesis Data Streams.</p>
    /// - On failure, responds with [`SdkError<RegisterStreamConsumerError>`](crate::error::RegisterStreamConsumerError)
    pub fn register_stream_consumer(&self) -> fluent_builders::RegisterStreamConsumer {
        fluent_builders::RegisterStreamConsumer::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`RemoveTagsFromStream`](crate::client::fluent_builders::RemoveTagsFromStream) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::RemoveTagsFromStream::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::RemoveTagsFromStream::set_stream_name): <p>The name of the stream.</p>
    ///   - [`tag_keys(Vec<String>)`](crate::client::fluent_builders::RemoveTagsFromStream::tag_keys) / [`set_tag_keys(Option<Vec<String>>)`](crate::client::fluent_builders::RemoveTagsFromStream::set_tag_keys): <p>A list of tag keys. Each corresponding tag is removed from the stream.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::RemoveTagsFromStream::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::RemoveTagsFromStream::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`RemoveTagsFromStreamOutput`](crate::output::RemoveTagsFromStreamOutput)

    /// - On failure, responds with [`SdkError<RemoveTagsFromStreamError>`](crate::error::RemoveTagsFromStreamError)
    pub fn remove_tags_from_stream(&self) -> fluent_builders::RemoveTagsFromStream {
        fluent_builders::RemoveTagsFromStream::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`SplitShard`](crate::client::fluent_builders::SplitShard) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::SplitShard::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::SplitShard::set_stream_name): <p>The name of the stream for the shard split.</p>
    ///   - [`shard_to_split(impl Into<String>)`](crate::client::fluent_builders::SplitShard::shard_to_split) / [`set_shard_to_split(Option<String>)`](crate::client::fluent_builders::SplitShard::set_shard_to_split): <p>The shard ID of the shard to split.</p>
    ///   - [`new_starting_hash_key(impl Into<String>)`](crate::client::fluent_builders::SplitShard::new_starting_hash_key) / [`set_new_starting_hash_key(Option<String>)`](crate::client::fluent_builders::SplitShard::set_new_starting_hash_key): <p>A hash key value for the starting hash key of one of the child shards created by the split. The hash key range for a given shard constitutes a set of ordered contiguous positive integers. The value for <code>NewStartingHashKey</code> must be in the range of hash keys being mapped into the shard. The <code>NewStartingHashKey</code> hash key value and all higher hash key values in hash key range are distributed to one of the child shards. All the lower hash key values in the range are distributed to the other child shard.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::SplitShard::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::SplitShard::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`SplitShardOutput`](crate::output::SplitShardOutput)

    /// - On failure, responds with [`SdkError<SplitShardError>`](crate::error::SplitShardError)
    pub fn split_shard(&self) -> fluent_builders::SplitShard {
        fluent_builders::SplitShard::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`StartStreamEncryption`](crate::client::fluent_builders::StartStreamEncryption) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::StartStreamEncryption::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::StartStreamEncryption::set_stream_name): <p>The name of the stream for which to start encrypting records.</p>
    ///   - [`encryption_type(EncryptionType)`](crate::client::fluent_builders::StartStreamEncryption::encryption_type) / [`set_encryption_type(Option<EncryptionType>)`](crate::client::fluent_builders::StartStreamEncryption::set_encryption_type): <p>The encryption type to use. The only valid value is <code>KMS</code>.</p>
    ///   - [`key_id(impl Into<String>)`](crate::client::fluent_builders::StartStreamEncryption::key_id) / [`set_key_id(Option<String>)`](crate::client::fluent_builders::StartStreamEncryption::set_key_id): <p>The GUID for the customer-managed Amazon Web Services KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias <code>aws/kinesis</code>.</p>  <ul>   <li> <p>Key ARN example: <code>arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012</code> </p> </li>   <li> <p>Alias ARN example: <code>arn:aws:kms:us-east-1:123456789012:alias/MyAliasName</code> </p> </li>   <li> <p>Globally unique key ID example: <code>12345678-1234-1234-1234-123456789012</code> </p> </li>   <li> <p>Alias name example: <code>alias/MyAliasName</code> </p> </li>   <li> <p>Master key owned by Kinesis Data Streams: <code>alias/aws/kinesis</code> </p> </li>  </ul>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::StartStreamEncryption::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::StartStreamEncryption::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`StartStreamEncryptionOutput`](crate::output::StartStreamEncryptionOutput)

    /// - On failure, responds with [`SdkError<StartStreamEncryptionError>`](crate::error::StartStreamEncryptionError)
    pub fn start_stream_encryption(&self) -> fluent_builders::StartStreamEncryption {
        fluent_builders::StartStreamEncryption::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`StopStreamEncryption`](crate::client::fluent_builders::StopStreamEncryption) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::StopStreamEncryption::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::StopStreamEncryption::set_stream_name): <p>The name of the stream on which to stop encrypting records.</p>
    ///   - [`encryption_type(EncryptionType)`](crate::client::fluent_builders::StopStreamEncryption::encryption_type) / [`set_encryption_type(Option<EncryptionType>)`](crate::client::fluent_builders::StopStreamEncryption::set_encryption_type): <p>The encryption type. The only valid value is <code>KMS</code>.</p>
    ///   - [`key_id(impl Into<String>)`](crate::client::fluent_builders::StopStreamEncryption::key_id) / [`set_key_id(Option<String>)`](crate::client::fluent_builders::StopStreamEncryption::set_key_id): <p>The GUID for the customer-managed Amazon Web Services KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias <code>aws/kinesis</code>.</p>  <ul>   <li> <p>Key ARN example: <code>arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012</code> </p> </li>   <li> <p>Alias ARN example: <code>arn:aws:kms:us-east-1:123456789012:alias/MyAliasName</code> </p> </li>   <li> <p>Globally unique key ID example: <code>12345678-1234-1234-1234-123456789012</code> </p> </li>   <li> <p>Alias name example: <code>alias/MyAliasName</code> </p> </li>   <li> <p>Master key owned by Kinesis Data Streams: <code>alias/aws/kinesis</code> </p> </li>  </ul>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::StopStreamEncryption::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::StopStreamEncryption::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`StopStreamEncryptionOutput`](crate::output::StopStreamEncryptionOutput)

    /// - On failure, responds with [`SdkError<StopStreamEncryptionError>`](crate::error::StopStreamEncryptionError)
    pub fn stop_stream_encryption(&self) -> fluent_builders::StopStreamEncryption {
        fluent_builders::StopStreamEncryption::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`UpdateShardCount`](crate::client::fluent_builders::UpdateShardCount) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_name(impl Into<String>)`](crate::client::fluent_builders::UpdateShardCount::stream_name) / [`set_stream_name(Option<String>)`](crate::client::fluent_builders::UpdateShardCount::set_stream_name): <p>The name of the stream.</p>
    ///   - [`target_shard_count(i32)`](crate::client::fluent_builders::UpdateShardCount::target_shard_count) / [`set_target_shard_count(Option<i32>)`](crate::client::fluent_builders::UpdateShardCount::set_target_shard_count): <p>The new number of shards. This value has the following default limits. By default, you cannot do the following: </p>  <ul>   <li> <p>Set this value to more than double your current shard count for a stream.</p> </li>   <li> <p>Set this value below half your current shard count for a stream.</p> </li>   <li> <p>Set this value to more than 10000 shards in a stream (the default limit for shard count per stream is 10000 per account per region), unless you request a limit increase.</p> </li>   <li> <p>Scale a stream with more than 10000 shards down unless you set this value to less than 10000 shards.</p> </li>  </ul>
    ///   - [`scaling_type(ScalingType)`](crate::client::fluent_builders::UpdateShardCount::scaling_type) / [`set_scaling_type(Option<ScalingType>)`](crate::client::fluent_builders::UpdateShardCount::set_scaling_type): <p>The scaling type. Uniform scaling creates shards of equal size.</p>
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::UpdateShardCount::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::UpdateShardCount::set_stream_arn): <p>The ARN of the stream.</p>
    /// - On success, responds with [`UpdateShardCountOutput`](crate::output::UpdateShardCountOutput) with field(s):
    ///   - [`stream_name(Option<String>)`](crate::output::UpdateShardCountOutput::stream_name): <p>The name of the stream.</p>
    ///   - [`current_shard_count(Option<i32>)`](crate::output::UpdateShardCountOutput::current_shard_count): <p>The current number of shards.</p>
    ///   - [`target_shard_count(Option<i32>)`](crate::output::UpdateShardCountOutput::target_shard_count): <p>The updated number of shards.</p>
    ///   - [`stream_arn(Option<String>)`](crate::output::UpdateShardCountOutput::stream_arn): <p>The ARN of the stream.</p>
    /// - On failure, responds with [`SdkError<UpdateShardCountError>`](crate::error::UpdateShardCountError)
    pub fn update_shard_count(&self) -> fluent_builders::UpdateShardCount {
        fluent_builders::UpdateShardCount::new(self.handle.clone())
    }
    /// Constructs a fluent builder for the [`UpdateStreamMode`](crate::client::fluent_builders::UpdateStreamMode) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`stream_arn(impl Into<String>)`](crate::client::fluent_builders::UpdateStreamMode::stream_arn) / [`set_stream_arn(Option<String>)`](crate::client::fluent_builders::UpdateStreamMode::set_stream_arn): <p> Specifies the ARN of the data stream whose capacity mode you want to update. </p>
    ///   - [`stream_mode_details(StreamModeDetails)`](crate::client::fluent_builders::UpdateStreamMode::stream_mode_details) / [`set_stream_mode_details(Option<StreamModeDetails>)`](crate::client::fluent_builders::UpdateStreamMode::set_stream_mode_details): <p> Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an <b>on-demand</b> capacity mode and a <b>provisioned</b> capacity mode for your data streams. </p>
    /// - On success, responds with [`UpdateStreamModeOutput`](crate::output::UpdateStreamModeOutput)

    /// - On failure, responds with [`SdkError<UpdateStreamModeError>`](crate::error::UpdateStreamModeError)
    pub fn update_stream_mode(&self) -> fluent_builders::UpdateStreamMode {
        fluent_builders::UpdateStreamMode::new(self.handle.clone())
    }
}
pub mod fluent_builders {

    //! Utilities to ergonomically construct a request to the service.
    //!
    //! Fluent builders are created through the [`Client`](crate::client::Client) by calling
    //! one if its operation methods. After parameters are set using the builder methods,
    //! the `send` method can be called to initiate the request.
    /// Fluent builder constructing a request to `AddTagsToStream`.
    ///
    /// <p>Adds or updates tags for the specified Kinesis data stream. You can assign up to 50 tags to a data stream.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>If tags have already been assigned to the stream, <code>AddTagsToStream</code> overwrites any existing tags that correspond to the specified tag keys.</p>
    /// <p> <code>AddTagsToStream</code> has a limit of five transactions per second per account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct AddTagsToStream {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::add_tags_to_stream_input::Builder,
    }
    impl AddTagsToStream {
        /// Creates a new `AddTagsToStream`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::AddTagsToStream,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::AddTagsToStreamError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::AddTagsToStreamOutput,
            aws_smithy_http::result::SdkError<crate::error::AddTagsToStreamError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// Adds a key-value pair to `Tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>A set of up to 10 key-value pairs to use to create the tags.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            self.inner = self.inner.tags(k.into(), v.into());
            self
        }
        /// <p>A set of up to 10 key-value pairs to use to create the tags.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.inner = self.inner.set_tags(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `CreateStream`.
    ///
    /// <p>Creates a Kinesis data stream. A stream captures and transports data records that are continuously emitted from different data sources or <i>producers</i>. Scale-out within a stream is explicitly supported by means of shards, which are uniquely identified groups of data records in a stream.</p>
    /// <p>You can create your data stream using either on-demand or provisioned capacity mode. Data streams with an on-demand mode require no capacity planning and automatically scale to handle gigabytes of write and read throughput per minute. With the on-demand mode, Kinesis Data Streams automatically manages the shards in order to provide the necessary throughput. For the data streams with a provisioned mode, you must specify the number of shards for the data stream. Each shard can support reads up to five transactions per second, up to a maximum data read total of 2 MiB per second. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per second. If the amount of data input increases or decreases, you can add or remove shards.</p>
    /// <p>The stream name identifies the stream. The name is scoped to the Amazon Web Services account used by the application. It is also scoped by Amazon Web Services Region. That is, two streams in two different accounts can have the same name, and two streams in the same account, but in two different Regions, can have the same name.</p>
    /// <p> <code>CreateStream</code> is an asynchronous operation. Upon receiving a <code>CreateStream</code> request, Kinesis Data Streams immediately returns and sets the stream status to <code>CREATING</code>. After the stream is created, Kinesis Data Streams sets the stream status to <code>ACTIVE</code>. You should perform read and write operations only on an <code>ACTIVE</code> stream. </p>
    /// <p>You receive a <code>LimitExceededException</code> when making a <code>CreateStream</code> request when you try to do one of the following:</p>
    /// <ul>
    /// <li> <p>Have more than five streams in the <code>CREATING</code> state at any point in time.</p> </li>
    /// <li> <p>Create more shards than are authorized for your account.</p> </li>
    /// </ul>
    /// <p>For the default shard limit for an Amazon Web Services account, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Amazon Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>. To increase this limit, <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">contact Amazon Web Services Support</a>.</p>
    /// <p>You can use <code>DescribeStreamSummary</code> to check the stream status, which is returned in <code>StreamStatus</code>.</p>
    /// <p> <code>CreateStream</code> has a limit of five transactions per second per account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct CreateStream {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::create_stream_input::Builder,
    }
    impl CreateStream {
        /// Creates a new `CreateStream`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::CreateStream,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::CreateStreamError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::CreateStreamOutput,
            aws_smithy_http::result::SdkError<crate::error::CreateStreamError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>A name to identify the stream. The stream name is scoped to the Amazon Web Services account used by the application that creates the stream. It is also scoped by Amazon Web Services Region. That is, two streams in two different Amazon Web Services accounts can have the same name. Two streams in the same Amazon Web Services account but in two different Regions can also have the same name.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>A name to identify the stream. The stream name is scoped to the Amazon Web Services account used by the application that creates the stream. It is also scoped by Amazon Web Services Region. That is, two streams in two different Amazon Web Services accounts can have the same name. Two streams in the same Amazon Web Services account but in two different Regions can also have the same name.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The number of shards that the stream will use. The throughput of the stream is a function of the number of shards; more shards are required for greater provisioned throughput.</p>
        pub fn shard_count(mut self, input: i32) -> Self {
            self.inner = self.inner.shard_count(input);
            self
        }
        /// <p>The number of shards that the stream will use. The throughput of the stream is a function of the number of shards; more shards are required for greater provisioned throughput.</p>
        pub fn set_shard_count(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_shard_count(input);
            self
        }
        /// <p> Indicates the capacity mode of the data stream. Currently, in Kinesis Data Streams, you can choose between an <b>on-demand</b> capacity mode and a <b>provisioned</b> capacity mode for your data streams.</p>
        pub fn stream_mode_details(mut self, input: crate::model::StreamModeDetails) -> Self {
            self.inner = self.inner.stream_mode_details(input);
            self
        }
        /// <p> Indicates the capacity mode of the data stream. Currently, in Kinesis Data Streams, you can choose between an <b>on-demand</b> capacity mode and a <b>provisioned</b> capacity mode for your data streams.</p>
        pub fn set_stream_mode_details(
            mut self,
            input: std::option::Option<crate::model::StreamModeDetails>,
        ) -> Self {
            self.inner = self.inner.set_stream_mode_details(input);
            self
        }
    }
    /// Fluent builder constructing a request to `DecreaseStreamRetentionPeriod`.
    ///
    /// <p>Decreases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream. The minimum value of a stream's retention period is 24 hours.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>This operation may result in lost data. For example, if the stream's retention period is 48 hours and is decreased to 24 hours, any data already in the stream that is older than 24 hours is inaccessible.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct DecreaseStreamRetentionPeriod {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::decrease_stream_retention_period_input::Builder,
    }
    impl DecreaseStreamRetentionPeriod {
        /// Creates a new `DecreaseStreamRetentionPeriod`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::DecreaseStreamRetentionPeriod,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::DecreaseStreamRetentionPeriodError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DecreaseStreamRetentionPeriodOutput,
            aws_smithy_http::result::SdkError<crate::error::DecreaseStreamRetentionPeriodError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream to modify.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream to modify.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The new retention period of the stream, in hours. Must be less than the current retention period.</p>
        pub fn retention_period_hours(mut self, input: i32) -> Self {
            self.inner = self.inner.retention_period_hours(input);
            self
        }
        /// <p>The new retention period of the stream, in hours. Must be less than the current retention period.</p>
        pub fn set_retention_period_hours(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_retention_period_hours(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `DeleteStream`.
    ///
    /// <p>Deletes a Kinesis data stream and all its shards and data. You must shut down any applications that are operating on the stream before you delete the stream. If an application attempts to operate on a deleted stream, it receives the exception <code>ResourceNotFoundException</code>.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>If the stream is in the <code>ACTIVE</code> state, you can delete it. After a <code>DeleteStream</code> request, the specified stream is in the <code>DELETING</code> state until Kinesis Data Streams completes the deletion.</p>
    /// <p> <b>Note:</b> Kinesis Data Streams might continue to accept data read and write operations, such as <code>PutRecord</code>, <code>PutRecords</code>, and <code>GetRecords</code>, on a stream in the <code>DELETING</code> state until the stream deletion is complete.</p>
    /// <p>When you delete a stream, any shards in that stream are also deleted, and any tags are dissociated from the stream.</p>
    /// <p>You can use the <code>DescribeStreamSummary</code> operation to check the state of the stream, which is returned in <code>StreamStatus</code>.</p>
    /// <p> <code>DeleteStream</code> has a limit of five transactions per second per account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct DeleteStream {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::delete_stream_input::Builder,
    }
    impl DeleteStream {
        /// Creates a new `DeleteStream`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::DeleteStream,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::DeleteStreamError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DeleteStreamOutput,
            aws_smithy_http::result::SdkError<crate::error::DeleteStreamError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream to delete.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream to delete.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>If this parameter is unset (<code>null</code>) or if you set it to <code>false</code>, and the stream has registered consumers, the call to <code>DeleteStream</code> fails with a <code>ResourceInUseException</code>. </p>
        pub fn enforce_consumer_deletion(mut self, input: bool) -> Self {
            self.inner = self.inner.enforce_consumer_deletion(input);
            self
        }
        /// <p>If this parameter is unset (<code>null</code>) or if you set it to <code>false</code>, and the stream has registered consumers, the call to <code>DeleteStream</code> fails with a <code>ResourceInUseException</code>. </p>
        pub fn set_enforce_consumer_deletion(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_enforce_consumer_deletion(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `DeregisterStreamConsumer`.
    ///
    /// <p>To deregister a consumer, provide its ARN. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to deregister, you can use the <code>ListStreamConsumers</code> operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its name and ARN.</p>
    /// <p>This operation has a limit of five transactions per second per stream.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct DeregisterStreamConsumer {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::deregister_stream_consumer_input::Builder,
    }
    impl DeregisterStreamConsumer {
        /// Creates a new `DeregisterStreamConsumer`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::DeregisterStreamConsumer,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::DeregisterStreamConsumerError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DeregisterStreamConsumerOutput,
            aws_smithy_http::result::SdkError<crate::error::DeregisterStreamConsumerError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the Kinesis data stream that the consumer is registered with. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the Kinesis data stream that the consumer is registered with. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
        /// <p>The name that you gave to the consumer.</p>
        pub fn consumer_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.consumer_name(input.into());
            self
        }
        /// <p>The name that you gave to the consumer.</p>
        pub fn set_consumer_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_consumer_name(input);
            self
        }
        /// <p>The ARN returned by Kinesis Data Streams when you registered the consumer. If you don't know the ARN of the consumer that you want to deregister, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its ARN.</p>
        pub fn consumer_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.consumer_arn(input.into());
            self
        }
        /// <p>The ARN returned by Kinesis Data Streams when you registered the consumer. If you don't know the ARN of the consumer that you want to deregister, you can use the ListStreamConsumers operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream. The description of a consumer contains its ARN.</p>
        pub fn set_consumer_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_consumer_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `DescribeLimits`.
    ///
    /// <p>Describes the shard limits and usage for the account.</p>
    /// <p>If you update your account limits, the old limits might be returned for a few minutes.</p>
    /// <p>This operation has a limit of one transaction per second per account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct DescribeLimits {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::describe_limits_input::Builder,
    }
    impl DescribeLimits {
        /// Creates a new `DescribeLimits`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::DescribeLimits,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::DescribeLimitsError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DescribeLimitsOutput,
            aws_smithy_http::result::SdkError<crate::error::DescribeLimitsError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
    }
    /// Fluent builder constructing a request to `DescribeStream`.
    ///
    /// <p>Describes the specified Kinesis data stream.</p> <note>
    /// <p>This API has been revised. It's highly recommended that you use the <code>DescribeStreamSummary</code> API to get a summarized description of the specified Kinesis data stream and the <code>ListShards</code> API to list the shards in a specified data stream and obtain information about each shard. </p>
    /// </note> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>The information returned includes the stream name, Amazon Resource Name (ARN), creation time, enhanced metric configuration, and shard map. The shard map is an array of shard objects. For each shard object, there is the hash key and sequence number ranges that the shard spans, and the IDs of any earlier shards that played in a role in creating the shard. Every record ingested in the stream is identified by a sequence number, which is assigned when the record is put into the stream.</p>
    /// <p>You can limit the number of shards returned by each call. For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-retrieve-shards.html">Retrieving Shards from a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
    /// <p>There are no guarantees about the chronological order shards returned. To process shards in chronological order, use the ID of the parent shard to track the lineage to the oldest shard.</p>
    /// <p>This operation has a limit of 10 transactions per second per account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct DescribeStream {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::describe_stream_input::Builder,
    }
    impl DescribeStream {
        /// Creates a new `DescribeStream`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::DescribeStream,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::DescribeStreamError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DescribeStreamOutput,
            aws_smithy_http::result::SdkError<crate::error::DescribeStreamError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream to describe.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream to describe.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The maximum number of shards to return in a single call. The default value is 100. If you specify a value greater than 100, at most 100 results are returned.</p>
        pub fn limit(mut self, input: i32) -> Self {
            self.inner = self.inner.limit(input);
            self
        }
        /// <p>The maximum number of shards to return in a single call. The default value is 100. If you specify a value greater than 100, at most 100 results are returned.</p>
        pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_limit(input);
            self
        }
        /// <p>The shard ID of the shard to start with.</p>
        /// <p>Specify this parameter to indicate that you want to describe the stream starting with the shard whose ID immediately follows <code>ExclusiveStartShardId</code>.</p>
        /// <p>If you don't specify this parameter, the default behavior for <code>DescribeStream</code> is to describe the stream starting with the first shard in the stream.</p>
        pub fn exclusive_start_shard_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.exclusive_start_shard_id(input.into());
            self
        }
        /// <p>The shard ID of the shard to start with.</p>
        /// <p>Specify this parameter to indicate that you want to describe the stream starting with the shard whose ID immediately follows <code>ExclusiveStartShardId</code>.</p>
        /// <p>If you don't specify this parameter, the default behavior for <code>DescribeStream</code> is to describe the stream starting with the first shard in the stream.</p>
        pub fn set_exclusive_start_shard_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_exclusive_start_shard_id(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `DescribeStreamConsumer`.
    ///
    /// <p>To get the description of a registered consumer, provide the ARN of the consumer. Alternatively, you can provide the ARN of the data stream and the name you gave the consumer when you registered it. You may also provide all three parameters, as long as they don't conflict with each other. If you don't know the name or ARN of the consumer that you want to describe, you can use the <code>ListStreamConsumers</code> operation to get a list of the descriptions of all the consumers that are currently registered with a given data stream.</p>
    /// <p>This operation has a limit of 20 transactions per second per stream.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct DescribeStreamConsumer {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::describe_stream_consumer_input::Builder,
    }
    impl DescribeStreamConsumer {
        /// Creates a new `DescribeStreamConsumer`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::DescribeStreamConsumer,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::DescribeStreamConsumerError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DescribeStreamConsumerOutput,
            aws_smithy_http::result::SdkError<crate::error::DescribeStreamConsumerError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the Kinesis data stream that the consumer is registered with. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the Kinesis data stream that the consumer is registered with. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
        /// <p>The name that you gave to the consumer.</p>
        pub fn consumer_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.consumer_name(input.into());
            self
        }
        /// <p>The name that you gave to the consumer.</p>
        pub fn set_consumer_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_consumer_name(input);
            self
        }
        /// <p>The ARN returned by Kinesis Data Streams when you registered the consumer.</p>
        pub fn consumer_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.consumer_arn(input.into());
            self
        }
        /// <p>The ARN returned by Kinesis Data Streams when you registered the consumer.</p>
        pub fn set_consumer_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_consumer_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `DescribeStreamSummary`.
    ///
    /// <p>Provides a summarized description of the specified Kinesis data stream without the shard list.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>The information returned includes the stream name, Amazon Resource Name (ARN), status, record retention period, approximate creation time, monitoring, encryption details, and open shard count. </p>
    /// <p> <code>DescribeStreamSummary</code> has a limit of 20 transactions per second per account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct DescribeStreamSummary {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::describe_stream_summary_input::Builder,
    }
    impl DescribeStreamSummary {
        /// Creates a new `DescribeStreamSummary`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::DescribeStreamSummary,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::DescribeStreamSummaryError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DescribeStreamSummaryOutput,
            aws_smithy_http::result::SdkError<crate::error::DescribeStreamSummaryError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream to describe.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream to describe.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `DisableEnhancedMonitoring`.
    ///
    /// <p>Disables enhanced monitoring.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct DisableEnhancedMonitoring {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::disable_enhanced_monitoring_input::Builder,
    }
    impl DisableEnhancedMonitoring {
        /// Creates a new `DisableEnhancedMonitoring`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::DisableEnhancedMonitoring,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::DisableEnhancedMonitoringError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::DisableEnhancedMonitoringOutput,
            aws_smithy_http::result::SdkError<crate::error::DisableEnhancedMonitoringError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the Kinesis data stream for which to disable enhanced monitoring.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the Kinesis data stream for which to disable enhanced monitoring.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// Appends an item to `ShardLevelMetrics`.
        ///
        /// To override the contents of this collection use [`set_shard_level_metrics`](Self::set_shard_level_metrics).
        ///
        /// <p>List of shard-level metrics to disable.</p>
        /// <p>The following are the valid shard-level metrics. The value "<code>ALL</code>" disables every metric.</p>
        /// <ul>
        /// <li> <p> <code>IncomingBytes</code> </p> </li>
        /// <li> <p> <code>IncomingRecords</code> </p> </li>
        /// <li> <p> <code>OutgoingBytes</code> </p> </li>
        /// <li> <p> <code>OutgoingRecords</code> </p> </li>
        /// <li> <p> <code>WriteProvisionedThroughputExceeded</code> </p> </li>
        /// <li> <p> <code>ReadProvisionedThroughputExceeded</code> </p> </li>
        /// <li> <p> <code>IteratorAgeMilliseconds</code> </p> </li>
        /// <li> <p> <code>ALL</code> </p> </li>
        /// </ul>
        /// <p>For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html">Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
        pub fn shard_level_metrics(mut self, input: crate::model::MetricsName) -> Self {
            self.inner = self.inner.shard_level_metrics(input);
            self
        }
        /// <p>List of shard-level metrics to disable.</p>
        /// <p>The following are the valid shard-level metrics. The value "<code>ALL</code>" disables every metric.</p>
        /// <ul>
        /// <li> <p> <code>IncomingBytes</code> </p> </li>
        /// <li> <p> <code>IncomingRecords</code> </p> </li>
        /// <li> <p> <code>OutgoingBytes</code> </p> </li>
        /// <li> <p> <code>OutgoingRecords</code> </p> </li>
        /// <li> <p> <code>WriteProvisionedThroughputExceeded</code> </p> </li>
        /// <li> <p> <code>ReadProvisionedThroughputExceeded</code> </p> </li>
        /// <li> <p> <code>IteratorAgeMilliseconds</code> </p> </li>
        /// <li> <p> <code>ALL</code> </p> </li>
        /// </ul>
        /// <p>For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html">Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
        pub fn set_shard_level_metrics(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::MetricsName>>,
        ) -> Self {
            self.inner = self.inner.set_shard_level_metrics(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `EnableEnhancedMonitoring`.
    ///
    /// <p>Enables enhanced Kinesis data stream monitoring for shard-level metrics.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct EnableEnhancedMonitoring {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::enable_enhanced_monitoring_input::Builder,
    }
    impl EnableEnhancedMonitoring {
        /// Creates a new `EnableEnhancedMonitoring`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::EnableEnhancedMonitoring,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::EnableEnhancedMonitoringError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::EnableEnhancedMonitoringOutput,
            aws_smithy_http::result::SdkError<crate::error::EnableEnhancedMonitoringError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream for which to enable enhanced monitoring.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream for which to enable enhanced monitoring.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// Appends an item to `ShardLevelMetrics`.
        ///
        /// To override the contents of this collection use [`set_shard_level_metrics`](Self::set_shard_level_metrics).
        ///
        /// <p>List of shard-level metrics to enable.</p>
        /// <p>The following are the valid shard-level metrics. The value "<code>ALL</code>" enables every metric.</p>
        /// <ul>
        /// <li> <p> <code>IncomingBytes</code> </p> </li>
        /// <li> <p> <code>IncomingRecords</code> </p> </li>
        /// <li> <p> <code>OutgoingBytes</code> </p> </li>
        /// <li> <p> <code>OutgoingRecords</code> </p> </li>
        /// <li> <p> <code>WriteProvisionedThroughputExceeded</code> </p> </li>
        /// <li> <p> <code>ReadProvisionedThroughputExceeded</code> </p> </li>
        /// <li> <p> <code>IteratorAgeMilliseconds</code> </p> </li>
        /// <li> <p> <code>ALL</code> </p> </li>
        /// </ul>
        /// <p>For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html">Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
        pub fn shard_level_metrics(mut self, input: crate::model::MetricsName) -> Self {
            self.inner = self.inner.shard_level_metrics(input);
            self
        }
        /// <p>List of shard-level metrics to enable.</p>
        /// <p>The following are the valid shard-level metrics. The value "<code>ALL</code>" enables every metric.</p>
        /// <ul>
        /// <li> <p> <code>IncomingBytes</code> </p> </li>
        /// <li> <p> <code>IncomingRecords</code> </p> </li>
        /// <li> <p> <code>OutgoingBytes</code> </p> </li>
        /// <li> <p> <code>OutgoingRecords</code> </p> </li>
        /// <li> <p> <code>WriteProvisionedThroughputExceeded</code> </p> </li>
        /// <li> <p> <code>ReadProvisionedThroughputExceeded</code> </p> </li>
        /// <li> <p> <code>IteratorAgeMilliseconds</code> </p> </li>
        /// <li> <p> <code>ALL</code> </p> </li>
        /// </ul>
        /// <p>For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/monitoring-with-cloudwatch.html">Monitoring the Amazon Kinesis Data Streams Service with Amazon CloudWatch</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
        pub fn set_shard_level_metrics(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::MetricsName>>,
        ) -> Self {
            self.inner = self.inner.set_shard_level_metrics(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `GetRecords`.
    ///
    /// <p>Gets data records from a Kinesis data stream's shard.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter in addition to the <code>ShardIterator</code> parameter.</p>
    /// </note>
    /// <p>Specify a shard iterator using the <code>ShardIterator</code> parameter. The shard iterator specifies the position in the shard from which you want to start reading data records sequentially. If there are no records available in the portion of the shard that the iterator points to, <code>GetRecords</code> returns an empty list. It might take multiple calls to get to a portion of the shard that contains records.</p>
    /// <p>You can scale by provisioning multiple shards per stream while considering service limits (for more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Amazon Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>). Your application should have one thread per shard, each reading continuously from its stream. To read from a stream continually, call <code>GetRecords</code> in a loop. Use <code>GetShardIterator</code> to get the shard iterator to specify in the first <code>GetRecords</code> call. <code>GetRecords</code> returns a new shard iterator in <code>NextShardIterator</code>. Specify the shard iterator returned in <code>NextShardIterator</code> in subsequent calls to <code>GetRecords</code>. If the shard has been closed, the shard iterator can't return more data and <code>GetRecords</code> returns <code>null</code> in <code>NextShardIterator</code>. You can terminate the loop when the shard is closed, or when the shard iterator reaches the record with the sequence number or other attribute that marks it as the last record to process.</p>
    /// <p>Each data record can be up to 1 MiB in size, and each shard can read up to 2 MiB per second. You can ensure that your calls don't exceed the maximum supported size or throughput by using the <code>Limit</code> parameter to specify the maximum number of records that <code>GetRecords</code> can return. Consider your average record size when determining this limit. The maximum number of records that can be returned per call is 10,000.</p>
    /// <p>The size of the data returned by <code>GetRecords</code> varies depending on the utilization of the shard. It is recommended that consumer applications retrieve records via the <code>GetRecords</code> command using the 5 TPS limit to remain caught up. Retrieving records less frequently can lead to consumer applications falling behind. The maximum size of data that <code>GetRecords</code> can return is 10 MiB. If a call returns this amount of data, subsequent calls made within the next 5 seconds throw <code>ProvisionedThroughputExceededException</code>. If there is insufficient provisioned throughput on the stream, subsequent calls made within the next 1 second throw <code>ProvisionedThroughputExceededException</code>. <code>GetRecords</code> doesn't return any data when it throws an exception. For this reason, we recommend that you wait 1 second between calls to <code>GetRecords</code>. However, it's possible that the application will get exceptions for longer than 1 second.</p>
    /// <p>To detect whether the application is falling behind in processing, you can use the <code>MillisBehindLatest</code> response attribute. You can also monitor the stream using CloudWatch metrics and other mechanisms (see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/monitoring.html">Monitoring</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>).</p>
    /// <p>Each Amazon Kinesis record includes a value, <code>ApproximateArrivalTimestamp</code>, that is set when a stream successfully receives and stores a record. This is commonly referred to as a server-side time stamp, whereas a client-side time stamp is set when a data producer creates or sends the record to a stream (a data producer is any data source putting data records into a stream, for example with <code>PutRecords</code>). The time stamp has millisecond precision. There are no guarantees about the time stamp accuracy, or that the time stamp is always increasing. For example, records in a shard or across a stream might have time stamps that are out of order.</p>
    /// <p>This operation has a limit of five transactions per second per shard.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct GetRecords {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::get_records_input::Builder,
    }
    impl GetRecords {
        /// Creates a new `GetRecords`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::GetRecords,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::GetRecordsError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::GetRecordsOutput,
            aws_smithy_http::result::SdkError<crate::error::GetRecordsError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The position in the shard from which you want to start sequentially reading data records. A shard iterator specifies this position using the sequence number of a data record in the shard.</p>
        pub fn shard_iterator(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.shard_iterator(input.into());
            self
        }
        /// <p>The position in the shard from which you want to start sequentially reading data records. A shard iterator specifies this position using the sequence number of a data record in the shard.</p>
        pub fn set_shard_iterator(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_shard_iterator(input);
            self
        }
        /// <p>The maximum number of records to return. Specify a value of up to 10,000. If you specify a value that is greater than 10,000, <code>GetRecords</code> throws <code>InvalidArgumentException</code>. The default value is 10,000.</p>
        pub fn limit(mut self, input: i32) -> Self {
            self.inner = self.inner.limit(input);
            self
        }
        /// <p>The maximum number of records to return. Specify a value of up to 10,000. If you specify a value that is greater than 10,000, <code>GetRecords</code> throws <code>InvalidArgumentException</code>. The default value is 10,000.</p>
        pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_limit(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `GetShardIterator`.
    ///
    /// <p>Gets an Amazon Kinesis shard iterator. A shard iterator expires 5 minutes after it is returned to the requester.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>A shard iterator specifies the shard position from which to start reading data records sequentially. The position is specified using the sequence number of a data record in a shard. A sequence number is the identifier associated with every record ingested in the stream, and is assigned when a record is put into the stream. Each stream has one or more shards.</p>
    /// <p>You must specify the shard iterator type. For example, you can set the <code>ShardIteratorType</code> parameter to read exactly from the position denoted by a specific sequence number by using the <code>AT_SEQUENCE_NUMBER</code> shard iterator type. Alternatively, the parameter can read right after the sequence number by using the <code>AFTER_SEQUENCE_NUMBER</code> shard iterator type, using sequence numbers returned by earlier calls to <code>PutRecord</code>, <code>PutRecords</code>, <code>GetRecords</code>, or <code>DescribeStream</code>. In the request, you can specify the shard iterator type <code>AT_TIMESTAMP</code> to read records from an arbitrary point in time, <code>TRIM_HORIZON</code> to cause <code>ShardIterator</code> to point to the last untrimmed record in the shard in the system (the oldest data record in the shard), or <code>LATEST</code> so that you always read the most recent data in the shard. </p>
    /// <p>When you read repeatedly from a stream, use a <code>GetShardIterator</code> request to get the first shard iterator for use in your first <code>GetRecords</code> request and for subsequent reads use the shard iterator returned by the <code>GetRecords</code> request in <code>NextShardIterator</code>. A new shard iterator is returned by every <code>GetRecords</code> request in <code>NextShardIterator</code>, which you use in the <code>ShardIterator</code> parameter of the next <code>GetRecords</code> request. </p>
    /// <p>If a <code>GetShardIterator</code> request is made too often, you receive a <code>ProvisionedThroughputExceededException</code>. For more information about throughput limits, see <code>GetRecords</code>, and <a href="https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
    /// <p>If the shard is closed, <code>GetShardIterator</code> returns a valid iterator for the last sequence number of the shard. A shard can be closed as a result of using <code>SplitShard</code> or <code>MergeShards</code>.</p>
    /// <p> <code>GetShardIterator</code> has a limit of five transactions per second per account per open shard.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct GetShardIterator {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::get_shard_iterator_input::Builder,
    }
    impl GetShardIterator {
        /// Creates a new `GetShardIterator`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::GetShardIterator,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::GetShardIteratorError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::GetShardIteratorOutput,
            aws_smithy_http::result::SdkError<crate::error::GetShardIteratorError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the Amazon Kinesis data stream.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the Amazon Kinesis data stream.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The shard ID of the Kinesis Data Streams shard to get the iterator for.</p>
        pub fn shard_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.shard_id(input.into());
            self
        }
        /// <p>The shard ID of the Kinesis Data Streams shard to get the iterator for.</p>
        pub fn set_shard_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_shard_id(input);
            self
        }
        /// <p>Determines how the shard iterator is used to start reading data records from the shard.</p>
        /// <p>The following are the valid Amazon Kinesis shard iterator types:</p>
        /// <ul>
        /// <li> <p>AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific sequence number, provided in the value <code>StartingSequenceNumber</code>.</p> </li>
        /// <li> <p>AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted by a specific sequence number, provided in the value <code>StartingSequenceNumber</code>.</p> </li>
        /// <li> <p>AT_TIMESTAMP - Start reading from the position denoted by a specific time stamp, provided in the value <code>Timestamp</code>.</p> </li>
        /// <li> <p>TRIM_HORIZON - Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard.</p> </li>
        /// <li> <p>LATEST - Start reading just after the most recent record in the shard, so that you always read the most recent data in the shard.</p> </li>
        /// </ul>
        pub fn shard_iterator_type(mut self, input: crate::model::ShardIteratorType) -> Self {
            self.inner = self.inner.shard_iterator_type(input);
            self
        }
        /// <p>Determines how the shard iterator is used to start reading data records from the shard.</p>
        /// <p>The following are the valid Amazon Kinesis shard iterator types:</p>
        /// <ul>
        /// <li> <p>AT_SEQUENCE_NUMBER - Start reading from the position denoted by a specific sequence number, provided in the value <code>StartingSequenceNumber</code>.</p> </li>
        /// <li> <p>AFTER_SEQUENCE_NUMBER - Start reading right after the position denoted by a specific sequence number, provided in the value <code>StartingSequenceNumber</code>.</p> </li>
        /// <li> <p>AT_TIMESTAMP - Start reading from the position denoted by a specific time stamp, provided in the value <code>Timestamp</code>.</p> </li>
        /// <li> <p>TRIM_HORIZON - Start reading at the last untrimmed record in the shard in the system, which is the oldest data record in the shard.</p> </li>
        /// <li> <p>LATEST - Start reading just after the most recent record in the shard, so that you always read the most recent data in the shard.</p> </li>
        /// </ul>
        pub fn set_shard_iterator_type(
            mut self,
            input: std::option::Option<crate::model::ShardIteratorType>,
        ) -> Self {
            self.inner = self.inner.set_shard_iterator_type(input);
            self
        }
        /// <p>The sequence number of the data record in the shard from which to start reading. Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER.</p>
        pub fn starting_sequence_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.starting_sequence_number(input.into());
            self
        }
        /// <p>The sequence number of the data record in the shard from which to start reading. Used with shard iterator type AT_SEQUENCE_NUMBER and AFTER_SEQUENCE_NUMBER.</p>
        pub fn set_starting_sequence_number(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_starting_sequence_number(input);
            self
        }
        /// <p>The time stamp of the data record from which to start reading. Used with shard iterator type AT_TIMESTAMP. A time stamp is the Unix epoch date with precision in milliseconds. For example, <code>2016-04-04T19:58:46.480-00:00</code> or <code>1459799926.480</code>. If a record with this exact time stamp does not exist, the iterator returned is for the next (later) record. If the time stamp is older than the current trim horizon, the iterator returned is for the oldest untrimmed data record (TRIM_HORIZON).</p>
        pub fn timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.inner = self.inner.timestamp(input);
            self
        }
        /// <p>The time stamp of the data record from which to start reading. Used with shard iterator type AT_TIMESTAMP. A time stamp is the Unix epoch date with precision in milliseconds. For example, <code>2016-04-04T19:58:46.480-00:00</code> or <code>1459799926.480</code>. If a record with this exact time stamp does not exist, the iterator returned is for the next (later) record. If the time stamp is older than the current trim horizon, the iterator returned is for the oldest untrimmed data record (TRIM_HORIZON).</p>
        pub fn set_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.inner = self.inner.set_timestamp(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `IncreaseStreamRetentionPeriod`.
    ///
    /// <p>Increases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream. The maximum value of a stream's retention period is 8760 hours (365 days).</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>If you choose a longer stream retention period, this operation increases the time period during which records that have not yet expired are accessible. However, it does not make previous, expired data (older than the stream's previous retention period) accessible after the operation has been called. For example, if a stream's retention period is set to 24 hours and is increased to 168 hours, any data that is older than 24 hours remains inaccessible to consumer applications.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct IncreaseStreamRetentionPeriod {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::increase_stream_retention_period_input::Builder,
    }
    impl IncreaseStreamRetentionPeriod {
        /// Creates a new `IncreaseStreamRetentionPeriod`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::IncreaseStreamRetentionPeriod,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::IncreaseStreamRetentionPeriodError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::IncreaseStreamRetentionPeriodOutput,
            aws_smithy_http::result::SdkError<crate::error::IncreaseStreamRetentionPeriodError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream to modify.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream to modify.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The new retention period of the stream, in hours. Must be more than the current retention period.</p>
        pub fn retention_period_hours(mut self, input: i32) -> Self {
            self.inner = self.inner.retention_period_hours(input);
            self
        }
        /// <p>The new retention period of the stream, in hours. Must be more than the current retention period.</p>
        pub fn set_retention_period_hours(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_retention_period_hours(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `ListShards`.
    ///
    /// <p>Lists the shards in a stream and provides information about each shard. This operation has a limit of 1000 transactions per second per data stream.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>This action does not list expired shards. For information about expired shards, see <a href="https://docs.aws.amazon.com/streams/latest/dev/kinesis-using-sdk-java-after-resharding.html#kinesis-using-sdk-java-resharding-data-routing">Data Routing, Data Persistence, and Shard State after a Reshard</a>. </p> <important>
    /// <p>This API is a new operation that is used by the Amazon Kinesis Client Library (KCL). If you have a fine-grained IAM policy that only allows specific operations, you must update your policy to allow calls to this API. For more information, see <a href="https://docs.aws.amazon.com/streams/latest/dev/controlling-access.html">Controlling Access to Amazon Kinesis Data Streams Resources Using IAM</a>.</p>
    /// </important>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct ListShards {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::list_shards_input::Builder,
    }
    impl ListShards {
        /// Creates a new `ListShards`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ListShards,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ListShardsError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListShardsOutput,
            aws_smithy_http::result::SdkError<crate::error::ListShardsError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the data stream whose shards you want to list. </p>
        /// <p>You cannot specify this parameter if you specify the <code>NextToken</code> parameter.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the data stream whose shards you want to list. </p>
        /// <p>You cannot specify this parameter if you specify the <code>NextToken</code> parameter.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>When the number of shards in the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of shards in the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListShards</code> to list the next set of shards.</p>
        /// <p>Don't specify <code>StreamName</code> or <code>StreamCreationTimestamp</code> if you specify <code>NextToken</code> because the latter unambiguously identifies the stream.</p>
        /// <p>You can optionally specify a value for the <code>MaxResults</code> parameter when you specify <code>NextToken</code>. If you specify a <code>MaxResults</code> value that is less than the number of shards that the operation returns if you don't specify <code>MaxResults</code>, the response will contain a new <code>NextToken</code> value. You can use the new <code>NextToken</code> value in a subsequent call to the <code>ListShards</code> operation.</p> <important>
        /// <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListShards</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListShards</code>, you get <code>ExpiredNextTokenException</code>.</p>
        /// </important>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.next_token(input.into());
            self
        }
        /// <p>When the number of shards in the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of shards in the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListShards</code> to list the next set of shards.</p>
        /// <p>Don't specify <code>StreamName</code> or <code>StreamCreationTimestamp</code> if you specify <code>NextToken</code> because the latter unambiguously identifies the stream.</p>
        /// <p>You can optionally specify a value for the <code>MaxResults</code> parameter when you specify <code>NextToken</code>. If you specify a <code>MaxResults</code> value that is less than the number of shards that the operation returns if you don't specify <code>MaxResults</code>, the response will contain a new <code>NextToken</code> value. You can use the new <code>NextToken</code> value in a subsequent call to the <code>ListShards</code> operation.</p> <important>
        /// <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListShards</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListShards</code>, you get <code>ExpiredNextTokenException</code>.</p>
        /// </important>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_next_token(input);
            self
        }
        /// <p>Specify this parameter to indicate that you want to list the shards starting with the shard whose ID immediately follows <code>ExclusiveStartShardId</code>.</p>
        /// <p>If you don't specify this parameter, the default behavior is for <code>ListShards</code> to list the shards starting with the first one in the stream.</p>
        /// <p>You cannot specify this parameter if you specify <code>NextToken</code>.</p>
        pub fn exclusive_start_shard_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.exclusive_start_shard_id(input.into());
            self
        }
        /// <p>Specify this parameter to indicate that you want to list the shards starting with the shard whose ID immediately follows <code>ExclusiveStartShardId</code>.</p>
        /// <p>If you don't specify this parameter, the default behavior is for <code>ListShards</code> to list the shards starting with the first one in the stream.</p>
        /// <p>You cannot specify this parameter if you specify <code>NextToken</code>.</p>
        pub fn set_exclusive_start_shard_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_exclusive_start_shard_id(input);
            self
        }
        /// <p>The maximum number of shards to return in a single call to <code>ListShards</code>. The maximum number of shards to return in a single call. The default value is 1000. If you specify a value greater than 1000, at most 1000 results are returned. </p>
        /// <p>When the number of shards to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>ListShards</code> to list the next set of shards.</p>
        pub fn max_results(mut self, input: i32) -> Self {
            self.inner = self.inner.max_results(input);
            self
        }
        /// <p>The maximum number of shards to return in a single call to <code>ListShards</code>. The maximum number of shards to return in a single call. The default value is 1000. If you specify a value greater than 1000, at most 1000 results are returned. </p>
        /// <p>When the number of shards to be listed is greater than the value of <code>MaxResults</code>, the response contains a <code>NextToken</code> value that you can use in a subsequent call to <code>ListShards</code> to list the next set of shards.</p>
        pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_max_results(input);
            self
        }
        /// <p>Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the shards for.</p>
        /// <p>You cannot specify this parameter if you specify the <code>NextToken</code> parameter.</p>
        pub fn stream_creation_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.inner = self.inner.stream_creation_timestamp(input);
            self
        }
        /// <p>Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the shards for.</p>
        /// <p>You cannot specify this parameter if you specify the <code>NextToken</code> parameter.</p>
        pub fn set_stream_creation_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.inner = self.inner.set_stream_creation_timestamp(input);
            self
        }
        /// <p>Enables you to filter out the response of the <code>ListShards</code> API. You can only specify one filter at a time. </p>
        /// <p>If you use the <code>ShardFilter</code> parameter when invoking the ListShards API, the <code>Type</code> is the required property and must be specified. If you specify the <code>AT_TRIM_HORIZON</code>, <code>FROM_TRIM_HORIZON</code>, or <code>AT_LATEST</code> types, you do not need to specify either the <code>ShardId</code> or the <code>Timestamp</code> optional properties. </p>
        /// <p>If you specify the <code>AFTER_SHARD_ID</code> type, you must also provide the value for the optional <code>ShardId</code> property. The <code>ShardId</code> property is identical in fuctionality to the <code>ExclusiveStartShardId</code> parameter of the <code>ListShards</code> API. When <code>ShardId</code> property is specified, the response includes the shards starting with the shard whose ID immediately follows the <code>ShardId</code> that you provided. </p>
        /// <p>If you specify the <code>AT_TIMESTAMP</code> or <code>FROM_TIMESTAMP_ID</code> type, you must also provide the value for the optional <code>Timestamp</code> property. If you specify the AT_TIMESTAMP type, then all shards that were open at the provided timestamp are returned. If you specify the FROM_TIMESTAMP type, then all shards starting from the provided timestamp to TIP are returned. </p>
        pub fn shard_filter(mut self, input: crate::model::ShardFilter) -> Self {
            self.inner = self.inner.shard_filter(input);
            self
        }
        /// <p>Enables you to filter out the response of the <code>ListShards</code> API. You can only specify one filter at a time. </p>
        /// <p>If you use the <code>ShardFilter</code> parameter when invoking the ListShards API, the <code>Type</code> is the required property and must be specified. If you specify the <code>AT_TRIM_HORIZON</code>, <code>FROM_TRIM_HORIZON</code>, or <code>AT_LATEST</code> types, you do not need to specify either the <code>ShardId</code> or the <code>Timestamp</code> optional properties. </p>
        /// <p>If you specify the <code>AFTER_SHARD_ID</code> type, you must also provide the value for the optional <code>ShardId</code> property. The <code>ShardId</code> property is identical in fuctionality to the <code>ExclusiveStartShardId</code> parameter of the <code>ListShards</code> API. When <code>ShardId</code> property is specified, the response includes the shards starting with the shard whose ID immediately follows the <code>ShardId</code> that you provided. </p>
        /// <p>If you specify the <code>AT_TIMESTAMP</code> or <code>FROM_TIMESTAMP_ID</code> type, you must also provide the value for the optional <code>Timestamp</code> property. If you specify the AT_TIMESTAMP type, then all shards that were open at the provided timestamp are returned. If you specify the FROM_TIMESTAMP type, then all shards starting from the provided timestamp to TIP are returned. </p>
        pub fn set_shard_filter(
            mut self,
            input: std::option::Option<crate::model::ShardFilter>,
        ) -> Self {
            self.inner = self.inner.set_shard_filter(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `ListStreamConsumers`.
    ///
    /// <p>Lists the consumers registered to receive data from a stream using enhanced fan-out, and provides information about each consumer.</p>
    /// <p>This operation has a limit of 5 transactions per second per stream.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct ListStreamConsumers {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::list_stream_consumers_input::Builder,
    }
    impl ListStreamConsumers {
        /// Creates a new `ListStreamConsumers`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ListStreamConsumers,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ListStreamConsumersError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListStreamConsumersOutput,
            aws_smithy_http::result::SdkError<crate::error::ListStreamConsumersError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// Create a paginator for this request
        ///
        /// Paginators are used by calling [`send().await`](crate::paginator::ListStreamConsumersPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
        pub fn into_paginator(self) -> crate::paginator::ListStreamConsumersPaginator {
            crate::paginator::ListStreamConsumersPaginator::new(self.handle, self.inner)
        }
        /// <p>The ARN of the Kinesis data stream for which you want to list the registered consumers. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the Kinesis data stream for which you want to list the registered consumers. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
        /// <p>When the number of consumers that are registered with the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of consumers that are registered with the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListStreamConsumers</code> to list the next set of registered consumers.</p>
        /// <p>Don't specify <code>StreamName</code> or <code>StreamCreationTimestamp</code> if you specify <code>NextToken</code> because the latter unambiguously identifies the stream.</p>
        /// <p>You can optionally specify a value for the <code>MaxResults</code> parameter when you specify <code>NextToken</code>. If you specify a <code>MaxResults</code> value that is less than the number of consumers that the operation returns if you don't specify <code>MaxResults</code>, the response will contain a new <code>NextToken</code> value. You can use the new <code>NextToken</code> value in a subsequent call to the <code>ListStreamConsumers</code> operation to list the next set of consumers.</p> <important>
        /// <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListStreamConsumers</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListStreamConsumers</code>, you get <code>ExpiredNextTokenException</code>.</p>
        /// </important>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.next_token(input.into());
            self
        }
        /// <p>When the number of consumers that are registered with the data stream is greater than the default value for the <code>MaxResults</code> parameter, or if you explicitly specify a value for <code>MaxResults</code> that is less than the number of consumers that are registered with the data stream, the response includes a pagination token named <code>NextToken</code>. You can specify this <code>NextToken</code> value in a subsequent call to <code>ListStreamConsumers</code> to list the next set of registered consumers.</p>
        /// <p>Don't specify <code>StreamName</code> or <code>StreamCreationTimestamp</code> if you specify <code>NextToken</code> because the latter unambiguously identifies the stream.</p>
        /// <p>You can optionally specify a value for the <code>MaxResults</code> parameter when you specify <code>NextToken</code>. If you specify a <code>MaxResults</code> value that is less than the number of consumers that the operation returns if you don't specify <code>MaxResults</code>, the response will contain a new <code>NextToken</code> value. You can use the new <code>NextToken</code> value in a subsequent call to the <code>ListStreamConsumers</code> operation to list the next set of consumers.</p> <important>
        /// <p>Tokens expire after 300 seconds. When you obtain a value for <code>NextToken</code> in the response to a call to <code>ListStreamConsumers</code>, you have 300 seconds to use that value. If you specify an expired token in a call to <code>ListStreamConsumers</code>, you get <code>ExpiredNextTokenException</code>.</p>
        /// </important>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_next_token(input);
            self
        }
        /// <p>The maximum number of consumers that you want a single call of <code>ListStreamConsumers</code> to return. The default value is 100. If you specify a value greater than 100, at most 100 results are returned. </p>
        pub fn max_results(mut self, input: i32) -> Self {
            self.inner = self.inner.max_results(input);
            self
        }
        /// <p>The maximum number of consumers that you want a single call of <code>ListStreamConsumers</code> to return. The default value is 100. If you specify a value greater than 100, at most 100 results are returned. </p>
        pub fn set_max_results(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_max_results(input);
            self
        }
        /// <p>Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the consumers for. </p>
        /// <p>You can't specify this parameter if you specify the NextToken parameter. </p>
        pub fn stream_creation_timestamp(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.inner = self.inner.stream_creation_timestamp(input);
            self
        }
        /// <p>Specify this input parameter to distinguish data streams that have the same name. For example, if you create a data stream and then delete it, and you later create another data stream with the same name, you can use this input parameter to specify which of the two streams you want to list the consumers for. </p>
        /// <p>You can't specify this parameter if you specify the NextToken parameter. </p>
        pub fn set_stream_creation_timestamp(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.inner = self.inner.set_stream_creation_timestamp(input);
            self
        }
    }
    /// Fluent builder constructing a request to `ListStreams`.
    ///
    /// <p>Lists your Kinesis data streams.</p>
    /// <p>The number of streams may be too large to return from a single call to <code>ListStreams</code>. You can limit the number of returned streams using the <code>Limit</code> parameter. If you do not specify a value for the <code>Limit</code> parameter, Kinesis Data Streams uses the default limit, which is currently 100.</p>
    /// <p>You can detect if there are more streams available to list by using the <code>HasMoreStreams</code> flag from the returned output. If there are more streams available, you can request more streams by using the name of the last stream returned by the <code>ListStreams</code> request in the <code>ExclusiveStartStreamName</code> parameter in a subsequent request to <code>ListStreams</code>. The group of stream names returned by the subsequent request is then added to the list. You can continue this process until all the stream names have been collected in the list. </p>
    /// <p> <code>ListStreams</code> has a limit of five transactions per second per account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct ListStreams {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::list_streams_input::Builder,
    }
    impl ListStreams {
        /// Creates a new `ListStreams`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ListStreams,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ListStreamsError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListStreamsOutput,
            aws_smithy_http::result::SdkError<crate::error::ListStreamsError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// Create a paginator for this request
        ///
        /// Paginators are used by calling [`send().await`](crate::paginator::ListStreamsPaginator::send) which returns a [`Stream`](tokio_stream::Stream).
        pub fn into_paginator(self) -> crate::paginator::ListStreamsPaginator {
            crate::paginator::ListStreamsPaginator::new(self.handle, self.inner)
        }
        /// <p>The maximum number of streams to list. The default value is 100. If you specify a value greater than 100, at most 100 results are returned.</p>
        pub fn limit(mut self, input: i32) -> Self {
            self.inner = self.inner.limit(input);
            self
        }
        /// <p>The maximum number of streams to list. The default value is 100. If you specify a value greater than 100, at most 100 results are returned.</p>
        pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_limit(input);
            self
        }
        /// <p>The name of the stream to start the list with.</p>
        pub fn exclusive_start_stream_name(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.inner = self.inner.exclusive_start_stream_name(input.into());
            self
        }
        /// <p>The name of the stream to start the list with.</p>
        pub fn set_exclusive_start_stream_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_exclusive_start_stream_name(input);
            self
        }
        /// <p></p>
        pub fn next_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.next_token(input.into());
            self
        }
        /// <p></p>
        pub fn set_next_token(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_next_token(input);
            self
        }
    }
    /// Fluent builder constructing a request to `ListTagsForStream`.
    ///
    /// <p>Lists the tags for the specified Kinesis data stream. This operation has a limit of five transactions per second per account.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct ListTagsForStream {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::list_tags_for_stream_input::Builder,
    }
    impl ListTagsForStream {
        /// Creates a new `ListTagsForStream`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ListTagsForStream,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ListTagsForStreamError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ListTagsForStreamOutput,
            aws_smithy_http::result::SdkError<crate::error::ListTagsForStreamError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The key to use as the starting point for the list of tags. If this parameter is set, <code>ListTagsForStream</code> gets all tags that occur after <code>ExclusiveStartTagKey</code>. </p>
        pub fn exclusive_start_tag_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.exclusive_start_tag_key(input.into());
            self
        }
        /// <p>The key to use as the starting point for the list of tags. If this parameter is set, <code>ListTagsForStream</code> gets all tags that occur after <code>ExclusiveStartTagKey</code>. </p>
        pub fn set_exclusive_start_tag_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_exclusive_start_tag_key(input);
            self
        }
        /// <p>The number of tags to return. If this number is less than the total number of tags associated with the stream, <code>HasMoreTags</code> is set to <code>true</code>. To list additional tags, set <code>ExclusiveStartTagKey</code> to the last key in the response.</p>
        pub fn limit(mut self, input: i32) -> Self {
            self.inner = self.inner.limit(input);
            self
        }
        /// <p>The number of tags to return. If this number is less than the total number of tags associated with the stream, <code>HasMoreTags</code> is set to <code>true</code>. To list additional tags, set <code>ExclusiveStartTagKey</code> to the last key in the response.</p>
        pub fn set_limit(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_limit(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `MergeShards`.
    ///
    /// <p>Merges two adjacent shards in a Kinesis data stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data. This API is only supported for the data streams with the provisioned capacity mode. Two shards are considered adjacent if the union of the hash key ranges for the two shards form a contiguous set with no gaps. For example, if you have two shards, one with a hash key range of 276...381 and the other with a hash key range of 382...454, then you could merge these two shards into a single shard that would have a hash key range of 276...454. After the merge, the single child shard receives data for all hash key values covered by the two parent shards.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p> <code>MergeShards</code> is called when there is a need to reduce the overall capacity of a stream because of excess capacity that is not being used. You must specify the shard to be merged and the adjacent shard for a stream. For more information about merging shards, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-merge.html">Merge Two Shards</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
    /// <p>If the stream is in the <code>ACTIVE</code> state, you can call <code>MergeShards</code>. If a stream is in the <code>CREATING</code>, <code>UPDATING</code>, or <code>DELETING</code> state, <code>MergeShards</code> returns a <code>ResourceInUseException</code>. If the specified stream does not exist, <code>MergeShards</code> returns a <code>ResourceNotFoundException</code>. </p>
    /// <p>You can use <code>DescribeStreamSummary</code> to check the state of the stream, which is returned in <code>StreamStatus</code>.</p>
    /// <p> <code>MergeShards</code> is an asynchronous operation. Upon receiving a <code>MergeShards</code> request, Amazon Kinesis Data Streams immediately returns a response and sets the <code>StreamStatus</code> to <code>UPDATING</code>. After the operation is completed, Kinesis Data Streams sets the <code>StreamStatus</code> to <code>ACTIVE</code>. Read and write operations continue to work while the stream is in the <code>UPDATING</code> state. </p>
    /// <p>You use <code>DescribeStreamSummary</code> and the <code>ListShards</code> APIs to determine the shard IDs that are specified in the <code>MergeShards</code> request. </p>
    /// <p>If you try to operate on too many streams in parallel using <code>CreateStream</code>, <code>DeleteStream</code>, <code>MergeShards</code>, or <code>SplitShard</code>, you receive a <code>LimitExceededException</code>. </p>
    /// <p> <code>MergeShards</code> has a limit of five transactions per second per account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct MergeShards {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::merge_shards_input::Builder,
    }
    impl MergeShards {
        /// Creates a new `MergeShards`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::MergeShards,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::MergeShardsError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::MergeShardsOutput,
            aws_smithy_http::result::SdkError<crate::error::MergeShardsError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream for the merge.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream for the merge.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The shard ID of the shard to combine with the adjacent shard for the merge.</p>
        pub fn shard_to_merge(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.shard_to_merge(input.into());
            self
        }
        /// <p>The shard ID of the shard to combine with the adjacent shard for the merge.</p>
        pub fn set_shard_to_merge(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_shard_to_merge(input);
            self
        }
        /// <p>The shard ID of the adjacent shard for the merge.</p>
        pub fn adjacent_shard_to_merge(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.adjacent_shard_to_merge(input.into());
            self
        }
        /// <p>The shard ID of the adjacent shard for the merge.</p>
        pub fn set_adjacent_shard_to_merge(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_adjacent_shard_to_merge(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `PutRecord`.
    ///
    /// <p>Writes a single data record into an Amazon Kinesis data stream. Call <code>PutRecord</code> to send data into the stream for real-time ingestion and subsequent processing, one record at a time. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per second.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>You must specify the name of the stream that captures, stores, and transports the data; a partition key; and the data blob itself.</p>
    /// <p>The data blob can be any type of data; for example, a segment from a log file, geographic/location data, website clickstream data, and so on.</p>
    /// <p>The partition key is used by Kinesis Data Streams to distribute data across shards. Kinesis Data Streams segregates the data records that belong to a stream into multiple shards, using the partition key associated with each data record to determine the shard to which a given data record belongs.</p>
    /// <p>Partition keys are Unicode strings, with a maximum length limit of 256 characters for each key. An MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards using the hash key ranges of the shards. You can override hashing the partition key to determine the shard by explicitly specifying a hash value using the <code>ExplicitHashKey</code> parameter. For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
    /// <p> <code>PutRecord</code> returns the shard ID of where the data record was placed and the sequence number that was assigned to the data record.</p>
    /// <p>Sequence numbers increase over time and are specific to a shard within a stream, not across all shards within a stream. To guarantee strictly increasing ordering, write serially to a shard and use the <code>SequenceNumberForOrdering</code> parameter. For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <important>
    /// <p>After you write a record to a stream, you cannot modify that record or its order within the stream.</p>
    /// </important>
    /// <p>If a <code>PutRecord</code> request cannot be processed because of insufficient provisioned throughput on the shard involved in the request, <code>PutRecord</code> throws <code>ProvisionedThroughputExceededException</code>. </p>
    /// <p>By default, data records are accessible for 24 hours from the time that they are added to a stream. You can use <code>IncreaseStreamRetentionPeriod</code> or <code>DecreaseStreamRetentionPeriod</code> to modify this retention period.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct PutRecord {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::put_record_input::Builder,
    }
    impl PutRecord {
        /// Creates a new `PutRecord`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::PutRecord,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::PutRecordError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::PutRecordOutput,
            aws_smithy_http::result::SdkError<crate::error::PutRecordError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream to put the data record into.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream to put the data record into.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The data blob to put into the record, which is base64-encoded when the blob is serialized. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MiB).</p>
        pub fn data(mut self, input: aws_smithy_types::Blob) -> Self {
            self.inner = self.inner.data(input);
            self
        }
        /// <p>The data blob to put into the record, which is base64-encoded when the blob is serialized. When the data blob (the payload before base64-encoding) is added to the partition key size, the total size must not exceed the maximum record size (1 MiB).</p>
        pub fn set_data(mut self, input: std::option::Option<aws_smithy_types::Blob>) -> Self {
            self.inner = self.inner.set_data(input);
            self
        }
        /// <p>Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis Data Streams uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.</p>
        pub fn partition_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.partition_key(input.into());
            self
        }
        /// <p>Determines which shard in the stream the data record is assigned to. Partition keys are Unicode strings with a maximum length limit of 256 characters for each key. Amazon Kinesis Data Streams uses the partition key as input to a hash function that maps the partition key and associated data to a specific shard. Specifically, an MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream.</p>
        pub fn set_partition_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_partition_key(input);
            self
        }
        /// <p>The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.</p>
        pub fn explicit_hash_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.explicit_hash_key(input.into());
            self
        }
        /// <p>The hash value used to explicitly determine the shard the data record is assigned to by overriding the partition key hash.</p>
        pub fn set_explicit_hash_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_explicit_hash_key(input);
            self
        }
        /// <p>Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key. Usage: set the <code>SequenceNumberForOrdering</code> of record <i>n</i> to the sequence number of record <i>n-1</i> (as returned in the result when putting record <i>n-1</i>). If this parameter is not set, records are coarsely ordered based on arrival time.</p>
        pub fn sequence_number_for_ordering(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.inner = self.inner.sequence_number_for_ordering(input.into());
            self
        }
        /// <p>Guarantees strictly increasing sequence numbers, for puts from the same client and to the same partition key. Usage: set the <code>SequenceNumberForOrdering</code> of record <i>n</i> to the sequence number of record <i>n-1</i> (as returned in the result when putting record <i>n-1</i>). If this parameter is not set, records are coarsely ordered based on arrival time.</p>
        pub fn set_sequence_number_for_ordering(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_sequence_number_for_ordering(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `PutRecords`.
    ///
    /// <p>Writes multiple data records into a Kinesis data stream in a single call (also referred to as a <code>PutRecords</code> request). Use this operation to send data into the stream for data ingestion and processing. </p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>Each <code>PutRecords</code> request can support up to 500 records. Each record in the request can be as large as 1 MiB, up to a limit of 5 MiB for the entire request, including partition keys. Each shard can support writes up to 1,000 records per second, up to a maximum data write total of 1 MiB per second.</p>
    /// <p>You must specify the name of the stream that captures, stores, and transports the data; and an array of request <code>Records</code>, with each record in the array requiring a partition key and data blob. The record size limit applies to the total size of the partition key and data blob.</p>
    /// <p>The data blob can be any type of data; for example, a segment from a log file, geographic/location data, website clickstream data, and so on.</p>
    /// <p>The partition key is used by Kinesis Data Streams as input to a hash function that maps the partition key and associated data to a specific shard. An MD5 hash function is used to map partition keys to 128-bit integer values and to map associated data records to shards. As a result of this hashing mechanism, all data records with the same partition key map to the same shard within the stream. For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-add-data-to-stream">Adding Data to a Stream</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
    /// <p>Each record in the <code>Records</code> array may include an optional parameter, <code>ExplicitHashKey</code>, which overrides the partition key to shard mapping. This parameter allows a data producer to determine explicitly the shard where the record is stored. For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/developing-producers-with-sdk.html#kinesis-using-sdk-java-putrecords">Adding Multiple Records with PutRecords</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
    /// <p>The <code>PutRecords</code> response includes an array of response <code>Records</code>. Each record in the response array directly correlates with a record in the request array using natural ordering, from the top to the bottom of the request and response. The response <code>Records</code> array always includes the same number of records as the request array.</p>
    /// <p>The response <code>Records</code> array includes both successfully and unsuccessfully processed records. Kinesis Data Streams attempts to process all records in each <code>PutRecords</code> request. A single record failure does not stop the processing of subsequent records. As a result, PutRecords doesn't guarantee the ordering of records. If you need to read records in the same order they are written to the stream, use <code>PutRecord</code> instead of <code>PutRecords</code>, and write to the same shard.</p>
    /// <p>A successfully processed record includes <code>ShardId</code> and <code>SequenceNumber</code> values. The <code>ShardId</code> parameter identifies the shard in the stream where the record is stored. The <code>SequenceNumber</code> parameter is an identifier assigned to the put record, unique to all records in the stream.</p>
    /// <p>An unsuccessfully processed record includes <code>ErrorCode</code> and <code>ErrorMessage</code> values. <code>ErrorCode</code> reflects the type of error and can be one of the following values: <code>ProvisionedThroughputExceededException</code> or <code>InternalFailure</code>. <code>ErrorMessage</code> provides more detailed information about the <code>ProvisionedThroughputExceededException</code> exception including the account ID, stream name, and shard ID of the record that was throttled. For more information about partially successful responses, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-add-data-to-stream.html#kinesis-using-sdk-java-putrecords">Adding Multiple Records with PutRecords</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p> <important>
    /// <p>After you write a record to a stream, you cannot modify that record or its order within the stream.</p>
    /// </important>
    /// <p>By default, data records are accessible for 24 hours from the time that they are added to a stream. You can use <code>IncreaseStreamRetentionPeriod</code> or <code>DecreaseStreamRetentionPeriod</code> to modify this retention period.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct PutRecords {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::put_records_input::Builder,
    }
    impl PutRecords {
        /// Creates a new `PutRecords`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::PutRecords,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::PutRecordsError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::PutRecordsOutput,
            aws_smithy_http::result::SdkError<crate::error::PutRecordsError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// Appends an item to `Records`.
        ///
        /// To override the contents of this collection use [`set_records`](Self::set_records).
        ///
        /// <p>The records associated with the request.</p>
        pub fn records(mut self, input: crate::model::PutRecordsRequestEntry) -> Self {
            self.inner = self.inner.records(input);
            self
        }
        /// <p>The records associated with the request.</p>
        pub fn set_records(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::PutRecordsRequestEntry>>,
        ) -> Self {
            self.inner = self.inner.set_records(input);
            self
        }
        /// <p>The stream name associated with the request.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The stream name associated with the request.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `RegisterStreamConsumer`.
    ///
    /// <p>Registers a consumer with a Kinesis data stream. When you use this operation, the consumer you register can then call <code>SubscribeToShard</code> to receive data from the stream using enhanced fan-out, at a rate of up to 2 MiB per second for every shard you subscribe to. This rate is unaffected by the total number of consumers that read from the same stream.</p>
    /// <p>You can register up to 20 consumers per stream. A given consumer can only be registered with one stream at a time.</p>
    /// <p>For an example of how to use this operations, see <a href="/streams/latest/dev/building-enhanced-consumers-api.html">Enhanced Fan-Out Using the Kinesis Data Streams API</a>.</p>
    /// <p>The use of this operation has a limit of five transactions per second per account. Also, only 5 consumers can be created simultaneously. In other words, you cannot have more than 5 consumers in a <code>CREATING</code> status at the same time. Registering a 6th consumer while there are 5 in a <code>CREATING</code> status results in a <code>LimitExceededException</code>.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct RegisterStreamConsumer {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::register_stream_consumer_input::Builder,
    }
    impl RegisterStreamConsumer {
        /// Creates a new `RegisterStreamConsumer`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::RegisterStreamConsumer,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::RegisterStreamConsumerError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::RegisterStreamConsumerOutput,
            aws_smithy_http::result::SdkError<crate::error::RegisterStreamConsumerError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The ARN of the Kinesis data stream that you want to register the consumer with. For more info, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the Kinesis data stream that you want to register the consumer with. For more info, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kinesis-streams">Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces</a>.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
        /// <p>For a given Kinesis data stream, each consumer must have a unique name. However, consumer names don't have to be unique across data streams.</p>
        pub fn consumer_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.consumer_name(input.into());
            self
        }
        /// <p>For a given Kinesis data stream, each consumer must have a unique name. However, consumer names don't have to be unique across data streams.</p>
        pub fn set_consumer_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_consumer_name(input);
            self
        }
    }
    /// Fluent builder constructing a request to `RemoveTagsFromStream`.
    ///
    /// <p>Removes tags from the specified Kinesis data stream. Removed tags are deleted and cannot be recovered after this operation successfully completes.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>If you specify a tag that does not exist, it is ignored.</p>
    /// <p> <code>RemoveTagsFromStream</code> has a limit of five transactions per second per account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct RemoveTagsFromStream {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::remove_tags_from_stream_input::Builder,
    }
    impl RemoveTagsFromStream {
        /// Creates a new `RemoveTagsFromStream`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::RemoveTagsFromStream,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::RemoveTagsFromStreamError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::RemoveTagsFromStreamOutput,
            aws_smithy_http::result::SdkError<crate::error::RemoveTagsFromStreamError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// Appends an item to `TagKeys`.
        ///
        /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
        ///
        /// <p>A list of tag keys. Each corresponding tag is removed from the stream.</p>
        pub fn tag_keys(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.tag_keys(input.into());
            self
        }
        /// <p>A list of tag keys. Each corresponding tag is removed from the stream.</p>
        pub fn set_tag_keys(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.inner = self.inner.set_tag_keys(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `SplitShard`.
    ///
    /// <p>Splits a shard into two new shards in the Kinesis data stream, to increase the stream's capacity to ingest and transport data. <code>SplitShard</code> is called when there is a need to increase the overall capacity of a stream because of an expected increase in the volume of data records being ingested. This API is only supported for the data streams with the provisioned capacity mode.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>You can also use <code>SplitShard</code> when a shard appears to be approaching its maximum utilization; for example, the producers sending data into the specific shard are suddenly sending more than previously anticipated. You can also call <code>SplitShard</code> to increase stream capacity, so that more Kinesis Data Streams applications can simultaneously read data from the stream for real-time processing. </p>
    /// <p>You must specify the shard to be split and the new hash key, which is the position in the shard where the shard gets split in two. In many cases, the new hash key might be the average of the beginning and ending hash key, but it can be any hash key value in the range being mapped into the shard. For more information, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/kinesis-using-sdk-java-resharding-split.html">Split a Shard</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>.</p>
    /// <p>You can use <code>DescribeStreamSummary</code> and the <code>ListShards</code> APIs to determine the shard ID and hash key values for the <code>ShardToSplit</code> and <code>NewStartingHashKey</code> parameters that are specified in the <code>SplitShard</code> request.</p>
    /// <p> <code>SplitShard</code> is an asynchronous operation. Upon receiving a <code>SplitShard</code> request, Kinesis Data Streams immediately returns a response and sets the stream status to <code>UPDATING</code>. After the operation is completed, Kinesis Data Streams sets the stream status to <code>ACTIVE</code>. Read and write operations continue to work while the stream is in the <code>UPDATING</code> state. </p>
    /// <p>You can use <code>DescribeStreamSummary</code> to check the status of the stream, which is returned in <code>StreamStatus</code>. If the stream is in the <code>ACTIVE</code> state, you can call <code>SplitShard</code>. </p>
    /// <p>If the specified stream does not exist, <code>DescribeStreamSummary</code> returns a <code>ResourceNotFoundException</code>. If you try to create more shards than are authorized for your account, you receive a <code>LimitExceededException</code>. </p>
    /// <p>For the default shard limit for an Amazon Web Services account, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Kinesis Data Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>. To increase this limit, <a href="https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html">contact Amazon Web Services Support</a>.</p>
    /// <p>If you try to operate on too many streams simultaneously using <code>CreateStream</code>, <code>DeleteStream</code>, <code>MergeShards</code>, and/or <code>SplitShard</code>, you receive a <code>LimitExceededException</code>. </p>
    /// <p> <code>SplitShard</code> has a limit of five transactions per second per account.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct SplitShard {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::split_shard_input::Builder,
    }
    impl SplitShard {
        /// Creates a new `SplitShard`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::SplitShard,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::SplitShardError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::SplitShardOutput,
            aws_smithy_http::result::SdkError<crate::error::SplitShardError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream for the shard split.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream for the shard split.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The shard ID of the shard to split.</p>
        pub fn shard_to_split(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.shard_to_split(input.into());
            self
        }
        /// <p>The shard ID of the shard to split.</p>
        pub fn set_shard_to_split(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_shard_to_split(input);
            self
        }
        /// <p>A hash key value for the starting hash key of one of the child shards created by the split. The hash key range for a given shard constitutes a set of ordered contiguous positive integers. The value for <code>NewStartingHashKey</code> must be in the range of hash keys being mapped into the shard. The <code>NewStartingHashKey</code> hash key value and all higher hash key values in hash key range are distributed to one of the child shards. All the lower hash key values in the range are distributed to the other child shard.</p>
        pub fn new_starting_hash_key(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.new_starting_hash_key(input.into());
            self
        }
        /// <p>A hash key value for the starting hash key of one of the child shards created by the split. The hash key range for a given shard constitutes a set of ordered contiguous positive integers. The value for <code>NewStartingHashKey</code> must be in the range of hash keys being mapped into the shard. The <code>NewStartingHashKey</code> hash key value and all higher hash key values in hash key range are distributed to one of the child shards. All the lower hash key values in the range are distributed to the other child shard.</p>
        pub fn set_new_starting_hash_key(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.inner = self.inner.set_new_starting_hash_key(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `StartStreamEncryption`.
    ///
    /// <p>Enables or updates server-side encryption using an Amazon Web Services KMS key for a specified stream. </p>
    /// <p>Starting encryption is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to <code>UPDATING</code>. After the update is complete, Kinesis Data Streams sets the status of the stream back to <code>ACTIVE</code>. Updating or applying encryption normally takes a few seconds to complete, but it can take minutes. You can continue to read and write data to your stream while its status is <code>UPDATING</code>. Once the status of the stream is <code>ACTIVE</code>, encryption begins for records written to the stream. </p>
    /// <p>API Limits: You can successfully apply a new Amazon Web Services KMS key for server-side encryption 25 times in a rolling 24-hour period.</p>
    /// <p>Note: It can take up to 5 seconds after the stream is in an <code>ACTIVE</code> status before all records written to the stream are encrypted. After you enable encryption, you can verify that encryption is applied by inspecting the API response from <code>PutRecord</code> or <code>PutRecords</code>.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct StartStreamEncryption {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::start_stream_encryption_input::Builder,
    }
    impl StartStreamEncryption {
        /// Creates a new `StartStreamEncryption`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::StartStreamEncryption,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::StartStreamEncryptionError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::StartStreamEncryptionOutput,
            aws_smithy_http::result::SdkError<crate::error::StartStreamEncryptionError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream for which to start encrypting records.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream for which to start encrypting records.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The encryption type to use. The only valid value is <code>KMS</code>.</p>
        pub fn encryption_type(mut self, input: crate::model::EncryptionType) -> Self {
            self.inner = self.inner.encryption_type(input);
            self
        }
        /// <p>The encryption type to use. The only valid value is <code>KMS</code>.</p>
        pub fn set_encryption_type(
            mut self,
            input: std::option::Option<crate::model::EncryptionType>,
        ) -> Self {
            self.inner = self.inner.set_encryption_type(input);
            self
        }
        /// <p>The GUID for the customer-managed Amazon Web Services KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias <code>aws/kinesis</code>.</p>
        /// <ul>
        /// <li> <p>Key ARN example: <code>arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012</code> </p> </li>
        /// <li> <p>Alias ARN example: <code>arn:aws:kms:us-east-1:123456789012:alias/MyAliasName</code> </p> </li>
        /// <li> <p>Globally unique key ID example: <code>12345678-1234-1234-1234-123456789012</code> </p> </li>
        /// <li> <p>Alias name example: <code>alias/MyAliasName</code> </p> </li>
        /// <li> <p>Master key owned by Kinesis Data Streams: <code>alias/aws/kinesis</code> </p> </li>
        /// </ul>
        pub fn key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.key_id(input.into());
            self
        }
        /// <p>The GUID for the customer-managed Amazon Web Services KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias <code>aws/kinesis</code>.</p>
        /// <ul>
        /// <li> <p>Key ARN example: <code>arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012</code> </p> </li>
        /// <li> <p>Alias ARN example: <code>arn:aws:kms:us-east-1:123456789012:alias/MyAliasName</code> </p> </li>
        /// <li> <p>Globally unique key ID example: <code>12345678-1234-1234-1234-123456789012</code> </p> </li>
        /// <li> <p>Alias name example: <code>alias/MyAliasName</code> </p> </li>
        /// <li> <p>Master key owned by Kinesis Data Streams: <code>alias/aws/kinesis</code> </p> </li>
        /// </ul>
        pub fn set_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_key_id(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `StopStreamEncryption`.
    ///
    /// <p>Disables server-side encryption for a specified stream. </p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>Stopping encryption is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to <code>UPDATING</code>. After the update is complete, Kinesis Data Streams sets the status of the stream back to <code>ACTIVE</code>. Stopping encryption normally takes a few seconds to complete, but it can take minutes. You can continue to read and write data to your stream while its status is <code>UPDATING</code>. Once the status of the stream is <code>ACTIVE</code>, records written to the stream are no longer encrypted by Kinesis Data Streams. </p>
    /// <p>API Limits: You can successfully disable server-side encryption 25 times in a rolling 24-hour period. </p>
    /// <p>Note: It can take up to 5 seconds after the stream is in an <code>ACTIVE</code> status before all records written to the stream are no longer subject to encryption. After you disabled encryption, you can verify that encryption is not applied by inspecting the API response from <code>PutRecord</code> or <code>PutRecords</code>.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct StopStreamEncryption {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::stop_stream_encryption_input::Builder,
    }
    impl StopStreamEncryption {
        /// Creates a new `StopStreamEncryption`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::StopStreamEncryption,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::StopStreamEncryptionError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::StopStreamEncryptionOutput,
            aws_smithy_http::result::SdkError<crate::error::StopStreamEncryptionError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream on which to stop encrypting records.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream on which to stop encrypting records.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The encryption type. The only valid value is <code>KMS</code>.</p>
        pub fn encryption_type(mut self, input: crate::model::EncryptionType) -> Self {
            self.inner = self.inner.encryption_type(input);
            self
        }
        /// <p>The encryption type. The only valid value is <code>KMS</code>.</p>
        pub fn set_encryption_type(
            mut self,
            input: std::option::Option<crate::model::EncryptionType>,
        ) -> Self {
            self.inner = self.inner.set_encryption_type(input);
            self
        }
        /// <p>The GUID for the customer-managed Amazon Web Services KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias <code>aws/kinesis</code>.</p>
        /// <ul>
        /// <li> <p>Key ARN example: <code>arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012</code> </p> </li>
        /// <li> <p>Alias ARN example: <code>arn:aws:kms:us-east-1:123456789012:alias/MyAliasName</code> </p> </li>
        /// <li> <p>Globally unique key ID example: <code>12345678-1234-1234-1234-123456789012</code> </p> </li>
        /// <li> <p>Alias name example: <code>alias/MyAliasName</code> </p> </li>
        /// <li> <p>Master key owned by Kinesis Data Streams: <code>alias/aws/kinesis</code> </p> </li>
        /// </ul>
        pub fn key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.key_id(input.into());
            self
        }
        /// <p>The GUID for the customer-managed Amazon Web Services KMS key to use for encryption. This value can be a globally unique identifier, a fully specified Amazon Resource Name (ARN) to either an alias or a key, or an alias name prefixed by "alias/".You can also use a master key owned by Kinesis Data Streams by specifying the alias <code>aws/kinesis</code>.</p>
        /// <ul>
        /// <li> <p>Key ARN example: <code>arn:aws:kms:us-east-1:123456789012:key/12345678-1234-1234-1234-123456789012</code> </p> </li>
        /// <li> <p>Alias ARN example: <code>arn:aws:kms:us-east-1:123456789012:alias/MyAliasName</code> </p> </li>
        /// <li> <p>Globally unique key ID example: <code>12345678-1234-1234-1234-123456789012</code> </p> </li>
        /// <li> <p>Alias name example: <code>alias/MyAliasName</code> </p> </li>
        /// <li> <p>Master key owned by Kinesis Data Streams: <code>alias/aws/kinesis</code> </p> </li>
        /// </ul>
        pub fn set_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_key_id(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `UpdateShardCount`.
    ///
    /// <p>Updates the shard count of the specified stream to the specified number of shards. This API is only supported for the data streams with the provisioned capacity mode.</p> <note>
    /// <p>When invoking this API, it is recommended you use the <code>StreamARN</code> input parameter rather than the <code>StreamName</code> input parameter.</p>
    /// </note>
    /// <p>Updating the shard count is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to <code>UPDATING</code>. After the update is complete, Kinesis Data Streams sets the status of the stream back to <code>ACTIVE</code>. Depending on the size of the stream, the scaling action could take a few minutes to complete. You can continue to read and write data to your stream while its status is <code>UPDATING</code>.</p>
    /// <p>To update the shard count, Kinesis Data Streams performs splits or merges on individual shards. This can cause short-lived shards to be created, in addition to the final shards. These short-lived shards count towards your total shard limit for your account in the Region.</p>
    /// <p>When using this operation, we recommend that you specify a target shard count that is a multiple of 25% (25%, 50%, 75%, 100%). You can specify any target value within your shard limit. However, if you specify a target that isn't a multiple of 25%, the scaling action might take longer to complete. </p>
    /// <p>This operation has the following default limits. By default, you cannot do the following:</p>
    /// <ul>
    /// <li> <p>Scale more than ten times per rolling 24-hour period per stream</p> </li>
    /// <li> <p>Scale up to more than double your current shard count for a stream</p> </li>
    /// <li> <p>Scale down below half your current shard count for a stream</p> </li>
    /// <li> <p>Scale up to more than 10000 shards in a stream</p> </li>
    /// <li> <p>Scale a stream with more than 10000 shards down unless the result is less than 10000 shards</p> </li>
    /// <li> <p>Scale up to more than the shard limit for your account</p> </li>
    /// </ul>
    /// <p>For the default limits for an Amazon Web Services account, see <a href="https://docs.aws.amazon.com/kinesis/latest/dev/service-sizes-and-limits.html">Streams Limits</a> in the <i>Amazon Kinesis Data Streams Developer Guide</i>. To request an increase in the call rate limit, the shard limit for this API, or your overall shard limit, use the <a href="https://console.aws.amazon.com/support/v1#/case/create?issueType=service-limit-increase&amp;limitType=service-code-kinesis">limits form</a>.</p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct UpdateShardCount {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::update_shard_count_input::Builder,
    }
    impl UpdateShardCount {
        /// Creates a new `UpdateShardCount`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::UpdateShardCount,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::UpdateShardCountError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::UpdateShardCountOutput,
            aws_smithy_http::result::SdkError<crate::error::UpdateShardCountError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p>The name of the stream.</p>
        pub fn stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_name(input.into());
            self
        }
        /// <p>The name of the stream.</p>
        pub fn set_stream_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_name(input);
            self
        }
        /// <p>The new number of shards. This value has the following default limits. By default, you cannot do the following: </p>
        /// <ul>
        /// <li> <p>Set this value to more than double your current shard count for a stream.</p> </li>
        /// <li> <p>Set this value below half your current shard count for a stream.</p> </li>
        /// <li> <p>Set this value to more than 10000 shards in a stream (the default limit for shard count per stream is 10000 per account per region), unless you request a limit increase.</p> </li>
        /// <li> <p>Scale a stream with more than 10000 shards down unless you set this value to less than 10000 shards.</p> </li>
        /// </ul>
        pub fn target_shard_count(mut self, input: i32) -> Self {
            self.inner = self.inner.target_shard_count(input);
            self
        }
        /// <p>The new number of shards. This value has the following default limits. By default, you cannot do the following: </p>
        /// <ul>
        /// <li> <p>Set this value to more than double your current shard count for a stream.</p> </li>
        /// <li> <p>Set this value below half your current shard count for a stream.</p> </li>
        /// <li> <p>Set this value to more than 10000 shards in a stream (the default limit for shard count per stream is 10000 per account per region), unless you request a limit increase.</p> </li>
        /// <li> <p>Scale a stream with more than 10000 shards down unless you set this value to less than 10000 shards.</p> </li>
        /// </ul>
        pub fn set_target_shard_count(mut self, input: std::option::Option<i32>) -> Self {
            self.inner = self.inner.set_target_shard_count(input);
            self
        }
        /// <p>The scaling type. Uniform scaling creates shards of equal size.</p>
        pub fn scaling_type(mut self, input: crate::model::ScalingType) -> Self {
            self.inner = self.inner.scaling_type(input);
            self
        }
        /// <p>The scaling type. Uniform scaling creates shards of equal size.</p>
        pub fn set_scaling_type(
            mut self,
            input: std::option::Option<crate::model::ScalingType>,
        ) -> Self {
            self.inner = self.inner.set_scaling_type(input);
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p>The ARN of the stream.</p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
    }
    /// Fluent builder constructing a request to `UpdateStreamMode`.
    ///
    /// <p> Updates the capacity mode of the data stream. Currently, in Kinesis Data Streams, you can choose between an <b>on-demand</b> capacity mode and a <b>provisioned</b> capacity mode for your data stream. </p>
    #[derive(std::clone::Clone, std::fmt::Debug)]
    pub struct UpdateStreamMode {
        handle: std::sync::Arc<super::Handle>,
        inner: crate::input::update_stream_mode_input::Builder,
    }
    impl UpdateStreamMode {
        /// Creates a new `UpdateStreamMode`.
        pub(crate) fn new(handle: std::sync::Arc<super::Handle>) -> Self {
            Self {
                handle,
                inner: Default::default(),
            }
        }

        /// Consume this builder, creating a customizable operation that can be modified before being
        /// sent. The operation's inner [http::Request] can be modified as well.
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::UpdateStreamMode,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::UpdateStreamModeError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::UpdateStreamModeOutput,
            aws_smithy_http::result::SdkError<crate::error::UpdateStreamModeError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }
        /// <p> Specifies the ARN of the data stream whose capacity mode you want to update. </p>
        pub fn stream_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.stream_arn(input.into());
            self
        }
        /// <p> Specifies the ARN of the data stream whose capacity mode you want to update. </p>
        pub fn set_stream_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.inner = self.inner.set_stream_arn(input);
            self
        }
        /// <p> Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an <b>on-demand</b> capacity mode and a <b>provisioned</b> capacity mode for your data streams. </p>
        pub fn stream_mode_details(mut self, input: crate::model::StreamModeDetails) -> Self {
            self.inner = self.inner.stream_mode_details(input);
            self
        }
        /// <p> Specifies the capacity mode to which you want to set your data stream. Currently, in Kinesis Data Streams, you can choose between an <b>on-demand</b> capacity mode and a <b>provisioned</b> capacity mode for your data streams. </p>
        pub fn set_stream_mode_details(
            mut self,
            input: std::option::Option<crate::model::StreamModeDetails>,
        ) -> Self {
            self.inner = self.inner.set_stream_mode_details(input);
            self
        }
    }
}

impl Client {
    /// Creates a new client from an [SDK Config](aws_types::sdk_config::SdkConfig).
    ///
    /// # Panics
    ///
    /// - This method will panic if the `sdk_config` is missing an async sleep implementation. If you experience this panic, set
    ///     the `sleep_impl` on the Config passed into this function to fix it.
    /// - This method will panic if the `sdk_config` is missing an HTTP connector. If you experience this panic, set the
    ///     `http_connector` on the Config passed into this function to fix it.
    pub fn new(sdk_config: &aws_types::sdk_config::SdkConfig) -> Self {
        Self::from_conf(sdk_config.into())
    }

    /// Creates a new client from the service [`Config`](crate::Config).
    ///
    /// # Panics
    ///
    /// - This method will panic if the `conf` is missing an async sleep implementation. If you experience this panic, set
    ///     the `sleep_impl` on the Config passed into this function to fix it.
    /// - This method will panic if the `conf` is missing an HTTP connector. If you experience this panic, set the
    ///     `http_connector` on the Config passed into this function to fix it.
    pub fn from_conf(conf: crate::Config) -> Self {
        let retry_config = conf
            .retry_config()
            .cloned()
            .unwrap_or_else(aws_smithy_types::retry::RetryConfig::disabled);
        let timeout_config = conf
            .timeout_config()
            .cloned()
            .unwrap_or_else(aws_smithy_types::timeout::TimeoutConfig::disabled);
        let sleep_impl = conf.sleep_impl();
        if (retry_config.has_retry() || timeout_config.has_timeouts()) && sleep_impl.is_none() {
            panic!("An async sleep implementation is required for retries or timeouts to work. \
                                    Set the `sleep_impl` on the Config passed into this function to fix this panic.");
        }

        let connector = conf.http_connector().and_then(|c| {
            let timeout_config = conf
                .timeout_config()
                .cloned()
                .unwrap_or_else(aws_smithy_types::timeout::TimeoutConfig::disabled);
            let connector_settings =
                aws_smithy_client::http_connector::ConnectorSettings::from_timeout_config(
                    &timeout_config,
                );
            c.connector(&connector_settings, conf.sleep_impl())
        });

        let builder = aws_smithy_client::Builder::new();

        let builder = match connector {
            // Use provided connector
            Some(c) => builder.connector(c),
            None => {
                #[cfg(any(feature = "rustls", feature = "native-tls"))]
                {
                    // Use default connector based on enabled features
                    builder.dyn_https_connector(
                        aws_smithy_client::http_connector::ConnectorSettings::from_timeout_config(
                            &timeout_config,
                        ),
                    )
                }
                #[cfg(not(any(feature = "rustls", feature = "native-tls")))]
                {
                    panic!("No HTTP connector was available. Enable the `rustls` or `native-tls` crate feature or set a connector to fix this.");
                }
            }
        };
        let mut builder = builder
            .middleware(aws_smithy_client::erase::DynMiddleware::new(
                crate::middleware::DefaultMiddleware::new(),
            ))
            .retry_config(retry_config.into())
            .operation_timeout_config(timeout_config.into());
        builder.set_sleep_impl(sleep_impl);
        let client = builder.build();

        Self {
            handle: std::sync::Arc::new(Handle { client, conf }),
        }
    }
}