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
batchTranslateDocument(request, callback) → {undefined}
Calls BatchTranslateDocument.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.IBatchTranslateDocumentRequest |
BatchTranslateDocumentRequest message or plain object |
callback |
google.cloud.translation.v3beta1.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.v3beta1.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.v3beta1.IBatchTranslateTextRequest |
BatchTranslateTextRequest message or plain object |
callback |
google.cloud.translation.v3beta1.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.v3beta1.IBatchTranslateTextRequest |
BatchTranslateTextRequest 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.v3beta1.ICreateGlossaryRequest |
CreateGlossaryRequest message or plain object |
callback |
google.cloud.translation.v3beta1.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.v3beta1.ICreateGlossaryRequest |
CreateGlossaryRequest 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.v3beta1.IDeleteGlossaryRequest |
DeleteGlossaryRequest message or plain object |
callback |
google.cloud.translation.v3beta1.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.v3beta1.IDeleteGlossaryRequest |
DeleteGlossaryRequest 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.v3beta1.IDetectLanguageRequest |
DetectLanguageRequest message or plain object |
callback |
google.cloud.translation.v3beta1.TranslationService.DetectLanguageCallback |
Node-style callback called with the error, if any, and DetectLanguageResponse |
Returns:
Type | Description |
---|---|
undefined |
detectLanguage(request) → {Promise.<google.cloud.translation.v3beta1.DetectLanguageResponse>}
Calls DetectLanguage.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.IDetectLanguageRequest |
DetectLanguageRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.translation.v3beta1.DetectLanguageResponse> |
Promise |
getGlossary(request, callback) → {undefined}
Calls GetGlossary.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.IGetGlossaryRequest |
GetGlossaryRequest message or plain object |
callback |
google.cloud.translation.v3beta1.TranslationService.GetGlossaryCallback |
Node-style callback called with the error, if any, and Glossary |
Returns:
Type | Description |
---|---|
undefined |
getGlossary(request) → {Promise.<google.cloud.translation.v3beta1.Glossary>}
Calls GetGlossary.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.IGetGlossaryRequest |
GetGlossaryRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.translation.v3beta1.Glossary> |
Promise |
getSupportedLanguages(request, callback) → {undefined}
Calls GetSupportedLanguages.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.IGetSupportedLanguagesRequest |
GetSupportedLanguagesRequest message or plain object |
callback |
google.cloud.translation.v3beta1.TranslationService.GetSupportedLanguagesCallback |
Node-style callback called with the error, if any, and SupportedLanguages |
Returns:
Type | Description |
---|---|
undefined |
getSupportedLanguages(request) → {Promise.<google.cloud.translation.v3beta1.SupportedLanguages>}
Calls GetSupportedLanguages.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.IGetSupportedLanguagesRequest |
GetSupportedLanguagesRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.translation.v3beta1.SupportedLanguages> |
Promise |
listGlossaries(request, callback) → {undefined}
Calls ListGlossaries.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.IListGlossariesRequest |
ListGlossariesRequest message or plain object |
callback |
google.cloud.translation.v3beta1.TranslationService.ListGlossariesCallback |
Node-style callback called with the error, if any, and ListGlossariesResponse |
Returns:
Type | Description |
---|---|
undefined |
listGlossaries(request) → {Promise.<google.cloud.translation.v3beta1.ListGlossariesResponse>}
Calls ListGlossaries.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.IListGlossariesRequest |
ListGlossariesRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.translation.v3beta1.ListGlossariesResponse> |
Promise |
translateDocument(request, callback) → {undefined}
Calls TranslateDocument.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.ITranslateDocumentRequest |
TranslateDocumentRequest message or plain object |
callback |
google.cloud.translation.v3beta1.TranslationService.TranslateDocumentCallback |
Node-style callback called with the error, if any, and TranslateDocumentResponse |
Returns:
Type | Description |
---|---|
undefined |
translateDocument(request) → {Promise.<google.cloud.translation.v3beta1.TranslateDocumentResponse>}
Calls TranslateDocument.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.ITranslateDocumentRequest |
TranslateDocumentRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.translation.v3beta1.TranslateDocumentResponse> |
Promise |
translateText(request, callback) → {undefined}
Calls TranslateText.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.ITranslateTextRequest |
TranslateTextRequest message or plain object |
callback |
google.cloud.translation.v3beta1.TranslationService.TranslateTextCallback |
Node-style callback called with the error, if any, and TranslateTextResponse |
Returns:
Type | Description |
---|---|
undefined |
translateText(request) → {Promise.<google.cloud.translation.v3beta1.TranslateTextResponse>}
Calls TranslateText.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.translation.v3beta1.ITranslateTextRequest |
TranslateTextRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.translation.v3beta1.TranslateTextResponse> |
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
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 |
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 |
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 |
DetectLanguageCallback(error, responseopt)
Callback as used by detectLanguage.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.translation.v3beta1.DetectLanguageResponse |
<optional> |
DetectLanguageResponse |
GetGlossaryCallback(error, responseopt)
Callback as used by getGlossary.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.translation.v3beta1.Glossary |
<optional> |
Glossary |
GetSupportedLanguagesCallback(error, responseopt)
Callback as used by getSupportedLanguages.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.translation.v3beta1.SupportedLanguages |
<optional> |
SupportedLanguages |
ListGlossariesCallback(error, responseopt)
Callback as used by listGlossaries.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.translation.v3beta1.ListGlossariesResponse |
<optional> |
ListGlossariesResponse |
TranslateDocumentCallback(error, responseopt)
Callback as used by translateDocument.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.translation.v3beta1.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.v3beta1.TranslateTextResponse |
<optional> |
TranslateTextResponse |