aws-sdk-elementalinference 1.6.0

AWS SDK for AWS Elemental Inference
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, ::std::fmt::Debug)]
pub struct UpdateDictionaryInput {
    /// <p>The ID of the dictionary to update.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>A new name for the dictionary. If not specified, the name is not changed.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A new language for the dictionary. If not specified, the language is not changed.</p>
    pub language: ::std::option::Option<crate::types::DictionaryLanguage>,
    /// <p>New dictionary entries. If not specified, the entries are not changed.</p>
    pub entries: ::std::option::Option<::std::string::String>,
}
impl UpdateDictionaryInput {
    /// <p>The ID of the dictionary to update.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>A new name for the dictionary. If not specified, the name is not changed.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A new language for the dictionary. If not specified, the language is not changed.</p>
    pub fn language(&self) -> ::std::option::Option<&crate::types::DictionaryLanguage> {
        self.language.as_ref()
    }
    /// <p>New dictionary entries. If not specified, the entries are not changed.</p>
    pub fn entries(&self) -> ::std::option::Option<&str> {
        self.entries.as_deref()
    }
}
impl UpdateDictionaryInput {
    /// Creates a new builder-style object to manufacture [`UpdateDictionaryInput`](crate::operation::update_dictionary::UpdateDictionaryInput).
    pub fn builder() -> crate::operation::update_dictionary::builders::UpdateDictionaryInputBuilder {
        crate::operation::update_dictionary::builders::UpdateDictionaryInputBuilder::default()
    }
}

/// A builder for [`UpdateDictionaryInput`](crate::operation::update_dictionary::UpdateDictionaryInput).
#[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 {
    /// <p>The ID of the dictionary to update.</p>
    /// This field is required.
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the dictionary to update.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The ID of the dictionary to update.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>A new name for the dictionary. If not specified, the name is not changed.</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>A new name for the dictionary. If not specified, the name is not changed.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>A new name for the dictionary. If not specified, the name is not changed.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A new language for the dictionary. If not specified, the language is not changed.</p>
    pub fn language(mut self, input: crate::types::DictionaryLanguage) -> Self {
        self.language = ::std::option::Option::Some(input);
        self
    }
    /// <p>A new language for the dictionary. If not specified, the language is not changed.</p>
    pub fn set_language(mut self, input: ::std::option::Option<crate::types::DictionaryLanguage>) -> Self {
        self.language = input;
        self
    }
    /// <p>A new language for the dictionary. If not specified, the language is not changed.</p>
    pub fn get_language(&self) -> &::std::option::Option<crate::types::DictionaryLanguage> {
        &self.language
    }
    /// <p>New dictionary entries. If not specified, the entries are not changed.</p>
    pub fn entries(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.entries = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>New dictionary entries. If not specified, the entries are not changed.</p>
    pub fn set_entries(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.entries = input;
        self
    }
    /// <p>New dictionary entries. If not specified, the entries are not changed.</p>
    pub fn get_entries(&self) -> &::std::option::Option<::std::string::String> {
        &self.entries
    }
    /// Consumes the builder and constructs a [`UpdateDictionaryInput`](crate::operation::update_dictionary::UpdateDictionaryInput).
    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,
        })
    }
}