aws-sdk-connect 1.153.0

AWS SDK for Amazon Connect Service
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 AssociateDefaultVocabularyInput {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/transcribe-whatis.html">What is Amazon Transcribe?</a></p>
    pub language_code: ::std::option::Option<crate::types::VocabularyLanguageCode>,
    /// <p>The identifier of the custom vocabulary. If this is empty, the default is set to none.</p>
    pub vocabulary_id: ::std::option::Option<::std::string::String>,
}
impl AssociateDefaultVocabularyInput {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/transcribe-whatis.html">What is Amazon Transcribe?</a></p>
    pub fn language_code(&self) -> ::std::option::Option<&crate::types::VocabularyLanguageCode> {
        self.language_code.as_ref()
    }
    /// <p>The identifier of the custom vocabulary. If this is empty, the default is set to none.</p>
    pub fn vocabulary_id(&self) -> ::std::option::Option<&str> {
        self.vocabulary_id.as_deref()
    }
}
impl AssociateDefaultVocabularyInput {
    /// Creates a new builder-style object to manufacture [`AssociateDefaultVocabularyInput`](crate::operation::associate_default_vocabulary::AssociateDefaultVocabularyInput).
    pub fn builder() -> crate::operation::associate_default_vocabulary::builders::AssociateDefaultVocabularyInputBuilder {
        crate::operation::associate_default_vocabulary::builders::AssociateDefaultVocabularyInputBuilder::default()
    }
}

/// A builder for [`AssociateDefaultVocabularyInput`](crate::operation::associate_default_vocabulary::AssociateDefaultVocabularyInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateDefaultVocabularyInputBuilder {
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) language_code: ::std::option::Option<crate::types::VocabularyLanguageCode>,
    pub(crate) vocabulary_id: ::std::option::Option<::std::string::String>,
}
impl AssociateDefaultVocabularyInputBuilder {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    /// This field is required.
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/transcribe-whatis.html">What is Amazon Transcribe?</a></p>
    /// This field is required.
    pub fn language_code(mut self, input: crate::types::VocabularyLanguageCode) -> Self {
        self.language_code = ::std::option::Option::Some(input);
        self
    }
    /// <p>The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/transcribe-whatis.html">What is Amazon Transcribe?</a></p>
    pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::VocabularyLanguageCode>) -> Self {
        self.language_code = input;
        self
    }
    /// <p>The language code of the vocabulary entries. For a list of languages and their corresponding language codes, see <a href="https://docs.aws.amazon.com/transcribe/latest/dg/transcribe-whatis.html">What is Amazon Transcribe?</a></p>
    pub fn get_language_code(&self) -> &::std::option::Option<crate::types::VocabularyLanguageCode> {
        &self.language_code
    }
    /// <p>The identifier of the custom vocabulary. If this is empty, the default is set to none.</p>
    pub fn vocabulary_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.vocabulary_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the custom vocabulary. If this is empty, the default is set to none.</p>
    pub fn set_vocabulary_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.vocabulary_id = input;
        self
    }
    /// <p>The identifier of the custom vocabulary. If this is empty, the default is set to none.</p>
    pub fn get_vocabulary_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.vocabulary_id
    }
    /// Consumes the builder and constructs a [`AssociateDefaultVocabularyInput`](crate::operation::associate_default_vocabulary::AssociateDefaultVocabularyInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::associate_default_vocabulary::AssociateDefaultVocabularyInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::associate_default_vocabulary::AssociateDefaultVocabularyInput {
            instance_id: self.instance_id,
            language_code: self.language_code,
            vocabulary_id: self.vocabulary_id,
        })
    }
}