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

/// <p>A structure that contains the configuration for the <code>SINGLE_MASTER</code> channel type.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SingleMasterConfiguration {
    /// <p>The period of time (in seconds) a signaling channel retains undelivered messages before they are discarded. Use to update this value.</p>
    pub message_ttl_seconds: ::std::option::Option<i32>,
}
impl SingleMasterConfiguration {
    /// <p>The period of time (in seconds) a signaling channel retains undelivered messages before they are discarded. Use to update this value.</p>
    pub fn message_ttl_seconds(&self) -> ::std::option::Option<i32> {
        self.message_ttl_seconds
    }
}
impl SingleMasterConfiguration {
    /// Creates a new builder-style object to manufacture [`SingleMasterConfiguration`](crate::types::SingleMasterConfiguration).
    pub fn builder() -> crate::types::builders::SingleMasterConfigurationBuilder {
        crate::types::builders::SingleMasterConfigurationBuilder::default()
    }
}

/// A builder for [`SingleMasterConfiguration`](crate::types::SingleMasterConfiguration).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SingleMasterConfigurationBuilder {
    pub(crate) message_ttl_seconds: ::std::option::Option<i32>,
}
impl SingleMasterConfigurationBuilder {
    /// <p>The period of time (in seconds) a signaling channel retains undelivered messages before they are discarded. Use to update this value.</p>
    pub fn message_ttl_seconds(mut self, input: i32) -> Self {
        self.message_ttl_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>The period of time (in seconds) a signaling channel retains undelivered messages before they are discarded. Use to update this value.</p>
    pub fn set_message_ttl_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.message_ttl_seconds = input;
        self
    }
    /// <p>The period of time (in seconds) a signaling channel retains undelivered messages before they are discarded. Use to update this value.</p>
    pub fn get_message_ttl_seconds(&self) -> &::std::option::Option<i32> {
        &self.message_ttl_seconds
    }
    /// Consumes the builder and constructs a [`SingleMasterConfiguration`](crate::types::SingleMasterConfiguration).
    pub fn build(self) -> crate::types::SingleMasterConfiguration {
        crate::types::SingleMasterConfiguration {
            message_ttl_seconds: self.message_ttl_seconds,
        }
    }
}
