package translate
import "github.com/aws/aws-sdk-go-v2/service/translate"
Package translate provides the API client, operations, and parameter types for Amazon Translate.
Provides translation between one source language and another of the same set of languages.
Index ¶
- Constants
- func NewDefaultEndpointResolver() *internalendpoints.Resolver
- func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
- func WithEndpointResolver(v EndpointResolver) func(*Options)
- type Client
- func New(options Options, optFns ...func(*Options)) *Client
- func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client
- func (c *Client) CreateParallelData(ctx context.Context, params *CreateParallelDataInput, optFns ...func(*Options)) (*CreateParallelDataOutput, error)
- func (c *Client) DeleteParallelData(ctx context.Context, params *DeleteParallelDataInput, optFns ...func(*Options)) (*DeleteParallelDataOutput, error)
- func (c *Client) DeleteTerminology(ctx context.Context, params *DeleteTerminologyInput, optFns ...func(*Options)) (*DeleteTerminologyOutput, error)
- func (c *Client) DescribeTextTranslationJob(ctx context.Context, params *DescribeTextTranslationJobInput, optFns ...func(*Options)) (*DescribeTextTranslationJobOutput, error)
- func (c *Client) GetParallelData(ctx context.Context, params *GetParallelDataInput, optFns ...func(*Options)) (*GetParallelDataOutput, error)
- func (c *Client) GetTerminology(ctx context.Context, params *GetTerminologyInput, optFns ...func(*Options)) (*GetTerminologyOutput, error)
- func (c *Client) ImportTerminology(ctx context.Context, params *ImportTerminologyInput, optFns ...func(*Options)) (*ImportTerminologyOutput, error)
- func (c *Client) ListLanguages(ctx context.Context, params *ListLanguagesInput, optFns ...func(*Options)) (*ListLanguagesOutput, error)
- func (c *Client) ListParallelData(ctx context.Context, params *ListParallelDataInput, optFns ...func(*Options)) (*ListParallelDataOutput, error)
- func (c *Client) ListTerminologies(ctx context.Context, params *ListTerminologiesInput, optFns ...func(*Options)) (*ListTerminologiesOutput, error)
- func (c *Client) ListTextTranslationJobs(ctx context.Context, params *ListTextTranslationJobsInput, optFns ...func(*Options)) (*ListTextTranslationJobsOutput, error)
- func (c *Client) StartTextTranslationJob(ctx context.Context, params *StartTextTranslationJobInput, optFns ...func(*Options)) (*StartTextTranslationJobOutput, error)
- func (c *Client) StopTextTranslationJob(ctx context.Context, params *StopTextTranslationJobInput, optFns ...func(*Options)) (*StopTextTranslationJobOutput, error)
- func (c *Client) TranslateText(ctx context.Context, params *TranslateTextInput, optFns ...func(*Options)) (*TranslateTextOutput, error)
- func (c *Client) UpdateParallelData(ctx context.Context, params *UpdateParallelDataInput, optFns ...func(*Options)) (*UpdateParallelDataOutput, error)
- type CreateParallelDataInput
- type CreateParallelDataOutput
- type DeleteParallelDataInput
- type DeleteParallelDataOutput
- type DeleteTerminologyInput
- type DeleteTerminologyOutput
- type DescribeTextTranslationJobInput
- type DescribeTextTranslationJobOutput
- type EndpointResolver
- type EndpointResolverFunc
- type EndpointResolverOptions
- type GetParallelDataInput
- type GetParallelDataOutput
- type GetTerminologyInput
- type GetTerminologyOutput
- type HTTPClient
- type HTTPSignerV4
- type IdempotencyTokenProvider
- type ImportTerminologyInput
- type ImportTerminologyOutput
- type ListLanguagesAPIClient
- type ListLanguagesInput
- type ListLanguagesOutput
- type ListLanguagesPaginator
- func NewListLanguagesPaginator(client ListLanguagesAPIClient, params *ListLanguagesInput, optFns ...func(*ListLanguagesPaginatorOptions)) *ListLanguagesPaginator
- func (p *ListLanguagesPaginator) HasMorePages() bool
- func (p *ListLanguagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLanguagesOutput, error)
- type ListLanguagesPaginatorOptions
- type ListParallelDataAPIClient
- type ListParallelDataInput
- type ListParallelDataOutput
- type ListParallelDataPaginator
- func NewListParallelDataPaginator(client ListParallelDataAPIClient, params *ListParallelDataInput, optFns ...func(*ListParallelDataPaginatorOptions)) *ListParallelDataPaginator
- func (p *ListParallelDataPaginator) HasMorePages() bool
- func (p *ListParallelDataPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListParallelDataOutput, error)
- type ListParallelDataPaginatorOptions
- type ListTerminologiesAPIClient
- type ListTerminologiesInput
- type ListTerminologiesOutput
- type ListTerminologiesPaginator
- func NewListTerminologiesPaginator(client ListTerminologiesAPIClient, params *ListTerminologiesInput, optFns ...func(*ListTerminologiesPaginatorOptions)) *ListTerminologiesPaginator
- func (p *ListTerminologiesPaginator) HasMorePages() bool
- func (p *ListTerminologiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTerminologiesOutput, error)
- type ListTerminologiesPaginatorOptions
- type ListTextTranslationJobsAPIClient
- type ListTextTranslationJobsInput
- type ListTextTranslationJobsOutput
- type ListTextTranslationJobsPaginator
- func NewListTextTranslationJobsPaginator(client ListTextTranslationJobsAPIClient, params *ListTextTranslationJobsInput, optFns ...func(*ListTextTranslationJobsPaginatorOptions)) *ListTextTranslationJobsPaginator
- func (p *ListTextTranslationJobsPaginator) HasMorePages() bool
- func (p *ListTextTranslationJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTextTranslationJobsOutput, error)
- type ListTextTranslationJobsPaginatorOptions
- type Options
- type ResolveEndpoint
- func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
- func (*ResolveEndpoint) ID() string
- type StartTextTranslationJobInput
- type StartTextTranslationJobOutput
- type StopTextTranslationJobInput
- type StopTextTranslationJobOutput
- type TranslateTextInput
- type TranslateTextOutput
- type UpdateParallelDataInput
- type UpdateParallelDataOutput
Constants ¶
const ServiceAPIVersion = "2017-07-01"
const ServiceID = "Translate"
Functions ¶
func NewDefaultEndpointResolver ¶
func NewDefaultEndpointResolver() *internalendpoints.Resolver
NewDefaultEndpointResolver constructs a new service endpoint resolver
func WithAPIOptions ¶
func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
WithAPIOptions returns a functional option for setting the Client's APIOptions option.
func WithEndpointResolver ¶
func WithEndpointResolver(v EndpointResolver) func(*Options)
WithEndpointResolver returns a functional option for setting the Client's EndpointResolver option.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides the API client to make operations call for Amazon Translate.
func New ¶
New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.
func NewFromConfig ¶
NewFromConfig returns a new client from the provided config.
func (*Client) CreateParallelData ¶
func (c *Client) CreateParallelData(ctx context.Context, params *CreateParallelDataInput, optFns ...func(*Options)) (*CreateParallelDataOutput, error)
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.
func (*Client) DeleteParallelData ¶
func (c *Client) DeleteParallelData(ctx context.Context, params *DeleteParallelDataInput, optFns ...func(*Options)) (*DeleteParallelDataOutput, error)
Deletes a parallel data resource in Amazon Translate.
func (*Client) DeleteTerminology ¶
func (c *Client) DeleteTerminology(ctx context.Context, params *DeleteTerminologyInput, optFns ...func(*Options)) (*DeleteTerminologyOutput, error)
A synchronous action that deletes a custom terminology.
func (*Client) DescribeTextTranslationJob ¶
func (c *Client) DescribeTextTranslationJob(ctx context.Context, params *DescribeTextTranslationJobInput, optFns ...func(*Options)) (*DescribeTextTranslationJobOutput, error)
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.
func (*Client) GetParallelData ¶
func (c *Client) GetParallelData(ctx context.Context, params *GetParallelDataInput, optFns ...func(*Options)) (*GetParallelDataOutput, error)
Provides information about a parallel data resource.
func (*Client) GetTerminology ¶
func (c *Client) GetTerminology(ctx context.Context, params *GetTerminologyInput, optFns ...func(*Options)) (*GetTerminologyOutput, error)
Retrieves a custom terminology.
func (*Client) ImportTerminology ¶
func (c *Client) ImportTerminology(ctx context.Context, params *ImportTerminologyInput, optFns ...func(*Options)) (*ImportTerminologyOutput, error)
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.
func (*Client) ListLanguages ¶
func (c *Client) ListLanguages(ctx context.Context, params *ListLanguagesInput, optFns ...func(*Options)) (*ListLanguagesOutput, error)
Provides a list of languages (RFC-5646 codes and names) that Amazon Translate supports.
func (*Client) ListParallelData ¶
func (c *Client) ListParallelData(ctx context.Context, params *ListParallelDataInput, optFns ...func(*Options)) (*ListParallelDataOutput, error)
Provides a list of your parallel data resources in Amazon Translate.
func (*Client) ListTerminologies ¶
func (c *Client) ListTerminologies(ctx context.Context, params *ListTerminologiesInput, optFns ...func(*Options)) (*ListTerminologiesOutput, error)
Provides a list of custom terminologies associated with your account.
func (*Client) ListTextTranslationJobs ¶
func (c *Client) ListTextTranslationJobs(ctx context.Context, params *ListTextTranslationJobsInput, optFns ...func(*Options)) (*ListTextTranslationJobsOutput, error)
Gets a list of the batch translation jobs that you have submitted.
func (*Client) StartTextTranslationJob ¶
func (c *Client) StartTextTranslationJob(ctx context.Context, params *StartTextTranslationJobInput, optFns ...func(*Options)) (*StartTextTranslationJobOutput, error)
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.
func (*Client) StopTextTranslationJob ¶
func (c *Client) StopTextTranslationJob(ctx context.Context, params *StopTextTranslationJobInput, optFns ...func(*Options)) (*StopTextTranslationJobOutput, error)
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.
func (*Client) TranslateText ¶
func (c *Client) TranslateText(ctx context.Context, params *TranslateTextInput, optFns ...func(*Options)) (*TranslateTextOutput, error)
Translates input text from the source language to the target language. For a list of available languages and language codes, see what-is-languages.
func (*Client) UpdateParallelData ¶
func (c *Client) UpdateParallelData(ctx context.Context, params *UpdateParallelDataInput, optFns ...func(*Options)) (*UpdateParallelDataOutput, error)
Updates a previously created parallel data resource by importing a new input file from Amazon S3.
type CreateParallelDataInput ¶
type CreateParallelDataInput struct { // A unique identifier for the request. This token is automatically generated when // you use Amazon Translate through an AWS SDK. // // This member is required. ClientToken *string // A custom name for the parallel data resource in Amazon Translate. You must // assign a name that is unique in the account and region. // // This member is required. Name *string // Specifies the format and S3 location of the parallel data input file. // // This member is required. ParallelDataConfig *types.ParallelDataConfig // A custom description for the parallel data resource in Amazon Translate. Description *string // The encryption key used to encrypt this object. EncryptionKey *types.EncryptionKey // contains filtered or unexported fields }
type CreateParallelDataOutput ¶
type CreateParallelDataOutput struct { // The custom name that you assigned to the parallel data resource. Name *string // The status of the parallel data resource. When the resource is ready for you to // use, the status is ACTIVE. Status types.ParallelDataStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type DeleteParallelDataInput ¶
type DeleteParallelDataInput struct { // The name of the parallel data resource that is being deleted. // // This member is required. Name *string // contains filtered or unexported fields }
type DeleteParallelDataOutput ¶
type DeleteParallelDataOutput struct { // The name of the parallel data resource that is being deleted. Name *string // The status of the parallel data deletion. Status types.ParallelDataStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type DeleteTerminologyInput ¶
type DeleteTerminologyInput struct { // The name of the custom terminology being deleted. // // This member is required. Name *string // contains filtered or unexported fields }
type DeleteTerminologyOutput ¶
type DeleteTerminologyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type DescribeTextTranslationJobInput ¶
type DescribeTextTranslationJobInput struct { // The identifier that Amazon Translate generated for the job. The // StartTextTranslationJob operation returns this identifier in its response. // // This member is required. JobId *string // contains filtered or unexported fields }
type DescribeTextTranslationJobOutput ¶
type DescribeTextTranslationJobOutput struct { // An object that contains the properties associated with an asynchronous batch // translation job. TextTranslationJobProperties *types.TextTranslationJobProperties // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type EndpointResolver ¶
type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) }
EndpointResolver interface for resolving service endpoints.
func EndpointResolverFromURL ¶
func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver
EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.
type EndpointResolverFunc ¶
type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.
func (EndpointResolverFunc) ResolveEndpoint ¶
func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)
type EndpointResolverOptions ¶
type EndpointResolverOptions = internalendpoints.Options
EndpointResolverOptions is the service endpoint resolver options
type GetParallelDataInput ¶
type GetParallelDataInput struct { // The name of the parallel data resource that is being retrieved. // // This member is required. Name *string // contains filtered or unexported fields }
type GetParallelDataOutput ¶
type GetParallelDataOutput struct { // The Amazon S3 location of a file that provides any errors or warnings that were // produced by your input file. This file was created when Amazon Translate // attempted to create a parallel data resource. The location is returned as a // presigned URL to that has a 30-minute expiration. AuxiliaryDataLocation *types.ParallelDataDataLocation // The Amazon S3 location of the most recent parallel data input file that was // successfully imported into Amazon Translate. The location is returned as a // presigned URL that has a 30-minute expiration. Amazon Translate doesn't scan all // input files for the risk of CSV injection attacks. CSV injection occurs when a // .csv or .tsv file is altered so that a record contains malicious code. The // record begins with a special character, such as =, +, -, or @. When the file is // opened in a spreadsheet program, the program might interpret the record as a // formula and run the code within it. Before you download an input file from // Amazon S3, ensure that you recognize the file and trust its creator. DataLocation *types.ParallelDataDataLocation // The Amazon S3 location of a file that provides any errors or warnings that were // produced by your input file. This file was created when Amazon Translate // attempted to update a parallel data resource. The location is returned as a // presigned URL to that has a 30-minute expiration. LatestUpdateAttemptAuxiliaryDataLocation *types.ParallelDataDataLocation // The properties of the parallel data resource that is being retrieved. ParallelDataProperties *types.ParallelDataProperties // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type GetTerminologyInput ¶
type GetTerminologyInput struct { // The name of the custom terminology being retrieved. // // This member is required. Name *string // The data format of the custom terminology being retrieved. If you don't specify // this parameter, Amazon Translate returns a file with the same format as the file // that was imported to create the terminology. If you specify this parameter when // you retrieve a multi-directional terminology resource, you must specify the same // format as the input file that was imported to create it. Otherwise, Amazon // Translate throws an error. TerminologyDataFormat types.TerminologyDataFormat // contains filtered or unexported fields }
type GetTerminologyOutput ¶
type GetTerminologyOutput struct { // The Amazon S3 location of a file that provides any errors or warnings that were // produced by your input file. This file was created when Amazon Translate // attempted to create a terminology resource. The location is returned as a // presigned URL to that has a 30-minute expiration. AuxiliaryDataLocation *types.TerminologyDataLocation // The Amazon S3 location of the most recent custom terminology input file that was // successfully imported into Amazon Translate. The location is returned as a // presigned URL that has a 30-minute expiration. Amazon Translate doesn't scan all // input files for the risk of CSV injection attacks. CSV injection occurs when a // .csv or .tsv file is altered so that a record contains malicious code. The // record begins with a special character, such as =, +, -, or @. When the file is // opened in a spreadsheet program, the program might interpret the record as a // formula and run the code within it. Before you download an input file from // Amazon S3, ensure that you recognize the file and trust its creator. TerminologyDataLocation *types.TerminologyDataLocation // The properties of the custom terminology being retrieved. TerminologyProperties *types.TerminologyProperties // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type HTTPClient ¶
type HTTPSignerV4 ¶
type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error }
type IdempotencyTokenProvider ¶
IdempotencyTokenProvider interface for providing idempotency token
type ImportTerminologyInput ¶
type ImportTerminologyInput struct { // The merge strategy of the custom terminology being imported. Currently, only the // OVERWRITE merge strategy is supported. In this case, the imported terminology // will overwrite an existing terminology of the same name. // // This member is required. MergeStrategy types.MergeStrategy // The name of the custom terminology being imported. // // This member is required. Name *string // The terminology data for the custom terminology being imported. // // This member is required. TerminologyData *types.TerminologyData // The description of the custom terminology being imported. Description *string // The encryption key for the custom terminology being imported. EncryptionKey *types.EncryptionKey // contains filtered or unexported fields }
type ImportTerminologyOutput ¶
type ImportTerminologyOutput struct { // The Amazon S3 location of a file that provides any errors or warnings that were // produced by your input file. This file was created when Amazon Translate // attempted to create a terminology resource. The location is returned as a // presigned URL to that has a 30 minute expiration. AuxiliaryDataLocation *types.TerminologyDataLocation // The properties of the custom terminology being imported. TerminologyProperties *types.TerminologyProperties // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type ListLanguagesAPIClient ¶
type ListLanguagesAPIClient interface { ListLanguages(context.Context, *ListLanguagesInput, ...func(*Options)) (*ListLanguagesOutput, error) }
ListLanguagesAPIClient is a client that implements the ListLanguages operation.
type ListLanguagesInput ¶
type ListLanguagesInput struct { // The language code for the language to use to display the language names in the // response. The language code is en by default. DisplayLanguageCode types.DisplayLanguageCode // The maximum number of results to return in each response. MaxResults *int32 // Include the NextToken value to fetch the next group of supported languages. NextToken *string // contains filtered or unexported fields }
type ListLanguagesOutput ¶
type ListLanguagesOutput struct { // The language code passed in with the request. DisplayLanguageCode types.DisplayLanguageCode // The list of supported languages. Languages []types.Language // If the response does not include all remaining results, use the NextToken in the // next request to fetch the next group of supported languages. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type ListLanguagesPaginator ¶
type ListLanguagesPaginator struct {
// contains filtered or unexported fields
}
ListLanguagesPaginator is a paginator for ListLanguages
func NewListLanguagesPaginator ¶
func NewListLanguagesPaginator(client ListLanguagesAPIClient, params *ListLanguagesInput, optFns ...func(*ListLanguagesPaginatorOptions)) *ListLanguagesPaginator
NewListLanguagesPaginator returns a new ListLanguagesPaginator
func (*ListLanguagesPaginator) HasMorePages ¶
func (p *ListLanguagesPaginator) HasMorePages() bool
HasMorePages returns a boolean indicating whether more pages are available
func (*ListLanguagesPaginator) NextPage ¶
func (p *ListLanguagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLanguagesOutput, error)
NextPage retrieves the next ListLanguages page.
type ListLanguagesPaginatorOptions ¶
type ListLanguagesPaginatorOptions struct { // The maximum number of results to return in each response. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool }
ListLanguagesPaginatorOptions is the paginator options for ListLanguages
type ListParallelDataAPIClient ¶
type ListParallelDataAPIClient interface { ListParallelData(context.Context, *ListParallelDataInput, ...func(*Options)) (*ListParallelDataOutput, error) }
ListParallelDataAPIClient is a client that implements the ListParallelData operation.
type ListParallelDataInput ¶
type ListParallelDataInput struct { // The maximum number of parallel data resources returned for each request. MaxResults *int32 // A string that specifies the next page of results to return in a paginated // response. NextToken *string // contains filtered or unexported fields }
type ListParallelDataOutput ¶
type ListParallelDataOutput struct { // The string to use in a subsequent request to get the next page of results in a // paginated response. This value is null if there are no additional pages. NextToken *string // The properties of the parallel data resources returned by this request. ParallelDataPropertiesList []types.ParallelDataProperties // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type ListParallelDataPaginator ¶
type ListParallelDataPaginator struct {
// contains filtered or unexported fields
}
ListParallelDataPaginator is a paginator for ListParallelData
func NewListParallelDataPaginator ¶
func NewListParallelDataPaginator(client ListParallelDataAPIClient, params *ListParallelDataInput, optFns ...func(*ListParallelDataPaginatorOptions)) *ListParallelDataPaginator
NewListParallelDataPaginator returns a new ListParallelDataPaginator
func (*ListParallelDataPaginator) HasMorePages ¶
func (p *ListParallelDataPaginator) HasMorePages() bool
HasMorePages returns a boolean indicating whether more pages are available
func (*ListParallelDataPaginator) NextPage ¶
func (p *ListParallelDataPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListParallelDataOutput, error)
NextPage retrieves the next ListParallelData page.
type ListParallelDataPaginatorOptions ¶
type ListParallelDataPaginatorOptions struct { // The maximum number of parallel data resources returned for each request. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool }
ListParallelDataPaginatorOptions is the paginator options for ListParallelData
type ListTerminologiesAPIClient ¶
type ListTerminologiesAPIClient interface { ListTerminologies(context.Context, *ListTerminologiesInput, ...func(*Options)) (*ListTerminologiesOutput, error) }
ListTerminologiesAPIClient is a client that implements the ListTerminologies operation.
type ListTerminologiesInput ¶
type ListTerminologiesInput struct { // The maximum number of custom terminologies returned per list request. MaxResults *int32 // If the result of the request to ListTerminologies was truncated, include the // NextToken to fetch the next group of custom terminologies. NextToken *string // contains filtered or unexported fields }
type ListTerminologiesOutput ¶
type ListTerminologiesOutput struct { // If the response to the ListTerminologies was truncated, the NextToken fetches // the next group of custom terminologies. NextToken *string // The properties list of the custom terminologies returned on the list request. TerminologyPropertiesList []types.TerminologyProperties // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type ListTerminologiesPaginator ¶
type ListTerminologiesPaginator struct {
// contains filtered or unexported fields
}
ListTerminologiesPaginator is a paginator for ListTerminologies
func NewListTerminologiesPaginator ¶
func NewListTerminologiesPaginator(client ListTerminologiesAPIClient, params *ListTerminologiesInput, optFns ...func(*ListTerminologiesPaginatorOptions)) *ListTerminologiesPaginator
NewListTerminologiesPaginator returns a new ListTerminologiesPaginator
func (*ListTerminologiesPaginator) HasMorePages ¶
func (p *ListTerminologiesPaginator) HasMorePages() bool
HasMorePages returns a boolean indicating whether more pages are available
func (*ListTerminologiesPaginator) NextPage ¶
func (p *ListTerminologiesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTerminologiesOutput, error)
NextPage retrieves the next ListTerminologies page.
type ListTerminologiesPaginatorOptions ¶
type ListTerminologiesPaginatorOptions struct { // The maximum number of custom terminologies returned per list request. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool }
ListTerminologiesPaginatorOptions is the paginator options for ListTerminologies
type ListTextTranslationJobsAPIClient ¶
type ListTextTranslationJobsAPIClient interface { ListTextTranslationJobs(context.Context, *ListTextTranslationJobsInput, ...func(*Options)) (*ListTextTranslationJobsOutput, error) }
ListTextTranslationJobsAPIClient is a client that implements the ListTextTranslationJobs operation.
type ListTextTranslationJobsInput ¶
type ListTextTranslationJobsInput struct { // The parameters that specify which batch translation jobs to retrieve. Filters // include job name, job status, and submission time. You can only set one filter // at a time. Filter *types.TextTranslationJobFilter // The maximum number of results to return in each page. The default value is 100. MaxResults *int32 // The token to request the next page of results. NextToken *string // contains filtered or unexported fields }
type ListTextTranslationJobsOutput ¶
type ListTextTranslationJobsOutput struct { // The token to use to retrieve the next page of results. This value is null when // there are no more results to return. NextToken *string // A list containing the properties of each job that is returned. TextTranslationJobPropertiesList []types.TextTranslationJobProperties // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type ListTextTranslationJobsPaginator ¶
type ListTextTranslationJobsPaginator struct {
// contains filtered or unexported fields
}
ListTextTranslationJobsPaginator is a paginator for ListTextTranslationJobs
func NewListTextTranslationJobsPaginator ¶
func NewListTextTranslationJobsPaginator(client ListTextTranslationJobsAPIClient, params *ListTextTranslationJobsInput, optFns ...func(*ListTextTranslationJobsPaginatorOptions)) *ListTextTranslationJobsPaginator
NewListTextTranslationJobsPaginator returns a new ListTextTranslationJobsPaginator
func (*ListTextTranslationJobsPaginator) HasMorePages ¶
func (p *ListTextTranslationJobsPaginator) HasMorePages() bool
HasMorePages returns a boolean indicating whether more pages are available
func (*ListTextTranslationJobsPaginator) NextPage ¶
func (p *ListTextTranslationJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTextTranslationJobsOutput, error)
NextPage retrieves the next ListTextTranslationJobs page.
type ListTextTranslationJobsPaginatorOptions ¶
type ListTextTranslationJobsPaginatorOptions struct { // The maximum number of results to return in each page. The default value is 100. Limit int32 // Set to true if pagination should stop if the service returns a pagination token // that matches the most recent token provided to the service. StopOnDuplicateToken bool }
ListTextTranslationJobsPaginatorOptions is the paginator options for ListTextTranslationJobs
type Options ¶
type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // Provides idempotency tokens values that will be automatically populated into // idempotent API operations. IdempotencyTokenProvider IdempotencyTokenProvider // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig. You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient // contains filtered or unexported fields }
func (Options) Copy ¶
Copy creates a clone where the APIOptions list is deep copied.
type ResolveEndpoint ¶
type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions }
func (*ResolveEndpoint) HandleSerialize ¶
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
func (*ResolveEndpoint) ID ¶
func (*ResolveEndpoint) ID() string
type StartTextTranslationJobInput ¶
type StartTextTranslationJobInput struct { // A unique identifier for the request. This token is generated for you when using // the Amazon Translate SDK. // // This member is required. ClientToken *string // The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) // role that grants Amazon Translate read access to your input data. For more // information, see identity-and-access-management. // // This member is required. DataAccessRoleArn *string // Specifies the format and location of the input documents for the translation // job. // // This member is required. InputDataConfig *types.InputDataConfig // Specifies the S3 folder to which your job output will be saved. // // This member is required. OutputDataConfig *types.OutputDataConfig // The language code of the input language. For a list of language codes, see // what-is-languages. Amazon Translate does not automatically detect a source // language during batch translation jobs. // // This member is required. SourceLanguageCode *string // The language code of the output language. // // This member is required. TargetLanguageCodes []string // The name of the batch translation job to be performed. JobName *string // The name of a parallel data resource to add to the translation job. This // resource consists of examples that show how you want segments of text to be // translated. When you add parallel data to a translation job, you create an // Active Custom Translation job. This parameter accepts only one parallel data // resource. Active Custom Translation jobs are priced at a higher rate than other // jobs that don't use parallel data. For more information, see Amazon Translate // pricing (http://aws.amazon.com/translate/pricing/). For a list of available // parallel data resources, use the ListParallelData operation. For more // information, see customizing-translations-parallel-data. ParallelDataNames []string // Settings to configure your translation output, including the option to mask // profane words and phrases. StartTextTranslationJob does not support the // formality setting. Settings *types.TranslationSettings // The name of a custom terminology resource to add to the translation job. This // resource lists examples source terms and the desired translation for each term. // This parameter accepts only one custom terminology resource. For a list of // available custom terminology resources, use the ListTerminologies operation. For // more information, see how-custom-terminology. TerminologyNames []string // contains filtered or unexported fields }
type StartTextTranslationJobOutput ¶
type StartTextTranslationJobOutput struct { // The identifier generated for the job. To get the status of a job, use this ID // with the DescribeTextTranslationJob operation. JobId *string // The status of the job. Possible values include: // // * SUBMITTED - The job has been // received and is queued for processing. // // * IN_PROGRESS - Amazon Translate is // processing the job. // // * COMPLETED - The job was successfully completed and the // output is available. // // * COMPLETED_WITH_ERROR - The job was completed with // errors. The errors can be analyzed in the job's output. // // * FAILED - The job did // not complete. To get details, use the DescribeTextTranslationJob operation. // // * // STOP_REQUESTED - The user who started the job has requested that it be // stopped. // // * STOPPED - The job has been stopped. JobStatus types.JobStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type StopTextTranslationJobInput ¶
type StopTextTranslationJobInput struct { // The job ID of the job to be stopped. // // This member is required. JobId *string // contains filtered or unexported fields }
type StopTextTranslationJobOutput ¶
type StopTextTranslationJobOutput struct { // The job ID of the stopped batch translation job. JobId *string // The status of the designated job. Upon successful completion, the job's status // will be STOPPED. JobStatus types.JobStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type TranslateTextInput ¶
type TranslateTextInput struct { // The language code for the language of the source text. The language must be a // language supported by Amazon Translate. For a list of language codes, see // what-is-languages. To have Amazon Translate determine the source language of // your text, you can specify auto in the SourceLanguageCode field. If you specify // auto, Amazon Translate will call Amazon Comprehend // (https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html) to // determine the source language. If you specify auto, you must send the // TranslateText request in a region that supports Amazon Comprehend. Otherwise, // the request returns an error indicating that autodetect is not supported. // // This member is required. SourceLanguageCode *string // The language code requested for the language of the target text. The language // must be a language supported by Amazon Translate. // // This member is required. TargetLanguageCode *string // The text to translate. The text string can be a maximum of 5,000 bytes long. // Depending on your character set, this may be fewer than 5,000 characters. // // This member is required. Text *string // Settings to configure your translation output, including the option to set the // formality level of the output text and the option to mask profane words and // phrases. Settings *types.TranslationSettings // The name of the terminology list file to be used in the TranslateText request. // You can use 1 terminology list at most in a TranslateText request. Terminology // lists can contain a maximum of 256 terms. TerminologyNames []string // contains filtered or unexported fields }
type TranslateTextOutput ¶
type TranslateTextOutput struct { // The language code for the language of the source text. // // This member is required. SourceLanguageCode *string // The language code for the language of the target text. // // This member is required. TargetLanguageCode *string // The translated text. // // This member is required. TranslatedText *string // Settings that configure the translation output. AppliedSettings *types.TranslationSettings // The names of the custom terminologies applied to the input text by Amazon // Translate for the translated text response. AppliedTerminologies []types.AppliedTerminology // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
type UpdateParallelDataInput ¶
type UpdateParallelDataInput struct { // A unique identifier for the request. This token is automatically generated when // you use Amazon Translate through an AWS SDK. // // This member is required. ClientToken *string // The name of the parallel data resource being updated. // // This member is required. Name *string // Specifies the format and S3 location of the parallel data input file. // // This member is required. ParallelDataConfig *types.ParallelDataConfig // A custom description for the parallel data resource in Amazon Translate. Description *string // contains filtered or unexported fields }
type UpdateParallelDataOutput ¶
type UpdateParallelDataOutput struct { // The time that the most recent update was attempted. LatestUpdateAttemptAt *time.Time // The status of the parallel data update attempt. When the updated parallel data // resource is ready for you to use, the status is ACTIVE. LatestUpdateAttemptStatus types.ParallelDataStatus // The name of the parallel data resource being updated. Name *string // The status of the parallel data resource that you are attempting to update. Your // update request is accepted only if this status is either ACTIVE or FAILED. Status types.ParallelDataStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
Source Files ¶
api_client.go api_op_CreateParallelData.go api_op_DeleteParallelData.go api_op_DeleteTerminology.go api_op_DescribeTextTranslationJob.go api_op_GetParallelData.go api_op_GetTerminology.go api_op_ImportTerminology.go api_op_ListLanguages.go api_op_ListParallelData.go api_op_ListTerminologies.go api_op_ListTextTranslationJobs.go api_op_StartTextTranslationJob.go api_op_StopTextTranslationJob.go api_op_TranslateText.go api_op_UpdateParallelData.go deserializers.go doc.go endpoints.go go_module_metadata.go serializers.go validators.go
Directories ¶
Path | Synopsis |
---|---|
internal | |
types |
- Version
- v1.14.10
- Published
- Sep 20, 2022
- Platform
- js/wasm
- Imports
- 35 packages
- Last checked
- now –
Tools for package owners.