// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreateVocabulary`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`vocabulary_name(impl Into<String>)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::vocabulary_name) / [`set_vocabulary_name(Option<String>)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::set_vocabulary_name):<br>required: **true**<br><p>A unique name, chosen by you, for your new custom vocabulary.</p> <p>This name is case sensitive, cannot contain spaces, and must be unique within an Amazon Web Services account. If you try to create a new custom vocabulary with the same name as an existing custom vocabulary, you get a <code>ConflictException</code> error.</p><br>
/// - [`language_code(LanguageCode)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::language_code) / [`set_language_code(Option<LanguageCode>)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::set_language_code):<br>required: **true**<br><p>The language code that represents the language of the entries in your custom vocabulary. Each custom vocabulary must contain terms in only one language.</p> <p>A custom vocabulary can only be used to transcribe files in the same language as the custom vocabulary. For example, if you create a custom vocabulary using US English (<code>en-US</code>), you can only apply this custom vocabulary to files that contain English audio.</p> <p>For a list of supported languages and their associated language codes, refer to the <a href="https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html">Supported languages</a> table.</p><br>
/// - [`phrases(impl Into<String>)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::phrases) / [`set_phrases(Option<Vec::<String>>)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::set_phrases):<br>required: **false**<br><p>Use this parameter if you want to create your custom vocabulary by including all desired terms, as comma-separated values, within your request. The other option for creating your custom vocabulary is to save your entries in a text file and upload them to an Amazon S3 bucket, then specify the location of your file using the <code>VocabularyFileUri</code> parameter.</p> <p>Note that if you include <code>Phrases</code> in your request, you cannot use <code>VocabularyFileUri</code>; you must choose one or the other.</p> <p>Each language has a character set that contains all allowed characters for that specific language. If you use unsupported characters, your custom vocabulary filter request fails. Refer to <a href="https://docs.aws.amazon.com/transcribe/latest/dg/charsets.html">Character Sets for Custom Vocabularies</a> to get the character set for your language.</p><br>
/// - [`vocabulary_file_uri(impl Into<String>)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::vocabulary_file_uri) / [`set_vocabulary_file_uri(Option<String>)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::set_vocabulary_file_uri):<br>required: **false**<br><p>The Amazon S3 location of the text file that contains your custom vocabulary. The URI must be located in the same Amazon Web Services Region as the resource you're calling.</p> <p>Here's an example URI path: <code>s3://DOC-EXAMPLE-BUCKET/my-vocab-file.txt</code></p> <p>Note that if you include <code>VocabularyFileUri</code> in your request, you cannot use the <code>Phrases</code> flag; you must choose one or the other.</p><br>
/// - [`tags(Tag)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::set_tags):<br>required: **false**<br><p>Adds one or more custom tags, each in the form of a key:value pair, to a new custom vocabulary at the time you create this new custom vocabulary.</p> <p>To learn more about using tags with Amazon Transcribe, refer to <a href="https://docs.aws.amazon.com/transcribe/latest/dg/tagging.html">Tagging resources</a>.</p><br>
/// - [`data_access_role_arn(impl Into<String>)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::data_access_role_arn) / [`set_data_access_role_arn(Option<String>)`](crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::set_data_access_role_arn):<br>required: **false**<br><p>The Amazon Resource Name (ARN) of an IAM role that has permissions to access the Amazon S3 bucket that contains your input files (in this case, your custom vocabulary). If the role that you specify doesn’t have the appropriate permissions to access the specified Amazon S3 location, your request fails.</p> <p>IAM role ARNs have the format <code>arn:partition:iam::account:role/role-name-with-path</code>. For example: <code>arn:aws:iam::111122223333:role/Admin</code>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns">IAM ARNs</a>.</p><br>
/// - On success, responds with [`CreateVocabularyOutput`](crate::operation::create_vocabulary::CreateVocabularyOutput) with field(s):
/// - [`vocabulary_name(Option<String>)`](crate::operation::create_vocabulary::CreateVocabularyOutput::vocabulary_name): <p>The name you chose for your custom vocabulary.</p>
/// - [`language_code(Option<LanguageCode>)`](crate::operation::create_vocabulary::CreateVocabularyOutput::language_code): <p>The language code you selected for your custom vocabulary.</p>
/// - [`vocabulary_state(Option<VocabularyState>)`](crate::operation::create_vocabulary::CreateVocabularyOutput::vocabulary_state): <p>The processing state of your custom vocabulary. If the state is <code>READY</code>, you can use the custom vocabulary in a <code>StartTranscriptionJob</code> request.</p>
/// - [`last_modified_time(Option<DateTime>)`](crate::operation::create_vocabulary::CreateVocabularyOutput::last_modified_time): <p>The date and time you created your custom vocabulary.</p> <p>Timestamps are in the format <code>YYYY-MM-DD'T'HH:MM:SS.SSSSSS-UTC</code>. For example, <code>2022-05-04T12:32:58.761000-07:00</code> represents 12:32 PM UTC-7 on May 4, 2022.</p>
/// - [`failure_reason(Option<String>)`](crate::operation::create_vocabulary::CreateVocabularyOutput::failure_reason): <p>If <code>VocabularyState</code> is <code>FAILED</code>, <code>FailureReason</code> contains information about why the custom vocabulary request failed. See also: <a href="https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonErrors.html">Common Errors</a>.</p>
/// - On failure, responds with [`SdkError<CreateVocabularyError>`](crate::operation::create_vocabulary::CreateVocabularyError)
pub fn create_vocabulary(&self) -> crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder {
crate::operation::create_vocabulary::builders::CreateVocabularyFluentBuilder::new(self.handle.clone())
}
}