/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Http { class HttpClient; class HttpClientFactory; } // namespace Http namespace Utils { template< typename R, typename E> class Outcome; namespace Threading { class Executor; } // namespace Threading } // namespace Utils namespace Auth { class AWSCredentials; class AWSCredentialsProvider; } // namespace Auth namespace Client { class RetryStrategy; } // namespace Client namespace Translate { namespace Model { class DeleteTerminologyRequest; class DescribeTextTranslationJobRequest; class GetTerminologyRequest; class ImportTerminologyRequest; class ListTerminologiesRequest; class ListTextTranslationJobsRequest; class StartTextTranslationJobRequest; class StopTextTranslationJobRequest; class TranslateTextRequest; typedef Aws::Utils::Outcome DeleteTerminologyOutcome; typedef Aws::Utils::Outcome DescribeTextTranslationJobOutcome; typedef Aws::Utils::Outcome GetTerminologyOutcome; typedef Aws::Utils::Outcome ImportTerminologyOutcome; typedef Aws::Utils::Outcome ListTerminologiesOutcome; typedef Aws::Utils::Outcome ListTextTranslationJobsOutcome; typedef Aws::Utils::Outcome StartTextTranslationJobOutcome; typedef Aws::Utils::Outcome StopTextTranslationJobOutcome; typedef Aws::Utils::Outcome TranslateTextOutcome; typedef std::future DeleteTerminologyOutcomeCallable; typedef std::future DescribeTextTranslationJobOutcomeCallable; typedef std::future GetTerminologyOutcomeCallable; typedef std::future ImportTerminologyOutcomeCallable; typedef std::future ListTerminologiesOutcomeCallable; typedef std::future ListTextTranslationJobsOutcomeCallable; typedef std::future StartTextTranslationJobOutcomeCallable; typedef std::future StopTextTranslationJobOutcomeCallable; typedef std::future TranslateTextOutcomeCallable; } // namespace Model class TranslateClient; typedef std::function&) > DeleteTerminologyResponseReceivedHandler; typedef std::function&) > DescribeTextTranslationJobResponseReceivedHandler; typedef std::function&) > GetTerminologyResponseReceivedHandler; typedef std::function&) > ImportTerminologyResponseReceivedHandler; typedef std::function&) > ListTerminologiesResponseReceivedHandler; typedef std::function&) > ListTextTranslationJobsResponseReceivedHandler; typedef std::function&) > StartTextTranslationJobResponseReceivedHandler; typedef std::function&) > StopTextTranslationJobResponseReceivedHandler; typedef std::function&) > TranslateTextResponseReceivedHandler; /** *

Provides translation between one source language and another of the same set * of languages.

