#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateDictionaryInput {
pub id: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub language: ::std::option::Option<crate::types::DictionaryLanguage>,
pub entries: ::std::option::Option<::std::string::String>,
}
impl UpdateDictionaryInput {
pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn language(&self) -> ::std::option::Option<&crate::types::DictionaryLanguage> {
self.language.as_ref()
}
pub fn entries(&self) -> ::std::option::Option<&str> {
self.entries.as_deref()
}
}
impl UpdateDictionaryInput {
pub fn builder() -> crate::operation::update_dictionary::builders::UpdateDictionaryInputBuilder {
crate::operation::update_dictionary::builders::UpdateDictionaryInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateDictionaryInputBuilder {
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) language: ::std::option::Option<crate::types::DictionaryLanguage>,
pub(crate) entries: ::std::option::Option<::std::string::String>,
}
impl UpdateDictionaryInputBuilder {
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
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 language(mut self, input: crate::types::DictionaryLanguage) -> Self {
self.language = ::std::option::Option::Some(input);
self
}
pub fn set_language(mut self, input: ::std::option::Option<crate::types::DictionaryLanguage>) -> Self {
self.language = input;
self
}
pub fn get_language(&self) -> &::std::option::Option<crate::types::DictionaryLanguage> {
&self.language
}
pub fn entries(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.entries = ::std::option::Option::Some(input.into());
self
}
pub fn set_entries(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.entries = input;
self
}
pub fn get_entries(&self) -> &::std::option::Option<::std::string::String> {
&self.entries
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_dictionary::UpdateDictionaryInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_dictionary::UpdateDictionaryInput {
id: self.id,
name: self.name,
language: self.language,
entries: self.entries,
})
}
}