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

/// <p>Describes the content of the lexicon.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct LexiconDescription {
    /// <p>Name of the lexicon.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Provides lexicon metadata.</p>
    pub attributes: ::std::option::Option<crate::types::LexiconAttributes>,
}
impl LexiconDescription {
    /// <p>Name of the lexicon.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Provides lexicon metadata.</p>
    pub fn attributes(&self) -> ::std::option::Option<&crate::types::LexiconAttributes> {
        self.attributes.as_ref()
    }
}
impl LexiconDescription {
    /// Creates a new builder-style object to manufacture [`LexiconDescription`](crate::types::LexiconDescription).
    pub fn builder() -> crate::types::builders::LexiconDescriptionBuilder {
        crate::types::builders::LexiconDescriptionBuilder::default()
    }
}

/// A builder for [`LexiconDescription`](crate::types::LexiconDescription).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct LexiconDescriptionBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) attributes: ::std::option::Option<crate::types::LexiconAttributes>,
}
impl LexiconDescriptionBuilder {
    /// <p>Name of the lexicon.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Name of the lexicon.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>Name of the lexicon.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Provides lexicon metadata.</p>
    pub fn attributes(mut self, input: crate::types::LexiconAttributes) -> Self {
        self.attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>Provides lexicon metadata.</p>
    pub fn set_attributes(mut self, input: ::std::option::Option<crate::types::LexiconAttributes>) -> Self {
        self.attributes = input;
        self
    }
    /// <p>Provides lexicon metadata.</p>
    pub fn get_attributes(&self) -> &::std::option::Option<crate::types::LexiconAttributes> {
        &self.attributes
    }
    /// Consumes the builder and constructs a [`LexiconDescription`](crate::types::LexiconDescription).
    pub fn build(self) -> crate::types::LexiconDescription {
        crate::types::LexiconDescription {
            name: self.name,
            attributes: self.attributes,
        }
    }
}
