
commonMain.aws.sdk.kotlin.services.transcribe.model.UpdateVocabularyRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transcribe.model
public class UpdateVocabularyRequest private constructor(builder: Builder) {
/**
* 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.
*
* IAM role ARNs have the format `arn:partition:iam::account:role/role-name-with-path`. For example: `arn:aws:iam::111122223333:role/Admin`.
*
* For more information, see [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns).
*/
public val dataAccessRoleArn: kotlin.String? = builder.dataAccessRoleArn
/**
* The language code that represents the language of the entries in the custom vocabulary you want to update. Each custom vocabulary must contain terms in only one language.
*
* 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 (`en-US`), you can only apply this custom vocabulary to files that contain English audio.
*
* For a list of supported languages and their associated language codes, refer to the [Supported languages](https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) table.
*/
public val languageCode: aws.sdk.kotlin.services.transcribe.model.LanguageCode? = builder.languageCode
/**
* Use this parameter if you want to update your custom vocabulary by including all desired terms, as comma-separated values, within your request. The other option for updating 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 `VocabularyFileUri` parameter.
*
* Note that if you include `Phrases` in your request, you cannot use `VocabularyFileUri`; you must choose one or the other.
*
* 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 [Character Sets for Custom Vocabularies](https://docs.aws.amazon.com/transcribe/latest/dg/charsets.html) to get the character set for your language.
*/
public val phrases: List? = builder.phrases
/**
* 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.
*
* Here's an example URI path: `s3://DOC-EXAMPLE-BUCKET/my-vocab-file.txt`
*
* Note that if you include `VocabularyFileUri` in your request, you cannot use the `Phrases` flag; you must choose one or the other.
*/
public val vocabularyFileUri: kotlin.String? = builder.vocabularyFileUri
/**
* The name of the custom vocabulary you want to update. Custom vocabulary names are case sensitive.
*/
public val vocabularyName: kotlin.String? = builder.vocabularyName
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transcribe.model.UpdateVocabularyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateVocabularyRequest(")
append("dataAccessRoleArn=$dataAccessRoleArn,")
append("languageCode=$languageCode,")
append("phrases=$phrases,")
append("vocabularyFileUri=$vocabularyFileUri,")
append("vocabularyName=$vocabularyName")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = dataAccessRoleArn?.hashCode() ?: 0
result = 31 * result + (languageCode?.hashCode() ?: 0)
result = 31 * result + (phrases?.hashCode() ?: 0)
result = 31 * result + (vocabularyFileUri?.hashCode() ?: 0)
result = 31 * result + (vocabularyName?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as UpdateVocabularyRequest
if (dataAccessRoleArn != other.dataAccessRoleArn) return false
if (languageCode != other.languageCode) return false
if (phrases != other.phrases) return false
if (vocabularyFileUri != other.vocabularyFileUri) return false
if (vocabularyName != other.vocabularyName) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transcribe.model.UpdateVocabularyRequest = Builder(this).apply(block).build()
public class Builder {
/**
* 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.
*
* IAM role ARNs have the format `arn:partition:iam::account:role/role-name-with-path`. For example: `arn:aws:iam::111122223333:role/Admin`.
*
* For more information, see [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns).
*/
public var dataAccessRoleArn: kotlin.String? = null
/**
* The language code that represents the language of the entries in the custom vocabulary you want to update. Each custom vocabulary must contain terms in only one language.
*
* 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 (`en-US`), you can only apply this custom vocabulary to files that contain English audio.
*
* For a list of supported languages and their associated language codes, refer to the [Supported languages](https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) table.
*/
public var languageCode: aws.sdk.kotlin.services.transcribe.model.LanguageCode? = null
/**
* Use this parameter if you want to update your custom vocabulary by including all desired terms, as comma-separated values, within your request. The other option for updating 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 `VocabularyFileUri` parameter.
*
* Note that if you include `Phrases` in your request, you cannot use `VocabularyFileUri`; you must choose one or the other.
*
* 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 [Character Sets for Custom Vocabularies](https://docs.aws.amazon.com/transcribe/latest/dg/charsets.html) to get the character set for your language.
*/
public var phrases: List? = null
/**
* 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.
*
* Here's an example URI path: `s3://DOC-EXAMPLE-BUCKET/my-vocab-file.txt`
*
* Note that if you include `VocabularyFileUri` in your request, you cannot use the `Phrases` flag; you must choose one or the other.
*/
public var vocabularyFileUri: kotlin.String? = null
/**
* The name of the custom vocabulary you want to update. Custom vocabulary names are case sensitive.
*/
public var vocabularyName: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transcribe.model.UpdateVocabularyRequest) : this() {
this.dataAccessRoleArn = x.dataAccessRoleArn
this.languageCode = x.languageCode
this.phrases = x.phrases
this.vocabularyFileUri = x.vocabularyFileUri
this.vocabularyName = x.vocabularyName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transcribe.model.UpdateVocabularyRequest = UpdateVocabularyRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy