// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SubscribeToShardInput {
    /// <p>For this parameter, use the value you obtained when you called <code>RegisterStreamConsumer</code>.</p>
    pub consumer_arn: ::std::option::Option<::std::string::String>,
    /// <p>Not Implemented. Reserved for future use.</p>
    pub stream_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the shard you want to subscribe to. To see a list of all the shards for a given stream, use <code>ListShards</code>.</p>
    pub shard_id: ::std::option::Option<::std::string::String>,
    /// <p>The starting position in the data stream from which to start streaming.</p>
    pub starting_position: ::std::option::Option<crate::types::StartingPosition>,
}
impl SubscribeToShardInput {
    /// <p>For this parameter, use the value you obtained when you called <code>RegisterStreamConsumer</code>.</p>
    pub fn consumer_arn(&self) -> ::std::option::Option<&str> {
        self.consumer_arn.as_deref()
    }
    /// <p>Not Implemented. Reserved for future use.</p>
    pub fn stream_id(&self) -> ::std::option::Option<&str> {
        self.stream_id.as_deref()
    }
    /// <p>The ID of the shard you want to subscribe to. To see a list of all the shards for a given stream, use <code>ListShards</code>.</p>
    pub fn shard_id(&self) -> ::std::option::Option<&str> {
        self.shard_id.as_deref()
    }
    /// <p>The starting position in the data stream from which to start streaming.</p>
    pub fn starting_position(&self) -> ::std::option::Option<&crate::types::StartingPosition> {
        self.starting_position.as_ref()
    }
}
impl SubscribeToShardInput {
    /// Creates a new builder-style object to manufacture [`SubscribeToShardInput`](crate::operation::subscribe_to_shard::SubscribeToShardInput).
    pub fn builder() -> crate::operation::subscribe_to_shard::builders::SubscribeToShardInputBuilder {
        crate::operation::subscribe_to_shard::builders::SubscribeToShardInputBuilder::default()
    }
}

/// A builder for [`SubscribeToShardInput`](crate::operation::subscribe_to_shard::SubscribeToShardInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SubscribeToShardInputBuilder {
    pub(crate) consumer_arn: ::std::option::Option<::std::string::String>,
    pub(crate) stream_id: ::std::option::Option<::std::string::String>,
    pub(crate) shard_id: ::std::option::Option<::std::string::String>,
    pub(crate) starting_position: ::std::option::Option<crate::types::StartingPosition>,
}
impl SubscribeToShardInputBuilder {
    /// <p>For this parameter, use the value you obtained when you called <code>RegisterStreamConsumer</code>.</p>
    /// This field is required.
    pub fn consumer_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.consumer_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>For this parameter, use the value you obtained when you called <code>RegisterStreamConsumer</code>.</p>
    pub fn set_consumer_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.consumer_arn = input;
        self
    }
    /// <p>For this parameter, use the value you obtained when you called <code>RegisterStreamConsumer</code>.</p>
    pub fn get_consumer_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.consumer_arn
    }
    /// <p>Not Implemented. Reserved for future use.</p>
    pub fn stream_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stream_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Not Implemented. Reserved for future use.</p>
    pub fn set_stream_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stream_id = input;
        self
    }
    /// <p>Not Implemented. Reserved for future use.</p>
    pub fn get_stream_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.stream_id
    }
    /// <p>The ID of the shard you want to subscribe to. To see a list of all the shards for a given stream, use <code>ListShards</code>.</p>
    /// This field is required.
    pub fn shard_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.shard_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the shard you want to subscribe to. To see a list of all the shards for a given stream, use <code>ListShards</code>.</p>
    pub fn set_shard_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.shard_id = input;
        self
    }
    /// <p>The ID of the shard you want to subscribe to. To see a list of all the shards for a given stream, use <code>ListShards</code>.</p>
    pub fn get_shard_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.shard_id
    }
    /// <p>The starting position in the data stream from which to start streaming.</p>
    /// This field is required.
    pub fn starting_position(mut self, input: crate::types::StartingPosition) -> Self {
        self.starting_position = ::std::option::Option::Some(input);
        self
    }
    /// <p>The starting position in the data stream from which to start streaming.</p>
    pub fn set_starting_position(mut self, input: ::std::option::Option<crate::types::StartingPosition>) -> Self {
        self.starting_position = input;
        self
    }
    /// <p>The starting position in the data stream from which to start streaming.</p>
    pub fn get_starting_position(&self) -> &::std::option::Option<crate::types::StartingPosition> {
        &self.starting_position
    }
    /// Consumes the builder and constructs a [`SubscribeToShardInput`](crate::operation::subscribe_to_shard::SubscribeToShardInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::subscribe_to_shard::SubscribeToShardInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::subscribe_to_shard::SubscribeToShardInput {
            consumer_arn: self.consumer_arn,
            stream_id: self.stream_id,
            shard_id: self.shard_id,
            starting_position: self.starting_position,
        })
    }
}
