aws.sdk.kotlin.services.transcribe.model.CreateVocabularyRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transcribe Show documentation
Show all versions of transcribe Show documentation
Amazon Transcribe Service
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transcribe.model
class CreateVocabularyRequest private constructor(builder: Builder) {
/**
* The language code that represents the language of the entries in your custom
* vocabulary. Each vocabulary must contain terms in only one language. For a list of
* languages and their corresponding language codes, see Supported
* languages.
*/
val languageCode: aws.sdk.kotlin.services.transcribe.model.LanguageCode? = builder.languageCode
/**
* Use this flag to include a list of terms within your request.
* Note that if you include Phrases in your request, you cannot
* use VocabularyFileUri; you must choose one or the other.
*/
val phrases: List? = builder.phrases
/**
* Adds one or more tags, each in the form of a key:value pair, to a new
* custom vocabulary at the time you create this new vocabulary.
*/
val tags: List? = builder.tags
/**
* The S3 location of the text file that contains your custom vocabulary. The
* URI must be located in the same region as the API endpoint you're calling.
* Here's an example URI path:
*
* https://s3.us-east-1.amazonaws.com/my-s3-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.
*/
val vocabularyFileUri: kotlin.String? = builder.vocabularyFileUri
/**
* The name of your new vocabulary.
* This name is case sensitive, cannot contain spaces, and must be unique within an
* Amazon Web Services account. If you try to create a vocabulary with the same name as a
* previous vocabulary, you get a ConflictException error.
*/
val vocabularyName: kotlin.String? = builder.vocabularyName
companion object {
operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.transcribe.model.CreateVocabularyRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateVocabularyRequest(")
append("languageCode=$languageCode,")
append("phrases=$phrases,")
append("tags=$tags,")
append("vocabularyFileUri=$vocabularyFileUri,")
append("vocabularyName=$vocabularyName)")
}
override fun hashCode(): kotlin.Int {
var result = languageCode?.hashCode() ?: 0
result = 31 * result + (phrases?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateVocabularyRequest
if (languageCode != other.languageCode) return false
if (phrases != other.phrases) return false
if (tags != other.tags) return false
if (vocabularyFileUri != other.vocabularyFileUri) return false
if (vocabularyName != other.vocabularyName) return false
return true
}
inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.transcribe.model.CreateVocabularyRequest = Builder(this).apply(block).build()
class Builder {
/**
* The language code that represents the language of the entries in your custom
* vocabulary. Each vocabulary must contain terms in only one language. For a list of
* languages and their corresponding language codes, see Supported
* languages.
*/
var languageCode: aws.sdk.kotlin.services.transcribe.model.LanguageCode? = null
/**
* Use this flag to include a list of terms within your request.
* Note that if you include Phrases in your request, you cannot
* use VocabularyFileUri; you must choose one or the other.
*/
var phrases: List? = null
/**
* Adds one or more tags, each in the form of a key:value pair, to a new
* custom vocabulary at the time you create this new vocabulary.
*/
var tags: List? = null
/**
* The S3 location of the text file that contains your custom vocabulary. The
* URI must be located in the same region as the API endpoint you're calling.
* Here's an example URI path:
*
* https://s3.us-east-1.amazonaws.com/my-s3-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.
*/
var vocabularyFileUri: kotlin.String? = null
/**
* The name of your new vocabulary.
* This name is case sensitive, cannot contain spaces, and must be unique within an
* Amazon Web Services account. If you try to create a vocabulary with the same name as a
* previous vocabulary, you get a ConflictException error.
*/
var vocabularyName: kotlin.String? = null
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.transcribe.model.CreateVocabularyRequest) : this() {
this.languageCode = x.languageCode
this.phrases = x.phrases
this.tags = x.tags
this.vocabularyFileUri = x.vocabularyFileUri
this.vocabularyName = x.vocabularyName
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.transcribe.model.CreateVocabularyRequest = CreateVocabularyRequest(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy