/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the translate-2017-07-01.normal.json service model. */ using System; using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using System.Net; using Amazon.Translate.Model; using Amazon.Translate.Model.Internal.MarshallTransformations; using Amazon.Translate.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.Translate { /// /// Implementation for accessing Translate /// /// Provides translation of the input content from the source language to the target language. /// public partial class AmazonTranslateClient : AmazonServiceClient, IAmazonTranslate { private static IServiceMetadata serviceMetadata = new AmazonTranslateMetadata(); #region Constructors /// /// Constructs AmazonTranslateClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// public AmazonTranslateClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonTranslateConfig()) { } /// /// Constructs AmazonTranslateClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The region to connect. public AmazonTranslateClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonTranslateConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonTranslateClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The AmazonTranslateClient Configuration Object public AmazonTranslateClient(AmazonTranslateConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonTranslateClient with AWS Credentials /// /// AWS Credentials public AmazonTranslateClient(AWSCredentials credentials) : this(credentials, new AmazonTranslateConfig()) { } /// /// Constructs AmazonTranslateClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonTranslateClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonTranslateConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonTranslateClient with AWS Credentials and an /// AmazonTranslateClient Configuration object. /// /// AWS Credentials /// The AmazonTranslateClient Configuration Object public AmazonTranslateClient(AWSCredentials credentials, AmazonTranslateConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonTranslateClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonTranslateClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonTranslateConfig()) { } /// /// Constructs AmazonTranslateClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonTranslateClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonTranslateConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonTranslateClient with AWS Access Key ID, AWS Secret Key and an /// AmazonTranslateClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonTranslateClient Configuration Object public AmazonTranslateClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonTranslateConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonTranslateClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonTranslateClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonTranslateConfig()) { } /// /// Constructs AmazonTranslateClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The region to connect. public AmazonTranslateClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonTranslateConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonTranslateClient with AWS Access Key ID, AWS Secret Key and an /// AmazonTranslateClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonTranslateClient Configuration Object public AmazonTranslateClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonTranslateConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig) { } #endregion #if AWS_ASYNC_ENUMERABLES_API private ITranslatePaginatorFactory _paginators; /// /// Paginators for the service /// public ITranslatePaginatorFactory Paginators { get { if (this._paginators == null) { this._paginators = new TranslatePaginatorFactory(this); } return this._paginators; } } #endif #region Overrides /// /// Creates the signer for the service. /// protected override AbstractAWSSigner CreateSigner() { return new AWS4Signer(); } /// /// Customizes the runtime pipeline. /// /// Runtime pipeline for the current client. protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline) { pipeline.RemoveHandler(); pipeline.AddHandlerAfter(new AmazonTranslateEndpointResolver()); } /// /// Capture metadata for the service. /// protected override IServiceMetadata ServiceMetadata { get { return serviceMetadata; } } #endregion #region Dispose /// /// Disposes the service client. /// protected override void Dispose(bool disposing) { base.Dispose(disposing); } #endregion #region CreateParallelData internal virtual CreateParallelDataResponse CreateParallelData(CreateParallelDataRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreateParallelDataRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateParallelDataResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// Container for the necessary parameters to execute the CreateParallelData service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the CreateParallelData service method, as returned by Translate. /// /// Another modification is being made. That modification must complete before you can /// make your change. /// /// /// There was a conflict processing the request. Try your request again. /// /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// The request that you made is not valid. Check your request to determine why it's /// not valid and then retry the request. /// /// /// The specified limit has been exceeded. Review your request and retry it with a quantity /// below the stated limit. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// /// You have added too many tags to this resource. The maximum is 50 tags. /// /// REST API Reference for CreateParallelData Operation public virtual Task CreateParallelDataAsync(CreateParallelDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CreateParallelDataRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateParallelDataResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DeleteParallelData internal virtual DeleteParallelDataResponse DeleteParallelData(DeleteParallelDataRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteParallelDataRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteParallelDataResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Deletes a parallel data resource in Amazon Translate. /// /// Container for the necessary parameters to execute the DeleteParallelData service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DeleteParallelData service method, as returned by Translate. /// /// Another modification is being made. That modification must complete before you can /// make your change. /// /// /// An internal server error occurred. Retry your request. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// REST API Reference for DeleteParallelData Operation public virtual Task DeleteParallelDataAsync(DeleteParallelDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteParallelDataRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteParallelDataResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DeleteTerminology internal virtual DeleteTerminologyResponse DeleteTerminology(DeleteTerminologyRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteTerminologyRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteTerminologyResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// A synchronous action that deletes a custom terminology. /// /// Container for the necessary parameters to execute the DeleteTerminology service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DeleteTerminology service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// REST API Reference for DeleteTerminology Operation public virtual Task DeleteTerminologyAsync(DeleteTerminologyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteTerminologyRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteTerminologyResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeTextTranslationJob internal virtual DescribeTextTranslationJobResponse DescribeTextTranslationJob(DescribeTextTranslationJobRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeTextTranslationJobRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeTextTranslationJobResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// Container for the necessary parameters to execute the DescribeTextTranslationJob service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeTextTranslationJob service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// REST API Reference for DescribeTextTranslationJob Operation public virtual Task DescribeTextTranslationJobAsync(DescribeTextTranslationJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeTextTranslationJobRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeTextTranslationJobResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetParallelData internal virtual GetParallelDataResponse GetParallelData(GetParallelDataRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetParallelDataRequestMarshaller.Instance; options.ResponseUnmarshaller = GetParallelDataResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Provides information about a parallel data resource. /// /// Container for the necessary parameters to execute the GetParallelData service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetParallelData service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// REST API Reference for GetParallelData Operation public virtual Task GetParallelDataAsync(GetParallelDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetParallelDataRequestMarshaller.Instance; options.ResponseUnmarshaller = GetParallelDataResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetTerminology internal virtual GetTerminologyResponse GetTerminology(GetTerminologyRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetTerminologyRequestMarshaller.Instance; options.ResponseUnmarshaller = GetTerminologyResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Retrieves a custom terminology. /// /// Container for the necessary parameters to execute the GetTerminology service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetTerminology service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// REST API Reference for GetTerminology Operation public virtual Task GetTerminologyAsync(GetTerminologyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetTerminologyRequestMarshaller.Instance; options.ResponseUnmarshaller = GetTerminologyResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ImportTerminology internal virtual ImportTerminologyResponse ImportTerminology(ImportTerminologyRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ImportTerminologyRequestMarshaller.Instance; options.ResponseUnmarshaller = ImportTerminologyResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the ImportTerminology service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ImportTerminology service method, as returned by Translate. /// /// Another modification is being made. That modification must complete before you can /// make your change. /// /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// The specified limit has been exceeded. Review your request and retry it with a quantity /// below the stated limit. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// /// You have added too many tags to this resource. The maximum is 50 tags. /// /// REST API Reference for ImportTerminology Operation public virtual Task ImportTerminologyAsync(ImportTerminologyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ImportTerminologyRequestMarshaller.Instance; options.ResponseUnmarshaller = ImportTerminologyResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListLanguages internal virtual ListLanguagesResponse ListLanguages(ListLanguagesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListLanguagesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListLanguagesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports. /// /// Container for the necessary parameters to execute the ListLanguages service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListLanguages service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// /// Requested display language code is not supported. /// /// REST API Reference for ListLanguages Operation public virtual Task ListLanguagesAsync(ListLanguagesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListLanguagesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListLanguagesResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListParallelData internal virtual ListParallelDataResponse ListParallelData(ListParallelDataRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListParallelDataRequestMarshaller.Instance; options.ResponseUnmarshaller = ListParallelDataResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Provides a list of your parallel data resources in Amazon Translate. /// /// Container for the necessary parameters to execute the ListParallelData service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListParallelData service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// REST API Reference for ListParallelData Operation public virtual Task ListParallelDataAsync(ListParallelDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListParallelDataRequestMarshaller.Instance; options.ResponseUnmarshaller = ListParallelDataResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListTagsForResource internal virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Lists all tags associated with a given Amazon Translate resource. For more information, /// see Tagging /// your resources. /// /// Container for the necessary parameters to execute the ListTagsForResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListTagsForResource service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// REST API Reference for ListTagsForResource Operation public virtual Task ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListTerminologies internal virtual ListTerminologiesResponse ListTerminologies(ListTerminologiesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListTerminologiesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTerminologiesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Provides a list of custom terminologies associated with your account. /// /// Container for the necessary parameters to execute the ListTerminologies service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListTerminologies service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// REST API Reference for ListTerminologies Operation public virtual Task ListTerminologiesAsync(ListTerminologiesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListTerminologiesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTerminologiesResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListTextTranslationJobs internal virtual ListTextTranslationJobsResponse ListTextTranslationJobs(ListTextTranslationJobsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListTextTranslationJobsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTextTranslationJobsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Gets a list of the batch translation jobs that you have submitted. /// /// Container for the necessary parameters to execute the ListTextTranslationJobs service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListTextTranslationJobs service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The filter specified for the operation is not valid. Specify a different filter. /// /// /// The request that you made is not valid. Check your request to determine why it's /// not valid and then retry the request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// REST API Reference for ListTextTranslationJobs Operation public virtual Task ListTextTranslationJobsAsync(ListTextTranslationJobsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListTextTranslationJobsRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTextTranslationJobsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region StartTextTranslationJob internal virtual StartTextTranslationJobResponse StartTextTranslationJob(StartTextTranslationJobRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = StartTextTranslationJobRequestMarshaller.Instance; options.ResponseUnmarshaller = StartTextTranslationJobResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// /// Batch translation jobs can be described with the DescribeTextTranslationJob /// operation, listed with the ListTextTranslationJobs operation, and stopped with /// the StopTextTranslationJob operation. /// /// /// Container for the necessary parameters to execute the StartTextTranslationJob service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the StartTextTranslationJob service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// The request that you made is not valid. Check your request to determine why it's /// not valid and then retry the request. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// /// Amazon Translate does not support translation from the language of the source text /// into the requested target language. For more information, see Supported /// languages. /// /// REST API Reference for StartTextTranslationJob Operation public virtual Task StartTextTranslationJobAsync(StartTextTranslationJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = StartTextTranslationJobRequestMarshaller.Instance; options.ResponseUnmarshaller = StartTextTranslationJobResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region StopTextTranslationJob internal virtual StopTextTranslationJobResponse StopTextTranslationJob(StopTextTranslationJobRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = StopTextTranslationJobRequestMarshaller.Instance; options.ResponseUnmarshaller = StopTextTranslationJobResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// /// Container for the necessary parameters to execute the StopTextTranslationJob service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the StopTextTranslationJob service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// REST API Reference for StopTextTranslationJob Operation public virtual Task StopTextTranslationJobAsync(StopTextTranslationJobRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = StopTextTranslationJobRequestMarshaller.Instance; options.ResponseUnmarshaller = StopTextTranslationJobResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region TagResource internal virtual TagResourceResponse TagResource(TagResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = TagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// 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. /// /// Container for the necessary parameters to execute the TagResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the TagResource service method, as returned by Translate. /// /// Another modification is being made. That modification must complete before you can /// make your change. /// /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// You have added too many tags to this resource. The maximum is 50 tags. /// /// REST API Reference for TagResource Operation public virtual Task TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = TagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region TranslateDocument internal virtual TranslateDocumentResponse TranslateDocument(TranslateDocumentRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = TranslateDocumentRequestMarshaller.Instance; options.ResponseUnmarshaller = TranslateDocumentResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Translates the input document from the source language to the target language. This /// synchronous operation supports plain text or HTML for 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). /// /// /// /// TranslateDocument does not support language auto-detection. /// /// /// /// 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. /// /// /// Container for the necessary parameters to execute the TranslateDocument service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the TranslateDocument service method, as returned by Translate. /// /// An internal server error occurred. Retry your request. /// /// /// The request that you made is not valid. Check your request to determine why it's /// not valid and then retry the request. /// /// /// The specified limit has been exceeded. Review your request and retry it with a quantity /// below the stated limit. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// The Amazon Translate service is temporarily unavailable. Wait a bit and then retry /// your request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// /// Amazon Translate does not support translation from the language of the source text /// into the requested target language. For more information, see Supported /// languages. /// /// REST API Reference for TranslateDocument Operation public virtual Task TranslateDocumentAsync(TranslateDocumentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = TranslateDocumentRequestMarshaller.Instance; options.ResponseUnmarshaller = TranslateDocumentResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region TranslateText internal virtual TranslateTextResponse TranslateText(TranslateTextRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = TranslateTextRequestMarshaller.Instance; options.ResponseUnmarshaller = TranslateTextResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Translates input text from the source language to the target language. For a list /// of available languages and language codes, see Supported /// languages. /// /// Container for the necessary parameters to execute the TranslateText service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the TranslateText service method, as returned by Translate. /// /// The confidence that Amazon Comprehend accurately detected the source language is low. /// If a low confidence level is acceptable for your application, you can use the language /// in the exception to call Amazon Translate again. For more information, see the DetectDominantLanguage /// operation in the Amazon Comprehend Developer Guide. /// /// /// An internal server error occurred. Retry your request. /// /// /// The request that you made is not valid. Check your request to determine why it's /// not valid and then retry the request. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// The Amazon Translate service is temporarily unavailable. Wait a bit and then retry /// your request. /// /// /// The size of the text you submitted exceeds the size limit. Reduce the size of the /// text or use a smaller document and then retry your request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// /// Amazon Translate does not support translation from the language of the source text /// into the requested target language. For more information, see Supported /// languages. /// /// REST API Reference for TranslateText Operation public virtual Task TranslateTextAsync(TranslateTextRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = TranslateTextRequestMarshaller.Instance; options.ResponseUnmarshaller = TranslateTextResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UntagResource internal virtual UntagResourceResponse UntagResource(UntagResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UntagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Removes a specific tag associated with an Amazon Translate resource. For more information, /// see Tagging /// your resources. /// /// Container for the necessary parameters to execute the UntagResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UntagResource service method, as returned by Translate. /// /// Another modification is being made. That modification must complete before you can /// make your change. /// /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// REST API Reference for UntagResource Operation public virtual Task UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UntagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UpdateParallelData internal virtual UpdateParallelDataResponse UpdateParallelData(UpdateParallelDataRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateParallelDataRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateParallelDataResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Updates a previously created parallel data resource by importing a new input file /// from Amazon S3. /// /// Container for the necessary parameters to execute the UpdateParallelData service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UpdateParallelData service method, as returned by Translate. /// /// Another modification is being made. That modification must complete before you can /// make your change. /// /// /// There was a conflict processing the request. Try your request again. /// /// /// An internal server error occurred. Retry your request. /// /// /// The value of the parameter is not valid. Review the value of the parameter you are /// using to correct it, and then retry your operation. /// /// /// The request that you made is not valid. Check your request to determine why it's /// not valid and then retry the request. /// /// /// The specified limit has been exceeded. Review your request and retry it with a quantity /// below the stated limit. /// /// /// The resource you are looking for has not been found. Review the resource you're looking /// for and see if a different resource will accomplish your needs before retrying the /// revised request. /// /// /// You have made too many requests within a short period of time. Wait for a short time /// and then try your request again. /// /// REST API Reference for UpdateParallelData Operation public virtual Task UpdateParallelDataAsync(UpdateParallelDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateParallelDataRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateParallelDataResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion } }