#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct PutLexiconInput {
pub name: ::std::option::Option<::std::string::String>,
pub content: ::std::option::Option<::std::string::String>,
}
impl PutLexiconInput {
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
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 {
pub fn builder() -> crate::operation::put_lexicon::builders::PutLexiconInputBuilder {
crate::operation::put_lexicon::builders::PutLexiconInputBuilder::default()
}
}
#[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 {
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn content(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.content = ::std::option::Option::Some(input.into());
self
}
pub fn set_content(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.content = input;
self
}
pub fn get_content(&self) -> &::std::option::Option<::std::string::String> {
&self.content
}
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()
}
}