aws-sdk-polly 1.109.0

AWS SDK for Amazon Polly
Documentation
// 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)]
pub struct PutLexiconInput {
    /// <p>Name of the lexicon. The name must follow the regular express format \[0-9A-Za-z\]{1,20}. That is, the name is a case-sensitive alphanumeric string up to 20 characters long.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Content of the PLS lexicon as string data.</p>
    pub content: ::std::option::Option<::std::string::String>,
}
impl PutLexiconInput {
    /// <p>Name of the lexicon. The name must follow the regular express format \[0-9A-Za-z\]{1,20}. That is, the name is a case-sensitive alphanumeric string up to 20 characters long.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Content of the PLS lexicon as string data.</p>
    pub fn content(&self) -> ::std::option::Option<&str> {
        self.content.as_deref()
    }
}
impl ::std::fmt::Debug for PutLexiconInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PutLexiconInput");
        formatter.field("name", &self.name);
        formatter.field("content", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl PutLexiconInput {
    /// Creates a new builder-style object to manufacture [`PutLexiconInput`](crate::operation::put_lexicon::PutLexiconInput).
    pub fn builder() -> crate::operation::put_lexicon::builders::PutLexiconInputBuilder {
        crate::operation::put_lexicon::builders::PutLexiconInputBuilder::default()
    }
}

/// A builder for [`PutLexiconInput`](crate::operation::put_lexicon::PutLexiconInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct PutLexiconInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) content: ::std::option::Option<::std::string::String>,
}
impl PutLexiconInputBuilder {
    /// <p>Name of the lexicon. The name must follow the regular express format \[0-9A-Za-z\]{1,20}. That is, the name is a case-sensitive alphanumeric string up to 20 characters long.</p>
    /// This field is required.
    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. The name must follow the regular express format \[0-9A-Za-z\]{1,20}. That is, the name is a case-sensitive alphanumeric string up to 20 characters long.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>Name of the lexicon. The name must follow the regular express format \[0-9A-Za-z\]{1,20}. That is, the name is a case-sensitive alphanumeric string up to 20 characters long.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Content of the PLS lexicon as string data.</p>
    /// This field is required.
    pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.content = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Content of the PLS lexicon as string data.</p>
    pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.content = input;
        self
    }
    /// <p>Content of the PLS lexicon as string data.</p>
    pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
        &self.content
    }
    /// Consumes the builder and constructs a [`PutLexiconInput`](crate::operation::put_lexicon::PutLexiconInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::put_lexicon::PutLexiconInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::put_lexicon::PutLexiconInput {
            name: self.name,
            content: self.content,
        })
    }
}
impl ::std::fmt::Debug for PutLexiconInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("PutLexiconInputBuilder");
        formatter.field("name", &self.name);
        formatter.field("content", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}