// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Configuration that controls when synthesized audio data is sent on the output stream.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct FlushStreamConfiguration {
    /// <p>Specifies whether to force the synthesis engine to immediately write buffered audio data to the output stream.</p>
    pub force: bool,
}
impl FlushStreamConfiguration {
    /// <p>Specifies whether to force the synthesis engine to immediately write buffered audio data to the output stream.</p>
    pub fn force(&self) -> bool {
        self.force
    }
}
impl FlushStreamConfiguration {
    /// Creates a new builder-style object to manufacture [`FlushStreamConfiguration`](crate::types::FlushStreamConfiguration).
    pub fn builder() -> crate::types::builders::FlushStreamConfigurationBuilder {
        crate::types::builders::FlushStreamConfigurationBuilder::default()
    }
}

/// A builder for [`FlushStreamConfiguration`](crate::types::FlushStreamConfiguration).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct FlushStreamConfigurationBuilder {
    pub(crate) force: ::std::option::Option<bool>,
}
impl FlushStreamConfigurationBuilder {
    /// <p>Specifies whether to force the synthesis engine to immediately write buffered audio data to the output stream.</p>
    pub fn force(mut self, input: bool) -> Self {
        self.force = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to force the synthesis engine to immediately write buffered audio data to the output stream.</p>
    pub fn set_force(mut self, input: ::std::option::Option<bool>) -> Self {
        self.force = input;
        self
    }
    /// <p>Specifies whether to force the synthesis engine to immediately write buffered audio data to the output stream.</p>
    pub fn get_force(&self) -> &::std::option::Option<bool> {
        &self.force
    }
    /// Consumes the builder and constructs a [`FlushStreamConfiguration`](crate::types::FlushStreamConfiguration).
    pub fn build(self) -> crate::types::FlushStreamConfiguration {
        crate::types::FlushStreamConfiguration {
            force: self.force.unwrap_or_default(),
        }
    }
}
