TranslationService

google.cloud.translation.v3. TranslationService

Represents a TranslationService

Constructor

new TranslationService(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new TranslationService service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

adaptiveMtTranslate(request, callback) → {undefined}

Calls AdaptiveMtTranslate.

Parameters:
Name Type Description
request google.cloud.translation.v3.IAdaptiveMtTranslateRequest

AdaptiveMtTranslateRequest message or plain object

callback google.cloud.translation.v3.TranslationService.AdaptiveMtTranslateCallback

Node-style callback called with the error, if any, and AdaptiveMtTranslateResponse

Returns:
Type Description
undefined

adaptiveMtTranslate(request) → {Promise.<google.cloud.translation.v3.AdaptiveMtTranslateResponse>}

Calls AdaptiveMtTranslate.

Parameters:
Name Type Description
request google.cloud.translation.v3.IAdaptiveMtTranslateRequest

AdaptiveMtTranslateRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.AdaptiveMtTranslateResponse>

Promise

batchTranslateDocument(request, callback) → {undefined}

Calls BatchTranslateDocument.

Parameters:
Name Type Description
request google.cloud.translation.v3.IBatchTranslateDocumentRequest

BatchTranslateDocumentRequest message or plain object

callback google.cloud.translation.v3.TranslationService.BatchTranslateDocumentCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

batchTranslateDocument(request) → {Promise.<google.longrunning.Operation>}

Calls BatchTranslateDocument.

Parameters:
Name Type Description
request google.cloud.translation.v3.IBatchTranslateDocumentRequest

BatchTranslateDocumentRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

batchTranslateText(request, callback) → {undefined}

Calls BatchTranslateText.

Parameters:
Name Type Description
request google.cloud.translation.v3.IBatchTranslateTextRequest

BatchTranslateTextRequest message or plain object

callback google.cloud.translation.v3.TranslationService.BatchTranslateTextCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

batchTranslateText(request) → {Promise.<google.longrunning.Operation>}

Calls BatchTranslateText.

Parameters:
Name Type Description
request google.cloud.translation.v3.IBatchTranslateTextRequest

BatchTranslateTextRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

createAdaptiveMtDataset(request, callback) → {undefined}

Calls CreateAdaptiveMtDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.ICreateAdaptiveMtDatasetRequest

CreateAdaptiveMtDatasetRequest message or plain object

callback google.cloud.translation.v3.TranslationService.CreateAdaptiveMtDatasetCallback

Node-style callback called with the error, if any, and AdaptiveMtDataset

Returns:
Type Description
undefined

createAdaptiveMtDataset(request) → {Promise.<google.cloud.translation.v3.AdaptiveMtDataset>}

Calls CreateAdaptiveMtDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.ICreateAdaptiveMtDatasetRequest

CreateAdaptiveMtDatasetRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.AdaptiveMtDataset>

Promise

createDataset(request, callback) → {undefined}

Calls CreateDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.ICreateDatasetRequest

CreateDatasetRequest message or plain object

callback google.cloud.translation.v3.TranslationService.CreateDatasetCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

createDataset(request) → {Promise.<google.longrunning.Operation>}

Calls CreateDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.ICreateDatasetRequest

CreateDatasetRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

createGlossary(request, callback) → {undefined}

Calls CreateGlossary.

Parameters:
Name Type Description
request google.cloud.translation.v3.ICreateGlossaryRequest

CreateGlossaryRequest message or plain object

callback google.cloud.translation.v3.TranslationService.CreateGlossaryCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

createGlossary(request) → {Promise.<google.longrunning.Operation>}

Calls CreateGlossary.

Parameters:
Name Type Description
request google.cloud.translation.v3.ICreateGlossaryRequest

CreateGlossaryRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

createGlossaryEntry(request, callback) → {undefined}

Calls CreateGlossaryEntry.

Parameters:
Name Type Description
request google.cloud.translation.v3.ICreateGlossaryEntryRequest

CreateGlossaryEntryRequest message or plain object

callback google.cloud.translation.v3.TranslationService.CreateGlossaryEntryCallback

Node-style callback called with the error, if any, and GlossaryEntry

Returns:
Type Description
undefined

createGlossaryEntry(request) → {Promise.<google.cloud.translation.v3.GlossaryEntry>}

Calls CreateGlossaryEntry.

Parameters:
Name Type Description
request google.cloud.translation.v3.ICreateGlossaryEntryRequest

CreateGlossaryEntryRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.GlossaryEntry>

Promise

createModel(request, callback) → {undefined}

Calls CreateModel.

Parameters:
Name Type Description
request google.cloud.translation.v3.ICreateModelRequest

CreateModelRequest message or plain object

callback google.cloud.translation.v3.TranslationService.CreateModelCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

createModel(request) → {Promise.<google.longrunning.Operation>}

Calls CreateModel.

Parameters:
Name Type Description
request google.cloud.translation.v3.ICreateModelRequest

CreateModelRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

deleteAdaptiveMtDataset(request, callback) → {undefined}

Calls DeleteAdaptiveMtDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteAdaptiveMtDatasetRequest

DeleteAdaptiveMtDatasetRequest message or plain object

callback google.cloud.translation.v3.TranslationService.DeleteAdaptiveMtDatasetCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteAdaptiveMtDataset(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteAdaptiveMtDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteAdaptiveMtDatasetRequest

DeleteAdaptiveMtDatasetRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

deleteAdaptiveMtFile(request, callback) → {undefined}

Calls DeleteAdaptiveMtFile.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteAdaptiveMtFileRequest

DeleteAdaptiveMtFileRequest message or plain object

callback google.cloud.translation.v3.TranslationService.DeleteAdaptiveMtFileCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteAdaptiveMtFile(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteAdaptiveMtFile.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteAdaptiveMtFileRequest

DeleteAdaptiveMtFileRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

deleteDataset(request, callback) → {undefined}

Calls DeleteDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteDatasetRequest

DeleteDatasetRequest message or plain object

callback google.cloud.translation.v3.TranslationService.DeleteDatasetCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

deleteDataset(request) → {Promise.<google.longrunning.Operation>}

Calls DeleteDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteDatasetRequest

DeleteDatasetRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

deleteGlossary(request, callback) → {undefined}

Calls DeleteGlossary.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteGlossaryRequest

DeleteGlossaryRequest message or plain object

callback google.cloud.translation.v3.TranslationService.DeleteGlossaryCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

deleteGlossary(request) → {Promise.<google.longrunning.Operation>}

Calls DeleteGlossary.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteGlossaryRequest

DeleteGlossaryRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

deleteGlossaryEntry(request, callback) → {undefined}

Calls DeleteGlossaryEntry.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteGlossaryEntryRequest

DeleteGlossaryEntryRequest message or plain object

callback google.cloud.translation.v3.TranslationService.DeleteGlossaryEntryCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteGlossaryEntry(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteGlossaryEntry.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteGlossaryEntryRequest

DeleteGlossaryEntryRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

deleteModel(request, callback) → {undefined}

Calls DeleteModel.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteModelRequest

DeleteModelRequest message or plain object

callback google.cloud.translation.v3.TranslationService.DeleteModelCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

deleteModel(request) → {Promise.<google.longrunning.Operation>}

Calls DeleteModel.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDeleteModelRequest

DeleteModelRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

detectLanguage(request, callback) → {undefined}

Calls DetectLanguage.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDetectLanguageRequest

DetectLanguageRequest message or plain object

callback google.cloud.translation.v3.TranslationService.DetectLanguageCallback

Node-style callback called with the error, if any, and DetectLanguageResponse

Returns:
Type Description
undefined

detectLanguage(request) → {Promise.<google.cloud.translation.v3.DetectLanguageResponse>}

Calls DetectLanguage.

Parameters:
Name Type Description
request google.cloud.translation.v3.IDetectLanguageRequest

DetectLanguageRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.DetectLanguageResponse>

Promise

exportData(request, callback) → {undefined}

Calls ExportData.

Parameters:
Name Type Description
request google.cloud.translation.v3.IExportDataRequest

ExportDataRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ExportDataCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

exportData(request) → {Promise.<google.longrunning.Operation>}

Calls ExportData.

Parameters:
Name Type Description
request google.cloud.translation.v3.IExportDataRequest

ExportDataRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

getAdaptiveMtDataset(request, callback) → {undefined}

Calls GetAdaptiveMtDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetAdaptiveMtDatasetRequest

GetAdaptiveMtDatasetRequest message or plain object

callback google.cloud.translation.v3.TranslationService.GetAdaptiveMtDatasetCallback

Node-style callback called with the error, if any, and AdaptiveMtDataset

Returns:
Type Description
undefined

getAdaptiveMtDataset(request) → {Promise.<google.cloud.translation.v3.AdaptiveMtDataset>}

Calls GetAdaptiveMtDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetAdaptiveMtDatasetRequest

GetAdaptiveMtDatasetRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.AdaptiveMtDataset>

Promise

getAdaptiveMtFile(request, callback) → {undefined}

Calls GetAdaptiveMtFile.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetAdaptiveMtFileRequest

GetAdaptiveMtFileRequest message or plain object

callback google.cloud.translation.v3.TranslationService.GetAdaptiveMtFileCallback

Node-style callback called with the error, if any, and AdaptiveMtFile

Returns:
Type Description
undefined

getAdaptiveMtFile(request) → {Promise.<google.cloud.translation.v3.AdaptiveMtFile>}

Calls GetAdaptiveMtFile.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetAdaptiveMtFileRequest

GetAdaptiveMtFileRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.AdaptiveMtFile>

Promise

getDataset(request, callback) → {undefined}

Calls GetDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetDatasetRequest

GetDatasetRequest message or plain object

callback google.cloud.translation.v3.TranslationService.GetDatasetCallback

Node-style callback called with the error, if any, and Dataset

Returns:
Type Description
undefined

getDataset(request) → {Promise.<google.cloud.translation.v3.Dataset>}

Calls GetDataset.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetDatasetRequest

GetDatasetRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.Dataset>

Promise

getGlossary(request, callback) → {undefined}

Calls GetGlossary.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetGlossaryRequest

GetGlossaryRequest message or plain object

callback google.cloud.translation.v3.TranslationService.GetGlossaryCallback

Node-style callback called with the error, if any, and Glossary

Returns:
Type Description
undefined

getGlossary(request) → {Promise.<google.cloud.translation.v3.Glossary>}

Calls GetGlossary.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetGlossaryRequest

GetGlossaryRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.Glossary>

Promise

getGlossaryEntry(request, callback) → {undefined}

Calls GetGlossaryEntry.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetGlossaryEntryRequest

GetGlossaryEntryRequest message or plain object

callback google.cloud.translation.v3.TranslationService.GetGlossaryEntryCallback

Node-style callback called with the error, if any, and GlossaryEntry

Returns:
Type Description
undefined

getGlossaryEntry(request) → {Promise.<google.cloud.translation.v3.GlossaryEntry>}

Calls GetGlossaryEntry.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetGlossaryEntryRequest

GetGlossaryEntryRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.GlossaryEntry>

Promise

getModel(request, callback) → {undefined}

Calls GetModel.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetModelRequest

GetModelRequest message or plain object

callback google.cloud.translation.v3.TranslationService.GetModelCallback

Node-style callback called with the error, if any, and Model

Returns:
Type Description
undefined

getModel(request) → {Promise.<google.cloud.translation.v3.Model>}

Calls GetModel.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetModelRequest

GetModelRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.Model>

Promise

getSupportedLanguages(request, callback) → {undefined}

Calls GetSupportedLanguages.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetSupportedLanguagesRequest

GetSupportedLanguagesRequest message or plain object

callback google.cloud.translation.v3.TranslationService.GetSupportedLanguagesCallback

Node-style callback called with the error, if any, and SupportedLanguages

Returns:
Type Description
undefined

getSupportedLanguages(request) → {Promise.<google.cloud.translation.v3.SupportedLanguages>}

Calls GetSupportedLanguages.

Parameters:
Name Type Description
request google.cloud.translation.v3.IGetSupportedLanguagesRequest

GetSupportedLanguagesRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.SupportedLanguages>

Promise

importAdaptiveMtFile(request, callback) → {undefined}

Calls ImportAdaptiveMtFile.

Parameters:
Name Type Description
request google.cloud.translation.v3.IImportAdaptiveMtFileRequest

ImportAdaptiveMtFileRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ImportAdaptiveMtFileCallback

Node-style callback called with the error, if any, and ImportAdaptiveMtFileResponse

Returns:
Type Description
undefined

importAdaptiveMtFile(request) → {Promise.<google.cloud.translation.v3.ImportAdaptiveMtFileResponse>}

Calls ImportAdaptiveMtFile.

Parameters:
Name Type Description
request google.cloud.translation.v3.IImportAdaptiveMtFileRequest

ImportAdaptiveMtFileRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.ImportAdaptiveMtFileResponse>

Promise

importData(request, callback) → {undefined}

Calls ImportData.

Parameters:
Name Type Description
request google.cloud.translation.v3.IImportDataRequest

ImportDataRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ImportDataCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

importData(request) → {Promise.<google.longrunning.Operation>}

Calls ImportData.

Parameters:
Name Type Description
request google.cloud.translation.v3.IImportDataRequest

ImportDataRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

listAdaptiveMtDatasets(request, callback) → {undefined}

Calls ListAdaptiveMtDatasets.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListAdaptiveMtDatasetsRequest

ListAdaptiveMtDatasetsRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ListAdaptiveMtDatasetsCallback

Node-style callback called with the error, if any, and ListAdaptiveMtDatasetsResponse

Returns:
Type Description
undefined

listAdaptiveMtDatasets(request) → {Promise.<google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse>}

Calls ListAdaptiveMtDatasets.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListAdaptiveMtDatasetsRequest

ListAdaptiveMtDatasetsRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse>

Promise

listAdaptiveMtFiles(request, callback) → {undefined}

Calls ListAdaptiveMtFiles.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListAdaptiveMtFilesRequest

ListAdaptiveMtFilesRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ListAdaptiveMtFilesCallback

Node-style callback called with the error, if any, and ListAdaptiveMtFilesResponse

Returns:
Type Description
undefined

listAdaptiveMtFiles(request) → {Promise.<google.cloud.translation.v3.ListAdaptiveMtFilesResponse>}

Calls ListAdaptiveMtFiles.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListAdaptiveMtFilesRequest

ListAdaptiveMtFilesRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.ListAdaptiveMtFilesResponse>

Promise

listAdaptiveMtSentences(request, callback) → {undefined}

Calls ListAdaptiveMtSentences.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListAdaptiveMtSentencesRequest

ListAdaptiveMtSentencesRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ListAdaptiveMtSentencesCallback

Node-style callback called with the error, if any, and ListAdaptiveMtSentencesResponse

Returns:
Type Description
undefined

listAdaptiveMtSentences(request) → {Promise.<google.cloud.translation.v3.ListAdaptiveMtSentencesResponse>}

Calls ListAdaptiveMtSentences.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListAdaptiveMtSentencesRequest

ListAdaptiveMtSentencesRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.ListAdaptiveMtSentencesResponse>

Promise

listDatasets(request, callback) → {undefined}

Calls ListDatasets.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListDatasetsRequest

ListDatasetsRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ListDatasetsCallback

Node-style callback called with the error, if any, and ListDatasetsResponse

Returns:
Type Description
undefined

listDatasets(request) → {Promise.<google.cloud.translation.v3.ListDatasetsResponse>}

Calls ListDatasets.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListDatasetsRequest

ListDatasetsRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.ListDatasetsResponse>

Promise

listExamples(request, callback) → {undefined}

Calls ListExamples.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListExamplesRequest

ListExamplesRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ListExamplesCallback

Node-style callback called with the error, if any, and ListExamplesResponse

Returns:
Type Description
undefined

listExamples(request) → {Promise.<google.cloud.translation.v3.ListExamplesResponse>}

Calls ListExamples.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListExamplesRequest

ListExamplesRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.ListExamplesResponse>

Promise

listGlossaries(request, callback) → {undefined}

Calls ListGlossaries.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListGlossariesRequest

ListGlossariesRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ListGlossariesCallback

Node-style callback called with the error, if any, and ListGlossariesResponse

Returns:
Type Description
undefined

listGlossaries(request) → {Promise.<google.cloud.translation.v3.ListGlossariesResponse>}

Calls ListGlossaries.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListGlossariesRequest

ListGlossariesRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.ListGlossariesResponse>

Promise

listGlossaryEntries(request, callback) → {undefined}

Calls ListGlossaryEntries.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListGlossaryEntriesRequest

ListGlossaryEntriesRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ListGlossaryEntriesCallback

Node-style callback called with the error, if any, and ListGlossaryEntriesResponse

Returns:
Type Description
undefined

listGlossaryEntries(request) → {Promise.<google.cloud.translation.v3.ListGlossaryEntriesResponse>}

Calls ListGlossaryEntries.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListGlossaryEntriesRequest

ListGlossaryEntriesRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.ListGlossaryEntriesResponse>

Promise

listModels(request, callback) → {undefined}

Calls ListModels.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListModelsRequest

ListModelsRequest message or plain object

callback google.cloud.translation.v3.TranslationService.ListModelsCallback

Node-style callback called with the error, if any, and ListModelsResponse

Returns:
Type Description
undefined

listModels(request) → {Promise.<google.cloud.translation.v3.ListModelsResponse>}

Calls ListModels.

Parameters:
Name Type Description
request google.cloud.translation.v3.IListModelsRequest

ListModelsRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.ListModelsResponse>

Promise

romanizeText(request, callback) → {undefined}

Calls RomanizeText.

Parameters:
Name Type Description
request google.cloud.translation.v3.IRomanizeTextRequest

RomanizeTextRequest message or plain object

callback google.cloud.translation.v3.TranslationService.RomanizeTextCallback

Node-style callback called with the error, if any, and RomanizeTextResponse

Returns:
Type Description
undefined

romanizeText(request) → {Promise.<google.cloud.translation.v3.RomanizeTextResponse>}

Calls RomanizeText.

Parameters:
Name Type Description
request google.cloud.translation.v3.IRomanizeTextRequest

RomanizeTextRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.RomanizeTextResponse>

Promise

translateDocument(request, callback) → {undefined}

Calls TranslateDocument.

Parameters:
Name Type Description
request google.cloud.translation.v3.ITranslateDocumentRequest

TranslateDocumentRequest message or plain object

callback google.cloud.translation.v3.TranslationService.TranslateDocumentCallback

Node-style callback called with the error, if any, and TranslateDocumentResponse

Returns:
Type Description
undefined

translateDocument(request) → {Promise.<google.cloud.translation.v3.TranslateDocumentResponse>}

Calls TranslateDocument.

Parameters:
Name Type Description
request google.cloud.translation.v3.ITranslateDocumentRequest

TranslateDocumentRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.TranslateDocumentResponse>

Promise

translateText(request, callback) → {undefined}

Calls TranslateText.

Parameters:
Name Type Description
request google.cloud.translation.v3.ITranslateTextRequest

TranslateTextRequest message or plain object

callback google.cloud.translation.v3.TranslationService.TranslateTextCallback

Node-style callback called with the error, if any, and TranslateTextResponse

Returns:
Type Description
undefined

translateText(request) → {Promise.<google.cloud.translation.v3.TranslateTextResponse>}

Calls TranslateText.

Parameters:
Name Type Description
request google.cloud.translation.v3.ITranslateTextRequest

TranslateTextRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.TranslateTextResponse>

Promise

updateGlossary(request, callback) → {undefined}

Calls UpdateGlossary.

Parameters:
Name Type Description
request google.cloud.translation.v3.IUpdateGlossaryRequest

UpdateGlossaryRequest message or plain object

callback google.cloud.translation.v3.TranslationService.UpdateGlossaryCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

updateGlossary(request) → {Promise.<google.longrunning.Operation>}

Calls UpdateGlossary.

Parameters:
Name Type Description
request google.cloud.translation.v3.IUpdateGlossaryRequest

UpdateGlossaryRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

updateGlossaryEntry(request, callback) → {undefined}

Calls UpdateGlossaryEntry.

Parameters:
Name Type Description
request google.cloud.translation.v3.IUpdateGlossaryEntryRequest

UpdateGlossaryEntryRequest message or plain object

callback google.cloud.translation.v3.TranslationService.UpdateGlossaryEntryCallback

Node-style callback called with the error, if any, and GlossaryEntry

Returns:
Type Description
undefined

updateGlossaryEntry(request) → {Promise.<google.cloud.translation.v3.GlossaryEntry>}

Calls UpdateGlossaryEntry.

Parameters:
Name Type Description
request google.cloud.translation.v3.IUpdateGlossaryEntryRequest

UpdateGlossaryEntryRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.translation.v3.GlossaryEntry>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {TranslationService}

Creates new TranslationService service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
TranslationService

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

AdaptiveMtTranslateCallback(error, responseopt)

Callback as used by adaptiveMtTranslate.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.AdaptiveMtTranslateResponse <optional>

AdaptiveMtTranslateResponse

BatchTranslateDocumentCallback(error, responseopt)

Callback as used by batchTranslateDocument.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

BatchTranslateTextCallback(error, responseopt)

Callback as used by batchTranslateText.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

CreateAdaptiveMtDatasetCallback(error, responseopt)

Callback as used by createAdaptiveMtDataset.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.AdaptiveMtDataset <optional>

AdaptiveMtDataset

CreateDatasetCallback(error, responseopt)

Callback as used by createDataset.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

CreateGlossaryCallback(error, responseopt)

Callback as used by createGlossary.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

CreateGlossaryEntryCallback(error, responseopt)

Callback as used by createGlossaryEntry.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.GlossaryEntry <optional>

GlossaryEntry

CreateModelCallback(error, responseopt)

Callback as used by createModel.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

DeleteAdaptiveMtDatasetCallback(error, responseopt)

Callback as used by deleteAdaptiveMtDataset.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

DeleteAdaptiveMtFileCallback(error, responseopt)

Callback as used by deleteAdaptiveMtFile.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

DeleteDatasetCallback(error, responseopt)

Callback as used by deleteDataset.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

DeleteGlossaryCallback(error, responseopt)

Callback as used by deleteGlossary.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

DeleteGlossaryEntryCallback(error, responseopt)

Callback as used by deleteGlossaryEntry.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

DeleteModelCallback(error, responseopt)

Callback as used by deleteModel.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

DetectLanguageCallback(error, responseopt)

Callback as used by detectLanguage.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.DetectLanguageResponse <optional>

DetectLanguageResponse

ExportDataCallback(error, responseopt)

Callback as used by exportData.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

GetAdaptiveMtDatasetCallback(error, responseopt)

Callback as used by getAdaptiveMtDataset.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.AdaptiveMtDataset <optional>

AdaptiveMtDataset

GetAdaptiveMtFileCallback(error, responseopt)

Callback as used by getAdaptiveMtFile.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.AdaptiveMtFile <optional>

AdaptiveMtFile

GetDatasetCallback(error, responseopt)

Callback as used by getDataset.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.Dataset <optional>

Dataset

GetGlossaryCallback(error, responseopt)

Callback as used by getGlossary.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.Glossary <optional>

Glossary

GetGlossaryEntryCallback(error, responseopt)

Callback as used by getGlossaryEntry.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.GlossaryEntry <optional>

GlossaryEntry

GetModelCallback(error, responseopt)

Callback as used by getModel.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.Model <optional>

Model

GetSupportedLanguagesCallback(error, responseopt)

Callback as used by getSupportedLanguages.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.SupportedLanguages <optional>

SupportedLanguages

ImportAdaptiveMtFileCallback(error, responseopt)

Callback as used by importAdaptiveMtFile.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.ImportAdaptiveMtFileResponse <optional>

ImportAdaptiveMtFileResponse

ImportDataCallback(error, responseopt)

Callback as used by importData.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

ListAdaptiveMtDatasetsCallback(error, responseopt)

Callback as used by listAdaptiveMtDatasets.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.ListAdaptiveMtDatasetsResponse <optional>

ListAdaptiveMtDatasetsResponse

ListAdaptiveMtFilesCallback(error, responseopt)

Callback as used by listAdaptiveMtFiles.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.ListAdaptiveMtFilesResponse <optional>

ListAdaptiveMtFilesResponse

ListAdaptiveMtSentencesCallback(error, responseopt)

Callback as used by listAdaptiveMtSentences.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.ListAdaptiveMtSentencesResponse <optional>

ListAdaptiveMtSentencesResponse

ListDatasetsCallback(error, responseopt)

Callback as used by listDatasets.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.ListDatasetsResponse <optional>

ListDatasetsResponse

ListExamplesCallback(error, responseopt)

Callback as used by listExamples.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.ListExamplesResponse <optional>

ListExamplesResponse

ListGlossariesCallback(error, responseopt)

Callback as used by listGlossaries.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.ListGlossariesResponse <optional>

ListGlossariesResponse

ListGlossaryEntriesCallback(error, responseopt)

Callback as used by listGlossaryEntries.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.ListGlossaryEntriesResponse <optional>

ListGlossaryEntriesResponse

ListModelsCallback(error, responseopt)

Callback as used by listModels.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.ListModelsResponse <optional>

ListModelsResponse

RomanizeTextCallback(error, responseopt)

Callback as used by romanizeText.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.RomanizeTextResponse <optional>

RomanizeTextResponse

TranslateDocumentCallback(error, responseopt)

Callback as used by translateDocument.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.TranslateDocumentResponse <optional>

TranslateDocumentResponse

TranslateTextCallback(error, responseopt)

Callback as used by translateText.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.TranslateTextResponse <optional>

TranslateTextResponse

UpdateGlossaryCallback(error, responseopt)

Callback as used by updateGlossary.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

UpdateGlossaryEntryCallback(error, responseopt)

Callback as used by updateGlossaryEntry.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.translation.v3.GlossaryEntry <optional>

GlossaryEntry