commonMain.aws.sdk.kotlin.services.translate.TranslateClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of translate-jvm Show documentation
Show all versions of translate-jvm Show documentation
The AWS SDK for Kotlin client for Translate
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.translate
import aws.sdk.kotlin.runtime.auth.credentials.DefaultChainCredentialsProvider
import aws.sdk.kotlin.runtime.auth.credentials.internal.manage
import aws.sdk.kotlin.runtime.client.AwsSdkClientConfig
import aws.sdk.kotlin.runtime.config.AbstractAwsSdkClientFactory
import aws.sdk.kotlin.runtime.config.endpoints.resolveEndpointUrl
import aws.sdk.kotlin.runtime.config.profile.AwsProfile
import aws.sdk.kotlin.runtime.config.profile.AwsSharedConfig
import aws.sdk.kotlin.runtime.http.retries.AwsRetryPolicy
import aws.sdk.kotlin.services.translate.auth.DefaultTranslateAuthSchemeProvider
import aws.sdk.kotlin.services.translate.auth.TranslateAuthSchemeProvider
import aws.sdk.kotlin.services.translate.endpoints.DefaultTranslateEndpointProvider
import aws.sdk.kotlin.services.translate.endpoints.TranslateEndpointParameters
import aws.sdk.kotlin.services.translate.endpoints.TranslateEndpointProvider
import aws.sdk.kotlin.services.translate.model.CreateParallelDataRequest
import aws.sdk.kotlin.services.translate.model.CreateParallelDataResponse
import aws.sdk.kotlin.services.translate.model.DeleteParallelDataRequest
import aws.sdk.kotlin.services.translate.model.DeleteParallelDataResponse
import aws.sdk.kotlin.services.translate.model.DeleteTerminologyRequest
import aws.sdk.kotlin.services.translate.model.DeleteTerminologyResponse
import aws.sdk.kotlin.services.translate.model.DescribeTextTranslationJobRequest
import aws.sdk.kotlin.services.translate.model.DescribeTextTranslationJobResponse
import aws.sdk.kotlin.services.translate.model.GetParallelDataRequest
import aws.sdk.kotlin.services.translate.model.GetParallelDataResponse
import aws.sdk.kotlin.services.translate.model.GetTerminologyRequest
import aws.sdk.kotlin.services.translate.model.GetTerminologyResponse
import aws.sdk.kotlin.services.translate.model.ImportTerminologyRequest
import aws.sdk.kotlin.services.translate.model.ImportTerminologyResponse
import aws.sdk.kotlin.services.translate.model.ListLanguagesRequest
import aws.sdk.kotlin.services.translate.model.ListLanguagesResponse
import aws.sdk.kotlin.services.translate.model.ListParallelDataRequest
import aws.sdk.kotlin.services.translate.model.ListParallelDataResponse
import aws.sdk.kotlin.services.translate.model.ListTagsForResourceRequest
import aws.sdk.kotlin.services.translate.model.ListTagsForResourceResponse
import aws.sdk.kotlin.services.translate.model.ListTerminologiesRequest
import aws.sdk.kotlin.services.translate.model.ListTerminologiesResponse
import aws.sdk.kotlin.services.translate.model.ListTextTranslationJobsRequest
import aws.sdk.kotlin.services.translate.model.ListTextTranslationJobsResponse
import aws.sdk.kotlin.services.translate.model.StartTextTranslationJobRequest
import aws.sdk.kotlin.services.translate.model.StartTextTranslationJobResponse
import aws.sdk.kotlin.services.translate.model.StopTextTranslationJobRequest
import aws.sdk.kotlin.services.translate.model.StopTextTranslationJobResponse
import aws.sdk.kotlin.services.translate.model.TagResourceRequest
import aws.sdk.kotlin.services.translate.model.TagResourceResponse
import aws.sdk.kotlin.services.translate.model.TranslateDocumentRequest
import aws.sdk.kotlin.services.translate.model.TranslateDocumentResponse
import aws.sdk.kotlin.services.translate.model.TranslateTextRequest
import aws.sdk.kotlin.services.translate.model.TranslateTextResponse
import aws.sdk.kotlin.services.translate.model.UntagResourceRequest
import aws.sdk.kotlin.services.translate.model.UntagResourceResponse
import aws.sdk.kotlin.services.translate.model.UpdateParallelDataRequest
import aws.sdk.kotlin.services.translate.model.UpdateParallelDataResponse
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderConfig
import aws.smithy.kotlin.runtime.awsprotocol.ClockSkewInterceptor
import aws.smithy.kotlin.runtime.client.AbstractSdkClientBuilder
import aws.smithy.kotlin.runtime.client.AbstractSdkClientFactory
import aws.smithy.kotlin.runtime.client.IdempotencyTokenConfig
import aws.smithy.kotlin.runtime.client.IdempotencyTokenProvider
import aws.smithy.kotlin.runtime.client.LogMode
import aws.smithy.kotlin.runtime.client.RetryClientConfig
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfig
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfigImpl
import aws.smithy.kotlin.runtime.client.SdkClient
import aws.smithy.kotlin.runtime.client.SdkClientConfig
import aws.smithy.kotlin.runtime.http.auth.AuthScheme
import aws.smithy.kotlin.runtime.http.auth.HttpAuthConfig
import aws.smithy.kotlin.runtime.http.config.HttpClientConfig
import aws.smithy.kotlin.runtime.http.config.HttpEngineConfig
import aws.smithy.kotlin.runtime.http.engine.HttpClientEngine
import aws.smithy.kotlin.runtime.http.engine.HttpEngineConfigImpl
import aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor
import aws.smithy.kotlin.runtime.net.url.Url
import aws.smithy.kotlin.runtime.retries.RetryStrategy
import aws.smithy.kotlin.runtime.retries.policy.RetryPolicy
import aws.smithy.kotlin.runtime.telemetry.Global
import aws.smithy.kotlin.runtime.telemetry.TelemetryConfig
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
import kotlin.collections.List
import kotlin.jvm.JvmStatic
public const val ServiceId: String = "Translate"
public const val SdkVersion: String = "1.3.20"
public const val ServiceApiVersion: String = "2017-07-01"
/**
* Provides translation of the input content from the source language to the target language.
*/
public interface TranslateClient : SdkClient {
/**
* TranslateClient's configuration
*/
public override val config: Config
public companion object : AbstractAwsSdkClientFactory()
{
@JvmStatic
override fun builder(): Builder = Builder()
override fun finalizeConfig(builder: Builder) {
super.finalizeConfig(builder)
builder.config.interceptors.add(0, ClockSkewInterceptor())
}
override suspend fun finalizeEnvironmentalConfig(builder: Builder, sharedConfig: LazyAsyncValue, activeProfile: LazyAsyncValue) {
super.finalizeEnvironmentalConfig(builder, sharedConfig, activeProfile)
builder.config.endpointUrl = builder.config.endpointUrl ?: resolveEndpointUrl(
sharedConfig,
"Translate",
"TRANSLATE",
"translate",
)
}
}
public class Builder internal constructor(): AbstractSdkClientBuilder() {
override val config: Config.Builder = Config.Builder()
override fun newClient(config: Config): TranslateClient = DefaultTranslateClient(config)
}
public class Config private constructor(builder: Builder) : AwsSdkClientConfig, CredentialsProviderConfig, HttpAuthConfig, HttpClientConfig, HttpEngineConfig by builder.buildHttpEngineConfig(), IdempotencyTokenConfig, RetryClientConfig, RetryStrategyClientConfig by builder.buildRetryStrategyClientConfig(), SdkClientConfig, TelemetryConfig {
override val clientName: String = builder.clientName
override val region: String? = builder.region
override val authSchemes: kotlin.collections.List = builder.authSchemes
override val credentialsProvider: CredentialsProvider = builder.credentialsProvider ?: DefaultChainCredentialsProvider(httpClient = httpClient, region = region).manage()
public val endpointProvider: TranslateEndpointProvider = builder.endpointProvider ?: DefaultTranslateEndpointProvider()
public val endpointUrl: Url? = builder.endpointUrl
override val idempotencyTokenProvider: IdempotencyTokenProvider = builder.idempotencyTokenProvider ?: IdempotencyTokenProvider.Default
override val interceptors: kotlin.collections.List = builder.interceptors
override val logMode: LogMode = builder.logMode ?: LogMode.Default
override val retryPolicy: RetryPolicy = builder.retryPolicy ?: AwsRetryPolicy.Default
override val telemetryProvider: TelemetryProvider = builder.telemetryProvider ?: TelemetryProvider.Global
override val useDualStack: Boolean = builder.useDualStack ?: false
override val useFips: Boolean = builder.useFips ?: false
override val applicationId: String? = builder.applicationId
public val authSchemeProvider: TranslateAuthSchemeProvider = builder.authSchemeProvider ?: DefaultTranslateAuthSchemeProvider()
public companion object {
public inline operator fun invoke(block: Builder.() -> kotlin.Unit): Config = Builder().apply(block).build()
}
public fun toBuilder(): Builder = Builder().apply {
clientName = [email protected]
region = [email protected]
authSchemes = [email protected]
credentialsProvider = [email protected]
endpointProvider = [email protected]
endpointUrl = [email protected]
httpClient = [email protected]
idempotencyTokenProvider = [email protected]
interceptors = [email protected]()
logMode = [email protected]
retryPolicy = [email protected]
retryStrategy = [email protected]
telemetryProvider = [email protected]
useDualStack = [email protected]
useFips = [email protected]
applicationId = [email protected]
authSchemeProvider = [email protected]
}
public class Builder : AwsSdkClientConfig.Builder, CredentialsProviderConfig.Builder, HttpAuthConfig.Builder, HttpClientConfig.Builder, HttpEngineConfig.Builder by HttpEngineConfigImpl.BuilderImpl(), IdempotencyTokenConfig.Builder, RetryClientConfig.Builder, RetryStrategyClientConfig.Builder by RetryStrategyClientConfigImpl.BuilderImpl(), SdkClientConfig.Builder, TelemetryConfig.Builder {
/**
* A reader-friendly name for the client.
*/
override var clientName: String = "Translate"
/**
* The AWS region (e.g. `us-west-2`) to make requests to. See about AWS
* [global infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/) for more
* information
*/
override var region: String? = null
/**
* Register new or override default [AuthScheme]s configured for this client. By default, the set
* of auth schemes configured comes from the service model. An auth scheme configured explicitly takes
* precedence over the defaults and can be used to customize identity resolution and signing for specific
* authentication schemes.
*/
override var authSchemes: kotlin.collections.List = emptyList()
/**
* The AWS credentials provider to use for authenticating requests. If not provided a
* [aws.sdk.kotlin.runtime.auth.credentials.DefaultChainCredentialsProvider] instance will be used.
* NOTE: The caller is responsible for managing the lifetime of the provider when set. The SDK
* client will not close it when the client is closed.
*/
override var credentialsProvider: CredentialsProvider? = null
/**
* The endpoint provider used to determine where to make service requests. **This is an advanced config
* option.**
*
* Endpoint resolution occurs as part of the workflow for every request made via the service client.
*
* The inputs to endpoint resolution are defined on a per-service basis (see [EndpointParameters]).
*/
public var endpointProvider: TranslateEndpointProvider? = null
/**
* A custom endpoint to route requests to. The endpoint set here is passed to the configured
* [endpointProvider], which may inspect and modify it as needed.
*
* Setting a custom endpointUrl should generally be preferred to overriding the [endpointProvider] and is
* the recommended way to route requests to development or preview instances of a service.
*
* **This is an advanced config option.**
*/
public var endpointUrl: Url? = null
/**
* Override the default idempotency token generator. SDK clients will generate tokens for members
* that represent idempotent tokens when not explicitly set by the caller using this generator.
*/
override var idempotencyTokenProvider: IdempotencyTokenProvider? = null
/**
* Add an [aws.smithy.kotlin.runtime.client.Interceptor] that will have access to read and modify
* the request and response objects as they are processed by the SDK.
* Interceptors added using this method are executed in the order they are configured and are always
* later than any added automatically by the SDK.
*/
override var interceptors: kotlin.collections.MutableList = kotlin.collections.mutableListOf()
/**
* Configure events that will be logged. By default clients will not output
* raw requests or responses. Use this setting to opt-in to additional debug logging.
*
* This can be used to configure logging of requests, responses, retries, etc of SDK clients.
*
* **NOTE**: Logging of raw requests or responses may leak sensitive information! It may also have
* performance considerations when dumping the request/response body. This is primarily a tool for
* debug purposes.
*/
override var logMode: LogMode? = null
/**
* The policy to use for evaluating operation results and determining whether/how to retry.
*/
override var retryPolicy: RetryPolicy? = null
/**
* The telemetry provider used to instrument the SDK operations with. By default, the global telemetry
* provider will be used.
*/
override var telemetryProvider: TelemetryProvider? = null
/**
* Flag to toggle whether to use dual-stack endpoints when making requests.
* See [https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html] for more information.
* ` Disabled by default.
*/
override var useDualStack: Boolean? = null
/**
* Flag to toggle whether to use [FIPS](https://aws.amazon.com/compliance/fips/) endpoints when making requests.
* ` Disabled by default.
*/
override var useFips: Boolean? = null
/**
* An optional application specific identifier.
* When set it will be appended to the User-Agent header of every request in the form of: `app/{applicationId}`.
* When not explicitly set, the value will be loaded from the following locations:
*
* - JVM System Property: `aws.userAgentAppId`
* - Environment variable: `AWS_SDK_UA_APP_ID`
* - Shared configuration profile attribute: `sdk_ua_app_id`
*
* See [shared configuration settings](https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html)
* reference for more information on environment variables and shared config settings.
*/
override var applicationId: String? = null
/**
* Configure the provider used to resolve the authentication scheme to use for a particular operation.
*/
public var authSchemeProvider: TranslateAuthSchemeProvider? = null
override fun build(): Config = Config(this)
}
}
/**
* Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.
*/
public suspend fun createParallelData(input: CreateParallelDataRequest): CreateParallelDataResponse
/**
* Deletes a parallel data resource in Amazon Translate.
*/
public suspend fun deleteParallelData(input: DeleteParallelDataRequest): DeleteParallelDataResponse
/**
* A synchronous action that deletes a custom terminology.
*/
public suspend fun deleteTerminology(input: DeleteTerminologyRequest): DeleteTerminologyResponse
/**
* Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.
*/
public suspend fun describeTextTranslationJob(input: DescribeTextTranslationJobRequest): DescribeTextTranslationJobResponse
/**
* Provides information about a parallel data resource.
*/
public suspend fun getParallelData(input: GetParallelDataRequest): GetParallelDataResponse
/**
* Retrieves a custom terminology.
*/
public suspend fun getTerminology(input: GetTerminologyRequest): GetTerminologyResponse
/**
* Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name.
*
* If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology.
*/
public suspend fun importTerminology(input: ImportTerminologyRequest): ImportTerminologyResponse
/**
* Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
*/
public suspend fun listLanguages(input: ListLanguagesRequest = ListLanguagesRequest { }): ListLanguagesResponse
/**
* Provides a list of your parallel data resources in Amazon Translate.
*/
public suspend fun listParallelData(input: ListParallelDataRequest = ListParallelDataRequest { }): ListParallelDataResponse
/**
* Lists all tags associated with a given Amazon Translate resource. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html).
*/
public suspend fun listTagsForResource(input: ListTagsForResourceRequest): ListTagsForResourceResponse
/**
* Provides a list of custom terminologies associated with your account.
*/
public suspend fun listTerminologies(input: ListTerminologiesRequest = ListTerminologiesRequest { }): ListTerminologiesResponse
/**
* Gets a list of the batch translation jobs that you have submitted.
*/
public suspend fun listTextTranslationJobs(input: ListTextTranslationJobsRequest = ListTextTranslationJobsRequest { }): ListTextTranslationJobsResponse
/**
* Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text across multiple documents at once. For batch translation, you can input documents with different source languages (specify `auto` as the source language). You can specify one or more target languages. Batch translation translates each input document into each of the target languages. For more information, see [Asynchronous batch processing](https://docs.aws.amazon.com/translate/latest/dg/async.html).
*
* Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.
*/
public suspend fun startTextTranslationJob(input: StartTextTranslationJobRequest): StartTextTranslationJobResponse
/**
* Stops an asynchronous batch translation job that is in progress.
*
* If the job's state is `IN_PROGRESS`, the job will be marked for termination and put into the `STOP_REQUESTED` state. If the job completes before it can be stopped, it is put into the `COMPLETED` state. Otherwise, the job is put into the `STOPPED` state.
*
* Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation job's `JobId`.
*/
public suspend fun stopTextTranslationJob(input: StopTextTranslationJobRequest): StopTextTranslationJobResponse
/**
* Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html).
*/
public suspend fun tagResource(input: TagResourceRequest): TagResourceResponse
/**
* Translates the input document from the source language to the target language. This synchronous operation supports text, HTML, or Word documents as the input document. `TranslateDocument` supports translations from English to any supported language, and from any supported language to English. Therefore, specify either the source language code or the target language code as “en” (English).
*
* If you set the `Formality` parameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see [Setting formality](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-formality.html).
*/
public suspend fun translateDocument(input: TranslateDocumentRequest): TranslateDocumentResponse
/**
* Translates input text from the source language to the target language. For a list of available languages and language codes, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html).
*/
public suspend fun translateText(input: TranslateTextRequest): TranslateTextResponse
/**
* Removes a specific tag associated with an Amazon Translate resource. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html).
*/
public suspend fun untagResource(input: UntagResourceRequest): UntagResourceResponse
/**
* Updates a previously created parallel data resource by importing a new input file from Amazon S3.
*/
public suspend fun updateParallelData(input: UpdateParallelDataRequest): UpdateParallelDataResponse
}
/**
* Create a copy of the client with one or more configuration values overridden.
* This method allows the caller to perform scoped config overrides for one or more client operations.
*
* Any resources created on your behalf will be shared between clients, and will only be closed when ALL clients using them are closed.
* If you provide a resource (e.g. [HttpClientEngine]) to the SDK, you are responsible for managing the lifetime of that resource.
*/
public fun TranslateClient.withConfig(block: TranslateClient.Config.Builder.() -> Unit): TranslateClient {
val newConfig = config.toBuilder().apply(block).build()
return DefaultTranslateClient(newConfig)
}
/**
* Creates a parallel data resource in Amazon Translate by importing an input file from Amazon S3. Parallel data files contain examples that show how you want segments of text to be translated. By adding parallel data, you can influence the style, tone, and word choice in your translation output.
*/
public suspend inline fun TranslateClient.createParallelData(crossinline block: CreateParallelDataRequest.Builder.() -> Unit): CreateParallelDataResponse = createParallelData(CreateParallelDataRequest.Builder().apply(block).build())
/**
* Deletes a parallel data resource in Amazon Translate.
*/
public suspend inline fun TranslateClient.deleteParallelData(crossinline block: DeleteParallelDataRequest.Builder.() -> Unit): DeleteParallelDataResponse = deleteParallelData(DeleteParallelDataRequest.Builder().apply(block).build())
/**
* A synchronous action that deletes a custom terminology.
*/
public suspend inline fun TranslateClient.deleteTerminology(crossinline block: DeleteTerminologyRequest.Builder.() -> Unit): DeleteTerminologyResponse = deleteTerminology(DeleteTerminologyRequest.Builder().apply(block).build())
/**
* Gets the properties associated with an asynchronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.
*/
public suspend inline fun TranslateClient.describeTextTranslationJob(crossinline block: DescribeTextTranslationJobRequest.Builder.() -> Unit): DescribeTextTranslationJobResponse = describeTextTranslationJob(DescribeTextTranslationJobRequest.Builder().apply(block).build())
/**
* Provides information about a parallel data resource.
*/
public suspend inline fun TranslateClient.getParallelData(crossinline block: GetParallelDataRequest.Builder.() -> Unit): GetParallelDataResponse = getParallelData(GetParallelDataRequest.Builder().apply(block).build())
/**
* Retrieves a custom terminology.
*/
public suspend inline fun TranslateClient.getTerminology(crossinline block: GetTerminologyRequest.Builder.() -> Unit): GetTerminologyResponse = getTerminology(GetTerminologyRequest.Builder().apply(block).build())
/**
* Creates or updates a custom terminology, depending on whether one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. The only supported merge strategy is OVERWRITE, where the imported terminology overwrites the existing terminology of the same name.
*
* If you import a terminology that overwrites an existing one, the new terminology takes up to 10 minutes to fully propagate. After that, translations have access to the new terminology.
*/
public suspend inline fun TranslateClient.importTerminology(crossinline block: ImportTerminologyRequest.Builder.() -> Unit): ImportTerminologyResponse = importTerminology(ImportTerminologyRequest.Builder().apply(block).build())
/**
* Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
*/
public suspend inline fun TranslateClient.listLanguages(crossinline block: ListLanguagesRequest.Builder.() -> Unit): ListLanguagesResponse = listLanguages(ListLanguagesRequest.Builder().apply(block).build())
/**
* Provides a list of your parallel data resources in Amazon Translate.
*/
public suspend inline fun TranslateClient.listParallelData(crossinline block: ListParallelDataRequest.Builder.() -> Unit): ListParallelDataResponse = listParallelData(ListParallelDataRequest.Builder().apply(block).build())
/**
* Lists all tags associated with a given Amazon Translate resource. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html).
*/
public suspend inline fun TranslateClient.listTagsForResource(crossinline block: ListTagsForResourceRequest.Builder.() -> Unit): ListTagsForResourceResponse = listTagsForResource(ListTagsForResourceRequest.Builder().apply(block).build())
/**
* Provides a list of custom terminologies associated with your account.
*/
public suspend inline fun TranslateClient.listTerminologies(crossinline block: ListTerminologiesRequest.Builder.() -> Unit): ListTerminologiesResponse = listTerminologies(ListTerminologiesRequest.Builder().apply(block).build())
/**
* Gets a list of the batch translation jobs that you have submitted.
*/
public suspend inline fun TranslateClient.listTextTranslationJobs(crossinline block: ListTextTranslationJobsRequest.Builder.() -> Unit): ListTextTranslationJobsResponse = listTextTranslationJobs(ListTextTranslationJobsRequest.Builder().apply(block).build())
/**
* Starts an asynchronous batch translation job. Use batch translation jobs to translate large volumes of text across multiple documents at once. For batch translation, you can input documents with different source languages (specify `auto` as the source language). You can specify one or more target languages. Batch translation translates each input document into each of the target languages. For more information, see [Asynchronous batch processing](https://docs.aws.amazon.com/translate/latest/dg/async.html).
*
* Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.
*/
public suspend inline fun TranslateClient.startTextTranslationJob(crossinline block: StartTextTranslationJobRequest.Builder.() -> Unit): StartTextTranslationJobResponse = startTextTranslationJob(StartTextTranslationJobRequest.Builder().apply(block).build())
/**
* Stops an asynchronous batch translation job that is in progress.
*
* If the job's state is `IN_PROGRESS`, the job will be marked for termination and put into the `STOP_REQUESTED` state. If the job completes before it can be stopped, it is put into the `COMPLETED` state. Otherwise, the job is put into the `STOPPED` state.
*
* Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation job's `JobId`.
*/
public suspend inline fun TranslateClient.stopTextTranslationJob(crossinline block: StopTextTranslationJobRequest.Builder.() -> Unit): StopTextTranslationJobResponse = stopTextTranslationJob(StopTextTranslationJobRequest.Builder().apply(block).build())
/**
* Associates a specific tag with a resource. A tag is a key-value pair that adds as a metadata to a resource. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html).
*/
public suspend inline fun TranslateClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse = tagResource(TagResourceRequest.Builder().apply(block).build())
/**
* Translates the input document from the source language to the target language. This synchronous operation supports text, HTML, or Word documents as the input document. `TranslateDocument` supports translations from English to any supported language, and from any supported language to English. Therefore, specify either the source language code or the target language code as “en” (English).
*
* If you set the `Formality` parameter, the request will fail if the target language does not support formality. For a list of target languages that support formality, see [Setting formality](https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-formality.html).
*/
public suspend inline fun TranslateClient.translateDocument(crossinline block: TranslateDocumentRequest.Builder.() -> Unit): TranslateDocumentResponse = translateDocument(TranslateDocumentRequest.Builder().apply(block).build())
/**
* Translates input text from the source language to the target language. For a list of available languages and language codes, see [Supported languages](https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html).
*/
public suspend inline fun TranslateClient.translateText(crossinline block: TranslateTextRequest.Builder.() -> Unit): TranslateTextResponse = translateText(TranslateTextRequest.Builder().apply(block).build())
/**
* Removes a specific tag associated with an Amazon Translate resource. For more information, see [ Tagging your resources](https://docs.aws.amazon.com/translate/latest/dg/tagging.html).
*/
public suspend inline fun TranslateClient.untagResource(crossinline block: UntagResourceRequest.Builder.() -> Unit): UntagResourceResponse = untagResource(UntagResourceRequest.Builder().apply(block).build())
/**
* Updates a previously created parallel data resource by importing a new input file from Amazon S3.
*/
public suspend inline fun TranslateClient.updateParallelData(crossinline block: UpdateParallelDataRequest.Builder.() -> Unit): UpdateParallelDataResponse = updateParallelData(UpdateParallelDataRequest.Builder().apply(block).build())