*/ class AWS_TRANSLATE_API TranslateClient : public Aws::Client::AWSJsonClient { public: typedef Aws::Client::AWSJsonClient BASECLASS; /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ TranslateClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ TranslateClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ TranslateClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); virtual ~TranslateClient(); /** *

A synchronous action that deletes a custom terminology.

See * Also:

AWS * API Reference

*/ virtual Model::DeleteTerminologyOutcome DeleteTerminology(const Model::DeleteTerminologyRequest& request) const; /** *

A synchronous action that deletes a custom terminology.

See * Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::DeleteTerminologyOutcomeCallable DeleteTerminologyCallable(const Model::DeleteTerminologyRequest& request) const; /** *

A synchronous action that deletes a custom terminology.

See * Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void DeleteTerminologyAsync(const Model::DeleteTerminologyRequest& request, const DeleteTerminologyResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Gets the properties associated with an asycnhronous batch translation job * including name, ID, status, source and target languages, input/output S3 * buckets, and so on.

See Also:

AWS * API Reference

*/ virtual Model::DescribeTextTranslationJobOutcome DescribeTextTranslationJob(const Model::DescribeTextTranslationJobRequest& request) const; /** *

Gets the properties associated with an asycnhronous batch translation job * including name, ID, status, source and target languages, input/output S3 * buckets, and so on.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::DescribeTextTranslationJobOutcomeCallable DescribeTextTranslationJobCallable(const Model::DescribeTextTranslationJobRequest& request) const; /** *

Gets the properties associated with an asycnhronous batch translation job * including name, ID, status, source and target languages, input/output S3 * buckets, and so on.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void DescribeTextTranslationJobAsync(const Model::DescribeTextTranslationJobRequest& request, const DescribeTextTranslationJobResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Retrieves a custom terminology.

See Also:

AWS * API Reference

*/ virtual Model::GetTerminologyOutcome GetTerminology(const Model::GetTerminologyRequest& request) const; /** *

Retrieves a custom terminology.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetTerminologyOutcomeCallable GetTerminologyCallable(const Model::GetTerminologyRequest& request) const; /** *

Retrieves a custom terminology.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetTerminologyAsync(const Model::GetTerminologyRequest& request, const GetTerminologyResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge strategy is OVERWRITE, and * so the imported terminology will overwrite an existing terminology of the same * name.

If you import a terminology that overwrites an existing one, the * new terminology take up to 10 minutes to fully propagate and be available for * use in a translation due to cache policies with the DataPlane service that * performs the translations.

See Also:

AWS * API Reference

*/ virtual Model::ImportTerminologyOutcome ImportTerminology(const Model::ImportTerminologyRequest& request) const; /** *

Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge strategy is OVERWRITE, and * so the imported terminology will overwrite an existing terminology of the same * name.

If you import a terminology that overwrites an existing one, the * new terminology take up to 10 minutes to fully propagate and be available for * use in a translation due to cache policies with the DataPlane service that * performs the translations.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ImportTerminologyOutcomeCallable ImportTerminologyCallable(const Model::ImportTerminologyRequest& request) const; /** *

Creates or updates a custom terminology, depending on whether or not 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. Currently, the only supported merge strategy is OVERWRITE, and * so the imported terminology will overwrite an existing terminology of the same * name.

If you import a terminology that overwrites an existing one, the * new terminology take up to 10 minutes to fully propagate and be available for * use in a translation due to cache policies with the DataPlane service that * performs the translations.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ImportTerminologyAsync(const Model::ImportTerminologyRequest& request, const ImportTerminologyResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Provides a list of custom terminologies associated with your * account.

See Also:

AWS * API Reference

*/ virtual Model::ListTerminologiesOutcome ListTerminologies(const Model::ListTerminologiesRequest& request) const; /** *

Provides a list of custom terminologies associated with your * account.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ListTerminologiesOutcomeCallable ListTerminologiesCallable(const Model::ListTerminologiesRequest& request) const; /** *

Provides a list of custom terminologies associated with your * account.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ListTerminologiesAsync(const Model::ListTerminologiesRequest& request, const ListTerminologiesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Gets a list of the batch translation jobs that you have * submitted.

See Also:

AWS * API Reference

*/ virtual Model::ListTextTranslationJobsOutcome ListTextTranslationJobs(const Model::ListTextTranslationJobsRequest& request) const; /** *

Gets a list of the batch translation jobs that you have * submitted.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ListTextTranslationJobsOutcomeCallable ListTextTranslationJobsCallable(const Model::ListTextTranslationJobsRequest& request) const; /** *

Gets a list of the batch translation jobs that you have * submitted.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ListTextTranslationJobsAsync(const Model::ListTextTranslationJobsRequest& request, const ListTextTranslationJobsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Starts an asynchronous batch translation job. Batch translation jobs can be * used to translate large volumes of text across multiple documents at once. For * more information, see async.

Batch translation jobs can be * described with the DescribeTextTranslationJob operation, listed with the * ListTextTranslationJobs operation, and stopped with the * StopTextTranslationJob operation.

Amazon Translate does not * support batch translation of multiple source languages at once.

*

See Also:

AWS * API Reference

*/ virtual Model::StartTextTranslationJobOutcome StartTextTranslationJob(const Model::StartTextTranslationJobRequest& request) const; /** *

Starts an asynchronous batch translation job. Batch translation jobs can be * used to translate large volumes of text across multiple documents at once. For * more information, see async.

Batch translation jobs can be * described with the DescribeTextTranslationJob operation, listed with the * ListTextTranslationJobs operation, and stopped with the * StopTextTranslationJob operation.

Amazon Translate does not * support batch translation of multiple source languages at once.

*

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::StartTextTranslationJobOutcomeCallable StartTextTranslationJobCallable(const Model::StartTextTranslationJobRequest& request) const; /** *

Starts an asynchronous batch translation job. Batch translation jobs can be * used to translate large volumes of text across multiple documents at once. For * more information, see async.

Batch translation jobs can be * described with the DescribeTextTranslationJob operation, listed with the * ListTextTranslationJobs operation, and stopped with the * StopTextTranslationJob operation.

Amazon Translate does not * support batch translation of multiple source languages at once.

*

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void StartTextTranslationJobAsync(const Model::StartTextTranslationJobRequest& request, const StartTextTranslationJobResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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.

See Also:

* AWS * API Reference

*/ virtual Model::StopTextTranslationJobOutcome StopTextTranslationJob(const Model::StopTextTranslationJobRequest& request) const; /** *

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.

See Also:

* AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::StopTextTranslationJobOutcomeCallable StopTextTranslationJobCallable(const Model::StopTextTranslationJobRequest& request) const; /** *

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.

See Also:

* AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void StopTextTranslationJobAsync(const Model::StopTextTranslationJobRequest& request, const StopTextTranslationJobResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Translates input text from the source language to the target language. For a * list of available languages and language codes, see * what-is-languages.

See Also:

AWS * API Reference

*/ virtual Model::TranslateTextOutcome TranslateText(const Model::TranslateTextRequest& request) const; /** *

Translates input text from the source language to the target language. For a * list of available languages and language codes, see * what-is-languages.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::TranslateTextOutcomeCallable TranslateTextCallable(const Model::TranslateTextRequest& request) const; /** *

Translates input text from the source language to the target language. For a * list of available languages and language codes, see * what-is-languages.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void TranslateTextAsync(const Model::TranslateTextRequest& request, const TranslateTextResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; void OverrideEndpoint(const Aws::String& endpoint); private: void init(const Aws::Client::ClientConfiguration& clientConfiguration); void DeleteTerminologyAsyncHelper(const Model::DeleteTerminologyRequest& request, const DeleteTerminologyResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DescribeTextTranslationJobAsyncHelper(const Model::DescribeTextTranslationJobRequest& request, const DescribeTextTranslationJobResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetTerminologyAsyncHelper(const Model::GetTerminologyRequest& request, const GetTerminologyResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ImportTerminologyAsyncHelper(const Model::ImportTerminologyRequest& request, const ImportTerminologyResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ListTerminologiesAsyncHelper(const Model::ListTerminologiesRequest& request, const ListTerminologiesResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ListTextTranslationJobsAsyncHelper(const Model::ListTextTranslationJobsRequest& request, const ListTextTranslationJobsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void StartTextTranslationJobAsyncHelper(const Model::StartTextTranslationJobRequest& request, const StartTextTranslationJobResponseReceivedHandler& handler, const std::shared_ptr& context) const; void StopTextTranslationJobAsyncHelper(const Model::StopTextTranslationJobRequest& request, const StopTextTranslationJobResponseReceivedHandler& handler, const std::shared_ptr& context) const; void TranslateTextAsyncHelper(const Model::TranslateTextRequest& request, const TranslateTextResponseReceivedHandler& handler, const std::shared_ptr& context) const; Aws::String m_uri; Aws::String m_configScheme; std::shared_ptr m_executor; }; } // namespace Translate } // namespace Aws